You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@austinEng do we have common code anywhere for creating hidpi canvases? we should, and it should use ResizeObserver to handle devicePixelRatio changes (and forward them to the samples)
Thinking about this a little more while filing another issue - I'm now thinking we should not use hidpi canvases / ResizeObserver in most of the samples. It adds some complexity and I prefer the samples to be more standalone. It's more straightforward for most samples to have fixed canvas sizes, and people have to look at a ResizeObserver or hidpi sample if they want to learn how to do that.
Switching to iframes, ideally the iframe fills the page with a canvas. That way the sample browser is in control of what size to make the sample appear. Then it can choose a smaller size on mobile. With hardcoded sizes the samples are not mobile friendly
The samples are pretty minimal right now and I don't want to complicate all of them with canvas resizing stuff. Maybe I'm worried for nothing and it won't get in the way though. If it does, we could do something like, have samples use an 800x800 drawing buffer, and set up the CSS so the max-width/max-height are 800 css pixels but they can shrink to fit on mobile?
@austinEng do we have common code anywhere for creating hidpi canvases? we should, and it should use ResizeObserver to handle devicePixelRatio changes (and forward them to the samples)
Originally posted by @kainino0x in #247 (comment)
The text was updated successfully, but these errors were encountered: