diff --git a/gzewp2awcf.js b/gzewp2awcf.js index 79c6e1f..9a8aca0 100644 --- a/gzewp2awcf.js +++ b/gzewp2awcf.js @@ -39,8 +39,9 @@ this.raycaster.getIntersectedObjects(this.buttons).map( } var x = Math.round(intersect.uv.x * 256); - var y = Math.round(intersect.uv.y * 256); + var y = Math.round(1 - intersect.uv.y * 256); + /* for (var x = 0; x < 256; x++) { var line = ''; @@ -51,10 +52,11 @@ this.raycaster.getIntersectedObjects(this.buttons).map( console.log(line); } + */ - //var pixel = alphas[(256 * y) + x]; + var pixel = alphas[(256 * y) + x]; - //console.log(intersect.mesh.name + ' : ' + pixel); + console.log(intersect.mesh.name + ' : ' + pixel); }