Skip to content
Konjure / spatial intelligence

Line

← Builtin reference

A line segment between two local positions.

Signature

type Line { from: Vec3 = Vec3 {}; to: Vec3 = Vec3 { x: 1 }; }

Endpoints are passed through as meters. The adapter tessellates the segment for rendering; no positive length or physics collision contract is declared here.

Fields

from: Vec3
Start point in local meters; defaults to the origin.
DefaultVec3 {}
to: Vec3
End point in local meters; defaults to (1, 0, 0).
DefaultVec3 { x: 1 }

Examples

Create a segment

Line endpoints are expressed in the entity's local coordinates.

Tick 0 · 0.00 sThis device
main.kj⌘ / Ctrl + Enter
Loading…Drag to orbit · select to inspect
0 entities
Loading the language runtime…
Output 0
No output.
Expected output
2

Rust definition

Interpreter RecordValue geometry schema consumed by spatial adapters.

See also