mirror of
https://github.com/scratchfoundation/scratch-render.git
synced 2025-08-28 22:30:04 -04:00
Code cleanup and remove todo comment.
This commit is contained in:
parent
99af15a974
commit
74a7a8c0b6
1 changed files with 2 additions and 6 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue