Guide 1 Docs 2 Reference 3
4

ModelBuild type

What models.new hands its build function: makes the model's materials, textures, parts and animations.

Functions 4

modelBuild:material(name: string, color: Ink, opts: { grain: number?, alpha: number? }?) → ModelMaterial

Makes a named colour a display may repaint; grain (0 to 1) darkens pixels into four tones, alpha below 1 is glass.

modelBuild:texture(width: number, height: number, opts: { tint: ModelMaterial?, scroll: ("up" | "down" | "left" | "right")?, speed: number? }?) → ModelTexture

Makes a pixel picture for one face; with tint, drawn in greys and coloured by that material. With scroll, it moves by itself on a block drawn from the model, speed texels a tick (1, 2, 3, or 0.5, 0.25).

modelBuild:part(name: string, opts: { pivot: Vec3? }?) → ModelPart

Makes a named child part of the root that turns around its pivot, the model's origin unless given.

modelBuild:animation(name: string, opts: { [string]: any })

`{ length = seconds, loop = false, <part name> = { rotation = { [t] = is both named fields and part names, so this one is open.