@skenora/procedural
v0.1.3
Published
Pure deterministic compilers for Skenora procedural geometry and material graphs.
Readme
@skenora/procedural
Pure, renderer-independent compilers for versioned Skenora procedural programs.
This package is not currently published to npm; the install command below is intended release syntax. Procedural V1 is current repository source and is not covered by the 2026-08-28 package/browser evidence.
pnpm add @skenora/proceduralcompileProceduralGeometry()validates and compiles a bounded geometry graph into positions, indices, normals, UVs, bounds, statistics, and a deterministic signature.compileMaterialProgram()validates and lowers a typed material graph into a deterministic intermediate representation with parameter uniforms, requirements, topology signature, and content signature.compileTextureProgram()produces deterministic bounded generated texture bytes and WGSL reflection metadata.compileRenderGraph()lowers trusted capture/blur/transmission passes to ordered target IR with memory estimates.compileSimulationProgram()expands fixed-step fluid, staged inverse FFT, or radiance/JFA declarations into stable ping-pong pass IR.- Schema, validation, capability-description, limit, and program types are
re-exported from
@skenora/contracts.
import {
compileMaterialProgram,
compileProceduralGeometry,
validateProceduralGeometryProgram,
} from "@skenora/procedural";
const validation = validateProceduralGeometryProgram(geometryProgram);
if (!validation.valid) throw new Error(validation.issues[0]?.message);
const mesh = compileProceduralGeometry(geometryProgram);
const material = compileMaterialProgram(materialProgram);
console.log(mesh.stats, mesh.signature, material.topologySignature);Geometry V1 limits nodes, segments, array counts, vertices, triangles, and convex extrusion profiles. Material V1 limits nodes and parameters and can write only PBR base color and emission. Changing parameter values preserves a material topology signature; changing graph structure or literals does not.
The package never evaluates authored JavaScript or shader source and owns no
Canvas, Babylon, GPU, workspace, Editor, or network resources. See the
repository; the current working-tree
guide and resource-free example are docs/PROCEDURAL_AI.md and
examples/procedural-ai/procedural-material.blueprint.json.
The explicit @skenora/procedural/emitters subpath contains versioned trusted
GLSL and WGSL emitters over compiled MaterialProgram IR. It is an
internal-style backend seam: callers cannot provide shader text. Runtime
consumes the GLSL artifact; isolated tooling may inspect the WGSL artifact
without making WebGPU part of the default Babylon Runtime. Physical WebGPU
execution lives only in the explicit @skenora/runtime/simulation subpath.
