wire

altspace/components. wire

The wire component allows you to trigger an event on one entity when an event occurs on the another entity. If no targets are selected, it will target itself.

Example
<a-box id='proxy' wire='on: click; emit: click; target: #otherbox></a-box>
<a-box id='otherbox' random-color></a-box>

Extends

Members

emit :string

Name of an event to trigger on the targets

gain :string

Name of a state to add on the target

gained :string

Name of a state to watch for

lose :string

Name of a state to remove on the target

lost :string

Name of a state to watch for

on :string

Name of an event to listen for

target :selector

A selector to pick a single object to wire to. The selector is re-evaluated when the wire is triggered.

targets :selector

A selector to pick which objects to wire to. The selector is re-evaluated when the wire is triggered.