Remove deprecated prop

This commit is contained in:
Daniel Imms
2022-10-28 19:12:01 -07:00
parent 6b37187b4d
commit 975d52fab9
5 changed files with 16 additions and 20 deletions
+3 -5
View File
@@ -57,9 +57,7 @@ export class TextureAtlas implements ITextureAtlas {
// The texture that the atlas is drawn to
private _pages: AtlasPage[] = [];
public get pages(): HTMLCanvasElement[] { return this._pages.map(e => e.canvas); }
public get cacheCanvas(): HTMLCanvasElement { return this._pages[0].canvas; }
public get pages(): { canvas: HTMLCanvasElement }[] { return this._pages; }
private _tmpCanvas: HTMLCanvasElement;
// A temporary context that glyphs are drawn to before being transfered to the atlas.
@@ -105,8 +103,8 @@ export class TextureAtlas implements ITextureAtlas {
}
public dispose(): void {
if (this.cacheCanvas.parentElement) {
this.cacheCanvas.parentElement.removeChild(this.cacheCanvas);
for (const page of this.pages) {
page.canvas.remove();
}
}
+1 -4
View File
@@ -87,10 +87,7 @@ export interface IRenderer extends IDisposable {
}
export interface ITextureAtlas extends IDisposable {
/** @deprecated */
readonly cacheCanvas: HTMLCanvasElement;
readonly pages: HTMLCanvasElement[];
readonly pages: { canvas: HTMLCanvasElement }[];
hasCanvasChanged: boolean;