Skip to content
Get started

allyhub 3d-model

Builds a 3D model's TypeScript module (defineModel) into a GLB; --inspect measures it without writing one

Terminal window
allyhub 3d-model [file] [options]
Argument Type What it is
<file> string The model module, a .ts, .mts, .js or .mjs file whose default export is defineModel(build)
Option Type Default What it does
--inspect boolean false Measure it without writing a GLB: each object’s parent, matrix, bounds (Blender Z-up metres), triangles, materials as glTF reads them, UV layers, a curve’s splines
--args string "{}" What the module’s build is given (defineModel’s parameters), a JSON object
--out string The GLB to write (default .allyhub/out/<module>.glb, named as the module is); one there is replaced only after the build succeeds
--fresh boolean false Build anew instead of reusing the build kept in .allyhub/cache/model (one is reused while the module, the files it read, its parameters, seed and the modelling runtime are unchanged); the new build is kept too

Each is given as --param name=value.

Name Type Default What it does
seed integer 0 Seed of the build’s random generator (bpy.random, 32 bits)

--dir <value>: the project’s folder; default the one around where it is run. --json: print the result as JSON.

Terminal window
allyhub 3d-model models/table.ts
allyhub 3d-model models/table.ts --inspect --args '{"width":1.8}'

0 when it succeeds; the others are listed in Exit codes.

modeling: Modelling a prop in code, or adding one from a library

add search → add → 3d-model → 3d-model capabilities

Was this page helpful?