cherche / physics-test

Playing with JavaScript to create a physics test for no reason at all.

Home Page:https://cherche.github.io/physics-test/

Repository from Github https://github.comcherche/physics-testRepository from Github https://github.comcherche/physics-test

physics-test

Playing with JavaScript to create a physics test for no reason at all.

Fun

The variable ball is accessible in the global scope. You can use it to mess around with its acceleration, velocity, and position.

ball.acc.set.add([1000, -50])
// Acceleration is now [1000, -50]

ball.vel.set.scale(2)
// Velocity has been doubled

ball.dis.set([100, 100])
// Position is [100, 100],
// relative to top-left of viewport

About

Playing with JavaScript to create a physics test for no reason at all.

https://cherche.github.io/physics-test/

License:MIT License


Languages

Language:JavaScript 84.9%Language:HTML 9.5%Language:CSS 5.5%