# Instructions example (Rust)

Uses the [`voraus-3d-visu`](https://voraus.jfrog.io/ui/packages/cargo:%2F%2Fvoraus-3d-visu) crate to walk through the client
instructions one after another: setting an object's position, rotation,
quaternion and scale, toggling visibility, depth test and transparency,
parenting objects, changing colors, and uploading point clouds in the PLY
(binary and ASCII) and PCD formats.

The whole walkthrough lives in [`src/main.rs`](src/main.rs). The bundled
`box.glb` and `robot.glb` models and the point clouds under
[`objects/`](objects) back each step.

## Run the interactive demo

First start the visualization server with the bundled compose file, which brings
up the `voraus-3d-visu` service (and its codemeter license sidecar) on
`http://localhost:8077`:

```sh
docker compose up -d
```

Then run the demo. The URL is taken from the first argument, then the
`V3DVISU_URL` environment variable, then defaults to `http://voraus-3d-visu/`
(the hostname used inside the compose network):

```sh
cargo run -- http://localhost:8077
```

Press Enter to step through the walkthrough and watch the result in the browser
at `http://localhost:8077`. Stop the server again with `docker compose down`.
