UX is the ScrapyardIO layered scene / node library for 0.7. A screen is a
tree of Node / Drawable / UIComponent children orchestrated by a Scene
that paints through a borrowed tubes Renderer2D into a Canvas framebuffer.
game-engine (future) → scrapyard-io/ux → scrapyard-io/tubes → framework
- PHP 8.4+
scrapyard-io/framework^0.7scrapyard-io/tubes^0.7
composer require scrapyard-io/ux:^0.7.0
php workshop package:discoverPublish the config to change the palette or default metrics:
php workshop vendor:publish --tag=ux-configuse ScrapyardIO\UX\Components\Chrome\Panel;
use ScrapyardIO\UX\Components\Chrome\StatusBar;
use ScrapyardIO\UX\Components\Ball;
use ScrapyardIO\UX\Core\Scene;
$root = Panel::surface();
$root->addChild(StatusBar::of('L', 'C', 'R'));
$root->addChild(Ball::of(24)->setCenter(160, 120));
$scene = (new Scene)->attach($window)->setRoot($root);
$renderer->setFramebuffer($window->framebuffer());
$scene->paint($renderer);
$renderer->unsetFramebuffer();
$window->present();With UX installed, the tubes smoke name runs the UX Scene sketch:
./runner canvas-window-demo
./runner canvas-window-demo sdl3 --fps=60
./runner ux-canvas-window-demo # explicit aliasphp workshop make:component Hud/Meter
php workshop make:ux-node Entities/PlayerEcosystem docs and the package .okf/ knowledge bundle cover the layered tree,
ownership vs tubes, and the engine extension seam.