Link Search Menu Expand Document

Ocean

Flat-shaded ocean primitive.

All wire objects have a set of basic attributes {object_id, action, type, persist, data}. The data attribute defines the object-specific attributes

Ocean Attributes

Attribute Type Default Description Required
object_id string   A uuid or otherwise unique identifier for this object. Yes
persist boolean True Persist this object in the database. Yes
type string; Must be: object 'object' AFrame 3D Object Yes
action string; One of: ['create', 'delete', 'update'] 'create' Message action create, update, delete. Yes
ttl number   When applied to an entity, the entity will remove itself from DOM after the specified number of seconds. Update is allowed, which will reset the timer to start from that moment. No
private boolean False If true, interactions with this object should not be broadcasted to other clients, but rather sent on private topics No
program_id string   The program_id on private program topics that interactions to be directed to, if the private flag is set true. Ignored if private flag is false. No
data Ocean data   Ocean Data Yes

Ocean Data Attributes

Attribute Type Default Description Required
object_type string; Must be: ocean ocean 3D object type. Yes
width number 10 Width of the ocean area. Yes
depth number 10 Depth of the ocean area. Yes
density number 10 Density of waves. No
amplitude number 0.1 Wave amplitude. No
amplitudeVariance number 0.3 Wave amplitude variance. No
speed number 1 Wave speed. No
speedVariance number 2 Wave speed variance. No
color string '#7AD2F7' Wave color. Yes
opacity number 0.8 Wave opacity. No
parent string   Parent’s object_id. Child objects inherit attributes of their parent, for example scale and translation. No
position position   3D object position. Yes
rotation rotation {'w': -0.70711, 'x': 0.70711, 'y': 0, 'z': 0} 3D object rotation in quaternion representation; Right-handed coordinate system. Euler degrees are deprecated in wire message format. Yes
scale scale   3D object scale. No
visible boolean True Whether object is visible. Property is inherited. No