Comments (7)
AcademiaWired/Traxometro is where I'm working, and I created that issue there because the problem with the <P5Wrapper />
causes effects that block me to continue developing some things. That issue is not the solution to this issue, I referenced this issue here over there, and not that issue here. Do you understand?
I closed that issue because in my case, I know when my component will be destroyed and in this place I put p.noLoop()
to stop the p.draw()
. But it's doesn't solve the <P5Wrapper />
's unmount problem.
I will look into the other repo that you mentioned as soon as possible. Thanks for you help! :D
from react.
I tried make an isDead()
in my component, pass it to the sketch and check if it's false
in the p.draw()
with an p.noLoop()
in the else. But when my component will be unmounted, the render()
it's no longer called, in other words, the <P5Wrapper />
will not receive new props.
Any help until wrapper update?
from react.
When you have a similar issue and the solution is in another language :D.
from react.
what did you mean?
from react.
It seems like when the issue was closed another discussion was referenced as part of the issue's closing, I dont understand the referenced discussion because its in another language. Thats all : )
As I am trying to tackle this issue I found this repo by @JobLeonard 'https://github.com/JobLeonard/p5-react' in which he addresses the mounting problems.
Im a newbie to both React and P5js so learning both of them at the same time and integrating them is quite the challenge :D.
from react.
About the @JobLeonard's repo: It seems very good, and solve the unmount problem. But also create the canvas by it's self, and in my case I want draw directly using the context provided from canvas
's element. To this propose, I'm using P5js library just to I don't have to worry about frame rate and the draw()
loop to update my own canvas.
I think that it can be better, but I didn't find another soluction until now (P5js doesn't provide the context and doesn't draw like I want)
from react.
I just released a new Version since Ages 😅
Please check if your Issue got fixed.
If not please reopen this Issue or create a new one.
from react.
Related Issues (20)
- Duplicate canvas when running in vite dev HOT 5
- TypeError: p5.loadSound is not a function HOT 4
- 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
- Is this package supported in React Native? HOT 1
- How to access custom props using abstracted updateWithProps
- Custom updaters as props for use in abstracted methods
- Missing typings for `ReactP5WrapperGuard` in 5.0.0-rc.0 HOT 2
- npm package for version 4.4.1 is empty HOT 3
- It creates new canvas once state is changed HOT 4
- How can I use @P5-wrapper/react in react native HOT 1
- drawingContext is not definied HOT 1
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.