Files
AnimationDirector-Blockbenc…/README.md
T
2026-09-29 14:54:06 +02:00

39 lines
3.1 KiB
Markdown

# AnimationDirector
Blockbench tools for creating multi-actor animations and animation definitions for Needs of Nature.
## Installation And Requirements
- Install `AnimationDirector.js` using Blockbench's **Plugins > Load Plugin from File**. No separate logo or asset files are required.
- Supported baseline: Blockbench **5.2.1 or newer**.
- Enable the **GeckoLib** format plugin to create/import multi-actor animation projects.
- **Create JEM Model** requires **CEM Template Loader**. Its preset loader may require an internet connection.
- Desktop Blockbench is required for automatic import, pack folders, item props, JEM transfer, and the NoN sound library. These actions are hidden in browser Blockbench; manual JSON import/export remains available.
- **Asset Browser** is optional. AnimationDirector can use its downloaded Minecraft asset cache, installed Minecraft client archives, or manually selected assets. It does not download vanilla textures itself.
## Workflow
1. Use **Tools > AnimationDirector Anims > Import Whole Animation** to select an animdef or `.animation.json` from an extracted pack. A new GeckoLib project is created after reviewing actors and models.
2. Alternatively, import actors and animations manually. Actor bones use `actorN_` prefixes to prevent name collisions.
3. Use **Actor Preferences** to set actor names, preview textures, and matching information.
4. Configure **Block Requirements** with live required-block/clearance previews, and **Item Props** with locally available assets or a PNG texture.
5. Use **Animation Definition** to save generator fields in the project or export an animdef. Imported definitions replace the saved fields for that animation.
6. Use **Export Animations** to export all physical stages and actor clips for an animation ID. Keep the Blockbench project as the editable source.
## Preview Tools
- **NoN Sound Library** auditions cues and assigns local sound previews to imported/created sound keyframes. These preview files are not exported as animation cues.
- **Autoplay Stages** advances non-looping clips to the next physical stage of the same animation ID. It takes priority over Blockbench's global loop toggle without changing that preference. Looping clips and custom timeline ranges remain unchanged.
- The timeline pose buttons copy the preceding stage's final pose to the current start, or copy keyed channels from the current start to its end.
- Mixed texture-size UV normalization is applied only to GeckoLib projects. Other formats retain their native UV sizing.
- **Tools > AnimationDirector Model > Create JEM Model** transfers selected additions into a CEM preset. It does not transfer animation keyframes, locators, or modifications to existing vanilla cubes. Review the resulting model and save its textures alongside the exported JEM as appropriate.
## Checks
```sh
node --check AnimationDirector.js
node -e "for(const f of require('node:fs').readdirSync('test').filter(f=>f.endsWith('.test.js')))require('./test/'+f)"
```
The tests use Blockbench API doubles. Before release, also check real Blockbench imports, Undo/Redo, JEM texture export, mixed atlas sizes, sound playback, and plugin unload/reload.