ml5js / ml5-website-v02-gatsby

A work-in-progress repo for the new website of ml5.js
https://ml5js.org/
MIT License
0 stars 9 forks source link

iframe p5 sketch loading issue #6

Closed MOQN closed 5 months ago

MOQN commented 7 months ago

The p5 sketch in the iframe doesn't load when coming back from a Docisy page.

alanvww commented 5 months ago

Fixed in #10 Preview Deployment

MOQN commented 5 months ago

@alanvww Thank you! This is fantastic. Can you please apply max-width: 800px for the iframe module on Learn, Community and About pages?

alanvww commented 5 months ago

@MOQN I just tried a little more time with my deploy preview and I believe the sketch is loading correctly when the user go back from the docsify page now.(It didn't fail on my device :/) But for the problem in "open in new page", it shows the same error that

DOMException: Failed to execute 'drawImage' on 'CanvasRenderingContext2D': The image argument is a canvas element with a width or height of 0.

This is actually quite interesting and I would like to explore it more besides working on the content. In the meantime, maybe we can try to review the p5 sketch code together?

MOQN commented 5 months ago

@alanvww Thank you! Absolutely. Please feel free to look at this code. I got an idea for solving it. Let me explore it and share the details soon.

MOQN commented 5 months ago

The hero sketch was newly developed with @XiaozaoWang's hand sketches.