aframe-event-set-component
An A-Frame component to register event listeners that set properties.
Properties
The event set component can register multiple event handlers that set multiple
properties. Use double-underscores (__<EVENT_NAME>
) to namespace individual
instances of the component. Alternatively, pass the event name via _event
.
Property | Description | Default Value |
---|---|---|
_delay | Delay before setting (ms). | '' |
_event | Event name. | '' |
_target | Query selector if setting property on another entity. | '' |
_event
and _target
are prefixed with underscores to avoid name collisions
if case another component has event
or target
properties. Any key-value
property pairs provided beyond _event
and _target
will be what is set once
the event is emitted. Remember you can also specify an event name in the HTML
attribute in event-set__<EVENT_NAME>
.
Usage
Browser Installation
Install and use by directly including the browser files:
My A-Frame Scene
NPM Installation
Install via NPM:
npm install aframe-event-set-component
Then register and use.
;;