Skip to content

ZKJGOLD/collision

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

collision

多个小球的碰撞

主要考虑小球与浏览器各个边的碰撞检测(注意小球本身的半径)。
给小球一个x轴,y轴方向的速度,碰撞之后速度取反,颜色改变(用随机数即可)。
还需注意当浏览器窗口改变时,小球边界检测改变。通过window.onresize.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages