Code cleanup and remove todo comment.

This commit is contained in:
Karishma Chadha 2019-10-21 13:53:01 -04:00
parent 99af15a974
commit 74a7a8c0b6

View file

@ -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);
}