Skip to content

Allow canvas size to be controlled by page layout on web target #1661

@alvinhochun

Description

@alvinhochun

Currently, the web target uses a fixed window size and it sizes the canvas based on it. It would be nice to instead have a mode that allows the canvas to be laid out on the page with CSS layout like flexbox or CSS grid. The resizing of the element can be detected using ResizeObsever, which can also handle pixel-perfect canvas sizing (#1659 (comment)). In this mode, the winit window should not be resizable by user code.

Metadata

Metadata

Assignees

No one assigned

    Labels

    DS - webAffects the Web backend (WebAssembly/WASM)H - help wantedSomeone please save usS - enhancementWouldn't this be the coolest?

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions