X-Git-Url: https://gitweb.ps.run/cloth_sim/blobdiff_plain/f97f4ee25759ffaa6a4d4709f45fc8b7b5b24973:/Scripts/main.js..959c350fb8cddf7d1b31907fcc1f7f99dad52f3e:/js/main.js 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);