small UI fixes
This commit is contained in:
@@ -1,6 +1,7 @@
|
|||||||
import { Color, Group, DoubleSide, RepeatWrapping, MeshStandardMaterial, VideoTexture } from "three"
|
import { Color, Group, DoubleSide, RepeatWrapping, MeshStandardMaterial, VideoTexture } from "three"
|
||||||
import { EventManager } from '@/lib/EventManager';
|
import { EventManager } from '@/lib/EventManager';
|
||||||
import { centerOrigin } from "@/lib/MeshUtils";
|
import { centerOrigin } from "@/lib/MeshUtils";
|
||||||
|
import Utils from "#/app/Utils";
|
||||||
|
|
||||||
class ClassicPuzzle extends EventManager {
|
class ClassicPuzzle extends EventManager {
|
||||||
emits = ['finish', 'interaction']
|
emits = ['finish', 'interaction']
|
||||||
@@ -32,10 +33,15 @@ class ClassicPuzzle extends EventManager {
|
|||||||
|
|
||||||
let dragZone = gltf.scene.getObjectByName('DragZone');
|
let dragZone = gltf.scene.getObjectByName('DragZone');
|
||||||
dragZone.material.side = DoubleSide;
|
dragZone.material.side = DoubleSide;
|
||||||
|
let pCount = 0;
|
||||||
let eventsFn= {
|
let eventsFn= {
|
||||||
start(){
|
async start(){
|
||||||
that.dispatchEvent({type:'interaction'});
|
that.dispatchEvent({type:'interaction'});
|
||||||
if (vi?.paused) vi.play();
|
if (vi?.paused) {
|
||||||
|
await vi.play();
|
||||||
|
await Utils.wait(5000);
|
||||||
|
done != pCount && vi.pause();
|
||||||
|
}
|
||||||
},
|
},
|
||||||
drag(){},
|
drag(){},
|
||||||
end(e){
|
end(e){
|
||||||
@@ -59,7 +65,6 @@ class ClassicPuzzle extends EventManager {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
let pCount = 0;
|
|
||||||
dragZone.visible = false;
|
dragZone.visible = false;
|
||||||
|
|
||||||
let defaultMaterial = new MeshStandardMaterial({
|
let defaultMaterial = new MeshStandardMaterial({
|
||||||
|
|||||||
@@ -95,6 +95,10 @@ export default {
|
|||||||
if (this.file) {
|
if (this.file) {
|
||||||
fd.append('file', 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));
|
fd.append('object', JSON.stringify(this.object));
|
||||||
let result = await this.$api.gameObject.save(fd);
|
let result = await this.$api.gameObject.save(fd);
|
||||||
Object.assign(this.object, result.data.object);
|
Object.assign(this.object, result.data.object);
|
||||||
|
|||||||
@@ -115,7 +115,7 @@ video{
|
|||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
max-width: 100vw;
|
max-width: 100vw;
|
||||||
height: calc(100vh - 277px);
|
height: calc(100vh - 188px);
|
||||||
&.pan {
|
&.pan {
|
||||||
cursor: grab;
|
cursor: grab;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user