# replace lines 6 to 20 in scripts/strings.js with this | |
var ROPE_LENGTH = 0.04; // the equilibirum length of each rope | |
var ROPE_LENGTH_SQ = ROPE_LENGTH * ROPE_LENGTH; // square of the rope length | |
var ROPE_SPACING = 0.04; // initial horizontal distance between vertices | |
var ROPE_MASS = 0.00003; // Mass per length of rope (actually the mass of vertices) | |
function isPaused() { | |
return game.paused || game.drawmode; | |
} | |
// Start | |
function init(){ | |
for (var i=0; i<200; i++) { | |
createVertex(ROPE_SPACING * i, 0, false); | |
} | |
points[0].fixed = true; | |
points[points.length-1].fixed = true; | |
for (var i=0; i<199; i++) { | |
joinVertices(i, i + 1); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment