Clean up
This commit is contained in:
@@ -355,12 +355,9 @@ export class GlyphRenderer extends Disposable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public setAtlas(atlas: ITextureAtlas): void {
|
public setAtlas(atlas: ITextureAtlas): void {
|
||||||
const gl = this._gl;
|
|
||||||
this._atlas = atlas;
|
this._atlas = atlas;
|
||||||
|
for (let i = 0; i < atlas.pages.length; i++) {
|
||||||
// TODO: Share code
|
this._bindAtlasPageTexture(this._gl, atlas, i);
|
||||||
for (let i = 0; i < this._atlas.pages.length; i++) {
|
|
||||||
this._bindAtlasPageTexture(gl, atlas, i);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -56,7 +56,6 @@ export class TextureAtlas implements ITextureAtlas {
|
|||||||
private _workBoundingBox: IBoundingBox = { top: 0, left: 0, bottom: 0, right: 0 };
|
private _workBoundingBox: IBoundingBox = { top: 0, left: 0, bottom: 0, right: 0 };
|
||||||
private _workAttributeData: AttributeData = new AttributeData();
|
private _workAttributeData: AttributeData = new AttributeData();
|
||||||
|
|
||||||
// TODO: Register
|
|
||||||
private readonly _onAddTextureAtlasCanvas = new EventEmitter<HTMLCanvasElement>();
|
private readonly _onAddTextureAtlasCanvas = new EventEmitter<HTMLCanvasElement>();
|
||||||
public readonly onAddTextureAtlasCanvas = this._onAddTextureAtlasCanvas.event;
|
public readonly onAddTextureAtlasCanvas = this._onAddTextureAtlasCanvas.event;
|
||||||
|
|
||||||
@@ -81,6 +80,7 @@ export class TextureAtlas implements ITextureAtlas {
|
|||||||
for (const page of this.pages) {
|
for (const page of this.pages) {
|
||||||
page.canvas.remove();
|
page.canvas.remove();
|
||||||
}
|
}
|
||||||
|
this._onAddTextureAtlasCanvas.dispose();
|
||||||
}
|
}
|
||||||
|
|
||||||
public warmUp(): void {
|
public warmUp(): void {
|
||||||
|
|||||||
Reference in New Issue
Block a user