-
Notifications
You must be signed in to change notification settings - Fork 3
Description
Currently, if the canvas changes size, the visualization gets stretched out or squished. Instead, when the canvas is resized, the Scene offset and scale should be adjusted to preserve the aspect ratio of rendered Sprites.
This operation could be set to check for canvas size immediately before performing the draw call. If the canvas size has changed since the last call, then perform the offset/scale adjustment.
When performing the adjustment, there's a question as to which world coordinate to preserve. For example, it could be that the world origin maintains its position in pixel space relative to the top left of the canvas (or the center of the canvas). Consider what options might be appropriate and whether/how to expose them to the API user.