Three.js Scene
Load a Three.js Scene.
Could be THREE.js version-specific; you can see the THREE.js version in the JS console once you open ARENA; using glTF is preferred. Format: THREE.js Scene. See guidance to store paths under ARENA File Store, CDN, or DropBox.
Additional Python properties are available in the ThreejsScene API Reference.
The following source code was mirrored from the arena-py
threejs_scene.py example.
from arena import *
scene = Scene(host="arenaxr.org", scene="example")
@scene.run_once
def make_threejs_scene():
test_scene = ThreejsScene(
object_id="test-scene",
position=(0, 1, -3),
url="/store/users/wiselab/threejs-scenes/simple_scene.json",
)
scene.add_object(test_scene)
scene.run_tasks()