Skip to main content

QUAD

Constant QUAD 

Source
pub const QUAD: &str = "type Quad { width: Number = 1; height: Number = 1; }";
Expand description

A rectangular local XY surface facing local +Z.

Width and height must be positive when rendered. The adapter expands Quad into two triangles with +Z normals; it is not a RigidBody collision shape.

§Declaration

type Quad { width: Number = 1; height: Number = 1; }

§Fields and methods

  • width: Width in meters along local X; defaults to 1.

  • height: Height in meters along local Y; defaults to 1.

§Create a quad

The adapter places the surface in local XY.

let entity = spawn(Quad { width: 3 });
print(get[Quad](entity).width);