Repository navigation
build workspace
laurel Lin edited this page Aug 22, 2026
·
3 revisions
Blockbench-dependent layer. Generation creates a new standalone workspace (model tab) instead of
dumping output into the current one: the name comes from the wizard, the texture resolution = the shared
texture size of the three parts, and the parts' source textures are imported there so the assembly layer
can resolve cube-face texture references to real Texture objects.
Creates the output workspace and imports the part textures, returning a "source texture key → Texture" map.
- creates the workspace with the given format — pass
'free'(the free model, the only format that can hold mesh groups) when a part has mesh groups, otherwise Java block/item model - sets the workspace name and texture resolution
- removes the new workspace's default blank texture, then imports the parts' source textures (deduplicated by source)
Throws on failure (invalid format / cannot create); the caller surfaces the message.
export function createTrackWorkspace(
format: ModelFormat | string,
name: string,
textureSize: [number, number],
textures: SourceTexture[]
): Map<string, Texture>;