Ball Pit

Balls bouncing around on a two-dimensional plane

建立方法 Web Workers, Canvas,

  • 181 次观看
  • 0 个评论

有关此演示作者的更多信息

This demo demonstrates one very basic way that web workers can be used for simulating physics.

Use tips:try adding 10-100 at a time by entering the number of balls you want to add in the textbox at the top, then click "Add". Also: try resizing the window or zooming in/out.

This demo uses a worker to track ball location and a worker nested in the worker that tracks ball location to detect collisions (for this reason, my demo will not work in chrome/webkit - see:http://code.google.com/p/chromium/issues/detail?id=31666).

还没有评论。

登录后添加您自己的。

关于此演示

下载源代码 10.63 KB · ZIP 格式

此演示发布于 GPL 授权之下。