tiramisu/primitive
Primitive mesh attributes.
Primitive nodes are the fastest way to put visible geometry in a scene without relying on external assets.
Values
pub fn cast_shadow(bool: Bool) -> attribute.Attribute(msg)
Enable or disable shadow casting for the primitive.
pub fn cone(
radius radius: Float,
height height: Float,
segments segments: Int,
) -> attribute.Attribute(msg)
Create a cone geometry.
pub fn cylinder(
radius_top radius_top: Float,
radius_bottom radius_bottom: Float,
height height: Float,
segments segments: Int,
) -> attribute.Attribute(msg)
Create a cylinder geometry.
pub const hidden: fn(Bool) -> attribute.Attribute(a)
Hide or show the primitive object.
This controls Three.js visibility for the node rather than DOM layout.
pub fn receive_shadow(bool: Bool) -> attribute.Attribute(msg)
Enable or disable shadow receiving for the primitive.
pub fn sphere(
radius radius: Float,
segments segments: vec2.Vec2(Int),
) -> attribute.Attribute(msg)
Create a sphere geometry.
pub fn torus(
radius radius: Float,
tube tube: Float,
radial_segments radial_segments: Int,
tubular_segments tubular_segments: Int,
) -> attribute.Attribute(msg)
Create a torus geometry.