small UI fixes
This commit is contained in:
@@ -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({
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -115,7 +115,7 @@ video{
|
||||
overflow: hidden;
|
||||
width: 100%;
|
||||
max-width: 100vw;
|
||||
height: calc(100vh - 277px);
|
||||
height: calc(100vh - 188px);
|
||||
&.pan {
|
||||
cursor: grab;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user