p5.js-svg icon indicating copy to clipboard operation
p5.js-svg copied to clipboard

p5.js version 1.7.0 "reading '__clearCanvas'" error

Open romellogoodman opened this issue 1 year ago • 7 comments

I am getting an error using the library with version 1.7.0 of p5.js.

TypeError: Cannot read properties of undefined (reading '__clearCanvas')

I created a sketch here for recreation purposes: https://editor.p5js.org/romellogoodman/sketches/pPa91TFuP. Assuming this might have something to do with the latest release of the library.

romellogoodman avatar Aug 16 '23 14:08 romellogoodman

Came to report the same bug. Reverting p5 to 1.6.x fixed this for me while we wait for a fix

xanderjl avatar Aug 25 '23 21:08 xanderjl

i think its my problem too i dont think im doing anything wrong whats the full different script i tried changing the 1.7.0s to 1.6.xs new to p5 obviously.

n-926 avatar Aug 29 '23 20:08 n-926

whats the full different script

I'm not totally following your ask here. While my implementation is fairly involved, the relevant piece happens here. Package versions are here

xanderjl avatar Aug 29 '23 23:08 xanderjl

I opened an issue asking for an example to my code and what i would add to the html and code in order to export my sketch as a svg so i can use that example for the others maybe you could check it out if get a chance? thank you anyways

n-926 avatar Sep 04 '23 16:09 n-926

Reverting to 1.6 worked for me, as did this fix: https://github.com/zenozeng/p5.js-svg/issues/172#issuecomment-610669082

oskay avatar Sep 04 '23 19:09 oskay

ok so i can revert to 1.6 (ill look that up how) and just to clarify one last thing on making sure im right- since im only using the library to export the p5.js sketch as an svg i dont need to actually re-code my sketch using "svg functions " or whatever to directly make it with svg shapes right, and i can just add ,svg like create canvas 600,600,svg, the one html script and upload the downloaded files extracted from the zip to the sidebar or not that part?

On Mon, Sep 4, 2023 at 3:13 PM Windell Oskay @.***> wrote:

Reverting to 1.6 worked for me, as did this fix: #172 (comment) https://github.com/zenozeng/p5.js-svg/issues/172#issuecomment-610669082

— Reply to this email directly, view it on GitHub https://github.com/zenozeng/p5.js-svg/issues/249#issuecomment-1705632979, or unsubscribe https://github.com/notifications/unsubscribe-auth/BB5ISQB3KHFK5UCIOUMYN73XYYR6FANCNFSM6AAAAAA3SU45U4 . You are receiving this because you commented.Message ID: <zenozeng/p5. @.***>

n-926 avatar Sep 04 '23 19:09 n-926

i am reading further into that at the different suggestions in that comment thread for calling the functions correctly

On Mon, Sep 4, 2023 at 3:22 PM Nicolas Calder @.***> wrote:

ok so i can revert to 1.6 (ill look that up how) and just to clarify one last thing on making sure im right- since im only using the library to export the p5.js sketch as an svg i dont need to actually re-code my sketch using "svg functions " or whatever to directly make it with svg shapes right, and i can just add ,svg like create canvas 600,600,svg, the one html script and upload the downloaded files extracted from the zip to the sidebar or not that part?

On Mon, Sep 4, 2023 at 3:13 PM Windell Oskay @.***> wrote:

Reverting to 1.6 worked for me, as did this fix: #172 (comment) https://github.com/zenozeng/p5.js-svg/issues/172#issuecomment-610669082

— Reply to this email directly, view it on GitHub https://github.com/zenozeng/p5.js-svg/issues/249#issuecomment-1705632979, or unsubscribe https://github.com/notifications/unsubscribe-auth/BB5ISQB3KHFK5UCIOUMYN73XYYR6FANCNFSM6AAAAAA3SU45U4 . You are receiving this because you commented.Message ID: <zenozeng/p5. @.***>

n-926 avatar Sep 04 '23 19:09 n-926