We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 020cfab commit c03b5afCopy full SHA for c03b5af
1 file changed
src/geom/mesh/GenerateGridVerts.js
@@ -91,13 +91,11 @@ var GenerateGridVerts = function (config)
91
92
var textureFrame = texture.get(frame);
93
94
- // If the Mesh is ortho and no width/height is given, we'll default to texture sizes (if set!)
95
- if (!widthSet && isOrtho && texture)
+ // If the Mesh is ortho and no width / height is given, we'll default to texture sizes (if set!)
+ if (!widthSet && isOrtho && texture && mesh)
96
{
97
- var renderer = mesh.scene.sys.renderer;
98
-
99
- width = textureFrame.width / renderer.height;
100
- height = textureFrame.height / renderer.height;
+ width = textureFrame.width / mesh.height;
+ height = textureFrame.height / mesh.height;
101
}
102
103
var halfWidth = width / 2;
0 commit comments