-
Notifications
You must be signed in to change notification settings - Fork 0
3.2 Point
Jonas de Luna Skulberg edited this page Oct 6, 2023
·
7 revisions
Note that point may also be passed as a position to some components. This
-
x: number
X position of the point -
y: number
Y position of the point
label?: boolean
Whether or not to display the point's current position beside it.
decimals?: number
Number of decimals to include in the label.
color?: string
Color of the main part of the point.
draggable?: Draggable
Whether the point should be draggable.
dragListeners?: ((point: Point) => void)[]
Initial dragListeners that can be added upon construction of the point.
color: "#FAA307",
draggable: undefined,
decimals: 1,
label: false,
dragListeners: [],
-
addDragListener(listener: (point: Point) => void)
Adds a draglistener to the point. The parameter of the listenerfunction takes in a reference to the instance of the point the listener is attached to. collidesWith(other: Object3D): boolean
distanceTo(other: Object3D<Event>): number