mirror of
https://github.com/photonstorm/phaser
synced 2025-02-16 22:18:29 +00:00
Use mesh size
This commit is contained in:
parent
020cfab2d6
commit
c03b5af079
1 changed files with 4 additions and 6 deletions
|
@ -91,13 +91,11 @@ var GenerateGridVerts = function (config)
|
|||
|
||||
var textureFrame = texture.get(frame);
|
||||
|
||||
// If the Mesh is ortho and no width/height is given, we'll default to texture sizes (if set!)
|
||||
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)
|
||||
{
|
||||
var renderer = mesh.scene.sys.renderer;
|
||||
|
||||
width = textureFrame.width / renderer.height;
|
||||
height = textureFrame.height / renderer.height;
|
||||
width = textureFrame.width / mesh.height;
|
||||
height = textureFrame.height / mesh.height;
|
||||
}
|
||||
|
||||
var halfWidth = width / 2;
|
||||
|
|
Loading…
Add table
Reference in a new issue