UNPKG

arcade-physics

Version:
26 lines 1.11 kB
export default CenterOn; export type CenterFunction = (triangle: Phaser.Geom.Triangle) => Phaser.Math.Vector2; /** * @callback CenterFunction * * @param {Phaser.Geom.Triangle} triangle - The Triangle to return the center coordinates of. * * @return {Phaser.Math.Vector2} The center point of the Triangle according to the function. */ /** * Positions the Triangle so that it is centered on the given coordinates. * * @function Phaser.Geom.Triangle.CenterOn * @since 3.0.0 * * @generic {Phaser.Geom.Triangle} O - [triangle,$return] * * @param {Phaser.Geom.Triangle} triangle - The triangle to be positioned. * @param {number} x - The horizontal coordinate to center on. * @param {number} y - The vertical coordinate to center on. * @param {CenterFunction} [centerFunc] - The function used to center the triangle. Defaults to Centroid centering. * * @return {Phaser.Geom.Triangle} The Triangle that was centered. */ declare function CenterOn(triangle: Phaser.Geom.Triangle, x: number, y: number, centerFunc?: CenterFunction | undefined): Phaser.Geom.Triangle; //# sourceMappingURL=CenterOn.d.ts.map