We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d16630b commit 5d355b7Copy full SHA for 5d355b7
1 file changed
src/skin/index.js
@@ -191,14 +191,16 @@ class SkinRender extends Render {
191
let a = pixels[i + 3];
192
let x = (i / 4) % sourceCanvas.width;
193
let y = Math.floor((i / 4) / sourceCanvas.width);
194
- if (a > 16 || removeTransparency(x, y)) { // alpha over threshold OR area not supposed to have transparency at all
+ if (a > 178 || removeTransparency(x, y)) { // alpha over threshold OR area not supposed to have transparency at all
195
pixels[i + 3] = 255; // max the alpha
196
}
197
198
199
// update destination canvas
200
opaqueContext.putImageData(imageData, 0, 0);
201
202
+ console.log(opaqueCanvas.toDataURL())
203
+
204
skinTexture = new THREE.CanvasTexture(opaqueCanvas);
205
206
0 commit comments