diff options
| author | patrick-scho | 2025-04-17 22:22:14 +0200 |
|---|---|---|
| committer | patrick-scho | 2025-04-17 22:22:14 +0200 |
| commit | 959c350fb8cddf7d1b31907fcc1f7f99dad52f3e (patch) | |
| tree | ce2f5e05082aa0536bad3d87dce424a3d3b2db93 | |
| parent | f97f4ee25759ffaa6a4d4709f45fc8b7b5b24973 (diff) | |
| download | cloth_sim-959c350fb8cddf7d1b31907fcc1f7f99dad52f3e.tar.gz cloth_sim-959c350fb8cddf7d1b31907fcc1f7f99dad52f3e.zip | |
| -rw-r--r-- | 3D-Models/3D-Models.txt | 0 | ||||
| -rw-r--r-- | Paper and Presentation/Cloth_simulation_Paper.pdf | bin | 615566 -> 0 bytes | |||
| -rw-r--r-- | img/hsrm.jpg (renamed from Textures/hsrm.jpg) | bin | 22589 -> 22589 bytes | |||
| -rw-r--r-- | img/hsrm.png (renamed from Textures/hsrm.png) | bin | 10172 -> 10172 bytes | |||
| -rw-r--r-- | img/hsrm2.png (renamed from Textures/hsrm2.png) | bin | 36221 -> 36221 bytes | |||
| -rw-r--r-- | img/tears_of_steel_bridge_2k.jpg (renamed from Textures/tears_of_steel_bridge_2k.jpg) | bin | 371116 -> 371116 bytes | |||
| -rw-r--r-- | index.html | 8 | ||||
| -rw-r--r-- | js/OrbitControls.js (renamed from Scripts/OrbitControls.js) | 0 | ||||
| -rw-r--r-- | js/Script.txt (renamed from Scripts/Script.txt) | 0 | ||||
| -rw-r--r-- | js/_cloth.js (renamed from Scripts/_cloth.js) | 0 | ||||
| -rw-r--r-- | js/_main.js (renamed from Scripts/_main.js) | 0 | ||||
| -rw-r--r-- | js/cloth.js (renamed from Scripts/cloth.js) | 2 | ||||
| -rw-r--r-- | js/main.js (renamed from Scripts/main.js) | 4 | ||||
| -rw-r--r-- | js/three.js (renamed from Scripts/three.js) | 0 | ||||
| -rw-r--r-- | js/three.module.js (renamed from Scripts/three.module.js) | 0 | ||||
| -rw-r--r-- | pdf/Cloth_simulation_Presentation.pdf (renamed from Paper and Presentation/Cloth_simulation_Presentation.pdf) | bin | 1096616 -> 1096616 bytes |
16 files changed, 7 insertions, 7 deletions
diff --git a/3D-Models/3D-Models.txt b/3D-Models/3D-Models.txt deleted file mode 100644 index e69de29..0000000 --- a/3D-Models/3D-Models.txt +++ /dev/null diff --git a/Paper and Presentation/Cloth_simulation_Paper.pdf b/Paper and Presentation/Cloth_simulation_Paper.pdf Binary files differdeleted file mode 100644 index 84dc1b9..0000000 --- a/Paper and Presentation/Cloth_simulation_Paper.pdf +++ /dev/null diff --git a/Textures/hsrm.jpg b/img/hsrm.jpg Binary files differindex fddffd8..fddffd8 100644 --- a/Textures/hsrm.jpg +++ b/img/hsrm.jpg diff --git a/Textures/hsrm.png b/img/hsrm.png Binary files differindex 8945965..8945965 100644 --- a/Textures/hsrm.png +++ b/img/hsrm.png diff --git a/Textures/hsrm2.png b/img/hsrm2.png Binary files differindex 6b83d6b..6b83d6b 100644 --- a/Textures/hsrm2.png +++ b/img/hsrm2.png diff --git a/Textures/tears_of_steel_bridge_2k.jpg b/img/tears_of_steel_bridge_2k.jpg Binary files differindex bf311a3..bf311a3 100644 --- a/Textures/tears_of_steel_bridge_2k.jpg +++ b/img/tears_of_steel_bridge_2k.jpg @@ -9,14 +9,14 @@ margin: 0;
}
</style>
- <script src="./Scripts/three.js"></script>
- <script src="./Scripts/OrbitControls.js"></script>
+ <script src="/projects/cloth/js/three.js"></script>
+ <script src="/projects/cloth/js/OrbitControls.js"></script>
</script>
</head>
<body>
- <script src="./Scripts/cloth.js"></script>
- <script src="./Scripts/main.js"></script>
+ <script src="/projects/cloth/js/cloth.js"></script>
+ <script src="/projects/cloth/js/main.js"></script>
<div id="threejscontainer"></div>
<div id="Output"></div>
diff --git a/Scripts/OrbitControls.js b/js/OrbitControls.js index 54a09ef..54a09ef 100644 --- a/Scripts/OrbitControls.js +++ b/js/OrbitControls.js diff --git a/Scripts/Script.txt b/js/Script.txt index e69de29..e69de29 100644 --- a/Scripts/Script.txt +++ b/js/Script.txt diff --git a/Scripts/_cloth.js b/js/_cloth.js index 546f7d3..546f7d3 100644 --- a/Scripts/_cloth.js +++ b/js/_cloth.js diff --git a/Scripts/_main.js b/js/_main.js index fc797c8..fc797c8 100644 --- a/Scripts/_main.js +++ b/js/_main.js diff --git a/Scripts/cloth.js b/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 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 index 7b0e892..7b0e892 100644 --- a/Scripts/three.js +++ b/js/three.js diff --git a/Scripts/three.module.js b/js/three.module.js index a499d33..a499d33 100644 --- a/Scripts/three.module.js +++ b/js/three.module.js diff --git a/Paper and Presentation/Cloth_simulation_Presentation.pdf b/pdf/Cloth_simulation_Presentation.pdf Binary files differindex 06cc45e..06cc45e 100644 --- a/Paper and Presentation/Cloth_simulation_Presentation.pdf +++ b/pdf/Cloth_simulation_Presentation.pdf |
