Model - Texture resolve
API reference for src/lanes/textures/textureResolve, src/schema/textureResolve on @huukhanhnguyen/model, reachable from ..
See the Guide for the ModelJSON / evaluate pipeline.
API reference
Signatures are generated from the live package .d.ts - not hand-written.
resolveTexture
function
Evaluate one texture chain: own-parameter values first (function-call semantics), then the image pipeline. Cross-referenced sibling chains each evaluate with their OWN parameter defaults.
resolveTexture(texture: Chain, options: ResolveTextureOptions): ImageBufferResolveTextureOptions
type
type ResolveTextureOptions
// = {
/** Needed to evaluate `parameters`; absent → every chain sees {}. */
registry?: RegistryHost;
/** Sibling chains for blend/warp/channels cross-references. */
textures?: Chain[];
/** Bitmap registry for the `image` source (Store pre-load). */
imageOf?: (url: string) => TextureData | undefined;
/** Per-call rebinding of the ENTRY chain's own parameters. */
argsOverride?: Record<string, string>;
/** Intra-resolve memo (see TextureScope.cache). */
cache?: Map<string, ImageBuffer>;
}textureParams
function
Evaluate a texture's own parameters (with per-call overrides). Numbers feed formulas; string values (wrap/filter) ride the sampling contract.
Deliberately NO Table.get here (removed 2026-07-26). It was wired in 2026-07-16 to close a gap in a cross-lane wiring audit, not to serve a texture feature — and there is none: a texture is pixels, a pure function of its own args. Reading a host table made its output depend on scene state that never passed through its signature, which is exactly what an isolated scope buys (the same reason the parent.* bridge was deleted), and it broke sharing outright: extractShared does not carry tables, so a shared texture that read one produced a copy that validated and resolved wrong. A texture that needs a number from a table takes it as an ARG. Components keep Table.get — a chart IS a live report on host data.
textureParams(texture: Chain, argsOverride: Record<string, string> | undefined, registry: Registry): Record<string, number | string>