Install and first prop · PartScript Help ×

Install and first prop

PartScript is one program, partscript, written in Rust with no other dependencies. Install it with Cargo (from rustup):

cargo install --locked --git https://github.com/meowers-dev/partscript partscript-cli
partscript ref | less               # the whole language on one page

Or, working from a clone of the repository:

git clone https://github.com/meowers-dev/partscript
cd partscript
cargo run --release --locked -p partscript-cli -- ref | less

You do not need to install anything to try it: the playground runs PartScript in your browser.

A first prop

Make a folder called props and a file in it called crates.parts:

try it
prop crate_stack "Crate Stack"
  box size=.6,.45,.4 mat=crate_wood
  box at=0,0,on(.4) size=.6,.45,.4 mat=crate_wood turn=0,0,8
  bottle = cylinder at=.12,.05,on(.8) radius=.04 height=.28 mat=glass_opaque sides=6

Three lines, three shapes:

Check it, then build it:

partscript check props/          # parses everything, counts triangles; no building, instant
partscript build props/ -o out/  # writes out/crate_stack.glb

out/crate_stack.glb opens in Blender, Godot, three.js, any glTF viewer. It is 44 triangles with two small textures.

Units and directions

Next

The tour builds one prop ten ways, a new idea each time. Tools covers the command line, the formatter, the preview and the playground.