mirror of
https://github.com/photonstorm/phaser
synced 2025-02-16 22:18:29 +00:00
Added new jsdocs
This commit is contained in:
parent
b687f051e9
commit
38cacfd9f7
5 changed files with 20 additions and 15 deletions
|
@ -103,6 +103,7 @@ Nathaniel Foldan
|
|||
Peter Pedersen
|
||||
rootasjey
|
||||
Sam Frantz
|
||||
SBCGames
|
||||
snowbillr
|
||||
Stephen Hamilton
|
||||
STuFF
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
*/
|
||||
|
||||
/**
|
||||
* [description]
|
||||
* Takes an array of Game Objects, or any objects that have the public method setTint() and then updates it to the given value(s). You can specify tint color per corner or provide only one color value for `topLeft` parameter, in which case whole item will be tinted with that color.
|
||||
*
|
||||
* @function Phaser.Actions.SetTint
|
||||
* @since 3.0.0
|
||||
|
@ -13,10 +13,10 @@
|
|||
* @generic {Phaser.GameObjects.GameObject[]} G - [items,$return]
|
||||
*
|
||||
* @param {(array|Phaser.GameObjects.GameObject[])} items - An array of Game Objects. The contents of this array are updated by this Action.
|
||||
* @param {number} topLeft - [description]
|
||||
* @param {number} [topRight] - [description]
|
||||
* @param {number} [bottomLeft] - [description]
|
||||
* @param {number} [bottomRight] - [description]
|
||||
* @param {number} topLeft - The tint being applied to top-left corner of item. If other parameters are given no value, this tint will be applied to whole item.
|
||||
* @param {number} [topRight] - The tint to be applied to top-right corner of item.
|
||||
* @param {number} [bottomLeft] - The tint to be applied to the bottom-left corner of item.
|
||||
* @param {number} [bottomRight] - The tint to be applied to the bottom-right corner of item.
|
||||
*
|
||||
* @return {(array|Phaser.GameObjects.GameObject[])} The array of Game Objects that was passed to this Action.
|
||||
*/
|
||||
|
|
|
@ -8,18 +8,22 @@ var Rectangle = require('../rectangle/Rectangle');
|
|||
var RectangleToRectangle = require('./RectangleToRectangle');
|
||||
|
||||
/**
|
||||
* [description]
|
||||
* Checks if two Rectangle shapes intersect and returns the area of this intersection as Rectangle object.
|
||||
*
|
||||
* If optional `output` parameter is omitted, new Rectangle object is created and returned. If there is intersection, it will contain intersection area. If there is no intersection, it wil be empty Rectangle (all values set to zero).
|
||||
*
|
||||
* If Rectangle object is passed as `output` and there is intersection, then intersection area data will be loaded into it and it will be returned. If there is no intersetion, it will be returned without any change.
|
||||
*
|
||||
* @function Phaser.Geom.Intersects.GetRectangleIntersection
|
||||
* @since 3.0.0
|
||||
*
|
||||
* @generic {Phaser.Geom.Rectangle} O - [output,$return]
|
||||
*
|
||||
* @param {Phaser.Geom.Rectangle} rectA - [description]
|
||||
* @param {Phaser.Geom.Rectangle} rectB - [description]
|
||||
* @param {Phaser.Geom.Rectangle} [output] - [description]
|
||||
* @param {Phaser.Geom.Rectangle} rectA - The first Rectangle object.
|
||||
* @param {Phaser.Geom.Rectangle} rectB - The second Rectangle object.
|
||||
* @param {Phaser.Geom.Rectangle} [output] - Optional Rectangle object. If given, the intersection data will be loaded into it (in case of no intersection, it will be left unchanged). Otherwise, new Rectangle object will be created and returned with either intersection data or empty (all values set to zero), if there is no intersection.
|
||||
*
|
||||
* @return {Phaser.Geom.Rectangle} [description]
|
||||
* @return {Phaser.Geom.Rectangle} A rectangle object with intersection data.
|
||||
*/
|
||||
var GetRectangleIntersection = function (rectA, rectB, output)
|
||||
{
|
||||
|
|
|
@ -10,15 +10,15 @@ var ContainsArray = require('../triangle/ContainsArray');
|
|||
var Decompose = require('../rectangle/Decompose');
|
||||
|
||||
/**
|
||||
* [description]
|
||||
* Checks for intersection between Rectangle shape and Triangle shape.
|
||||
*
|
||||
* @function Phaser.Geom.Intersects.RectangleToTriangle
|
||||
* @since 3.0.0
|
||||
*
|
||||
* @param {Phaser.Geom.Rectangle} rect - [description]
|
||||
* @param {Phaser.Geom.Triangle} triangle - [description]
|
||||
* @param {Phaser.Geom.Rectangle} rect - Rectangle object to test.
|
||||
* @param {Phaser.Geom.Triangle} triangle - Triangle object to test.
|
||||
*
|
||||
* @return {boolean} [description]
|
||||
* @return {boolean} A value of `true` if objects intersect; otherwise `false`.
|
||||
*/
|
||||
var RectangleToTriangle = function (rect, triangle)
|
||||
{
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
var Point = require('./Point');
|
||||
|
||||
/**
|
||||
* [description]
|
||||
* Interpolate two given Point objects, based on `t` value. Return result either as new Point if `out` parameter is omitted or load result into Point passed as `out` parameter and return it. For `out` parameter you can also use any object with public x/y properties.
|
||||
*
|
||||
* @function Phaser.Geom.Point.Interpolate
|
||||
* @since 3.0.0
|
||||
|
|
Loading…
Add table
Reference in a new issue