@modoki/engine / index / WebSizing
Interface: WebSizing
webCanvasSizing — pure geometry for the shipped web build's rendering.web.sizeMode.
Applies ONLY to the standalone/shipped web game's layer container (App.tsx .game-wrapper) — NOT the editor viewport (which sizes itself / uses device presets). Three modes (see project-config rendering.web):
free→ the container fills the viewport; renderers use the full buffer.fixed→ the container is letterboxed to the width×height ASPECT, centred, with bars around it; renderers fill that (smaller) container.max→ the container fills the viewport, but each renderer's DRAWING BUFFER is clamped to at most width×height (CSS still fills, so a 4K display renders at ≤ width×height and upscales — saves fill-rate).
Kept pure (no DOM) so it's unit-testable; callers apply the returned numbers.
Rendering
height
height:
number
sizeMode
sizeMode:
"fixed"|"free"|"max"
width
width:
number