logiteck-mx-ink-controls
The logiteck-mx-ink-controls component interfaces with the Logitech MX Ink tracked pen. It
wraps the tracked-controls component while adding button
mappings, events, and a pencil model.
Example <a-entity logiteck-mx-ink-controls ="hand: left" > </a-entity > <a-entity logiteck-mx-ink-controls ="hand: right" > </a-entity >
Value
Property
Description
Default Value
hand
The hand that will be tracked (i.e., right, left).
left
model
Whether the Touch controller model is loaded.
true
Events
Event Name
Description
tiptouchstart
Tip touched.
tiptouchend
Tip no longer touched.
tipchanged
Tip changed.
frontdown
Front button pressed.
frontup
Front button released.
frontchanged
Front button changed.
reardown
Rear button pressed.
rearup
Rear button released.
rearchanged
Rear button changed.
Read tip changes Listen to the tipchanged
event.
<a-entity logiteck-mx-ink-controls ="hand: left" tip-logging > </a-entity > <a-entity logiteck-mx-ink-controls ="hand: right" tip-logging > </a-entity >
AFRAME .registerComponent ('tip-logging' ,{ init : function ( ) { this .el .addEventListener ('tipchanged' , this .tipChanged ); }, tipChanged : function (evt ) { console .log ("Pen tip changed" ); } });
Assets