• Performs a bunch of initialization tasks for cursor drawing like:

    • Hiding the cursor if hideMouse is true
    • Checks device type. This is important since mobile/tablet devices do not use a cursor
    • Creates a canvas, without duplication, that all drawings will take place on and appends it to the DOM.

    Remarks

    You will need to call this function at least once in a project.

    Returns

    A HTMLCanvasElement object that the cursor is drawn on

    Parameters

    • cursor: CursorObject

      The main Cursor Object for the project, there should typically be 1 per project

    Returns (() => void)

      • (): void
      • Returns void

Generated using TypeDoc