We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Sketches which have a low framerate defined and resize the canvas when the window id resized, show some flickering behaviour. Here is an example:
<!DOCTYPE html> <html> <body> <div id="container"></div> <script type="module"> import u5 from "https://www.unpkg.com/u5js@0.4.2/index.js"; const example = (sketch) => { sketch.setup = function () { sketch.createCanvas(sketch.windowWidth, sketch.windowHeight); sketch.frameRate(25); }; sketch.draw = function () { sketch.background("white"); sketch.fill("black"); sketch.noStroke(); const d = Math.min(sketch.width, sketch.height) / 2; sketch.ellipse(sketch.width / 2, sketch.height / 2, d, d); }; sketch.windowResized = () => { sketch.resizeCanvas(sketch.windowWidth, sketch.windowHeight); }; }; new u5(example, document.getElementById("container")); </script> </body> </html>
Actual result: Canvas flickers when resized Expected result: Canvas should not flicker when resized
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Sketches which have a low framerate defined and resize the canvas when the window id resized, show some flickering behaviour.
Here is an example:
Actual result: Canvas flickers when resized
Expected result: Canvas should not flicker when resized
The text was updated successfully, but these errors were encountered: