mirror of
https://github.com/aurora-opensource/xviz.git
synced 2026-01-25 14:16:45 +00:00
We are already doing this for the protocol docs, this updates all the rest so the format can stay consistent with multiple editors.
27 lines
665 B
Markdown
27 lines
665 B
Markdown
# Using the Declarative UI
|
|
|
|
XVIZ allows the producer to declartively connect strams to UI components like control widgets,
|
|
tables, charts, and tree-views. These UI components can be rendered by the XVIZ client, and can be
|
|
used to provide additional information beyond what can be captured in the primary 3D scene.
|
|
|
|
The easiest way to add declarative UI components to your XVIZ in JavaScript is to use the
|
|
`XVizUIBuilder` class.
|
|
|
|
```js
|
|
const builder = new XVIZDeclarativeUIBuilder({});
|
|
|
|
builder
|
|
.panel('Metrics')
|
|
.container('child-1')
|
|
|
|
.metric('child-1-1')
|
|
.title('Acceleration')
|
|
.end()
|
|
|
|
.metric('child-1-2')
|
|
.title('Velocity')
|
|
.end()
|
|
|
|
.end();
|
|
```
|