We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e4be6db commit 69f4a6dCopy full SHA for 69f4a6d
1 file changed
src/renderer/webgl/WebGLRenderer.js
@@ -987,6 +987,19 @@ var WebGLRenderer = new Class({
987
return this;
988
},
989
990
+ /**
991
+ * Gets the aspect ratio of the WebGLRenderer dimensions.
992
+ *
993
+ * @method Phaser.Renderer.WebGL.WebGLRenderer#getAspectRatio
994
+ * @since 3.50.0
995
996
+ * @return {number} The aspect ratio of the WebGLRenderer dimensions.
997
+ */
998
+ getAspectRatio: function ()
999
+ {
1000
+ return this.width / this.height;
1001
+ },
1002
+
1003
/**
1004
* Sets the Projection Matrix of this renderer to the given dimensions.
1005
*
0 commit comments