Library · by MetaPetal
dcl-lounge-kit
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. Not yet published to npm.
Instructions for agents
Install:
npm install dcl-bar-kit(it brings dcl-sittables), or justnpm install dcl-sittables.Copy the assets into the scene. This is required, because a scene can't load files from node_modules. Re-run after every update.
npx dcl-sittables-copy-assets && npx dcl-bar-kit-copy-assetsAdd to
scene.jsonrequiredPermissions:"ALLOW_TO_MOVE_PLAYER_INSIDE_SCENE"and"ALLOW_TO_TRIGGER_AVATAR_EMOTE".In
main(): callsetupBar({ drinks: mocktails() })before anyaddBartender(...). Place furniture withplaceFurniture(FURNITURE.<name>, { position, facing }).Render
<BarUi />inside the scene's existing UI root. A scene has only oneReactEcsRenderer.setUiRenderer, and a second call replaces the first.Directions are degrees about the vertical: 0 = +Z, 90 = +X.
facingis the way the sitter (or the bartender) faces.
What it includes
Two npm packages:
- dcl-sittables: Click-to-sit seats shared between players, plus 17 ready-to-place models (bar stools, couches, a bench, tables).
- 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
positionis 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. Usecollision: '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 ownsyncEntityids below 7000. - dcl-bar-kit sets dcl-sittables' single sit handler, so don't call
setSitHandlerin 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: from an empty scene to a working bar
- sittables-reference.md: every dcl-sittables export
- bar-kit-reference.md: every dcl-bar-kit export
- custom-furniture.md: where a seat goes, tuning
- custom-drinks.md: glasses, building drinking emotes in Blender, specials
- custom-bartenders.md: personalities, routines, models
- how-it-works.md: what's shared between players
- troubleshooting.md: troubleshooting
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”