Last active
August 29, 2015 14:25
-
-
Save ahvonenj/51e99b449e07e5bf09f9 to your computer and use it in GitHub Desktop.
Sine ball
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
this.position = Victor.fromObject( | |
{ | |
x: self.vpc.x + Math.cos(time * 0.002) * self.helpers.sineBetween(-100, 100, time * 0.0002), | |
y: self.vpc.y + Math.sin(time * 0.002) * self.helpers.sineBetween(100, 100, time * 0.002) | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment