xeolabs / xeogl

A WebGL-based 3D engine for technical visualization. Not actively maintained.
http://xeogl.org
Other
1.15k stars 264 forks source link

some question about picking_canvas_pickSurfaceNormalAndUV #254

Open joeslyon opened 6 years ago

joeslyon commented 6 years ago
Description of the problem

Location: examples/picking_canvas_pickSurfaceNormalAndUV.html

uvPosDiv.style.left = Math.floor(left + uv[0] * width) + "px";
uvPosDiv.style.top = Math.floor(top + height - (uv[1] * height)) + "px"; // Correct for our texture Y-flipping
  • The origin in UV coordinates is lower-left. It's right when I don't correct for texture Y-flipping, but I don't know why
  • And i think it may be better to set the uvpos center to match the TextureCoordinate .
  • Failed to load resource textures/height/everest.png
uvPosDiv.style.left = Math.floor(left + uv[0] * width - 12) + "px";
uvPosDiv.style.top = Math.floor(top + uv[1] * height - 12) + "px";
xeogl version
Browser
OS
Hardware Requirements