Skip to main content

Module cotis_traits

Module cotis_traits 

Source
Expand description

Cotis context trait implementations for HTMLRenderer.

These traits connect the renderer to the Cotis app loop:

TraitProvides
RendererTextMeasuringProviderBrowser-based text measurement via renderer.js
CotisWindowContextViewport size in pixels
CotisFrameContextFrame delta time in seconds
cotis_utils::traits::CotisRenderContextProvided automatically via blanket impl when window + frame traits are implemented
RenderCompatibleWithNo-op layout init hook

Mouse input is implemented on HTMLRenderer directly (see the interactivity module). Keyboard state is available through HTMLInteractivity in the interactivity module (SimpleKeyboardProvider).