instantiator

altspace/components. instantiator

Instantiates objects on an event trigger, adds them to the scene and syncs their creation across clients. The instantiated objects are built using the specified mixins.

Example
<!-- attaches a ball to your head if you click the box -->
<a-mixin id='headbox' geometry='primitive:sphere;' n-skeleton-parent='part: head'></a-mixin>
<a-box instantiator='on: click; mixin: headbox;'></a-box>

Extends

Members

group :string

An identifier which can be used to group instantiated objects.

Default Value:
  • "main"

mixin :string

A space-separated list of mixins that should be used to instantiate the object.

on :string

An event that triggers the instantiation

parent :string

A selector that determines which object the instantiated object will be added to.

Default Value:
  • "a-scene"

removeLast :boolean

Whether the last object instantiated in a group should be removed before instantiating a new object.

Default Value:
  • true