I needed the ability to smoothly track trigger level changes. Since the controller already has event listeners and maintains its own state, I figured it'd be more efficient to track these changes and emit events from the controller instead of tracking this externally. Also figured other folks might find this useful 😄
I'm also now retaining controllerId from constructor so that the Vive controller can be identified by an integer instead of just via the this keyword. Makes it easier for indexing in case you track an event and you are interested in associating other data/objects/etc via that ID.
Other changes:
I removed a console.log(...) that was killing my browser... I figured that was possibly a bug :thinking:
Added var model, otherwise it crashes in strict mode.
I needed the ability to smoothly track trigger level changes. Since the controller already has event listeners and maintains its own state, I figured it'd be more efficient to track these changes and emit events from the controller instead of tracking this externally. Also figured other folks might find this useful 😄
I'm also now retaining
controllerId
from constructor so that the Vive controller can be identified by an integer instead of just via thethis
keyword. Makes it easier for indexing in case you track an event and you are interested in associating other data/objects/etc via that ID.Other changes:
console.log(...)
that was killing my browser... I figured that was possibly a bug :thinking:var model
, otherwise it crashes instrict
mode.