bugs
This commit is contained in:
@@ -19,13 +19,17 @@ import { GameEngine } from '@/lib/gameEngine.js';
|
||||
let gameEngine = null;
|
||||
|
||||
export default{
|
||||
props:['object', 'autoplay'],
|
||||
props:{
|
||||
object: Object,
|
||||
autoplay: Boolean
|
||||
},
|
||||
data(){
|
||||
return {
|
||||
animations: []
|
||||
}
|
||||
},
|
||||
async mounted(){
|
||||
console.log('mounted')
|
||||
gameEngine = new GameEngine();
|
||||
this.gameEngine = gameEngine;
|
||||
await gameEngine.init(this.$refs.target);
|
||||
@@ -41,7 +45,9 @@ export default{
|
||||
},
|
||||
methods:{
|
||||
async loadAsset() {
|
||||
console.log('loading asset');
|
||||
if (this.forRendering) {
|
||||
console.log('loading preview');
|
||||
gameEngine.scene.clear();
|
||||
if (this.object.type == 'panorama2d') {
|
||||
let t = await gameEngine.loadTexture(`/asset/default/${this.object.asset.name}`);
|
||||
|
||||
Reference in New Issue
Block a user