Module Point-PIXI
class type _t = { ... }type t= Js.t(_t);The Point object represents a location in a two-dimensional coordinate system, where x represents the horizontal axis and y represents the vertical axis.
module Impl: { ... };include Impl;
let create: ?x:float => ?y:float => unit => t;creates a new point
- parameter x
position of the point on the x axis
- parameter y
position of the point on the y axis
- returns
new point
let getX: Js.t(_t) => float;position of the point on the x axis
let setX: Js.t(_t) => float => unit;position of the point on the x axis
let getY: Js.t(_t) => float;position of the point on the y axis
let setY: Js.t(_t) => float => unit;position of the point on the y axis
let copyFrom: Js.t(_t) => p:Js.t(_t) => Js.t(_t);Copies x and y from the given point
- deprecated
consider using IPoint.copyFrom instead for ObservablePoint support
- see /bs-pixi/PIXI/IPoint-PIXI/#val-copyFrom
IPoint.copyFrom
- parameter p
The point to copy from
- returns
itself
let copyTo: Js.t(_t) => p:Js.t(_t) => Js.t(_t);Copies x and y into the given point
- deprecated
consider using IPoint.copyTo instead for ObservablePoint support
- see /bs-pixi/PIXI/IPoint-PIXI/#val-copyTo
IPoint.copyTo
- parameter p
The point to copy
- returns
Given point with values updated
let equals: Js.t(_t) => p:Js.t(_t) => bool;Returns true if the given point is equal to this point
- deprecated
consider using IPoint.equals instead for ObservablePoint support
- see /bs-pixi/PIXI/IPoint-PIXI/#val-equals
IPoint.equals
- parameter p
The point to check
- returns
Whether the given point equal to this point
let set: Js.t(_t) => ?x:float => ?y:float => unit => unit;Sets the point to a new x and y position. If y is omitted, both x and y will be set to x.
- parameter x
position of the point on the x axis
- parameter y
position of the point on the y axis