]> gitweb.ps.run Git - cloth_sim/commitdiff
restructure main
authorpatrick-scho <patrick.schoenberger@posteo.de>
Thu, 17 Apr 2025 20:22:14 +0000 (22:22 +0200)
committerpatrick-scho <patrick.schoenberger@posteo.de>
Thu, 17 Apr 2025 20:22:14 +0000 (22:22 +0200)
16 files changed:
3D-Models/3D-Models.txt [deleted file]
Paper and Presentation/Cloth_simulation_Paper.pdf [deleted file]
img/hsrm.jpg [moved from Textures/hsrm.jpg with 100% similarity]
img/hsrm.png [moved from Textures/hsrm.png with 100% similarity]
img/hsrm2.png [moved from Textures/hsrm2.png with 100% similarity]
img/tears_of_steel_bridge_2k.jpg [moved from Textures/tears_of_steel_bridge_2k.jpg with 100% similarity]
index.html
js/OrbitControls.js [moved from Scripts/OrbitControls.js with 100% similarity]
js/Script.txt [moved from Scripts/Script.txt with 100% similarity]
js/_cloth.js [moved from Scripts/_cloth.js with 100% similarity]
js/_main.js [moved from Scripts/_main.js with 100% similarity]
js/cloth.js [moved from Scripts/cloth.js with 96% similarity]
js/main.js [moved from Scripts/main.js with 93% similarity]
js/three.js [moved from Scripts/three.js with 100% similarity]
js/three.module.js [moved from Scripts/three.module.js with 100% similarity]
pdf/Cloth_simulation_Presentation.pdf [moved from Paper and Presentation/Cloth_simulation_Presentation.pdf with 100% similarity]

diff --git a/3D-Models/3D-Models.txt b/3D-Models/3D-Models.txt
deleted file mode 100644 (file)
index e69de29..0000000
diff --git a/Paper and Presentation/Cloth_simulation_Paper.pdf b/Paper and Presentation/Cloth_simulation_Paper.pdf
deleted file mode 100644 (file)
index 84dc1b9..0000000
Binary files a/Paper and Presentation/Cloth_simulation_Paper.pdf and /dev/null differ
similarity index 100%
rename from Textures/hsrm.jpg
rename to img/hsrm.jpg
similarity index 100%
rename from Textures/hsrm.png
rename to img/hsrm.png
similarity index 100%
rename from Textures/hsrm2.png
rename to img/hsrm2.png
index de3e51b6e17ceb93cc46793a4f9f49337e4f8b82..a1d596263ffe8c6a7894c83c1baa12b135d5ef7f 100644 (file)
@@ -9,14 +9,14 @@
                        margin: 0;\r
                }\r
        </style>\r
-       <script src="./Scripts/three.js"></script>\r
-       <script src="./Scripts/OrbitControls.js"></script>\r
+       <script src="/projects/cloth/js/three.js"></script>\r
+       <script src="/projects/cloth/js/OrbitControls.js"></script>\r
        </script>\r
 </head>\r
 \r
 <body>\r
-       <script src="./Scripts/cloth.js"></script>\r
-       <script src="./Scripts/main.js"></script>\r
+       <script src="/projects/cloth/js/cloth.js"></script>\r
+       <script src="/projects/cloth/js/main.js"></script>\r
 \r
        <div id="threejscontainer"></div>\r
        <div id="Output"></div>\r
similarity index 100%
rename from Scripts/OrbitControls.js
rename to js/OrbitControls.js
similarity index 100%
rename from Scripts/Script.txt
rename to js/Script.txt
similarity index 100%
rename from Scripts/_cloth.js
rename to js/_cloth.js
similarity index 100%
rename from Scripts/_main.js
rename to js/_main.js
similarity index 96%
rename from Scripts/cloth.js
rename to js/cloth.js
index 712ed63a7250971788ab0424bba30bd9a0490003..bd13951e4c8b940d28ea70b4c194dcd290eb92d8 100644 (file)
@@ -289,7 +289,7 @@ class Cloth {
   blow(camPos, intersects) {\r
     let face = intersects[0].face;\r
     /** vector from cam to intersection (wind) */\r
-    let dir = intersects[0].point.clone().sub(camPos).multiplyScalar(100);\r
+    let dir = intersects[0].point.clone().sub(camPos).multiplyScalar(50);\r
     /** apply to all vertices of affected face */\r
     this.masses[face.a].addForce(dir);\r
     this.masses[face.b].addForce(dir);\r
similarity index 93%
rename from Scripts/main.js
rename to js/main.js
index 1a30f7a9db2cc3c240631e90e03d8505e0a00c15..64900d3c9002e37e9a09bd02586e2ea683c3a1ab 100644 (file)
@@ -37,7 +37,7 @@ function setup_scene(canvasSpace) {
   /** add scene background */\r
   const loader = new THREE.TextureLoader();\r
   const texture = loader.load(\r
-    'Textures/tears_of_steel_bridge_2k.jpg',\r
+    '/projects/cloth/img/tears_of_steel_bridge_2k.jpg',\r
     () => {\r
       const rt = new THREE.WebGLCubeRenderTarget(texture.image.height);\r
       rt.fromEquirectangularTexture(renderer, texture);\r
@@ -85,7 +85,7 @@ function init() {
   /** Create cloth and generate mesh */\r
   const cloth = new Cloth(1, 0.5, 20, 20);\r
   const clothGeometry = cloth.generateGeometry();\r
-  const clothMaterial = new THREE.MeshStandardMaterial({ map: loader.load('Textures/hsrm2.png'), color: 0xffffff, side: THREE.DoubleSide, flatShading: false });\r
+  const clothMaterial = new THREE.MeshStandardMaterial({ map: loader.load('/projects/cloth/img/hsrm2.png'), color: 0xffffff, side: THREE.DoubleSide, flatShading: false });\r
   //const clothMaterial = new THREE.MeshStandardMaterial({ color: 0xC70039, side: THREE.DoubleSide, flatShading: false });\r
   const clothMesh = new THREE.Mesh(clothGeometry, clothMaterial);\r
   scene.add(clothMesh);\r
similarity index 100%
rename from Scripts/three.js
rename to js/three.js
similarity index 100%
rename from Scripts/three.module.js
rename to js/three.module.js