Make SkinViewer.disposed readonly
This commit is contained in:
parent
872f012e42
commit
42278ee509
|
|
@ -17,7 +17,6 @@ export class SkinViewer {
|
||||||
public readonly domElement: Node;
|
public readonly domElement: Node;
|
||||||
public readonly animations: RootAnimation = new RootAnimation();
|
public readonly animations: RootAnimation = new RootAnimation();
|
||||||
public detectModel: boolean = true;
|
public detectModel: boolean = true;
|
||||||
public disposed: boolean = false;
|
|
||||||
|
|
||||||
public readonly skinImg: HTMLImageElement;
|
public readonly skinImg: HTMLImageElement;
|
||||||
public readonly skinCanvas: HTMLCanvasElement;
|
public readonly skinCanvas: HTMLCanvasElement;
|
||||||
|
|
@ -33,6 +32,7 @@ export class SkinViewer {
|
||||||
|
|
||||||
public readonly playerObject: PlayerObject;
|
public readonly playerObject: PlayerObject;
|
||||||
|
|
||||||
|
private _disposed: boolean = false;
|
||||||
private _renderPaused: boolean = false;
|
private _renderPaused: boolean = false;
|
||||||
|
|
||||||
constructor(options: SkinViewerOptions) {
|
constructor(options: SkinViewerOptions) {
|
||||||
|
|
@ -126,13 +126,17 @@ export class SkinViewer {
|
||||||
}
|
}
|
||||||
|
|
||||||
dispose(): void {
|
dispose(): void {
|
||||||
this.disposed = true;
|
this._disposed = true;
|
||||||
this.domElement.removeChild(this.renderer.domElement);
|
this.domElement.removeChild(this.renderer.domElement);
|
||||||
this.renderer.dispose();
|
this.renderer.dispose();
|
||||||
this.skinTexture.dispose();
|
this.skinTexture.dispose();
|
||||||
this.capeTexture.dispose();
|
this.capeTexture.dispose();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
get disposed(): boolean {
|
||||||
|
return this._disposed;
|
||||||
|
}
|
||||||
|
|
||||||
get renderPaused(): boolean {
|
get renderPaused(): boolean {
|
||||||
return this._renderPaused;
|
return this._renderPaused;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue