Skip to content

Instantly share code, notes, and snippets.

@ahvonenj
Last active August 29, 2015 14:25
Show Gist options
  • Save ahvonenj/7ce6d7a67932296d92d8 to your computer and use it in GitHub Desktop.
Save ahvonenj/7ce6d7a67932296d92d8 to your computer and use it in GitHub Desktop.
Sine heart
this.position = Victor.fromObject(
{
x: self.vpc.x + Math.cos(time * 0.002) * self.helpers.sineBetween(10, 250, time * 0.002),
y: self.vpc.y + Math.sin(time * 0.002) * self.helpers.sineBetween(-100, 250, time * 0.002)
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment