How to customize the path of plinko ball.

33 views
Skip to first unread message

Web Master

unread,
May 30, 2023, 10:38:57 PM5/30/23
to Developing Interactive Simulations in HTML5
Hello Everyone.
Hope you are doing well.
I have one question about the Plinko game.
For now I am going to customize path for the plinko ball.
But I dont know how to change the path.
If you know, Could you please let me know about that?
Have a nice day.
Best Regards.

cmalley

unread,
May 31, 2023, 9:56:44 AM5/31/23
to Developing Interactive Simulations in HTML5
I'm not certain what you mean by "path for the plinko ball".

If you mean the path that a ball follows as it falls, see Ball.js.  The 'for' loop at line 77 determines the path that a ball will follow through the pegs.  Method 'step' is called each time the simulation clock ticks, and this moves the ball.

If you mean the Path (scenery node) used to draw the ball, see BallNode.js. Each ball is currently drawn as a shaded sphere.

Chris Malley
PixelZoom, Inc.

Reply all
Reply to author
Forward
0 new messages