Skip to content

Ball.js is a Javascript class that handles physics interactions between balls (i.e. collisions) on a flat area as well as rendering.

License

Notifications You must be signed in to change notification settings

topheman/Ball.js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

#Ball.js

v1.0

Ball.js is a Javascript class that handles physics interactions between balls on a flat area (i.e. collisions) as well as rendering. You can render in canvas mode as well as in html mode. You have a bunch of display effects such as glowing, blinking, exploding (changing the radius, color, alpha) ...

I made an HTML5/Javascript game based on this class. You can see it in action on Topheman Bombs

You can see the examples live (source code on github repository)

This class could be used in all kinds of animations and games such as pool billard or air hockey ...

##See Ball.js API

##Files to include : To use Ball.js, you only have to include Vector2D.js (a js implementation of the java class) and my own class : Ball.js :

<script src="../Vector2D.js" type="text/javascript"></script>
<script src="../Ball.js" type="text/javascript"></script>

##Improvements todo :

  • Include Vector2D inside Ball.js to optimize garbage collection

copyright © 2012 Christophe Rosset (Topheman), released under MIT LICENSE

About

Ball.js is a Javascript class that handles physics interactions between balls (i.e. collisions) on a flat area as well as rendering.

Resources

License

Stars

Watchers

Forks

Packages

No packages published