You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/geom/mesh/typedefs/GenerateGridConfig.js
+3-2Lines changed: 3 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -5,13 +5,14 @@
5
5
* @property {(string|Phaser.Textures.Texture)} key - The key of the texture to be used for this Grid, as stored in the Texture Manager, or a Texture instance.
6
6
* @property {(string|integer)} [frame] - The name or index of the frame within the Texture.
7
7
* @property {Phaser.GameObjects.Mesh} [mesh] - If specified, the vertices of the generated grid will be added to this Mesh Game Object.
8
-
* @property {number} [width=128] - The width of the grid in pixels.
9
-
* @property {number} [height=width] - The height of the grid in pixels.
8
+
* @property {number} [width=1] - The width of the grid in 3D units. If you wish to get a pixel accurate grid based on a texture, you can use an Ortho Mesh or the `isOrtho` parameter.
9
+
* @property {number} [height=width] - The height of the grid in 3D units.
10
10
* @property {number} [widthSegments=1] - The number of segments to split the grid horizontally in to.
11
11
* @property {number} [heightSegments=widthSegments] - The number of segments to split the grid vertically in to.
12
12
* @property {number} [x=0] - Offset the grid x position by this amount.
13
13
* @property {number} [y=0] - Offset the grid y position by this amount.
14
14
* @property {number|number[]} [colors=0xffffff] - An array of colors, one per vertex, or a single color value applied to all vertices.
15
15
* @property {number|number[]} [alphas=1] - An array of alpha values, one per vertex, or a single alpha value applied to all vertices.
16
16
* @property {boolean} [tile=false] - Should the texture tile (repeat) across the grid segments, or display as a single texture?
17
+
* @property {boolean} [isOrtho=false] - If set and using a texture with an ortho Mesh, the `width` and `height` parameters will be calculated based on the frame size for you.
0 commit comments