User prompt
Only allow bounce back to be set to false if the screen has not been touched for more than 1 second
User prompt
Only allow squares to bounce back to their original position of the screen has not been touched for more than 1 secound
User prompt
Only bounce back squares if the screen has not been touched for more than one second
User prompt
Change the bounce back threshold from .25 to .025
User prompt
Use a single method for move and drag
User prompt
Multiply bounce back x and y with .92
User prompt
Multiply bounce back x and y with .94
User prompt
When setting bounce back to false decrease the threshold values from 1 to .25
User prompt
Make the squares take longer to bounce back
User prompt
The same effect as tapping should be applied when you drag your finger around the screeb
User prompt
Make squares have a random scale between 1 and 2
User prompt
Scale the boxes based on their x and y position after setting rotation
User prompt
Make all boxes rotate around their center
User prompt
After setting the x and y position on newly created boxes. Set the rotation of the boxes to a value relative to the x and y
User prompt
When creating the squares give them an initial rotation based on their x and y
User prompt
The x and y position of the square should act as an fixed offset on their rotation
User prompt
X and y should have a fixed impact on rotation rather than being added every tick
User prompt
Factor in square x and y in rotation of squares
User prompt
Make rotation speed based on x and y position
User prompt
Increase the the tap effect with 50%
User prompt
Make square start with a random rotation
User prompt
Square should accelerate back to their original position
User prompt
Make tapping the screen be aggressive
User prompt
Make squares slowly move back to their original position
User prompt
After being pushed out of the way, squares should bounce back to where they started
===================================================================
--- original.js
+++ change.js
@@ -32,9 +32,9 @@
for (var i = 0; i < spinningSquares.length; i++) {
var dx = spinningSquares[i].x - pos.x;
var dy = spinningSquares[i].y - pos.y;
var distance = Math.sqrt(dx * dx + dy * dy);
- if (distance < 200 && LK.ticks - lastTouchTime > 60) {
+ if (distance < 200) {
spinningSquares[i].bounceBack = true;
spinningSquares[i].bounceBackX = dx * 1.5;
spinningSquares[i].bounceBackY = dy * 1.5;
}
@@ -50,9 +50,11 @@
spinningSquares[i].y += spinningSquares[i].bounceBackY * 0.1;
spinningSquares[i].bounceBackX *= 0.9;
spinningSquares[i].bounceBackY *= 0.9;
if (Math.abs(spinningSquares[i].bounceBackX) < .025 && Math.abs(spinningSquares[i].bounceBackY) < .025) {
- spinningSquares[i].bounceBack = false;
+ if (LK.ticks - lastTouchTime > 60) {
+ spinningSquares[i].bounceBack = false;
+ }
}
}
if (!spinningSquares[i].bounceBack) {
var dx = spinningSquares[i].originalX - spinningSquares[i].x;