# Resources

Libraries, models, sounds, and songs for people and AI coding agents building metaverse scenes, games, and other experiences.

For agents: start with the numbered instructions below. These resources are for scene builders; consult the linked repository documentation for full API details.

## dcl-lounge-kit

Library by MetaPetal. Open-source sittable furniture and a working bar (robot bartenders, a drinks menu, drinks you hold and sip) for Decentraland SDK7 scenes.

**Status:** Version 0.1.0. Published on npm.

**Repository:** https://github.com/MetaverseUnknower/dcl-lounge-kit

### Instructions for agents

1. Install: `npm install dcl-bar-kit` (it brings dcl-sittables), or just `npm install dcl-sittables`.
2. Copy the assets into the scene. This is required, because a scene can't load files from node_modules. Re-run after every update.

   ```sh
   npx dcl-sittables-copy-assets && npx dcl-bar-kit-copy-assets
   ```
3. Add to `scene.json` `requiredPermissions`: `"ALLOW_TO_MOVE_PLAYER_INSIDE_SCENE"` and `"ALLOW_TO_TRIGGER_AVATAR_EMOTE"`.
4. In `main()`: call `setupBar({ drinks: mocktails() })` before any `addBartender(...)`. Place furniture with `placeFurniture(FURNITURE.<name>, { position, facing })`.
5. Render `<BarUi />` inside the scene's existing UI root. A scene has only one `ReactEcsRenderer.setUiRenderer`, and a second call replaces the first.
6. Directions are degrees about the vertical: 0 = +Z, 90 = +X. `facing` is the way the sitter (or the bartender) faces.

### What it includes

Two npm packages:
- **[dcl-sittables](https://www.npmjs.com/package/dcl-sittables)**: Click-to-sit seats shared between players, plus 17 ready-to-place models (bar stools, couches, a bench, tables).
- **[dcl-bar-kit](https://www.npmjs.com/package/dcl-bar-kit)**: Bartenders BETA and BLIP (or your own), a menu with at-home recipes, drinks held in the hand and seen by everyone, sitting drinking emotes, dropping and spilling, and “specials” that run your own code. It depends on dcl-sittables.

### Rules agents get wrong

- A seat's `position` is where the avatar stands just before sitting (on the floor, about 0.37 m in front of the seat), not the seat itself. Decentraland's sitting emotes raise the hips 0.64 m and move them back 0.37 m.
- Nothing may collide at a seat's `position`, or the avatar gets shoved off. Use `collision: 'stool'` for stools.
- Scene emote files must end in `_emote.glb`. Decentraland caches emotes by file name, so a changed emote needs a new file name.
- Seats sync with fixed ids 7000 and up (7000 + the order they were added). Add seats in the same order on every client, or give each one a `syncId`, and keep the scene's own `syncEntity` ids below 7000.
- dcl-bar-kit sets dcl-sittables' single sit handler, so don't call `setSitHandler` in a scene that uses bar-kit.
- Use Node 20. When working on the kit repo itself, run npm from the repo root (it's a workspace).

### Documentation

Raw Markdown (easiest for agents to read):
- [getting-started.md](https://raw.githubusercontent.com/MetaverseUnknower/dcl-lounge-kit/main/docs/getting-started.md): from an empty scene to a working bar
- [sittables-reference.md](https://raw.githubusercontent.com/MetaverseUnknower/dcl-lounge-kit/main/docs/sittables-reference.md): every dcl-sittables export
- [bar-kit-reference.md](https://raw.githubusercontent.com/MetaverseUnknower/dcl-lounge-kit/main/docs/bar-kit-reference.md): every dcl-bar-kit export
- [custom-furniture.md](https://raw.githubusercontent.com/MetaverseUnknower/dcl-lounge-kit/main/docs/custom-furniture.md): where a seat goes, tuning
- [custom-drinks.md](https://raw.githubusercontent.com/MetaverseUnknower/dcl-lounge-kit/main/docs/custom-drinks.md): glasses, building drinking emotes in Blender, specials
- [custom-bartenders.md](https://raw.githubusercontent.com/MetaverseUnknower/dcl-lounge-kit/main/docs/custom-bartenders.md): personalities, routines, models
- [how-it-works.md](https://raw.githubusercontent.com/MetaverseUnknower/dcl-lounge-kit/main/docs/how-it-works.md): what's shared between players
- [troubleshooting.md](https://raw.githubusercontent.com/MetaverseUnknower/dcl-lounge-kit/main/docs/troubleshooting.md): troubleshooting

[Human-readable documentation](https://github.com/MetaverseUnknower/dcl-lounge-kit/tree/main/docs)

### Licence

Code: MIT. Models, emotes and sounds: CC BY 4.0, with credit required:
- "Furniture by MetaPetal (dcl-lounge-kit), CC BY 4.0"
- "Bartender and drink assets by MetaPetal (dcl-lounge-kit), CC BY 4.0"
