mirror of
https://github.com/photonstorm/phaser
synced 2025-02-18 23:18:38 +00:00
Documented the majority of the Geom Line functions.
This commit is contained in:
parent
53cf7d847b
commit
c2bfc52987
27 changed files with 120 additions and 112 deletions
|
@ -255,7 +255,7 @@ var MatrixStack = {
|
|||
* @method Phaser.GameObjects.Components.MatrixStack#rotate
|
||||
* @since 3.2.0
|
||||
*
|
||||
* @param {number} t - The angle of rotation, in radians.
|
||||
* @param {number} t - The angle of rotation in radians.
|
||||
*
|
||||
* @return {this} This Game Object instance.
|
||||
*/
|
||||
|
|
|
@ -317,7 +317,7 @@ var TransformMatrix = new Class({
|
|||
* @method Phaser.GameObjects.Components.TransformMatrix#rotate
|
||||
* @since 3.0.0
|
||||
*
|
||||
* @param {number} radian - The angle of rotation, in radians.
|
||||
* @param {number} radian - The angle of rotation in radians.
|
||||
*
|
||||
* @return {this} This TransformMatrix.
|
||||
*/
|
||||
|
@ -556,7 +556,7 @@ var TransformMatrix = new Class({
|
|||
*
|
||||
* @param {number} x - The horizontal translation.
|
||||
* @param {number} y - The vertical translation.
|
||||
* @param {number} rotation - The angle of rotation, in radians.
|
||||
* @param {number} rotation - The angle of rotation in radians.
|
||||
* @param {number} scaleX - The horizontal scale.
|
||||
* @param {number} scaleY - The vertical scale.
|
||||
*
|
||||
|
|
|
@ -10,7 +10,7 @@ var Class = require('../../../utils/Class');
|
|||
* @callback EdgeZoneSourceCallback
|
||||
*
|
||||
* @param {integer} quantity - The number of particles to place on the source edge. If 0, `stepRate` should be used instead.
|
||||
* @param {number} [stepRate] - The distance between each particle. When set, `quantity` is implied and should be set to 0.
|
||||
* @param {number} [stepRate] - The distance between each particle. When set, `quantity` is implied and should be set to `0`.
|
||||
*
|
||||
* @return {Phaser.Geom.Point[]} - The points placed on the source edge.
|
||||
*/
|
||||
|
|
|
@ -5,14 +5,14 @@
|
|||
*/
|
||||
|
||||
/**
|
||||
* [description]
|
||||
* Calculate the angle of the line in radians.
|
||||
*
|
||||
* @function Phaser.Geom.Line.Angle
|
||||
* @since 3.0.0
|
||||
*
|
||||
* @param {Phaser.Geom.Line} line - [description]
|
||||
* @param {Phaser.Geom.Line} line - The line to calculate the angle of.
|
||||
*
|
||||
* @return {number} [description]
|
||||
* @return {number} The angle of the line, in radians.
|
||||
*/
|
||||
var Angle = function (line)
|
||||
{
|
||||
|
|
|
@ -6,16 +6,17 @@
|
|||
|
||||
/**
|
||||
* Using Bresenham's line algorithm this will return an array of all coordinates on this line.
|
||||
* The start and end points are rounded before this runs as the algorithm works on integers.
|
||||
*
|
||||
* The `start` and `end` points are rounded before this runs as the algorithm works on integers.
|
||||
*
|
||||
* @function Phaser.Geom.Line.BresenhamPoints
|
||||
* @since 3.0.0
|
||||
*
|
||||
* @param {Phaser.Geom.Line} line - [description]
|
||||
* @param {integer} [stepRate=1] - [description]
|
||||
* @param {array} [results] - [description]
|
||||
* @param {Phaser.Geom.Line} line - The line.
|
||||
* @param {integer} [stepRate=1] - The optional step rate for the points on the line.
|
||||
* @param {array} [results] - An optional array to push the resulting coordinates into.
|
||||
*
|
||||
* @return {array} [description]
|
||||
* @return {object[]} The array of coordinates on the line.
|
||||
*/
|
||||
var BresenhamPoints = function (line, stepRate, results)
|
||||
{
|
||||
|
|
|
@ -6,16 +6,16 @@
|
|||
|
||||
|
||||
/**
|
||||
* [description]
|
||||
* Center a line on the given coordinates.
|
||||
*
|
||||
* @function Phaser.Geom.Line.CenterOn
|
||||
* @since 3.0.0
|
||||
*
|
||||
* @param {Phaser.Geom.Line} line - [description]
|
||||
* @param {number} x - [description]
|
||||
* @param {number} y - [description]
|
||||
* @param {Phaser.Geom.Line} line - The line to center.
|
||||
* @param {number} x - The horizontal coordinate to center the line on.
|
||||
* @param {number} y - The vertical coordinate to center the line on.
|
||||
*
|
||||
* @return {Phaser.Geom.Line} [description]
|
||||
* @return {Phaser.Geom.Line} The centered line.
|
||||
*/
|
||||
var CenterOn = function (line, x, y)
|
||||
{
|
||||
|
|
|
@ -7,14 +7,14 @@
|
|||
var Line = require('./Line');
|
||||
|
||||
/**
|
||||
* [description]
|
||||
* Clone the given line.
|
||||
*
|
||||
* @function Phaser.Geom.Line.Clone
|
||||
* @since 3.0.0
|
||||
*
|
||||
* @param {Phaser.Geom.Line} source - [description]
|
||||
* @param {Phaser.Geom.Line} source - The source line to clone.
|
||||
*
|
||||
* @return {Phaser.Geom.Line} [description]
|
||||
* @return {Phaser.Geom.Line} The cloned line.
|
||||
*/
|
||||
var Clone = function (source)
|
||||
{
|
||||
|
|
|
@ -5,17 +5,17 @@
|
|||
*/
|
||||
|
||||
/**
|
||||
* [description]
|
||||
* Copy the values of one line to another line.
|
||||
*
|
||||
* @function Phaser.Geom.Line.CopyFrom
|
||||
* @since 3.0.0
|
||||
*
|
||||
* @generic {Phaser.Geom.Line} O - [dest,$return]
|
||||
*
|
||||
* @param {Phaser.Geom.Line} source - [description]
|
||||
* @param {Phaser.Geom.Line} dest - [description]
|
||||
* @param {Phaser.Geom.Line} source - The source line to copy from.
|
||||
* @param {Phaser.Geom.Line} dest - The destination line to copy to.
|
||||
*
|
||||
* @return {Phaser.Geom.Line} [description]
|
||||
* @return {Phaser.Geom.Line} The destination line after copying.
|
||||
*/
|
||||
var CopyFrom = function (source, dest)
|
||||
{
|
||||
|
|
|
@ -5,15 +5,15 @@
|
|||
*/
|
||||
|
||||
/**
|
||||
* [description]
|
||||
* Compare two lines for strict equality.
|
||||
*
|
||||
* @function Phaser.Geom.Line.Equals
|
||||
* @since 3.0.0
|
||||
*
|
||||
* @param {Phaser.Geom.Line} line - [description]
|
||||
* @param {Phaser.Geom.Line} toCompare - [description]
|
||||
* @param {Phaser.Geom.Line} line - The first line to compare.
|
||||
* @param {Phaser.Geom.Line} toCompare - The second line to compare.
|
||||
*
|
||||
* @return {boolean} [description]
|
||||
* @return {boolean} Whether the two lines are equal.
|
||||
*/
|
||||
var Equals = function (line, toCompare)
|
||||
{
|
||||
|
|
|
@ -7,17 +7,17 @@
|
|||
var Point = require('../point/Point');
|
||||
|
||||
/**
|
||||
* [description]
|
||||
* Get the midpoint of the given line.
|
||||
*
|
||||
* @function Phaser.Geom.Line.GetMidPoint
|
||||
* @since 3.0.0
|
||||
*
|
||||
* @generic {Phaser.Geom.Point} O - [out,$return]
|
||||
*
|
||||
* @param {Phaser.Geom.Line} line - [description]
|
||||
* @param {(Phaser.Geom.Point|object)} [out] - [description]
|
||||
* @param {Phaser.Geom.Line} line - The line to get the midpoint of.
|
||||
* @param {(Phaser.Geom.Point|object)} [out] - An optional point object to store the midpoint in.
|
||||
*
|
||||
* @return {(Phaser.Geom.Point|object)} [description]
|
||||
* @return {(Phaser.Geom.Point|object)} The midpoint of the Line.
|
||||
*/
|
||||
var GetMidPoint = function (line, out)
|
||||
{
|
||||
|
|
|
@ -9,17 +9,19 @@ var Angle = require('./Angle');
|
|||
var Point = require('../point/Point');
|
||||
|
||||
/**
|
||||
* [description]
|
||||
* Calculate the normal of the given line.
|
||||
*
|
||||
* The normal of a line is a vector that points perpendicular from it.
|
||||
*
|
||||
* @function Phaser.Geom.Line.GetNormal
|
||||
* @since 3.0.0
|
||||
*
|
||||
* @generic {Phaser.Geom.Point} O - [out,$return]
|
||||
*
|
||||
* @param {Phaser.Geom.Line} line - [description]
|
||||
* @param {(Phaser.Geom.Point|object)} [out] - [description]
|
||||
* @param {Phaser.Geom.Line} line - The line to calculate the normal of.
|
||||
* @param {(Phaser.Geom.Point|object)} [out] - An optional point object to store the normal in.
|
||||
*
|
||||
* @return {(Phaser.Geom.Point|object)} [description]
|
||||
* @return {(Phaser.Geom.Point|object)} The normal of the Line.
|
||||
*/
|
||||
var GetNormal = function (line, out)
|
||||
{
|
||||
|
|
|
@ -6,22 +6,19 @@
|
|||
|
||||
var Point = require('../point/Point');
|
||||
|
||||
// Get a point on the given line 'progress' percentage along its length.
|
||||
// progress is a value between 0 and 1.
|
||||
|
||||
/**
|
||||
* [description]
|
||||
* Get a point on a line that's a given percentage along its length.
|
||||
*
|
||||
* @function Phaser.Geom.Line.GetPoint
|
||||
* @since 3.0.0
|
||||
*
|
||||
* @generic {Phaser.Geom.Point} O - [out,$return]
|
||||
*
|
||||
* @param {Phaser.Geom.Line} line - [description]
|
||||
* @param {float} position - A value between 0 and 1, where 0 equals 0 degrees, 0.5 equals 180 degrees and 1 equals 360 around the circle.
|
||||
* @param {(Phaser.Geom.Point|object)} [out] - [description]
|
||||
* @param {Phaser.Geom.Line} line - The line.
|
||||
* @param {number} position - A value between 0 and 1, where 0 is the start, 0.5 is the middle and 1 is the end of the line.
|
||||
* @param {(Phaser.Geom.Point|object)} [out] - An optional point, or point-like object, to store the coordinates of the point on the line.
|
||||
*
|
||||
* @return {(Phaser.Geom.Point|object)} [description]
|
||||
* @return {(Phaser.Geom.Point|object)} The point on the line.
|
||||
*/
|
||||
var GetPoint = function (line, position, out)
|
||||
{
|
||||
|
|
|
@ -8,19 +8,24 @@ var Length = require('./Length');
|
|||
var Point = require('../point/Point');
|
||||
|
||||
/**
|
||||
* [description]
|
||||
* Get a number of points along a line's length.
|
||||
*
|
||||
* Provide a `quantity` to get an exact number of points along the line.
|
||||
*
|
||||
* Provide a `stepRate` to ensure a specific distance between each point on the line. Set `quantity` to `0` when
|
||||
* providing a `stepRate`.
|
||||
*
|
||||
* @function Phaser.Geom.Line.GetPoints
|
||||
* @since 3.0.0
|
||||
*
|
||||
* @generic {Phaser.Geom.Point[]} O - [out,$return]
|
||||
*
|
||||
* @param {Phaser.Geom.Line} line - [description]
|
||||
* @param {integer} quantity - [description]
|
||||
* @param {integer} [stepRate] - [description]
|
||||
* @param {(array|Phaser.Geom.Point[])} [out] - [description]
|
||||
* @param {Phaser.Geom.Line} line - The line.
|
||||
* @param {integer} quantity - The number of points to place on the line. Set to `0` to use `stepRate` instead.
|
||||
* @param {number} [stepRate] - The distance between each point on the line. When set, `quantity` is implied and should be set to `0`.
|
||||
* @param {(array|Phaser.Geom.Point[])} [out] - An optional array of Points, or point-like objects, to store the coordinates of the points on the line.
|
||||
*
|
||||
* @return {(array|Phaser.Geom.Point[])} [description]
|
||||
* @return {(array|Phaser.Geom.Point[])} An array of Points, or point-like objects, containing the coordinates of the points on the line.
|
||||
*/
|
||||
var GetPoints = function (line, quantity, stepRate, out)
|
||||
{
|
||||
|
|
|
@ -5,14 +5,14 @@
|
|||
*/
|
||||
|
||||
/**
|
||||
* [description]
|
||||
* Calculate the height of the given line.
|
||||
*
|
||||
* @function Phaser.Geom.Line.Height
|
||||
* @since 3.0.0
|
||||
*
|
||||
* @param {Phaser.Geom.Line} line - [description]
|
||||
* @param {Phaser.Geom.Line} line - The line to calculate the height of.
|
||||
*
|
||||
* @return {number} [description]
|
||||
* @return {number} The height of the line.
|
||||
*/
|
||||
var Height = function (line)
|
||||
{
|
||||
|
|
|
@ -5,14 +5,14 @@
|
|||
*/
|
||||
|
||||
/**
|
||||
* [description]
|
||||
* Calculate the length of the given line.
|
||||
*
|
||||
* @function Phaser.Geom.Line.Length
|
||||
* @since 3.0.0
|
||||
*
|
||||
* @param {Phaser.Geom.Line} line - [description]
|
||||
* @param {Phaser.Geom.Line} line - The line to calculate the length of.
|
||||
*
|
||||
* @return {number} [description]
|
||||
* @return {number} The length of the line.
|
||||
*/
|
||||
var Length = function (line)
|
||||
{
|
||||
|
|
|
@ -73,15 +73,15 @@ var Line = new Class({
|
|||
},
|
||||
|
||||
/**
|
||||
* [description]
|
||||
* Get a point on a line that's a given percentage along its length.
|
||||
*
|
||||
* @method Phaser.Geom.Line#getPoint
|
||||
* @since 3.0.0
|
||||
*
|
||||
* @generic {Phaser.Geom.Point} O - [output,$return]
|
||||
*
|
||||
* @param {float} position - [description]
|
||||
* @param {(Phaser.Geom.Point|object)} [output] - [description]
|
||||
* @param {number} position - A value between 0 and 1, where 0 is the start, 0.5 is the middle and 1 is the end of the line.
|
||||
* @param {(Phaser.Geom.Point|object)} [output] - An optional point, or point-like object, to store the coordinates of the point on the line.
|
||||
*
|
||||
* @return {(Phaser.Geom.Point|object)} A Point, or point-like object, containing the coordinates of the point on the line.
|
||||
*/
|
||||
|
@ -91,18 +91,23 @@ var Line = new Class({
|
|||
},
|
||||
|
||||
/**
|
||||
* [description]
|
||||
* Get a number of points along a line's length.
|
||||
*
|
||||
* Provide a `quantity` to get an exact number of points along the line.
|
||||
*
|
||||
* Provide a `stepRate` to ensure a specific distance between each point on the line. Set `quantity` to `0` when
|
||||
* providing a `stepRate`.
|
||||
*
|
||||
* @method Phaser.Geom.Line#getPoints
|
||||
* @since 3.0.0
|
||||
*
|
||||
* @generic {Phaser.Geom.Point} O - [output,$return]
|
||||
*
|
||||
* @param {integer} quantity - [description]
|
||||
* @param {integer} [stepRate] - [description]
|
||||
* @param {(array|Phaser.Geom.Point[])} [output] - [description]
|
||||
* @param {integer} quantity - The number of points to place on the line. Set to `0` to use `stepRate` instead.
|
||||
* @param {integer} [stepRate] - The distance between each point on the line. When set, `quantity` is implied and should be set to `0`.
|
||||
* @param {(array|Phaser.Geom.Point[])} [output] - An optional array of Points, or point-like objects, to store the coordinates of the points on the line.
|
||||
*
|
||||
* @return {(array|Phaser.Geom.Point[])} [description]
|
||||
* @return {(array|Phaser.Geom.Point[])} An array of Points, or point-like objects, containing the coordinates of the points on the line.
|
||||
*/
|
||||
getPoints: function (quantity, stepRate, output)
|
||||
{
|
||||
|
|
|
@ -9,14 +9,14 @@ var Wrap = require('../../math/Wrap');
|
|||
var Angle = require('./Angle');
|
||||
|
||||
/**
|
||||
* [description]
|
||||
* Get the angle of the normal of the given line in radians.
|
||||
*
|
||||
* @function Phaser.Geom.Line.NormalAngle
|
||||
* @since 3.0.0
|
||||
*
|
||||
* @param {Phaser.Geom.Line} line - [description]
|
||||
* @param {Phaser.Geom.Line} line - The line to calculate the angle of the normal of.
|
||||
*
|
||||
* @return {number} [description]
|
||||
* @return {number} The angle of the normal of the line in radians.
|
||||
*/
|
||||
var NormalAngle = function (line)
|
||||
{
|
||||
|
|
|
@ -5,18 +5,18 @@
|
|||
*/
|
||||
|
||||
/**
|
||||
* [description]
|
||||
* Offset a line by the given amount.
|
||||
*
|
||||
* @function Phaser.Geom.Line.Offset
|
||||
* @since 3.0.0
|
||||
*
|
||||
* @generic {Phaser.Geom.Line} O - [line,$return]
|
||||
*
|
||||
* @param {Phaser.Geom.Line} line - [description]
|
||||
* @param {number} x - [description]
|
||||
* @param {number} y - [description]
|
||||
* @param {Phaser.Geom.Line} line - The line to offset.
|
||||
* @param {number} x - The horizontal offset to add to the line.
|
||||
* @param {number} y - The vertical offset to add to the line.
|
||||
*
|
||||
* @return {Phaser.Geom.Line} [description]
|
||||
* @return {Phaser.Geom.Line} The offset line.
|
||||
*/
|
||||
var Offset = function (line, x, y)
|
||||
{
|
||||
|
|
|
@ -5,14 +5,14 @@
|
|||
*/
|
||||
|
||||
/**
|
||||
* [description]
|
||||
* Calculate the perpendicular slope of the given line.
|
||||
*
|
||||
* @function Phaser.Geom.Line.PerpSlope
|
||||
* @since 3.0.0
|
||||
*
|
||||
* @param {Phaser.Geom.Line} line - [description]
|
||||
* @param {Phaser.Geom.Line} line - The line to calculate the perpendicular slope of.
|
||||
*
|
||||
* @return {number} [description]
|
||||
* @return {number} The perpendicular slope of the line.
|
||||
*/
|
||||
var PerpSlope = function (line)
|
||||
{
|
||||
|
|
|
@ -8,19 +8,17 @@ var Angle = require('./Angle');
|
|||
var NormalAngle = require('./NormalAngle');
|
||||
|
||||
/**
|
||||
* Returns the reflected angle between two lines.
|
||||
* This is the outgoing angle based on the angle of Line 1 and the normalAngle of Line 2.
|
||||
*/
|
||||
/**
|
||||
* [description]
|
||||
* Calculate the reflected angle between two lines.
|
||||
*
|
||||
* This is the outgoing angle based on the angle of Line 1 and the normalAngle of Line 2.
|
||||
*
|
||||
* @function Phaser.Geom.Line.ReflectAngle
|
||||
* @since 3.0.0
|
||||
*
|
||||
* @param {Phaser.Geom.Line} lineA - [description]
|
||||
* @param {Phaser.Geom.Line} lineB - [description]
|
||||
* @param {Phaser.Geom.Line} lineA - The first line.
|
||||
* @param {Phaser.Geom.Line} lineB - The second line.
|
||||
*
|
||||
* @return {number} [description]
|
||||
* @return {number} The reflected angle between each line.
|
||||
*/
|
||||
var ReflectAngle = function (lineA, lineB)
|
||||
{
|
||||
|
|
|
@ -7,17 +7,17 @@
|
|||
var RotateAroundXY = require('./RotateAroundXY');
|
||||
|
||||
/**
|
||||
* [description]
|
||||
* Rotate a line around its midpoint by the given angle in radians.
|
||||
*
|
||||
* @function Phaser.Geom.Line.Rotate
|
||||
* @since 3.0.0
|
||||
*
|
||||
* @generic {Phaser.Geom.Line} O - [line,$return]
|
||||
*
|
||||
* @param {Phaser.Geom.Line} line - [description]
|
||||
* @param {number} angle - [description]
|
||||
* @param {Phaser.Geom.Line} line - The line to rotate.
|
||||
* @param {number} angle - The angle of rotation in radians.
|
||||
*
|
||||
* @return {Phaser.Geom.Line} [description]
|
||||
* @return {Phaser.Geom.Line} The rotated line.
|
||||
*/
|
||||
var Rotate = function (line, angle)
|
||||
{
|
||||
|
|
|
@ -7,18 +7,18 @@
|
|||
var RotateAroundXY = require('./RotateAroundXY');
|
||||
|
||||
/**
|
||||
* [description]
|
||||
* Rotate a line around a point by the given angle in radians.
|
||||
*
|
||||
* @function Phaser.Geom.Line.RotateAroundPoint
|
||||
* @since 3.0.0
|
||||
*
|
||||
* @generic {Phaser.Geom.Line} O - [line,$return]
|
||||
*
|
||||
* @param {Phaser.Geom.Line} line - [description]
|
||||
* @param {(Phaser.Geom.Point|object)} point - [description]
|
||||
* @param {number} angle - [description]
|
||||
* @param {Phaser.Geom.Line} line - The line to rotate.
|
||||
* @param {(Phaser.Geom.Point|object)} point - The point to rotate the line around.
|
||||
* @param {number} angle - The angle of rotation in radians.
|
||||
*
|
||||
* @return {Phaser.Geom.Line} [description]
|
||||
* @return {Phaser.Geom.Line} The rotated line.
|
||||
*/
|
||||
var RotateAroundPoint = function (line, point, angle)
|
||||
{
|
||||
|
|
|
@ -5,19 +5,19 @@
|
|||
*/
|
||||
|
||||
/**
|
||||
* [description]
|
||||
* Rotate a line around the given coordinates by the given angle in radians.
|
||||
*
|
||||
* @function Phaser.Geom.Line.RotateAroundXY
|
||||
* @since 3.0.0
|
||||
*
|
||||
* @generic {Phaser.Geom.Line} O - [line,$return]
|
||||
*
|
||||
* @param {Phaser.Geom.Line} line - [description]
|
||||
* @param {number} x - [description]
|
||||
* @param {number} y - [description]
|
||||
* @param {number} angle - [description]
|
||||
* @param {Phaser.Geom.Line} line - The line to rotate.
|
||||
* @param {number} x - The horizontal coordinate to rotate the line around.
|
||||
* @param {number} y - The vertical coordinate to rotate the line around.
|
||||
* @param {number} angle - The angle of rotation in radians.
|
||||
*
|
||||
* @return {Phaser.Geom.Line} [description]
|
||||
* @return {Phaser.Geom.Line} The rotated line.
|
||||
*/
|
||||
var RotateAroundXY = function (line, x, y, angle)
|
||||
{
|
||||
|
|
|
@ -5,20 +5,20 @@
|
|||
*/
|
||||
|
||||
/**
|
||||
* [description]
|
||||
* Set a line to a given position, angle and length.
|
||||
*
|
||||
* @function Phaser.Geom.Line.SetToAngle
|
||||
* @since 3.0.0
|
||||
*
|
||||
* @generic {Phaser.Geom.Line} O - [line,$return]
|
||||
*
|
||||
* @param {Phaser.Geom.Line} line - [description]
|
||||
* @param {number} x - [description]
|
||||
* @param {number} y - [description]
|
||||
* @param {number} angle - [description]
|
||||
* @param {number} length - [description]
|
||||
* @param {Phaser.Geom.Line} line - The line to set.
|
||||
* @param {number} x - The horizontal start position of the line.
|
||||
* @param {number} y - The vertical start position of the line.
|
||||
* @param {number} angle - The angle of the line in radians.
|
||||
* @param {number} length - The length of the line.
|
||||
*
|
||||
* @return {Phaser.Geom.Line} [description]
|
||||
* @return {Phaser.Geom.Line} The updated line.
|
||||
*/
|
||||
var SetToAngle = function (line, x, y, angle, length)
|
||||
{
|
||||
|
|
|
@ -5,14 +5,14 @@
|
|||
*/
|
||||
|
||||
/**
|
||||
* [description]
|
||||
* Calculate the slope of the given line.
|
||||
*
|
||||
* @function Phaser.Geom.Line.Slope
|
||||
* @since 3.0.0
|
||||
*
|
||||
* @param {Phaser.Geom.Line} line - [description]
|
||||
* @param {Phaser.Geom.Line} line - The line to calculate the slope of.
|
||||
*
|
||||
* @return {number} [description]
|
||||
* @return {number} The slope of the line.
|
||||
*/
|
||||
var Slope = function (line)
|
||||
{
|
||||
|
|
|
@ -5,14 +5,14 @@
|
|||
*/
|
||||
|
||||
/**
|
||||
* [description]
|
||||
* Calculate the width of the given line.
|
||||
*
|
||||
* @function Phaser.Geom.Line.Width
|
||||
* @since 3.0.0
|
||||
*
|
||||
* @param {Phaser.Geom.Line} line - [description]
|
||||
* @param {Phaser.Geom.Line} line - The line to calculate the width of.
|
||||
*
|
||||
* @return {number} [description]
|
||||
* @return {number} The width of the line.
|
||||
*/
|
||||
var Width = function (line)
|
||||
{
|
||||
|
|
|
@ -23,7 +23,7 @@ var tmpVec3 = new Vector3();
|
|||
*
|
||||
* @param {Phaser.Math.Vector3} vec - The vector to be rotated.
|
||||
* @param {Phaser.Math.Vector3} axis - The axis to rotate around.
|
||||
* @param {float} radians - The angle of rotation in radians.
|
||||
* @param {number} radians - The angle of rotation in radians.
|
||||
*
|
||||
* @return {Phaser.Math.Vector3} The given vector.
|
||||
*/
|
||||
|
|
Loading…
Add table
Reference in a new issue