Asset routes update

This commit is contained in:
Danylo Dotsenko 2024-01-27 13:40:11 -05:00
parent c26c922642
commit bd2ba173bb
2 changed files with 5 additions and 2 deletions

View File

@ -7,7 +7,7 @@ const gltfLoader = new GLTFLoader();
const canvas: HTMLCanvasElement = document.querySelector<HTMLCanvasElement>('#main-canvas')!;
const audio = new Audio('./public/lease.mp3');
const audio = new Audio('./lease.mp3');
// Renderer
const renderer = new THREE.WebGLRenderer({ canvas: canvas });
@ -94,7 +94,7 @@ document.addEventListener('click', () => {audio.play()});
function loadNewFish(x: number, z: number) {
gltfLoader.load(
// resource URL
'../public/Fish.glb',
'./Fish.glb',
// called when the resource is loaded
function ( gltf ) {

3
src/vite.config.js Normal file
View File

@ -0,0 +1,3 @@
export default {
base: './',
}