]> gitweb.ps.run Git - cloth_sim/blobdiff - Scripts/main.js
simulate
[cloth_sim] / Scripts / main.js
index d54aa9fc258ddc5e670268f519d3cfcb70eefe7c..3353f4dae854d6249718305dde58b21f33f97bee 100644 (file)
@@ -98,7 +98,9 @@ function init() {
    * @param {number} dt - time passed since last frame in ms\r
    */\r
   function animate(dt) {\r
-    // simulate cloth\r
+    cloth.simulate(dt / 1000);\r
+\r
+    cloth.updateGeometry(clothGeometry);\r
     \r
     raycaster.setFromCamera( new THREE.Vector2((mousePos.x / w) * 2 - 1, ((h - mousePos.y) / h) * 2 - 1), camera );\r
 \r