User prompt
in rightBoard introduce the use of move() event handler to make swipe more fluid (remove tween if necessary)
User prompt
in rightBoard introduce the use of move event to make swipe more fluid (remove tween if necessary)
Code edit (9 edits merged)
Please save this source code
User prompt
move the button swipe logic in RightBoard instead of Generatot buttons
Code edit (7 edits merged)
Please save this source code
User prompt
in GeneratorButton down and up events, don't use a local startY per instance but a unique global one
Code edit (1 edits merged)
Please save this source code
User prompt
now in RightBoard.swipe, don't prevent movement if firstButtonNewY < 1366 / 2 or lastButtonNewY > 1366 but limit detlaY to reach the boundary
User prompt
in RightBoard.swipe, use tween to make buttons movement smooth ↪💡 Consider importing and using the following plugins: @upit/tween.v1
Code edit (1 edits merged)
Please save this source code
Code edit (2 edits merged)
Please save this source code
User prompt
restrict generatorButtons swipe by pre-calculating the new position of first button (0) and last button. Only move all buttons if 1st one stays above screen center and Last one stays under the screen center.
User prompt
restrict generatorButtons swipe like that : - first button (0) should not move under the screen center - last button should not move above the screen center
Code edit (1 edits merged)
Please save this source code
User prompt
now in RightBoard.swipe(); move all the generator Buttons vertically depending on the swipe direction.
Code edit (5 edits merged)
Please save this source code
User prompt
Please fix the bug: 'Cannot set properties of undefined (setting 'swipe')' in or related to this line: 'self.swipe = function (deltaX, deltaY) {' Line Number: 1076
User prompt
Please fix the bug: 'Cannot set properties of undefined (setting 'swipe')' in or related to this line: 'self.swipe = function (deltaX, deltaY) {' Line Number: 1076
User prompt
Please fix the bug: 'Cannot set properties of undefined (setting 'swipe')' in or related to this line: 'self.swipe = function (deltaX, deltaY) {' Line Number: 1076
User prompt
Please fix the bug: 'Cannot set properties of undefined (setting 'swipe')' in or related to this line: 'self.swipe = function (deltaX, deltaY) {' Line Number: 1076
User prompt
Please fix the bug: 'Cannot set properties of undefined (setting 'swipe')' in or related to this line: 'self.swipe = function (deltaX, deltaY) {' Line Number: 1072
User prompt
OK. now on swipe, call a new function swipe() in RightBoard and the delta to it
User prompt
in GeneratorButton down event, differentiate between tap and swipe
Code edit (1 edits merged)
Please save this source code
User prompt
in the same way update : ``` rightBoard.generatorButtons[generatorId].children.forEach(function (child) { if (child instanceof Text2 && child.text !== generatorConfig.cost.toString()) { child.setText(self.generatorCounts[generatorId].toString()); } }); ``` for countText
===================================================================
--- original.js
+++ change.js
@@ -561,23 +561,24 @@
self.handleSwipe(y - globalStartY);
}
};
// Add any additional functionality or properties for rightBoard here
- self.handleSwipe = function (deltaY) {
- log("Swipe detected with deltaY:", deltaY);
- // Calculate new positions for the first and last buttons
+ self.move = function (x, y, obj) {
+ var deltaY = y - globalStartY; // Calculate deltaY based on movement
+ log("Move detected with deltaY:", deltaY);
+ // Calculate new positions for the first and last buttons
var firstButtonNewY = self.y + self.generatorButtons[0].y + deltaY;
var lastButtonNewY = self.y + self.generatorButtons[self.generatorButtons.length - 1].y + deltaY;
log("firstButtonNewY:", firstButtonNewY, "lastButtonNewY:", lastButtonNewY);
- // Check if the first button stays above the screen center and the last button stays below the screen center
- // Adjust deltaY to prevent moving beyond boundaries
+ // Check if the first button stays above the screen center and the last button stays below the screen center
+ // Adjust deltaY to prevent moving beyond boundaries
if (deltaY > 0) {
deltaY = Math.min(deltaY, 1000 - (self.y + self.generatorButtons[0].y));
}
if (deltaY < 0) {
deltaY = Math.max(deltaY, 1366 - (self.y + self.generatorButtons[self.generatorButtons.length - 1].y));
}
- // Move all generator buttons vertically based on swipe direction with tween
+ // Move all generator buttons vertically based on swipe direction
self.generatorButtons.forEach(function (button) {
button.y += deltaY;
});
};
a big lovely heart
a big stone heart
a big used copper heart
face view of a big bronze heart
face view of a big silver heart
Big shining gold heart verly slightly ornate. face view.
Big precious shiny porcelain heart slightly ornate. face view.
Large precious heart in mother-of-pearl, lightly ornate. Front view.
Large heart in precious ruby, very lightly decorated. Front view.
The most precious large heart in diamond, Front view.
clean pink enamel board witha very thin border
beautifull red gift box.
black plastic 3d triangle. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows
reset button. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows