// generated by diplomat-tool import type { FieldProgramDistanceKind } from "./FieldProgramDistanceKind.mjs" import type { NucleationError } from "./NucleationError.mjs" import type { SdfBounds } from "./SdfBounds.mjs" import type { SdfNormal } from "./SdfNormal.mjs" import type { pointer, codepoint } from "./diplomat-runtime.d.ts"; /** * A validated, sandboxed custom SDF field program: deterministic typed * bytecode over scalar/vec3/bool values with bounded loops, carrying * its own explicit finite bounds and distance-kind metadata. Build one * with {@link FieldProgramBuilder} or import it from JSON. */ export class FieldProgram { /** @internal */ get ffiValue(): pointer; /** @internal */ constructor(); static fromJsonString(json: string): FieldProgram; toJson(): string; evalAt(x: number, y: number, z: number): number; /** * Unit-length gradient of the scalar output at `(x, y, z)`: the * program's own forward-mode analytic gradient where it's * differentiable there, falling back to a numerical estimate * (central differences via `epsilon`) otherwise. */ gradient(x: number, y: number, z: number, epsilon: number): SdfNormal; bounds(): SdfBounds; distanceKind(): FieldProgramDistanceKind; }