Class representing a Cursor object.

Remarks

You can have only one Cursor object in a project. The Cursor object houses the various pointer objects you have created, and each of the pointers follow the cursor as a kind of parent

Example

const cursor1 = new Cursor({
pointers: [pointer1, pointer2, pointer3, pointer4, pointer5],
drag: 0, //where 1 is max
hideMouse: true,
});

Hierarchy

  • Cursor

Implements

Constructors

Properties

getDrag: (() => number)

Type declaration

    • (): number
    • A functuion that returns a number representing the drag force acting on thee whole cursor

      Returns number

getXOffset: (() => number)

Type declaration

    • (): number
    • A functuion that returns a number representing the offset of the cursor along the x-axis, this can be used to set where the point that does the "pointing" on the cursor is.

      Returns number

getYOffset: (() => number)

Type declaration

    • (): number
    • A functuion that returns a number representing the offset of the cursor along the y-axis, this can be used to set where the point that does the "pointing" on the cursor is.

      Returns number

hideMouse: boolean

A boolean value that determines whether the System cursor is hidden or not

pointers: PointerObject[]

An array of all pointers being used by the cursor

secondaryPointers: PointerObject[]

An array of all secondary pointers being used by the cursor

transition: number

A number in milliseconds representing how long it takes to switch from primary to secondary cursor

Generated using TypeDoc