|
|
@ -156,8 +156,6 @@ export default class Viewport { |
|
|
viewerDom.parentElement.parentElement.appendChild(statsControls.dom) |
|
|
viewerDom.parentElement.parentElement.appendChild(statsControls.dom) |
|
|
$(statsControls.dom).children().css('height', '28px') |
|
|
$(statsControls.dom).children().css('height', '28px') |
|
|
|
|
|
|
|
|
this.animate() |
|
|
|
|
|
|
|
|
|
|
|
// 监听事件
|
|
|
// 监听事件
|
|
|
this.watchList.push(watch(() => this.state.camera.position.y, (newVal) => { |
|
|
this.watchList.push(watch(() => this.state.camera.position.y, (newVal) => { |
|
|
if (!this.state.isReady) { |
|
|
if (!this.state.isReady) { |
|
|
@ -186,6 +184,8 @@ export default class Viewport { |
|
|
itemType.clazz.afterAddViewport(this) |
|
|
itemType.clazz.afterAddViewport(this) |
|
|
}) |
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
this.animate() |
|
|
|
|
|
|
|
|
try { |
|
|
try { |
|
|
if (worldModel.state.isDraft) { |
|
|
if (worldModel.state.isDraft) { |
|
|
await this.stateManager.loadFromLocalstore() |
|
|
await this.stateManager.loadFromLocalstore() |
|
|
|