Code cleanup and remove todo comment.
This commit is contained in:
parent
99af15a974
commit
74a7a8c0b6
@ -179,9 +179,7 @@ class Skin extends EventEmitter {
|
||||
// Free up the current reference to the _texture
|
||||
this._texture = null;
|
||||
|
||||
if (this._emptyImageData) {
|
||||
this._silhouette.update(this._emptyImageData);
|
||||
} else {
|
||||
if (!this._emptyImageData) {
|
||||
// Create a transparent pixel
|
||||
this._emptyImageData = new ImageData(1, 1);
|
||||
|
||||
@ -199,11 +197,9 @@ class Skin extends EventEmitter {
|
||||
// this._texture can get modified by other skins (e.g. BitmapSkin
|
||||
// and SVGSkin, so we can't use that same field for caching)
|
||||
this._emptyImageTexture = twgl.createTexture(gl, textureOptions);
|
||||
this._silhouette.update(this._emptyImageData);
|
||||
}
|
||||
|
||||
// TODO should we just make it not visible here?
|
||||
|
||||
this._silhouette.update(this._emptyImageData);
|
||||
this.emit(Skin.Events.WasAltered);
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user