mirror of
https://github.com/photonstorm/phaser
synced 2025-02-16 14:08:28 +00:00
Add Config types for ParticleEmitterManager and Mesh
This commit is contained in:
parent
f1836738a0
commit
d327a4da34
5 changed files with 34 additions and 2 deletions
|
@ -18,7 +18,7 @@ var Mesh = require('./Mesh');
|
|||
* @method Phaser.GameObjects.GameObjectCreator#mesh
|
||||
* @since 3.0.0
|
||||
*
|
||||
* @param {object} config - The configuration object this Game Object will use to create itself.
|
||||
* @param {Phaser.Types.GameObjects.Mesh.MeshConfig} config - The configuration object this Game Object will use to create itself.
|
||||
* @param {boolean} [addToScene] - Add this Game Object to the Scene after creating it? If set this argument overrides the `add` property in the config object.
|
||||
*
|
||||
* @return {Phaser.GameObjects.Mesh} The Game Object that was created.
|
||||
|
|
15
src/gameobjects/mesh/typedefs/MeshConfig.js
Normal file
15
src/gameobjects/mesh/typedefs/MeshConfig.js
Normal file
|
@ -0,0 +1,15 @@
|
|||
/**
|
||||
* @typedef {object} Phaser.Types.GameObjects.Mesh.MeshConfig
|
||||
* @extends Phaser.Types.GameObjects.GameObjectConfig
|
||||
* @since 3.0.0
|
||||
*
|
||||
* @property {string} [key] - The key, or instance of the Texture this Game Object will use to render with, as stored in the Texture Manager.
|
||||
* @property {string|number} [frame] - An optional frame from the Texture this Game Object is rendering with.
|
||||
* @property {number[]} [vertices] - The vertices array. Either `xy` pairs, or `xyz` if the `containsZ` parameter is `true`.
|
||||
* @property {number[]} [uvs] - The UVs pairs array.
|
||||
* @property {number[]} [indicies] - Optional vertex indicies array. If you don't have one, pass `null` or an empty array.
|
||||
* @property {boolean} [containsZ=false] - Does the vertices data include a `z` component?
|
||||
* @property {number[]} [normals] - Optional vertex normals array. If you don't have one, pass `null` or an empty array.
|
||||
* @property {number|number[]} [colors=0xffffff] - An array of colors, one per vertex, or a single color value applied to all vertices.
|
||||
* @property {number|number[]} [alphas=1] - An array of alpha values, one per vertex, or a single alpha value applied to all vertices.
|
||||
*/
|
9
src/gameobjects/mesh/typedefs/index.js
Normal file
9
src/gameobjects/mesh/typedefs/index.js
Normal file
|
@ -0,0 +1,9 @@
|
|||
/**
|
||||
* @author Richard Davey <rich@photonstorm.com>
|
||||
* @copyright 2020 Photon Storm Ltd.
|
||||
* @license {@link https://opensource.org/licenses/MIT|MIT License}
|
||||
*/
|
||||
|
||||
/**
|
||||
* @namespace Phaser.Types.GameObjects.Mesh
|
||||
*/
|
|
@ -17,7 +17,7 @@ var ParticleEmitterManager = require('./ParticleEmitterManager');
|
|||
* @method Phaser.GameObjects.GameObjectCreator#particles
|
||||
* @since 3.0.0
|
||||
*
|
||||
* @param {object} config - The configuration object this Game Object will use to create itself.
|
||||
* @param {Phaser.Types.GameObjects.Particles.ParticleEmitterManagerConfig} config - The configuration object this Game Object will use to create itself.
|
||||
* @param {boolean} [addToScene] - Add this Game Object to the Scene after creating it? If set this argument overrides the `add` property in the config object.
|
||||
*
|
||||
* @return {Phaser.GameObjects.Particles.ParticleEmitterManager} The Game Object that was created.
|
||||
|
|
|
@ -0,0 +1,8 @@
|
|||
/**
|
||||
* @typedef {object} Phaser.Types.GameObjects.Particles.ParticleEmitterManagerConfig
|
||||
* @since 3.0.0
|
||||
*
|
||||
* @property {string} [key] - The key of the Texture this Emitter Manager will use to render particles, as stored in the Texture Manager.
|
||||
* @property {(number|string)} [frame] - An optional frame from the Texture this Emitter Manager will use to render particles.
|
||||
* @property {Phaser.Types.GameObjects.Particles.ParticleEmitterConfig|Phaser.Types.GameObjects.Particles.ParticleEmitterConfig[]} [emitters] - Configuration settings for one or more emitters to create.
|
||||
*/
|
Loading…
Add table
Reference in a new issue