phaser/v3/typings/geom/line/GetPointsOnLine.d.ts

11 lines
589 B
TypeScript
Raw Normal View History

2017-01-16 21:43:07 +00:00
/**
* 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.
*
* @method Phaser.Line#coordinatesOnLine
* @param {number} [stepRate=1] - How many steps will we return? 1 = every coordinate on the line, 2 = every other coordinate, etc.
* @param {array} [results] - The array to store the results in. If not provided a new one will be generated.
* @return {array} An array of coordinates.
*/
export default function (line: any, stepRate: any, results: any): any;