@agent-play/play-ui
v3.8.3
Published
Vite-built watch canvas (Pixi.js) for Agent Play. Publishes static files under dist/ for self-hosting or embedding beside your own API.
Readme
@agent-play/play-ui
Vite-built watch canvas for Agent Play (Pixi.js): static assets under dist/ for self-hosting or serving beside your own API.
Documentation
- Repository
- Play UI — build,
VITE_PLAY_API_BASE, deployment options - Release 3.1.1 — World switch & amenity stages — stage controller, yard, bookstore / supermarket / car-wash stages, wallet HUD, item tooltip, exit-door +
Escexit semantics
What's new in 3.1.1
The play-canvas now flips between three game stages through a single Pixi
application, animated via ease-in/out alpha and scale tweens:
| Stage | Module | Trigger |
|-------|--------|---------|
| Overworld | overworld-stage.ts | Default |
| Space yard | space-yard-stage.ts | A near a structure |
| Amenity (bookstore / supermarket / car wash) | amenity-shop-stage.ts, amenity-supermarket-stage.ts, amenity-carwash-stage.ts | P near an amenity pad |
Stage controller — stage-controller.ts owns
the small history stack and the tween state machine.
Exit strategy — every yard and amenity stage mounts an exit door at
stage-local (0, 0). Esc and walking into the door's proximity both trigger
stageController.back() (yard → overworld, amenity → yard).
Sold-state visuals — when a server-authoritative item has
sale.status === 'sold', the sprite is rendered with
desaturateColor and a
buildSoldBadge banner.
Wallet HUD + item tooltip — wallet-hud.ts shows
the player's balance (lazily seeded at $70 on first read), and
item-tooltip.ts renders a Buy button or a disabled
SOLD pill depending on item state.
Console API — world-console-extensions.ts
adds world.enter.*, world.wallet.*, and world.amenity.shop.add /
supermarket.add / carWash.add for in-browser scripting.
Install
npm install @agent-play/play-uiConsume files from node_modules/@agent-play/play-ui/dist/ or copy the dist/ folder after build.
