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

Delegate canvas resizing #126

Merged
merged 2 commits into from
Jul 6, 2024
Merged

Conversation

raphaelameaume
Copy link
Owner

This PR delegates the resize of the canvas to the Renderer or the sketch file itself (see blank example) instead of applying canvas.width and canvas.height.

This has several files benefits such as:

  • not going against external library
  • fixing canvas blinking on resize
  • removing black canvas showing up when resizing with p5.js renderers
  • fix cross browser display

Details

  • Handle canvas resize in blank template
  • Handle canvas resize in fragment-gl renderer
  • Handle canvas resize in 2d renderer
  • Simplify canvas resize in p5.js renderers
  • Compute canvas display size with new CSS features
@raphaelameaume raphaelameaume merged commit c8d771b into dev Jul 6, 2024
@raphaelameaume raphaelameaume deleted the improvement/delegate-canvas-resizing branch July 6, 2024 09:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
1 participant