$conf, $runtime; function_exists('chdir') AND chdir(APP_PATH); $r = 'mysql' == $conf['cache']['type'] ? website_set('runtime', $runtime) : cache_set('runtime', $runtime); } function runtime_truncate() { global $conf; 'mysql' == $conf['cache']['type'] ? website_set('runtime', '') : cache_delete('runtime'); } register_shutdown_function('runtime_save'); ?>plugins - Canvas | Bouncing balls within a container (with gravity and collisions and background-images on the balls)|Programmer puzzle solving
最新消息:Welcome to the puzzle paradise for programmers! Here, a well-designed puzzle awaits you. From code logic puzzles to algorithmic challenges, each level is closely centered on the programmer's expertise and skills. Whether you're a novice programmer or an experienced tech guru, you'll find your own challenges on this site. In the process of solving puzzles, you can not only exercise your thinking skills, but also deepen your understanding and application of programming knowledge. Come to start this puzzle journey full of wisdom and challenges, with many programmers to compete with each other and show your programming wisdom! Translated with DeepL.com (free version)

plugins - Canvas | Bouncing balls within a container (with gravity and collisions and background-images on the balls)

matteradmin8PV0评论

I am really struggling to find some code that will help me create a canvas (will be positioned absolutely behind an element so I don't require any input from users) that I am able to place background images on balls (predetermined number of balls '10'). The balls need to bounce off the walls and each other while under the effect of gravity, eventually having the balls settle stacked up stationary is the dream.

Can anyone help me with this? Either using a WordPress free plug-in or direct me to some open source code that does this?

I have been through hundreds of articles and examples of code but none seem to apply to my use-case.

I appreciate this is quite a code heavy question failing the plug-in approach, however I am unable to write questions on stack-overflow even though I don't have any questions with a negative score (think the algorithm is broken for my account.)

Thanks, Jason.

I am really struggling to find some code that will help me create a canvas (will be positioned absolutely behind an element so I don't require any input from users) that I am able to place background images on balls (predetermined number of balls '10'). The balls need to bounce off the walls and each other while under the effect of gravity, eventually having the balls settle stacked up stationary is the dream.

Can anyone help me with this? Either using a WordPress free plug-in or direct me to some open source code that does this?

I have been through hundreds of articles and examples of code but none seem to apply to my use-case.

I appreciate this is quite a code heavy question failing the plug-in approach, however I am unable to write questions on stack-overflow even though I don't have any questions with a negative score (think the algorithm is broken for my account.)

Thanks, Jason.

Share Improve this question edited Feb 25, 2019 at 10:56 fuxia 107k39 gold badges255 silver badges461 bronze badges asked Feb 25, 2019 at 10:08 Jason Is My NameJason Is My Name 3782 gold badges7 silver badges21 bronze badges
Add a comment  | 

1 Answer 1

Reset to default 1

This is not related to WordPress. Maybe your Question would get better answers at other more javasript related stack exchanges.

Anyways: I searched for "bouncing balls" at codepen and found this piece. I guess adding background images would be no problem with this as a foundation.

Post a comment

comment list (0)

  1. No comments so far