# Cocoa Cube — Three.js Pack

*An AppalachAI Studios asset pack, ready for the web with Three.js.*

**Collection:** squishy-foodies-vol-1
**Asset ID:** `cocoa_cube` · **Slug:** `cocoa-cube`
**Version:** 1.0.0
**License tier:** Free Starter

---

## Howdy, web devs

AI-assisted, studio QC'd, and game-ready for the browser. We ship **GLB** so it loads fast with `GLTFLoader` and keeps your materials intact.

## What's inside

- `README.md` (readme)
- `LICENSE.md` (license)
- `manifest.json` (manifest)
- `thumbnails/cocoa_cube_thumb.svg` (thumbnail)
- `thumbnails/cocoa_cube.png` (render_thumbnail)
- `models/cocoa_cube.glb` (glb)
- `animations/animation_manifest.json` (animation_manifest)
- `animations/idle_bounce.json` (animation_recipe)
- `animations/squish_impact.json` (animation_recipe)
- `animations/wobble_recover.json` (animation_recipe)
- `animations/rare_celebration.json` (animation_recipe)
- `threejs/squishyProceduralAnimator.ts` (engine_script)

## Quick start

1. Copy the **`.glb`** into your project's assets/public folder so it's served at a reachable URL.
2. Load it with **`GLTFLoader`** from `three/examples/jsm/loaders/GLTFLoader.js`.
3. Add the loaded scene to your Three.js scene graph and position it to taste.
4. See **`threejs_example_loader.md`** for a copy-paste starter snippet.

## Scale & orientation

- glTF is **Y-up, meters, right-handed** — the same as Three.js — so models usually arrive correctly scaled and oriented.
- If you need to nudge it, set `model.scale.setScalar(...)` and `model.rotation.y = ...` on the loaded root.

## Texture & rendering notes

- For accurate PBR, set `renderer.outputColorSpace = THREE.SRGBColorSpace` and add an environment map (an HDRI via `RoomEnvironment` or `PMREMGenerator`) so metallic/rough surfaces have something to reflect.
- Base Color is sRGB; Normal and Roughness/Metallic are linear — `GLTFLoader` sets these up for you, so avoid double-converting.

## Animation

Check the **What's inside** list above for which motion system this asset uses:

- **Rigged clip pack** (`models/cocoa_cube_rigged.glb` + `animations/*.glb`): load the rigged
  model, load each clip GLB, and drive the clips with a `THREE.AnimationMixer` — the clips share
  the rigged model's skeleton, so `mixer.clipAction(clipGltf.animations[0])` plays straight onto it.
- **Procedural mover** (`threejs/squishyProceduralAnimator.ts`): instantiate the included helper
  with your loaded model, then call its `update(delta)` inside your render loop for that gentle
  squishy life — no skeletal rig required.

## License — Free Starter

Free to use in personal or small commercial projects. Attribution appreciated.

All sample IP in this pack is owned by **AppalachAI Studios**. © 2026 AppalachAI Studios.

## Support

Questions or a cool demo to show off? Email **hello@appalachaistudios.com**.

---

*Made with care by AppalachAI Studios. Pack version 1.0.0.*
