diff options
| author | Patrick Schönberger | 2021-01-22 14:10:23 +0100 |
|---|---|---|
| committer | Patrick Schönberger | 2021-01-22 14:10:58 +0100 |
| commit | 14881afe547086f68764e27bd65c794b21271c63 (patch) | |
| tree | 2a2438a811dd240fda696cdc1dbade365cceb9e6 /Scripts/main.js | |
| parent | a30256db1a628e1fd7f9a1537bebb9bdea8f3719 (diff) | |
| download | cloth_sim-14881afe547086f68764e27bd65c794b21271c63.tar.gz cloth_sim-14881afe547086f68764e27bd65c794b21271c63.zip | |
correct units, tweak parameters
Diffstat (limited to 'Scripts/main.js')
| -rw-r--r-- | Scripts/main.js | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/Scripts/main.js b/Scripts/main.js index ececd6a..8c61f82 100644 --- a/Scripts/main.js +++ b/Scripts/main.js @@ -1,6 +1,14 @@ import { Face, Spring, Cloth } from './cloth.js';
+/**
+ * rendering
+ * Einheiten konsistent
+ * Wind
+ * evtl. an Stoff ziehen
+ */
+
+
class Point {
constructor(x, y) {
this.x = x;
@@ -87,10 +95,10 @@ function init() { /**
* function called every frame
- * @param {number} dt - time passed since last frame
+ * @param {number} dt - time passed since last frame in ms
*/
function animate(dt) {
- cloth.simulate(dt);
+ cloth.simulate(dt/1000);
setTimeout(() => {
animate(frameTime);
|
