The pack
art3d
function art3d(): Pack<{ art3d: Art3dApi }>
The art-3d pack: procedural crystals, rocks, pillars and spires, and the composites they build into.
Requires a 3D world; the shapes are defined once as meshes, so every crystal in a scene is one draw.
Functions
crystalVerts
function crystalVerts(): Float32Array
Hexagonal bipyramid — the classic game crystal (flat facets).
pillarVerts
function pillarVerts(): Float32Array
A ruined column: square plinth, octagonal fluted shaft, square cap.
rockVerts
function rockVerts(): Float32Array
A low-poly boulder: jittered sphere with flat facets (deterministic).
spireVerts
function spireVerts(): Float32Array
A tapering four-sided obelisk with a pyramidal tip.
Types
Art3dApi
interface Art3dApi
game.art3d.
crystal(spec?: Spec): Handle— A six-sided crystal shard. Glossy light blue by default.rock(spec?: Spec): Handle— An irregular boulder. Matte grey by default.pillar(spec?: Spec): Handle— A fluted column with a plinth and a cap.spire(spec?: Spec): Handle— A tapering four-sided obelisk with a pyramidal tip.tree(opts?: { x?: number; z?: number; scale?: number; leaf?: string; trunk?: string }): Handle[]— A trunk and two canopy cones. Returns the three objects, so the game can move them together.crystalCluster(opts?: { x?: number; z?: number; count?: number; color?: string; seed?: number }): Handle[]— A deterministic scatter of tilted crystals around a point.


