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({
+4
View File
@@ -95,6 +95,10 @@ export default {
if (this.file) {
fd.append('file', this.file)
}
if (this.object.thumb){
fd.append('thumb', this.object.thumb)
delete this.object.thumb;
}
fd.append('object', JSON.stringify(this.object));
let result = await this.$api.gameObject.save(fd);
Object.assign(this.object, result.data.object);
+1 -1
View File
@@ -115,7 +115,7 @@ video{
overflow: hidden;
width: 100%;
max-width: 100vw;
height: calc(100vh - 277px);
height: calc(100vh - 188px);
&.pan {
cursor: grab;
}