Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sample(s) for hidpi, ResizeObserver, and fullscreen #356

Closed
kainino0x opened this issue Feb 27, 2024 · 2 comments
Closed

Sample(s) for hidpi, ResizeObserver, and fullscreen #356

kainino0x opened this issue Feb 27, 2024 · 2 comments
Assignees
Labels
sample request Request for a new sample sample wanted We definitely want to add this sample; contributions welcome

Comments

@kainino0x
Copy link
Collaborator

kainino0x commented Feb 27, 2024

We should have a sample that demonstrates correct usage of ResizeObserver to create canvases which are hidpi, resize-responsive, and fullscreenable. It should:

  • Show a checkerboard pattern to demonstrate the pixel size
  • Correctly handle both changing browser scale and changing canvas size
  • Let the user easily play with resizing by putting a resize handle on the canvas container div
  • Have a fullscreen button (perhaps fullscreening not just the canvas but a div containing some trivial HTML like a text overlay)

See also #249 about using hidpi canvases in more samples, which perhaps this sample should supersede.

@kainino0x
Copy link
Collaborator Author

kainino0x commented Feb 27, 2024

It could possibly also demonstrate CSS image-rendering options.
The sample image from the CSS spec is a nice test case for scaling-related stuff, so we could use it in this sample.
https://drafts.csswg.org/css-images/#example-30207ff9

@kainino0x kainino0x added sample request Request for a new sample sample wanted We definitely want to add this sample; contributions welcome labels Mar 5, 2024
@greggman greggman self-assigned this Mar 7, 2024
@greggman
Copy link
Collaborator

done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
sample request Request for a new sample sample wanted We definitely want to add this sample; contributions welcome
Projects
None yet
Development

No branches or pull requests

2 participants