Link Search Menu Expand Document

Attributes in arena-py

Attributes are used to specify parameters for ARENA Objects.

See object definition reference.

Accessing Object Attributes

See Appendix for all types of Attributes.

Usually, attributes (except for object_id, persist, ttl, and parent) are under the data field:

obj.object_id
obj.persist
...
obj.data.position
obj.data.rotation
...
obj.data.material
# etc etc

All Attributes

These attributes may be applied to any ARENA object.

Position

The position of an object can be specified by:

position=Position(x, y, z)
# or
position=(x, y, z)

Rotation

The rotation (in euler coordinates) of an object can be specified by:

rotation=Rotation(x, y, z)
# or
rotation=(x, y, z)

The rotation (in quaternions) of an object can be specified by:

rotation=Rotation(x, y, z, w) # note the additional "w" field
# or
rotation=(x, y, z, w)

Scale

The scale of an object can be specified by:

scale=Scale(x, y, z)
# or
scale=(x, y, z)

Animation

An animation can be added to an object:

See Animations and Morphs.

AR Marker

Add a armarker attribute:

armarker=Armarker(markerid, ...)

Attribution

Add a attribution attribute:

attribution=Attribution(...)

Blip

Add a blip attribute:

blip=Blip(blipin, blipout, ...)

Box Collision

Add a box-collision attribute:

box_collision_listener=BoxCollisionListener(dynamic, ...)

Goto Landmark

Add a goto-landmark attribute:

goto_landmark=GotoLandmark(landmark, on)

Goto Url

Goes to a goto-url on click.

goto_url=GotoUrl(dest, on, url)

Impulse

An impulse can be added by:

impulse=Impulse(on, force, position)

Landmark

Add a landmark attribute:

landmark=Landmark(label, ...)

Look At

Make object look-at the camera:

look_at="#my-camera"

or make object look-at at a position

look_at="0 0 0"

Particles

Add a spe-particles effect:

spe_particles=Particles(texture, color, velocity, ...)

Physics

dynamic-body and static-body can be added with:

physics=Physics(type, ...)

or

dynamic_body=DynamicBody(type, ...)

or

static_body=StaticBody(type, ...)

Shadow

Add a shadow attribute:

shadow=Shadow(cast, receive)

Sound

A sound can be added to an object using:

sound=Sound(src, positional, poolSize, autoplay, ...)

Text Input

textinput can be added using a keyboard with:

text_input=TextInput(on, title, label, placeholder)

Primitive Geometry Mesh Only Attributes

These attributes may be applied only to primitive geometric mesh ARENA objects.

Color

The color of an object can be specified by:

material=Material(color=Color(red, green, blue))
# or
material=Material(color=(red, green, blue))

Material

The material (transparency and color) of an object can be set by:

material=Material(color, transparent, opacity, ...)

Jitsi Video

Add a jitsi-video attribute:

jitsi_video=JitsiVideo(displayName, ...)

Multi-Source

Add a multisrc attribute:

multisrc=Multisrc(srcs, srcspath)

Video Control

Add a video-control attribute:

video_control=VideoControl(video_path, video_object, autoplay, ...)

Model Only Attributes

These attributes may be applied only to model ARENA objects like GLTF, PCD, Three Scene, Gaussian Splat.

Animation Mixer

An animation-mixer can be added to an object:

See Animations and Morphs.

GLTF Load On Demand (LOD)

Add a gltf-lod attribute:

gltf_model_lod=GltfModelLod(detailedUrl, detailedDistance, ...)

GLTF Model Update

Add a model-update attribute:

modelUpdate={"mixamorigLeftShoulder": {...}}

GLTF Morph

Add a gltf-morph attribute:

See Animations and Morphs.

Material Extras

Add a material-ext attribute:

material_extras=MaterialExtras(encoding, transparentOccluder, gltfOpacity, ...)

Generic Attribute

For attributes that are not specified by the library, you can use this (put anything you want in the “…”)! Inherit from this class to create custom attributes.

Attribute(...)

Additional Attributes (which are just specified as numbers or strings) may include persist, ttl, clickable, etc:

persist=True
ttl=30  # seconds
clickable=True
# click_listener=True works too
# etc.