Asset routes update
This commit is contained in:
parent
c26c922642
commit
bd2ba173bb
@ -7,7 +7,7 @@ const gltfLoader = new GLTFLoader();
|
|||||||
|
|
||||||
const canvas: HTMLCanvasElement = document.querySelector<HTMLCanvasElement>('#main-canvas')!;
|
const canvas: HTMLCanvasElement = document.querySelector<HTMLCanvasElement>('#main-canvas')!;
|
||||||
|
|
||||||
const audio = new Audio('./public/lease.mp3');
|
const audio = new Audio('./lease.mp3');
|
||||||
|
|
||||||
// Renderer
|
// Renderer
|
||||||
const renderer = new THREE.WebGLRenderer({ canvas: canvas });
|
const renderer = new THREE.WebGLRenderer({ canvas: canvas });
|
||||||
@ -94,7 +94,7 @@ document.addEventListener('click', () => {audio.play()});
|
|||||||
function loadNewFish(x: number, z: number) {
|
function loadNewFish(x: number, z: number) {
|
||||||
gltfLoader.load(
|
gltfLoader.load(
|
||||||
// resource URL
|
// resource URL
|
||||||
'../public/Fish.glb',
|
'./Fish.glb',
|
||||||
// called when the resource is loaded
|
// called when the resource is loaded
|
||||||
function ( gltf ) {
|
function ( gltf ) {
|
||||||
|
|
||||||
|
3
src/vite.config.js
Normal file
3
src/vite.config.js
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
export default {
|
||||||
|
base: './',
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user