a_update: a_update

Description Usage Arguments Details Value

View source: R/messages.R

Description

Build an A-Frame Update Message

Usage

1
a_update(id, component, attributes, replaces_component = FALSE)

Arguments

id

the id of the entity that will have the event emitted on it.

component

the name of the component to have its attributes updated.

attributes

the attributes to be set along with their values.

replaces_component

if TRUE, any attributes not specified are set to their default values. This effectively makes this update a full replacement of the existing component.

Details

Construct an A-Frame component attribute update message to be applied to the component of entity identified by 'id'.

Note for setting vector components: Due to a quirk in the A-Frame JS API, setting vectors for position, rotation, scale etc must be done with a named list: i.e.

a_update(id = "my_box", component = "position", attributes = list(x = 1, y = 1, z = 1))

Value

An object that represents an A-Frame event.


MilesMcBain/r2vr documentation built on Dec. 8, 2018, 10:13 a.m.