diff options
| author | Patrick Schönberger | 2021-02-06 13:43:39 +0100 |
|---|---|---|
| committer | Patrick Schönberger | 2021-02-06 13:43:39 +0100 |
| commit | 8199b09231f15b0f84480656a0e92827d795fcdc (patch) | |
| tree | c036ca2fc69f3216b926eb553da3f950d68d32c3 /Scripts/main.js | |
| parent | 56f6324db4aa55946a6b5ef7de3e1df8b0e22bca (diff) | |
| download | cloth_sim-8199b09231f15b0f84480656a0e92827d795fcdc.tar.gz cloth_sim-8199b09231f15b0f84480656a0e92827d795fcdc.zip | |
add cloth-cloth collision
Diffstat (limited to 'Scripts/main.js')
| -rw-r--r-- | Scripts/main.js | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/Scripts/main.js b/Scripts/main.js index 7611601..6fa9f22 100644 --- a/Scripts/main.js +++ b/Scripts/main.js @@ -83,13 +83,17 @@ function init() { //const loader = new THREE.TextureLoader();
//Red color: 0xC70039
- const cloth = new Cloth(1, 0.5, 40, 20);
+ const cloth = new Cloth(1, 0.5, 20, 20);
const clothGeometry = cloth.generateGeometry();
//const clothMaterial = new THREE.MeshStandardMaterial({ map: loader.load('Textures/DeutschlandFlagge.jpg'), 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);
+ document.getElementById("windToggle").onchange = (e) => {
+ options.wind = e.target.checked;
+ };
+
let raycaster = new THREE.Raycaster();
let intersects;
let rightMousePressed;
|
