Interface ParseNodeMaterialOptions
blockLoader?: (className: string) => Promise<BlockEmitter>;
hasInstances?: boolean;
hasSkeleton?: boolean;
json?: string | object;
shadowGenerators?: readonly ShadowGenerator[];
shadowLightIndices?: readonly number[];
snippetServer?: string;
textures?: Readonly<Record<string, Texture2D>>;
}
Properties
Optional Readonlyblock Loader
Optional graph-specific block loader. Avoids the full default registry when callers know the exact block set.
Custom emitters may preserve the established flag-only contracts by setting state.usesMorphTargets or
state.usesLightsUbo; the async parser loads the corresponding feature when no private seam was installed.
Optional Readonlyhas Instances
When true, InstancesBlock wires per-instance attributes. Default false.
Optional Readonlyhas Skeleton
When true, BonesBlock produces a skinned world matrix (requires all meshes using this material to have a skeleton). Default false.
Optional Readonlyjson
Pre-resolved JSON (object or string). When provided, bypasses the network.
Optional Readonlyshadow Generators
Shadow generators to integrate into the material. Each contributes
one shadow-light slot whose lightIndex is the position of its light in
scene.lights at the time of rendering. Materials built without this
option have zero shadow bindings / zero shadow WGSL.
Optional Readonlyshadow Light Indices
For each entry in shadowGenerators, the index of the owning light in scene.lights. When omitted, defaults to [0, 1, …] (first N lights).
Optional Readonlysnippet Server
Optional Readonlytextures
Texture overrides keyed by TextureBlock / ImageSourceBlock name.
Options for
parseNodeMaterialFromSnippet().