Overview · PartScript Help ×

PartScript

PartScript is a small language for building low-poly, PSX-style 3D models: props, rooms, ruins, whole buildings and the hills they stand on. A model is a few words a line, a few dozen lines a scene, and it compiles to .glb (glTF 2.0) by one small Rust program, with no Blender or other 3D package.

try it
prop street_lamp_demo "Street Lamp"
  lathe mat=steel_dark .19:0 .19:.07 .15:.11 .11:.42 .085:.5 .06:.58 sides=10 cap=1
  cylinder at=0,0,on(.58) radius=.05 height=2.5 mat=steel_dark sides=8
  lamp = cylinder at=0,0,on(3.13) radius=.12 height=.34 mat=lamp_warm sides=6 top_radius=.16
  box at=.14,0,3.3 size=.025,.025,.36 mat=steel_dark ring 6 step 60
  cone on=lamp radius=.22 height=.16 mat=steel_dark sides=6

That is a whole prop. Each line is a shape (a lathe, two cylinders, six bars round the lamp, a cap), where it goes, how big it is and what it is made of. The model it builds is 200 triangles with small, crunchy, dithered textures, the way games looked in 1997.

What it can do

Where to go next

Conventions in these docs

Every example with a prop in it builds as written (the test suite checks), and has a try it link that opens it in the playground, where you can change it and watch the model change. Examples may use the parts defined in the project's example files, as the playground does.