Code edit (6 edits merged)
Please save this source code
User prompt
without changing anything else, make players scale change progressive
Code edit (1 edits merged)
Please save this source code
User prompt
hide shadow when ball is hidden
Code edit (1 edits merged)
Please save this source code
User prompt
in initShadows, ball shadow should be placed before players also
Code edit (6 edits merged)
Please save this source code
User prompt
now add a new function : updateShadows (to update position and size of ballShadow., player1Shadow and player2Shadow
User prompt
inside initShadows, use game.addChildAt to place shadows just before players and ball
Code edit (9 edits merged)
Please save this source code
User prompt
in initShadows, use PLAYER1_INITIAL_X, PLAYER2_INITIAL_X... to place ball and players shadows (shdows are always on the ground)
Code edit (1 edits merged)
Please save this source code
Code edit (18 edits merged)
Please save this source code
User prompt
place beachBallShadow z-index, just before beachBall
Code edit (1 edits merged)
Please save this source code
Code edit (1 edits merged)
Please save this source code
Code edit (11 edits merged)
Please save this source code
User prompt
call initShadows at the end of gameInitialize
User prompt
inside initShadows, add all shadows to the game
User prompt
in initShadows, add 2 locals parasolShadow and chairShadow
User prompt
create 3 globals : ballShadow, player1Shadow, player2Shadow and a new function initShadows
Code edit (4 edits merged)
Please save this source code
User prompt
add the parasol to the game (respect coding style)
Code edit (1 edits merged)
Please save this source code
Code edit (5 edits merged)
Please save this source code
===================================================================
--- original.js
+++ change.js
@@ -578,18 +578,18 @@
player1Shadow.x = PLAYER1_INITIAL_X;
player1Shadow.y = PLAYER_INITIAL_Y;
player2Shadow.x = PLAYER2_INITIAL_X;
player2Shadow.y = PLAYER_INITIAL_Y;
- game.addChildAt(ballShadow, game.children.indexOf(player1));
- game.addChildAt(player1Shadow, game.children.indexOf(player1) + 1);
- game.addChildAt(player2Shadow, game.children.indexOf(player2) + 1);
+ game.addChildAt(ballShadow, game.children.indexOf(ball));
+ game.addChildAt(player1Shadow, game.children.indexOf(player1));
+ game.addChildAt(player2Shadow, game.children.indexOf(player2));
game.addChild(parasolShadow);
}
function updateShadows() {
// Update ball shadow position and size
ballShadow.x = ball.x;
- ballShadow.scale.x = 2.2 * (1 + (ball.y - PLAYER_INITIAL_Y) / 2500);
- ballShadow.scale.y = 0.6 * (1 + (ball.y - PLAYER_INITIAL_Y) / 2500);
+ ballShadow.scale.x = 2.2 * (1 + (ball.y - PLAYER_INITIAL_Y) / 3000);
+ ballShadow.scale.y = 0.6 * (1 + (ball.y - PLAYER_INITIAL_Y) / 3000);
// Update player1 shadow position and size
player1Shadow.x = player1.x;
player1Shadow.scale.x = 2.7 * (1 + (player1.y - PLAYER_INITIAL_Y) / 1500);
player1Shadow.scale.y = 0.7 * (1 + (player1.y - PLAYER_INITIAL_Y) / 1500);
white volley ball.
top view of a concave blue (0xADD8E6) plastic button. 4 small black directionnal chevrons engraved : right, left, top , bottom.. Photorealistic
Beach ball. photo
full view of a Beach white towel with colored infinte logo. placed on the sand. photo
Start button in the shape of a white beach volleyball with « START » written on it in black. Photo