[deploy] properly destroy world view
This commit is contained in:
parent
b8c8f8ab62
commit
6a8d15b638
3 changed files with 6 additions and 1 deletions
|
|
@ -34,6 +34,10 @@ export type WorldDataEmitterEvents = {
|
|||
|
||||
export class WorldDataEmitterWorker extends (EventEmitter as new () => TypedEmitter<WorldDataEmitterEvents>) {
|
||||
static readonly restorerName = 'WorldDataEmitterWorker'
|
||||
|
||||
destroy () {
|
||||
this.removeAllListeners()
|
||||
}
|
||||
}
|
||||
|
||||
export class WorldDataEmitter extends (EventEmitter as new () => TypedEmitter<WorldDataEmitterEvents>) {
|
||||
|
|
|
|||
|
|
@ -569,7 +569,7 @@ export abstract class WorldRendererCommon<WorkerSend = any, WorkerReceive = any>
|
|||
getMesherConfig (): MesherConfig {
|
||||
return {
|
||||
version: this.version,
|
||||
enableLighting: this.worldRendererConfig.enableLighting && !this.playerState.lightingDisabled,
|
||||
enableLighting: this.worldRendererConfig.enableLighting && !this.playerStateReactive.lightingDisabled,
|
||||
skyLight: this.skyLight,
|
||||
smoothLighting: this.worldRendererConfig.smoothLighting,
|
||||
outputFormat: this.outputFormat,
|
||||
|
|
|
|||
|
|
@ -261,6 +261,7 @@ export class AppViewer {
|
|||
if (cleanState) {
|
||||
this.currentState = undefined
|
||||
this.currentDisplay = null
|
||||
this.worldView?.destroy()
|
||||
this.worldView = undefined
|
||||
}
|
||||
if (this.backend) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue