Last active
May 16, 2019 17:53
-
-
Save anuraghazra/2de1047455896966a83e2e68a4842f7c to your computer and use it in GitHub Desktop.
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
let box = new Entity(100); | |
// x, y, vx, vy added random velocity in first dot to make the box rotate a little bit | |
box.addDot(100, 100, (Math.random() - 0.5) * 100.0); | |
box.addDot(200, 100); | |
box.addDot(200, 200); | |
box.addDot(100, 200); | |
box.addStick(0, 1); | |
box.addStick(1, 2); | |
box.addStick(2, 3); | |
box.addStick(3, 0); | |
box.addStick(3, 1); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment