From: patrick-scho Date: Thu, 17 Apr 2025 20:22:14 +0000 (+0200) Subject: restructure X-Git-Url: https://gitweb.ps.run/cloth_sim/commitdiff_plain/HEAD restructure --- diff --git a/3D-Models/3D-Models.txt b/3D-Models/3D-Models.txt deleted file mode 100644 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 index 84dc1b9..0000000 Binary files a/Paper and Presentation/Cloth_simulation_Paper.pdf and /dev/null differ diff --git a/Textures/hsrm.jpg b/img/hsrm.jpg similarity index 100% rename from Textures/hsrm.jpg rename to img/hsrm.jpg diff --git a/Textures/hsrm.png b/img/hsrm.png similarity index 100% rename from Textures/hsrm.png rename to img/hsrm.png diff --git a/Textures/hsrm2.png b/img/hsrm2.png similarity index 100% rename from Textures/hsrm2.png rename to img/hsrm2.png diff --git a/Textures/tears_of_steel_bridge_2k.jpg b/img/tears_of_steel_bridge_2k.jpg similarity index 100% rename from Textures/tears_of_steel_bridge_2k.jpg rename to img/tears_of_steel_bridge_2k.jpg diff --git a/index.html b/index.html index de3e51b..a1d5962 100644 --- a/index.html +++ b/index.html @@ -9,14 +9,14 @@ margin: 0; } - - + + - - + +
diff --git a/Scripts/OrbitControls.js b/js/OrbitControls.js similarity index 100% rename from Scripts/OrbitControls.js rename to js/OrbitControls.js diff --git a/Scripts/Script.txt b/js/Script.txt similarity index 100% rename from Scripts/Script.txt rename to js/Script.txt diff --git a/Scripts/_cloth.js b/js/_cloth.js similarity index 100% rename from Scripts/_cloth.js rename to js/_cloth.js diff --git a/Scripts/_main.js b/js/_main.js similarity index 100% rename from Scripts/_main.js rename to js/_main.js diff --git a/Scripts/cloth.js b/js/cloth.js similarity index 96% rename from Scripts/cloth.js rename to js/cloth.js index 712ed63..bd13951 100644 --- a/Scripts/cloth.js +++ b/js/cloth.js @@ -289,7 +289,7 @@ class Cloth { blow(camPos, intersects) { let face = intersects[0].face; /** vector from cam to intersection (wind) */ - let dir = intersects[0].point.clone().sub(camPos).multiplyScalar(100); + let dir = intersects[0].point.clone().sub(camPos).multiplyScalar(50); /** apply to all vertices of affected face */ this.masses[face.a].addForce(dir); this.masses[face.b].addForce(dir); diff --git a/Scripts/main.js b/js/main.js similarity index 93% rename from Scripts/main.js rename to js/main.js index 1a30f7a..64900d3 100644 --- a/Scripts/main.js +++ b/js/main.js @@ -37,7 +37,7 @@ function setup_scene(canvasSpace) { /** add scene background */ const loader = new THREE.TextureLoader(); const texture = loader.load( - 'Textures/tears_of_steel_bridge_2k.jpg', + '/projects/cloth/img/tears_of_steel_bridge_2k.jpg', () => { const rt = new THREE.WebGLCubeRenderTarget(texture.image.height); rt.fromEquirectangularTexture(renderer, texture); @@ -85,7 +85,7 @@ function init() { /** Create cloth and generate mesh */ const cloth = new Cloth(1, 0.5, 20, 20); const clothGeometry = cloth.generateGeometry(); - const clothMaterial = new THREE.MeshStandardMaterial({ map: loader.load('Textures/hsrm2.png'), color: 0xffffff, side: THREE.DoubleSide, flatShading: false }); + const clothMaterial = new THREE.MeshStandardMaterial({ map: loader.load('/projects/cloth/img/hsrm2.png'), color: 0xffffff, side: THREE.DoubleSide, flatShading: false }); //const clothMaterial = new THREE.MeshStandardMaterial({ color: 0xC70039, side: THREE.DoubleSide, flatShading: false }); const clothMesh = new THREE.Mesh(clothGeometry, clothMaterial); scene.add(clothMesh); diff --git a/Scripts/three.js b/js/three.js similarity index 100% rename from Scripts/three.js rename to js/three.js diff --git a/Scripts/three.module.js b/js/three.module.js similarity index 100% rename from Scripts/three.module.js rename to js/three.module.js diff --git a/Paper and Presentation/Cloth_simulation_Presentation.pdf b/pdf/Cloth_simulation_Presentation.pdf similarity index 100% rename from Paper and Presentation/Cloth_simulation_Presentation.pdf rename to pdf/Cloth_simulation_Presentation.pdf