We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent af665ed commit 32440cbCopy full SHA for 32440cb
1 file changed
src/gameobjects/mesh/Mesh.js
@@ -458,6 +458,9 @@ var Mesh = new Class({
458
*
459
* If using this mode you will often need to set `Mesh.hideCCW` to `false` as well.
460
461
+ * By default, calling this method with no parameters will set the scaleX value to
462
+ * match the renderers aspect ratio.
463
+ *
464
* See also `setPerspective`.
465
466
* @method Phaser.GameObjects.Mesh#setOrtho
@@ -470,7 +473,7 @@ var Mesh = new Class({
470
473
*/
471
474
setOrtho: function (scaleX, scaleY, near, far)
472
475
{
- if (scaleX === undefined) { scaleX = 1; }
476
+ if (scaleX === undefined) { scaleX = this.scene.sys.renderer.getAspectRatio(); }
477
if (scaleY === undefined) { scaleY = 1; }
478
if (near === undefined) { near = -1000; }
479
if (far === undefined) { far = 1000; }
0 commit comments