|
12 | 12 | As of version 23.1, calling this method with an unappended element will fail with a console error about |
13 | 13 | using an "invalid element".</dd> <dt>PIXI.Mouse.down([mouse button])</dt> <dd>Returns true if the button is actively pressed down.</dd> <dd class="return">Boolean</dd> <dt>PIXI.Mouse.fired(mouseEvent.button)</dt> <dd>Returns true if this is the first time the button value has been accessed since the button has been |
14 | 14 | pressed. |
15 | | - </dd> <dd class="return">Boolean</dd> <dt>PIXI.Mouse.x</dt> <dd>The last seen mouse X coordinate, scaled to the mouseContainer horizontally from left to right.</dd> <dd class="return">Number</dd> <dt>PIXI.Mouse.y</dt> <dd>The last seen mouse Y coordinate, scaled to the mouseContainer vertically from top to bottom.</dd> <dd class="return">Number</dd> </dl> <br> <h2>PIXI.Audio</h2> <dl> <dt>PIXI.Audio.from(src)</dt> <dd>Returns a "Pixi Audio" object. These can have .play() called on them to play their sound.</dd> <dd class="return">Pixi Audio object</dd> </dl> <br> <h2>PIXI.File</h2> <dl> <dt>PIXI.File.write(object, fileName)</dt> <dd>Converts the passed object into JSON and prompting the user to download the resulting fileName.json</dd> <dt>PIXI.File.open()</dt> <dd>Prompts the user to select a file, which it then attempts to parse as JSON and return</dd> <dd class="return">Object</dd> </dl> <br> <h2>PIXI.collision</h2> <dl> <dt>PIXI.collision.aabb(Sprite, Sprite)</dt> <dd>Checks if the two provided Sprites are colliding with the aabb algorithm - NOTE: Both a and b are |
| 15 | + </dd> <dd class="return">Boolean</dd> <dt>PIXI.Mouse.x</dt> <dd>The last seen mouse X coordinate, scaled to the mouseContainer horizontally from left to right.</dd> <dd class="return">Number</dd> <dt>PIXI.Mouse.y</dt> <dd>The last seen mouse Y coordinate, scaled to the mouseContainer vertically from top to bottom.</dd> <dd class="return">Number</dd> </dl> <br> <h2>PIXI.Audio</h2> <dl> <dt>PIXI.Audio.from(src)</dt> <dd>Returns a "Pixi Audio" object. These can have .play() called on them to play their sound.</dd> <dd class="return">Pixi Audio object</dd> </dl> <br> <h2>PIXI.File</h2> <dl> <dt>PIXI.File.write(object, fileName)</dt> <dd>Converts the passed object into JSON and prompting the user to download the resulting fileName.json</dd> <dt>PIXI.File.open()</dt> <dd>Prompts the user to select a file, which it then attempts to parse as JSON and return</dd> <dd class="return">Object</dd> </dl> <br> <h2>PIXI.Particles</h2> <dl> <dt>PIXI.Particles.from(src, maxParticleCount)</dt> <dd>Returns a "PIXI Particle Emitter" which is a particleContainer with a built-in <strong>step()</strong> |
| 16 | + function to progress the animation. The different attributes of the container specify how the particles |
| 17 | + are emitted.</dd> <dd class="return">Pixi Particle Container |
| 18 | + <br>{ |
| 19 | + <br>life: how far the particles can move away from the emitter's location, in pixels (default 128) |
| 20 | + <br>speed: quickly the particles move to their end of life distance (default 1) |
| 21 | + <br>direction: specifies the direction (in radians) that the particles will move (default 0) |
| 22 | + <br>spread: the angle (in radians) of how closely particles should follow the direction. 0 is no deviation, 2 PI is in a full circle (default is 2 PI) |
| 23 | + <br>step(): moves and updates all particles |
| 24 | + <br>} |
| 25 | + </dd> </dl> <br> <h2>PIXI.collision</h2> <dl> <dt>PIXI.collision.aabb(Sprite, Sprite)</dt> <dd>Checks if the two provided Sprites are colliding with the aabb algorithm - NOTE: Both a and b are |
16 | 26 | formatted |
17 | 27 | as javascript objects with x, y, width, and height, and optionally anchor positions.</dd> <dd class="return">Boolean</dd> <dt>PIXI.collision.radius(Sprite, Sprite)</dt> <dd>Checks if the two provided Sprites are colliding with the standard point-radius method of circle |
18 | 28 | collision - |
19 | 29 | NOTE: Both a and b are formatted as javascript objects with x, y, and r, and optionally anchor |
20 | 30 | positions. |
21 | | - </dd> <dd class="return">Boolean</dd> </dl> <br> <h2>PIXI.utils</h2> <dl> <dt>PIXI.utils.requestFullScreen(domElement)</dt> <dd>The element passed in (typically use the Application view) will attempt to go fullscreen</dd> </dl> <h2>Added Functions</h2> <dl> <dt>PIXI.clamp(x, min, max)</dt> <dd>Returns the value of x if it is between the bounds of min and max, or the closest bound if x is outside |
| 31 | + </dd> <dd class="return">Boolean</dd> </dl> <br> <h2>PIXI.utils</h2> <dl> <dt>PIXI.utils.requestFullScreen(domElement)</dt> <dd>The element passed in (typically use the Application view) will attempt to go fullscreen</dd> </dl> <br> <h2>Added Functions</h2> <dl> <dt>PIXI.clamp(x, min, max)</dt> <dd>Returns the value of x if it is between the bounds of min and max, or the closest bound if x is outside |
22 | 32 | </dd> <dd class="return">Number</dd> <dt>PIXI.mix(a, b, m)</dt> <dd>Linearly interpolate between values a and b</dd> <dd class="return">Number</dd> <dt>PIXI.rand(min, max)</dt> <dd>Generates a random integer between min and max, inclusive</dd> <dd class="return">Number</dd> </dl> </article> |
0 commit comments