instantiator

sync. 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.

Properties:
Name Type Default Description
on string

An event that triggers the instantiation

mixin string

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

parent string 'a-scene'

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

group string 'main'

An identifier which can be used to group instantiated objects.

removeLast boolean true

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