# Cube

> Vitro pack: a solid glass paperweight cube with rounded edges, a matte ball set in its heart and two glossy hoops turning round it inside the glass. Every face bends the ball into its own view, so it doubles and stretches as the cube turns, and light bounces round the inside of the walls. A tap spins the hoops up like a gyroscope. Raymarched in WebGL.

- Slug: `vitro-cube`
- Category: [Asset packs](https://assembli-rho.vercel.app/category/asset-packs.md)
- Subcategory: [Vitro](https://assembli-rho.vercel.app/category/asset-packs/vitro.md) (`vitro`)
- Type: component
- Tags: 3d, webgl, raymarching, asset, glass, abstract, refraction, cube, paperweight, crystal, gyroscope
- npm dependencies: none
- shadcn/ui dependencies: none
- Added: 2026-10-22
- Live preview: https://assembli-rho.vercel.app/preview/vitro-cube
- Page: https://assembli-rho.vercel.app/components/vitro-cube

## Install

One-time setup (needs a subscription):

1. Add the registry to the project's `components.json`: `{"@assembli":{"url":"https://assembli-rho.vercel.app/r/{name}.json","headers":{"Authorization":"Bearer ${ASSEMBLI_API_KEY}"}}}` (merge into `"registries"`).
2. Put an API key from https://assembli-rho.vercel.app/account in `.env.local` as `ASSEMBLI_API_KEY=asm_…`.

Then install with the shadcn CLI (writes `components/vitro-cube/vitro-cube.tsx` and installs dependencies):

```bash
npx shadcn@latest add @assembli/vitro-cube
```

Registry item JSON: https://assembli-rho.vercel.app/r/vitro-cube.json (send `Authorization: Bearer <api key>`)

## Code

> Component source needs an Assembli subscription ($12/month) and an API key sent as `Authorization: Bearer <key>`. To get one without copying anything, POST https://assembli-rho.vercel.app/api/agent/login (or call the MCP tool connect_account), show the user the link it returns, and poll https://assembli-rho.vercel.app/api/agent/token for the key. Or subscribe at https://assembli-rho.vercel.app/pricing and create a key at https://assembli-rho.vercel.app/account.
