diff options
| author | syuilo <syuilotan@yahoo.co.jp> | 2021-03-06 13:23:59 +0900 |
|---|---|---|
| committer | syuilo <syuilotan@yahoo.co.jp> | 2021-03-06 13:23:59 +0900 |
| commit | bca4e5f0faf45ab227bf64a4a6b8f3793c7a79c2 (patch) | |
| tree | 96d544f3b7b7493af9f14feaa21225564dae22bb /src/client/scripts | |
| parent | Improve usability (diff) | |
| download | sharkey-bca4e5f0faf45ab227bf64a4a6b8f3793c7a79c2.tar.gz sharkey-bca4e5f0faf45ab227bf64a4a6b8f3793c7a79c2.tar.bz2 sharkey-bca4e5f0faf45ab227bf64a4a6b8f3793c7a79c2.zip | |
refactor assets
Diffstat (limited to 'src/client/scripts')
| -rw-r--r-- | src/client/scripts/room/room.ts | 4 | ||||
| -rw-r--r-- | src/client/scripts/sound.ts | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/client/scripts/room/room.ts b/src/client/scripts/room/room.ts index 45ccd59b70..8fe3ebdeb0 100644 --- a/src/client/scripts/room/room.ts +++ b/src/client/scripts/room/room.ts @@ -340,7 +340,7 @@ export class Room { @autobind private loadRoom() { const type = this.roomInfo.roomType; - new GLTFLoader().load(`/assets/room/rooms/${type}/${type}.glb`, gltf => { + new GLTFLoader().load(`/static-assets/room/rooms/${type}/${type}.glb`, gltf => { gltf.scene.traverse(child => { if (!(child instanceof THREE.Mesh)) return; @@ -375,7 +375,7 @@ export class Room { const def = furnitureDefs.find(d => d.id === furniture.type); return new Promise<GLTF>((res, rej) => { const loader = new GLTFLoader(); - loader.load(`/assets/room/furnitures/${furniture.type}/${furniture.type}.glb`, gltf => { + loader.load(`/static-assets/room/furnitures/${furniture.type}/${furniture.type}.glb`, gltf => { const model = gltf.scene; // Load animation diff --git a/src/client/scripts/sound.ts b/src/client/scripts/sound.ts index 176d2b68bf..bb4cfee06a 100644 --- a/src/client/scripts/sound.ts +++ b/src/client/scripts/sound.ts @@ -16,7 +16,7 @@ export function playFile(file: string, volume: number) { if (cache.has(file)) { audio = cache.get(file); } else { - audio = new Audio(`/assets/sounds/${file}.mp3`); + audio = new Audio(`/static-assets/sounds/${file}.mp3`); cache.set(file, audio); } audio.volume = masterVolume - ((1 - volume) * masterVolume); |