BlockyRenderer:New Models
Blocky Renderer can create new models with a starting cube, and it helps you write model JSON by hand with a schema.
New Blocky Model…
The command Blocky: New Blocky Model… creates a new .blockymodel file. You find it:
- in the Command Palette,
- in the Explorer context menu of a folder,
- as
+in the title bar of the Models view, - in the context menu of a folder in the Models view.
Steps
- Enter a name, for example
Lantern. A trailing.blockymodelis removed. The name must not contain\ / : * ? " < > |, and the file must not exist yet. - Choose what the model starts with:
- Cube with starter texture: a cube and the texture
<Name>_Texture.png(128 × 64, each face in its own color). - Cube without texture.
- Empty model: just
{"nodes": []}with"lod": "auto".
- Cube with starter texture: a cube and the texture
- The file opens in the text editor.
If a texture with that name already exists, it is left untouched and the model uses it.
Target folder
- From a folder context menu: that folder.
- From the Command Palette: the folder of the active file, if it is in the workspace. Otherwise the workspace folder. With several workspace folders, you are asked which one to use.
- Without an open folder, the command shows Open a folder for the new model first.
The starter cube
- 32 × 32 × 32, one block. It stands on the ground: its position is
y = 16. - Node
id1, nameCube, shapebox, shadingflat. - All six faces sit in a cross layout in a 128 × 64 atlas: left, front, right and back side by side in the lower row, top above front and bottom above right.
- In the starter texture, each face has its own color with a darker border: front blue, back purple, left green, right orange, top yellow, bottom grey. The rest of the image is transparent.
Empty files from the Explorer
If you create an empty .blockymodel file in the VS Code Explorer, it is filled at once and saved. The setting blockyRenderer.newModelTemplate decides with what:
| Value | Content |
|---|---|
cube (default) |
The block-sized cube with all six faces in the texture layout |
empty |
A valid model without nodes |
off |
The file stays empty |
The content is inserted as an edit, so Ctrl+Z empties the file again. Files created by scripts or in the terminal are not filled. For those, the preview shows a Start with a Cube button.
JSON schema
.blockymodel files get a JSON schema. In the text editor this gives you:
- hover help for every field,
- validation of values, for example
shape.type,lodor the quad normal, - completion.
Ctrl+Spacein an empty file offers Cube. Insidenodesandchildrenit offers Box (8 × 8 × 8 with all six faces) and Group.
There is no schema for .blockyanim files.
| Blocky Renderer | |
|---|---|
| Start | Installation |
| Features | Preview · Animations · Blocky Editor · Renderer Only · Blocky Renderer Tab · New Models |
| Reference | Commands and Settings · File Format · FAQ · Version History |
| Links | Project page on mutigeraffe.com · Download on the VS Code Marketplace |