changelog shortlog graph tags branches changeset files revisions annotate raw help

Mercurial > core / rust/ui/alik/dash/src/main.rs

changeset 458: 702498601326
author: Richard Westhaver <ellis@rwest.io>
date: Wed, 19 Jun 2024 14:37:57 -0400
permissions: -rw-r--r--
description: add alik/dash
1 use rerun::{demo_util::grid, external::glam};
2 
3 fn main() -> Result<(), Box<dyn std::error::Error>> {
4  let rec = rerun::RecordingStreamBuilder::new("alik_dash").spawn()?;
5 
6  let points = grid(glam::Vec3::splat(-10.0), glam::Vec3::splat(10.0), 10);
7  let colors = grid(glam::Vec3::ZERO, glam::Vec3::splat(255.0), 10)
8  .map(|v| rerun::Color::from_rgb(v.x as u8, v.y as u8, v.z as u8));
9 
10  rec.log(
11  "my_points",
12  &rerun::Points3D::new(points)
13  .with_colors(colors)
14  .with_radii([0.5]),
15  )?;
16 
17  Ok(())
18 }