Skip to content

Commit 3e133c9

Browse files
committed
New method signature order
1 parent a2a1998 commit 3e133c9

1 file changed

Lines changed: 11 additions & 10 deletions

File tree

src/gameobjects/mesh/MeshFactory.js

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -16,22 +16,23 @@ var GameObjectFactory = require('../GameObjectFactory');
1616
* @webglOnly
1717
* @since 3.0.0
1818
*
19-
* @param {number} x - The horizontal position of this Game Object in the world.
20-
* @param {number} y - The vertical position of this Game Object in the world.
21-
* @param {number[]} vertices - An array containing the vertices data for this Mesh.
22-
* @param {number[]} uv - An array containing the uv data for this Mesh.
23-
* @param {number[]} colors - An array containing the color data for this Mesh.
24-
* @param {number[]} alphas - An array containing the alpha data for this Mesh.
25-
* @param {(string|Phaser.Textures.Texture)} texture - The key, or instance of the Texture this Game Object will use to render with, as stored in the Texture Manager.
26-
* @param {(string|integer)} [frame] - An optional frame from the Texture this Game Object is rendering with.
19+
* @param {number} [x] - The horizontal position of this Game Object in the world.
20+
* @param {number} [y] - The vertical position of this Game Object in the world.
21+
* @param {string|Phaser.Textures.Texture} [texture] - The key, or instance of the Texture this Game Object will use to render with, as stored in the Texture Manager.
22+
* @param {string|integer} [frame] - An optional frame from the Texture this Game Object is rendering with.
23+
* @param {number[]} [vertices] - An array containing the vertices data for this Mesh.
24+
* @param {number[]} [uvs] - An array containing the uv data for this Mesh.
25+
* @param {number[]} [indicies] - An array containing the vertex indicies for this Mesh.
26+
* @param {number|number[]} [colors=0xffffff] - An array containing the color data for this Mesh.
27+
* @param {number|number[]} [alphas=1] - An array containing the alpha data for this Mesh.
2728
*
2829
* @return {Phaser.GameObjects.Mesh} The Game Object that was created.
2930
*/
3031
if (typeof WEBGL_RENDERER)
3132
{
32-
GameObjectFactory.register('mesh', function (x, y, vertices, uv, colors, alphas, texture, frame)
33+
GameObjectFactory.register('mesh', function (x, y, texture, frame, vertices, uvs, indicies, colors, alphas)
3334
{
34-
return this.displayList.add(new Mesh(this.scene, x, y, vertices, uv, colors, alphas, texture, frame));
35+
return this.displayList.add(new Mesh(this.scene, x, y, texture, frame, vertices, uvs, indicies, colors, alphas));
3536
});
3637
}
3738

0 commit comments

Comments
 (0)