Skip to main content

Crate pite_render

Crate pite_render 

Source
Expand description

pite-render: Renderer2D trait. wgpu is the only impl; the viewport talks to the trait so batching/3D later doesn’t touch tree or editor code.

Re-exports§

pub use atlas::Atlas;
pub use atlas::AtlasFrame;

Modules§

atlas
Sprite-sheet atlases: frame metadata from a JSON sidecar plus the UV math the sprite pipeline needs.
text

Structs§

NoopRenderer
OffscreenRenderer
WgpuRenderer

Traits§

Renderer2D

Functions§

fit_scale
Uniform “contain” scale that fits design inside actual keeping aspect: the game renders the design resolution through zoom * fit_scale so content grows and shrinks with the window instead of showing more world. Zero sizes fall back to 1.0 (a minimized window must not divide).
screen_to_ndc
screen_to_world
world_to_screen