small UI fixes

This commit is contained in:
2026-02-17 20:48:15 +02:00
parent 9bd2f79ca2
commit c6cd7bbeb9
3 changed files with 13 additions and 4 deletions
@@ -1,6 +1,7 @@
import { Color, Group, DoubleSide, RepeatWrapping, MeshStandardMaterial, VideoTexture } from "three"
import { EventManager } from '@/lib/EventManager';
import { centerOrigin } from "@/lib/MeshUtils";
import Utils from "#/app/Utils";
class ClassicPuzzle extends EventManager {
emits = ['finish', 'interaction']
@@ -32,10 +33,15 @@ class ClassicPuzzle extends EventManager {
let dragZone = gltf.scene.getObjectByName('DragZone');
dragZone.material.side = DoubleSide;
let pCount = 0;
let eventsFn= {
start(){
async start(){
that.dispatchEvent({type:'interaction'});
if (vi?.paused) vi.play();
if (vi?.paused) {
await vi.play();
await Utils.wait(5000);
done != pCount && vi.pause();
}
},
drag(){},
end(e){
@@ -59,7 +65,6 @@ class ClassicPuzzle extends EventManager {
}
}
}
let pCount = 0;
dragZone.visible = false;
let defaultMaterial = new MeshStandardMaterial({