Merge pull request #398 from paulkaplan/revert-silhouette

Revert "Merge pull request #394 from paulkaplan/defer-silhouette-upda…
This commit is contained in:
Paul Kaplan 2019-01-15 12:25:37 -05:00 committed by GitHub
commit f1a7aab5a6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -101,6 +101,7 @@ class SVGSkin extends Skin {
if (this._texture) {
gl.bindTexture(gl.TEXTURE_2D, this._texture);
gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, gl.RGBA, gl.UNSIGNED_BYTE, this._svgRenderer.canvas);
this._silhouette.update(this._svgRenderer.canvas);
} else {
// TODO: mipmaps?
const textureOptions = {
@ -110,8 +111,8 @@ class SVGSkin extends Skin {
};
this._texture = twgl.createTexture(gl, textureOptions);
this._silhouette.update(this._svgRenderer.canvas);
}
this._silhouetteDirty = true;
const maxDimension = Math.max(this._svgRenderer.canvas.width, this._svgRenderer.canvas.height);
let testScale = 2;
@ -125,12 +126,6 @@ class SVGSkin extends Skin {
});
}
updateSilhouette () {
if (this._silhouetteDirty) {
this._silhouette.update(this._svgRenderer.canvas);
this._silhouetteDirty = false;
}
}
}
module.exports = SVGSkin;