pub const POINT_CLOUD: &str = "type PointCloud { points: Tensor[f32] = tensor[f32]([], [0, 3])?; radius: Number = 0.02; }";Expand description
A bounded set of points rendered with a shared radius.
Rendering requires 1 through 16384 points and a positive radius. The adapter expands each point into tessellated sphere geometry, so this is not a point GPU primitive contract.
§Declaration
type PointCloud { points: Tensor[f32] = tensor[f32]([], [0, 3])?; radius: Number = 0.02; }§Fields and methods
-
points: An N by 3 Tensorf32 of local XYZ positions in meters; the adapter requires 1..=16384 points. -
radius: Point radius in meters; defaults to 0.02.
§Create points
A spatial adapter consumes the points when the value is attached to an entity.
let entity = spawn(PointCloud { points: tensor[f32]([0, 0, 0, 1, 0, 0], [2, 3])? });
print(get[PointCloud](entity).points.shape()[0]?);