pub const SPHERE: &str = "type Sphere { radius: Number = 0.2; }";Expand description
A sphere centered at its entity origin.
The spatial adapter requires a positive radius before tessellation. A Sphere is also one of the two collision shapes accepted by RigidBody.
§Declaration
type Sphere { radius: Number = 0.2; }§Fields and methods
radius: Radius in meters; defaults to 0.2 and must be positive for physics.
§Create a sphere
Geometry becomes renderable when attached to an entity.
let entity = spawn(Sphere { radius: 0.5 });
print(get[Sphere](entity).radius);