X-Git-Url: https://gitweb.ps.run/cloth_sim/blobdiff_plain/323d38f395da1cae25ba629d3365c37c30f53fdf..999a549825d3de0b53e2922462ed1e120e176ec2:/Scripts/main.js?ds=sidebyside diff --git a/Scripts/main.js b/Scripts/main.js index d54aa9f..3353f4d 100644 --- a/Scripts/main.js +++ b/Scripts/main.js @@ -98,7 +98,9 @@ function init() { * @param {number} dt - time passed since last frame in ms */ function animate(dt) { - // simulate cloth + cloth.simulate(dt / 1000); + + cloth.updateGeometry(clothGeometry); raycaster.setFromCamera( new THREE.Vector2((mousePos.x / w) * 2 - 1, ((h - mousePos.y) / h) * 2 - 1), camera );