Skip to content

Commit f1a7aab

Browse files
authored
Merge pull request #398 from paulkaplan/revert-silhouette
Revert "Merge pull request #394 from paulkaplan/defer-silhouette-upda…
2 parents 7577298 + bb84aba commit f1a7aab

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

src/SVGSkin.js

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,7 @@ class SVGSkin extends Skin {
101101
if (this._texture) {
102102
gl.bindTexture(gl.TEXTURE_2D, this._texture);
103103
gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, gl.RGBA, gl.UNSIGNED_BYTE, this._svgRenderer.canvas);
104+
this._silhouette.update(this._svgRenderer.canvas);
104105
} else {
105106
// TODO: mipmaps?
106107
const textureOptions = {
@@ -110,8 +111,8 @@ class SVGSkin extends Skin {
110111
};
111112

112113
this._texture = twgl.createTexture(gl, textureOptions);
114+
this._silhouette.update(this._svgRenderer.canvas);
113115
}
114-
this._silhouetteDirty = true;
115116

116117
const maxDimension = Math.max(this._svgRenderer.canvas.width, this._svgRenderer.canvas.height);
117118
let testScale = 2;
@@ -125,12 +126,6 @@ class SVGSkin extends Skin {
125126
});
126127
}
127128

128-
updateSilhouette () {
129-
if (this._silhouetteDirty) {
130-
this._silhouette.update(this._svgRenderer.canvas);
131-
this._silhouetteDirty = false;
132-
}
133-
}
134129
}
135130

136131
module.exports = SVGSkin;

0 commit comments

Comments
 (0)