Skip to main content

Crate sgl_2d

Crate sgl_2d 

Source
Expand description

Reusable native/browser client building blocks.

Games own composition, simulation, content, and UI layout. This crate owns reusable asset, rendering, text, lighting, and immediate UI mechanisms extracted from working games.

Modules§

aseprite
Aseprite JSON sprite-sheet parsing and loading.
assets
Asset loading and caching: native clients can read an asset directory; browser bootstrap supplies the same bytes as an AssetBundle. GPU upload stays in the renderer.
canvas
Logical-canvas GPU rendering. This module may use winit’s Window handle to create a surface, but the game owns the window and event loop.
ui
Immediate-mode UI over the DrawList screen channel (AR-6): the app rebuilds every widget each frame; the only retained state is interaction (which widget the mouse went down on, which line-edit has focus, a blink clock).