BB.Pointer

Defined in: src/BB.Pointer.js:37

A module for funneling in and standardizing basic pointer-like interfaces like mouse and touch.

Index

Methods

Constructor

BB.Pointer
(
  • controllerModule
)

Parameters:

  • controllerModule Object

    The input module you would like to control this pointer with.

Properties

hasSelectionInterface Boolean default:false

Does the selection interface controlling this pointer have a selection interface (like a button)?

isDown Boolean default:false

A variable holding wether or not the selection interface (i.e. mouse button, etc...) controlling this pointer object (via BB.Pointer.update(...)) is active.

isMoving Boolean default:false

A variable holding wether or not the event module controlling this pointer object (via BB.Pointer.update(...)) is moving

x Number default:undefined

The pointer's current x position as supplied by the eventModule in BB.Pointer.update(...).

y Number default:undefined

The pointer's current y position as supplied by the eventModule in BB.Pointer.update(...).

There are no properties that match your current filter settings. You can change your filter settings in the index section on this page. index

Methods

on
(
  • eventName
  • callback
)

A method used to register "activestart", "activestop", "movestart", "movestop", and "move" events.

Parameters:

  • eventName String

    The event to register callback to. "activestart", "activestop", "movestart", and "movestop" are all valid events.

  • callback Function

    The callback to execute once the registered event has fired.

update
(
  • controllerModule
)

Update the pointer using the controllerModule. Usually called once per animation frame.

Parameters:

  • controllerModule Object

There are no methods that match your current filter settings. You can change your filter settings in the index section on this page. index