Comments (4)
I just removed the addons. (I was not sure if I should add them anyway)
Can you try Version 1.2.1?
from react.
Hi, I removed p5 as a Dependency of the p5-wrapper so everybody can choose which p5 Version he is using.
So you need to add p5 as an Dependency by yourself.
Try:
npm install p5 --save
from react.
Yes it's already in my dependencies and looks like the exception thrown from p5.dom
from react.
I'm sorry I found the problem.
The problem is in p5.dom.js
. Someone added 2 functions but in wrong place. This two functions should have been added before });
(line 3118).
processing/p5.js@9b5094a#diff-84dfcaf5d56a24f4ee13a32c644817b0R3118
Those changes was released in 21 Jan in 0.7.3
. Then this problem was fixed 23 Jan (processing/p5.js@8c75c73#diff-84dfcaf5d56a24f4ee13a32c644817b0). But this fix were in the next release 0.8.0
, which took place after 3 months on 9 Apr!
- I started my project in march so I used latest p5.js
0.7.3
. - I did not use the library
p5.dom.js
so the error did not occur. - Then I added
react-p5-wrapper
it uses ownp5
package0.5.5
so the error did not occur when I started using ofp5.dom
. - When I updated
react-p5-wrapper
to1.2.0
it began to usep5
from my project which is0.7.3
. I have created this Issue. - I have updated
p5
to0.8.0
and error is gone.
Now I update react-p5-wrapper to 1.2.1
. So to use dom library I import corresponding file in my sketch.js: import "p5/lib/addons/p5.dom";
.
🤯
Thank you.
from react.
Related Issues (20)
- Migrate to Vite and Vitest
- Migrate to the @P5-wrapper npm org
- Loading image P5-react
- React's strict mode causes the canvas to be created twice HOT 4
- An example of exposing imperative methods from the sketch? HOT 9
- unexpected array behavior inside p5 sketch function HOT 1
- ReactP5Wrapper has additional pixels in height HOT 3
- Could not find a declaration file but the code works HOT 10
- Duplicate canvas when running in vite dev HOT 5
- TypeError: p5.loadSound is not a function HOT 3
- P5-wrapper size HOT 5
- Stop rerender of p5 component when redux variables update HOT 3
- Latest commits not in the npm registry HOT 5
- Issue building with Vite 5 HOT 16
- npm ERR! Usage Error: This project is configured to use npm HOT 2
- windowResized() not firing HOT 4
- Error in nextjs HOT 7
- Change p5 dependency version to minimum 1.4.1 HOT 9
- Examples directory doesn't exist, link broken on README HOT 3
- Module parse failed: Identifier 'XX' has already been declared (7762:41) HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react.