Log inGet started
World

Builtin Library

Branchmain
Branchesmainpublish
Commite8beb5604c

README.md

mesh.plane

A flat rectangle centred on the origin in the XZ plane, facing +Y: two triangles. Use it for floors, cards and any flat quad.

It holds 4 points and 2 triangles; every normal is +Y. size is a Vec2 whose first value is the width along X and whose second is the depth along Z.

Inputs

  • size (Vec2, default { x = 1, y = 1 }). Its width along X and its depth along Z, in metres: the first and second values of the Vec2.

Outputs

  • geometry (Geometry). Triangles with P, N and uv on their points; primitives carry vstart and vcount.
local floor = g.mesh.plane({ size = { x = 4, y = 2 } })