@huukhanhnguyen/model / schema/vocabulary/builtinParams
schema/vocabulary/builtinParams
BuiltinParamDef
BuiltinParamDef = {
default:number|string;tooltip:string;type:string; }
One lane-builtin parameter's seeding record. NOT an ArgDef (schema/registry.ts): an ArgDef describes an arg EXPRESSION on a method (default is optional expression text), while this is a lane's reserved parameter key whose default is a required literal VALUE (number|string) and whose identity is the record key, not a key field.
default
default:
number|string
Value used when the lane entry declares no parameter with this key.
tooltip
tooltip:
string
type
type:
string
A TYPE_REGISTRY name — the value method a declaration should use.
BuiltinParamLane
BuiltinParamLane = keyof typeof
LANE_BUILTIN_PARAMS
Builtins
Builtins<
T> ={ -readonly [K in keyof T]: T[K] extends { default: infer D } ? D extends string ? string : D extends number ? number : D : never }
Same keys after resolution, widened to what a declaration may carry — the defaults are literals, a resolved value is any number/string. NOT a duplicate of BuiltinValues — this is the POST-resolution shape (widened).
Type Parameters
T
T
BuiltinValues
BuiltinValues<
T> ={ -readonly [K in keyof T]: T[K] extends { default: infer D } ? D : never }
The default VALUES of one lane's table, each key keeping the LITERAL type it was declared with (wrap: "repeat", paperWidth: 420). NOT a duplicate of Builtins — this is the PRE-resolution shape (literal defaults).
Type Parameters
T
T
LANE_BUILTIN_PARAMS
constLANE_BUILTIN_PARAMS: {textures: {filter: {default:"linear";tooltip: "Sampling filter: 'linear' | 'nearest'.";type:"string"; };imageHeight: {default:0;tooltip:"Output height in pixels. 0 = derive from the physical aspect (imageWidth × lengthY/lengthX — square physical pixels).";type:"number"; };imageWidth: {default:512;tooltip:"Output width in pixels — source ops default their own `width` to it; declaring it resamples the finished chain to exactly this size.";type:"number"; };lengthX: {default:1000;tooltip:"Physical width in mm of ONE tile. Declaring it attaches the size to the output stream (TextureData.tileWidth).";type:"length"; };lengthY: {default:1000;tooltip:"Physical height in mm of ONE tile (TextureData.tileHeight).";type:"length"; };uvSet: {default:0;tooltip:"UV channel the texture samples: 0 = TEXCOORD_0, 1 = TEXCOORD_1.";type:"number"; };wrap: {default:"repeat";tooltip: "Sampling wrap out of bounds: 'repeat' | 'clamp' | 'mirror'.";type:"string"; }; }; }
textures
readonlytextures: {filter: {default:"linear";tooltip: "Sampling filter: 'linear' | 'nearest'.";type:"string"; };imageHeight: {default:0;tooltip:"Output height in pixels. 0 = derive from the physical aspect (imageWidth × lengthY/lengthX — square physical pixels).";type:"number"; };imageWidth: {default:512;tooltip:"Output width in pixels — source ops default their own `width` to it; declaring it resamples the finished chain to exactly this size.";type:"number"; };lengthX: {default:1000;tooltip:"Physical width in mm of ONE tile. Declaring it attaches the size to the output stream (TextureData.tileWidth).";type:"length"; };lengthY: {default:1000;tooltip:"Physical height in mm of ONE tile (TextureData.tileHeight).";type:"length"; };uvSet: {default:0;tooltip:"UV channel the texture samples: 0 = TEXCOORD_0, 1 = TEXCOORD_1.";type:"number"; };wrap: {default:"repeat";tooltip: "Sampling wrap out of bounds: 'repeat' | 'clamp' | 'mirror'.";type:"string"; }; }
A texture chain's external contract: tile size in mm, output pixels, and the sampling triple. DECLARING a key is what activates it — an undeclared wrap/filter/uvSet keeps the default REPEAT + LINEAR + TEXCOORD_0, and undeclared tile mm leave the material record's own fallback in charge.
textures.filter
readonlyfilter: {default:"linear";tooltip: "Sampling filter: 'linear' | 'nearest'.";type:"string"; }
textures.filter.default
readonlydefault:"linear"="linear"
textures.filter.tooltip
readonlytooltip: "Sampling filter: 'linear' | 'nearest'." = "Sampling filter: 'linear' | 'nearest'."
textures.filter.type
readonlytype:"string"="string"
textures.imageHeight
readonlyimageHeight: {default:0;tooltip:"Output height in pixels. 0 = derive from the physical aspect (imageWidth × lengthY/lengthX — square physical pixels).";type:"number"; }
textures.imageHeight.default
readonlydefault:0=0
textures.imageHeight.tooltip
readonlytooltip:"Output height in pixels. 0 = derive from the physical aspect (imageWidth × lengthY/lengthX — square physical pixels)."="Output height in pixels. 0 = derive from the physical aspect (imageWidth × lengthY/lengthX — square physical pixels)."
textures.imageHeight.type
readonlytype:"number"="number"
textures.imageWidth
readonlyimageWidth: {default:512;tooltip:"Output width in pixels — source ops default their own `width` to it; declaring it resamples the finished chain to exactly this size.";type:"number"; }
textures.imageWidth.default
readonlydefault:512=512
textures.imageWidth.tooltip
readonlytooltip:"Output width in pixels — source ops default their own `width` to it; declaring it resamples the finished chain to exactly this size."="Output width in pixels — source ops default their own `width` to it; declaring it resamples the finished chain to exactly this size."
textures.imageWidth.type
readonlytype:"number"="number"
textures.lengthX
readonlylengthX: {default:1000;tooltip:"Physical width in mm of ONE tile. Declaring it attaches the size to the output stream (TextureData.tileWidth).";type:"length"; }
textures.lengthX.default
readonlydefault:1000=1000
textures.lengthX.tooltip
readonlytooltip:"Physical width in mm of ONE tile. Declaring it attaches the size to the output stream (TextureData.tileWidth)."="Physical width in mm of ONE tile. Declaring it attaches the size to the output stream (TextureData.tileWidth)."
textures.lengthX.type
readonlytype:"length"="length"
textures.lengthY
readonlylengthY: {default:1000;tooltip:"Physical height in mm of ONE tile (TextureData.tileHeight).";type:"length"; }
textures.lengthY.default
readonlydefault:1000=1000
textures.lengthY.tooltip
readonlytooltip:"Physical height in mm of ONE tile (TextureData.tileHeight)."="Physical height in mm of ONE tile (TextureData.tileHeight)."
textures.lengthY.type
readonlytype:"length"="length"
textures.uvSet
readonlyuvSet: {default:0;tooltip:"UV channel the texture samples: 0 = TEXCOORD_0, 1 = TEXCOORD_1.";type:"number"; }
textures.uvSet.default
readonlydefault:0=0
textures.uvSet.tooltip
readonlytooltip:"UV channel the texture samples: 0 = TEXCOORD_0, 1 = TEXCOORD_1."="UV channel the texture samples: 0 = TEXCOORD_0, 1 = TEXCOORD_1."
textures.uvSet.type
readonlytype:"number"="number"
textures.wrap
readonlywrap: {default:"repeat";tooltip: "Sampling wrap out of bounds: 'repeat' | 'clamp' | 'mirror'.";type:"string"; }
textures.wrap.default
readonlydefault:"repeat"="repeat"
textures.wrap.tooltip
readonlytooltip: "Sampling wrap out of bounds: 'repeat' | 'clamp' | 'mirror'." = "Sampling wrap out of bounds: 'repeat' | 'clamp' | 'mirror'."
textures.wrap.type
readonlytype:"string"="string"
builtinParamExpression()
builtinParamExpression(
def):string
The authored EXPRESSION a seeder writes for a builtin's default — a string builtin is quoted (wrap seeds as "'repeat'"), a number stringifies.
Parameters
def
Returns
string
builtinParamValues()
builtinParamValues<
T>(table):BuiltinValues<T>
{ paperWidth: 420, … } — the defaults alone, for the lane that wants a plain value record (and for resolveLaneBuiltins to layer overrides on).
Type Parameters
T
T extends Record<string, BuiltinParamDef>
Parameters
table
T
Returns
laneParamLiterals()
laneParamLiterals(
parameters):Record<string,unknown>
Primary-arg LITERAL values from a parameters[] lane (a number, or an unquoted/quoted string literal). Expressions that are not plain literals are skipped: the three builtin resolvers are registry-free by design, so full parametric paper size goes through a host that can evaluate.
Parameters
parameters
(Operation | Group)[] | undefined
Returns
Record<string, unknown>
resolveLaneBuiltins()
resolveLaneBuiltins<
T>(table,parameters):Builtins<T>
THE resolution law, implemented once: a builtin keeps its default unless the entry's own parameters[] declares that key with a finite literal of the same JS type. A lane that needs a range guard on top (paper must be positive; a 0 mm margin is legal) does that at its own call site — the shared law stays one rule.
Type Parameters
T
T extends Record<string, BuiltinParamDef>
Parameters
table
T
parameters
(Operation | Group)[] | undefined
Returns
Builtins<T>