Esacode

Docs / Blocks / Visualizers

3D scene

A general 3D engine: draws the scene file it is given (models, lights, environment, cameras, effects, sounds, the 2D layer of text, gauges and controls), and moves it with the run's data, live or replayed.

A view in the browser (JavaScript) Visualizers Version 0.2+6 Code you can open and adapt

How it works

Everything the view shows is in its scene file (esasim.scene/2), an asset of the project such as scenes/main.scene.json: the models and where they are, the lights and the sky, the cameras, the smoke and the sounds, the text, gauges and maps over the picture, the buttons that send commands. The run's data moves and changes them through bindings ("@channel.field"). See Docs > Reference > Scene files.

Inputs

InputTakesWhat it is
Data
data
Stream or Files or 3D scene
json, glb, gltf, obj, stl, ply
The run's data: a telemetry stream (live while a run goes on, kept to replay it) or recorded frames ({"frames": [...]}); 3D files a run made, placed by the scene as "file:NAME"; or a scene file a block makes. Takes several connections.

Settings

SettingDefaultWhat it does
Scene
scene
empty The scene file, by its path in the project's assets (Data > Assets).
Camera
camera
empty Which of the scene's cameras this view starts on, by its id.
Quality
quality
high Shadows, reflections and effects, for the computer that shows it.
One of: high, balanced, fast
Show the 2D layer
overlay
on The scene's text, gauges, events and controls over the picture. Off for a second view of the same scene (a chase camera, say) that shows only the 3D.
Controls
controls
empty This view's controls, one per line as in the Controls view: button NAME, slider NAME MIN MAX VALUE [STEP], select NAME a,b,c, switch NAME, pick NAME. Added to the scene file's controls; each sends {"control": NAME, "value": …} on the control channel while a run goes on.
Control channel
control_channel
control Where the scene's controls send their commands: {"control": NAME, "value": …}.
Script settings
settings
empty Settings for the scene's scripts, as JSON (a view moved from the classic 3D view keeps its other settings here).

Where it runs

In the browser, on the flow's View page and in the run's results, in a sandbox without network access. It needs no worker.

More in Visualizers