fix
This commit is contained in:
parent
83b9b9ec80
commit
be98f3e325
35
src/index.ts
35
src/index.ts
@ -104,6 +104,7 @@ window.addEventListener("DOMContentLoaded", () => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const loader = new GLTFLoader(manager);
|
const loader = new GLTFLoader(manager);
|
||||||
|
|
||||||
loader.register((parser) => {
|
loader.register((parser) => {
|
||||||
return new VRMLoaderPlugin(parser);
|
return new VRMLoaderPlugin(parser);
|
||||||
});
|
});
|
||||||
@ -111,8 +112,8 @@ window.addEventListener("DOMContentLoaded", () => {
|
|||||||
return new VRMAnimationLoaderPlugin(parser);
|
return new VRMAnimationLoaderPlugin(parser);
|
||||||
});
|
});
|
||||||
|
|
||||||
load("/vrma/ai.vrm");
|
load("/vrma/model/ai.vrm");
|
||||||
load("/vrma/fly_c.vrma");
|
load("/vrma/anime/fly_c.vrma");
|
||||||
|
|
||||||
const clock = new THREE.Clock();
|
const clock = new THREE.Clock();
|
||||||
clock.start();
|
clock.start();
|
||||||
@ -264,7 +265,7 @@ window.addEventListener("DOMContentLoaded", () => {
|
|||||||
case 1:
|
case 1:
|
||||||
cancelAnimationFrame(anime_id);
|
cancelAnimationFrame(anime_id);
|
||||||
scene.add(grid);
|
scene.add(grid);
|
||||||
load("/vrma/ai_normal.vrm");
|
load("/vrma/model/ai_normal.vrm");
|
||||||
scene.remove(currentVrm.scene);
|
scene.remove(currentVrm.scene);
|
||||||
renderer.toneMapping = THREE.NeutralToneMapping;
|
renderer.toneMapping = THREE.NeutralToneMapping;
|
||||||
light.intensity = 1;
|
light.intensity = 1;
|
||||||
@ -273,7 +274,7 @@ window.addEventListener("DOMContentLoaded", () => {
|
|||||||
scene.fog = new Fog(0xffffff, 3, 20);
|
scene.fog = new Fog(0xffffff, 3, 20);
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
load("/vrma/ai.vrm");
|
load("/vrma/model/ai.vrm");
|
||||||
scene.remove(currentVrm.scene);
|
scene.remove(currentVrm.scene);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -314,13 +315,13 @@ window.addEventListener("DOMContentLoaded", () => {
|
|||||||
|
|
||||||
function sword_s(){
|
function sword_s(){
|
||||||
scene.remove(currentVrm.scene);
|
scene.remove(currentVrm.scene);
|
||||||
load("/vrma/ai_sword.vrm");
|
load("/vrma/model/ai_sword.vrm");
|
||||||
load("/vrma/sword.vrma");
|
load("/vrma/anime/sword.vrma");
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
load("/vrma/idle.vrma");
|
load("/vrma/anime/idle.vrma");
|
||||||
}, 1000);
|
}, 1000);
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
load("/vrma/ai.vrm");
|
load("/vrma/model/ai.vrm");
|
||||||
scene.remove(currentVrm.scene);
|
scene.remove(currentVrm.scene);
|
||||||
}, 5000);
|
}, 5000);
|
||||||
}
|
}
|
||||||
@ -333,12 +334,12 @@ window.addEventListener("DOMContentLoaded", () => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function cloud_s(){
|
function cloud_s(){
|
||||||
load("/vrma/sky.vrma");
|
load("/vrma/anime/sky.vrma");
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
load("/vrma/jump.vrma");
|
load("/vrma/anime/jump.vrma");
|
||||||
}, 5000);
|
}, 5000);
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
load("/vrma/idle.vrma");
|
load("/vrma/anime/idle.vrma");
|
||||||
}, 5500);
|
}, 5500);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -349,12 +350,12 @@ window.addEventListener("DOMContentLoaded", () => {
|
|||||||
mouse_ivent_timer_id = setTimeout(function () {
|
mouse_ivent_timer_id = setTimeout(function () {
|
||||||
motion_enable = true;
|
motion_enable = true;
|
||||||
}, 1000);
|
}, 1000);
|
||||||
load("/vrma/run.vrma");
|
load("/vrma/anime/run.vrma");
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
document.querySelector('#btn-run').addEventListener('mouseup', (event) => {
|
document.querySelector('#btn-run').addEventListener('mouseup', (event) => {
|
||||||
clearTimeout(mouse_ivent_timer_id);
|
clearTimeout(mouse_ivent_timer_id);
|
||||||
load("/vrma/idle.vrma");
|
load("/vrma/anime/idle.vrma");
|
||||||
cool_time();
|
cool_time();
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -367,18 +368,18 @@ window.addEventListener("DOMContentLoaded", () => {
|
|||||||
|
|
||||||
function jump_s(){
|
function jump_s(){
|
||||||
motion_enable = true;
|
motion_enable = true;
|
||||||
load("/vrma/jump.vrma");
|
load("/vrma/anime/jump.vrma");
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
load("/vrma/idle.vrma");
|
load("/vrma/anime/idle.vrma");
|
||||||
}, 500);
|
}, 500);
|
||||||
cool_time();
|
cool_time();
|
||||||
}
|
}
|
||||||
|
|
||||||
setInterval(() => {
|
setInterval(() => {
|
||||||
const r = Math.floor(Math.random() * 4 + 1);
|
const r = Math.floor(Math.random() * 4 + 1);
|
||||||
if (motion_enable == false) { load("/vrma/" + r + ".vrma"); }
|
if (motion_enable == false) { load("/vrma/random/" + r + ".vrma"); }
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
if (motion_enable == false) { load("/vrma/fly_c.vrma"); }
|
if (motion_enable == false) { load("/vrma/anime/fly_c.vrma"); }
|
||||||
}, 10000);
|
}, 10000);
|
||||||
}, 15000);
|
}, 15000);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user