@roost2d/chikn-rigs 0.1.0 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +26 -1
- package/dist/data/chikn-anims.json +525 -16
- package/dist/data/chikn-rig.json +1 -1
- package/dist/data/roostr-anims.json +525 -16
- package/dist/data/roostr-rig.json +1 -1
- package/dist/index.d.ts +35 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +118 -6
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -7,8 +7,33 @@ npm install @roost2d/contracts @roost2d/rig2d @roost2d/chikn-rigs
|
|
|
7
7
|
```
|
|
8
8
|
|
|
9
9
|
```ts
|
|
10
|
-
import {
|
|
10
|
+
import {
|
|
11
|
+
applyCharacterRecipe,
|
|
12
|
+
CHARACTER_RECIPE_SCHEMA,
|
|
13
|
+
loadChiknAnimations,
|
|
14
|
+
loadChiknRig,
|
|
15
|
+
} from '@roost2d/chikn-rigs';
|
|
11
16
|
const [definition, clips] = await Promise.all([loadChiknRig(), loadChiknAnimations()]);
|
|
17
|
+
|
|
18
|
+
const recipe = {
|
|
19
|
+
schema: CHARACTER_RECIPE_SCHEMA,
|
|
20
|
+
species: 'chikn',
|
|
21
|
+
skinId: 'Celestial',
|
|
22
|
+
traitGroupIds: ['head/admiral', 'tail/golden-plumage'],
|
|
23
|
+
animationId: 'chikn.walk',
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
applyCharacterRecipe(rig, recipe, definition, clips);
|
|
12
27
|
```
|
|
13
28
|
|
|
29
|
+
Both species ship the same 40 animation names, prefixed with `chikn.` or `roostr.`:
|
|
30
|
+
|
|
31
|
+
- Movement: `walk`, `slowed`, `fly`, `run`, `sneak`, `crouch`, `jump`, `fall`, `land`, `dodge`, `charge`, `swim`, `spawn_drop`
|
|
32
|
+
- Combat: `attack`, `peck`, `attack_peck`, `attack_heavy`, `block`, `parry`, `kick`, `wing_slap`, `headbutt`, `cast`
|
|
33
|
+
- Reactions: `hit`, `stagger`, `knockback`, `knockdown`, `get_up`, `death_burst`
|
|
34
|
+
- Emotes: `extraction_bow`, `draft_cheer`, `victory`, `wave`, `dance`, `panic`
|
|
35
|
+
- Ambient: `idle_breathe`, `idle_alert`, `sleep`, `eat`, `look_around`
|
|
36
|
+
|
|
37
|
+
Loop and loop-mode metadata travels with every clip. One-shots preserve their authored end pose, so call `resetPose()` before switching independently previewed actions; persistent states such as `knockdown` can instead flow directly into `get_up`.
|
|
38
|
+
|
|
14
39
|
Resolve each `definition.attachments[].texture.assetId` through a separately hosted Chikn runtime manifest before creating the display factory. [Chikn integration tutorial](https://github.com/Roost2D/roost2d/blob/main/docs/chikn-assets.md).
|