Giter Site home page Giter Site logo

Comments (5)

AlaricBaraou avatar AlaricBaraou commented on June 5, 2024 1

Can I do anything to help this one get merged ?

Like a demo or analysis on the impact on the eco-system etc

Let me know!

from react-three-fiber.

AlaricBaraou avatar AlaricBaraou commented on June 5, 2024 1

Here is a demo using invalidate and Drei Orbitcontrols that perfectly showcase the difference.
When using the controls it request a render. Same when clicking the cube.
At the top of the demo I display the current number of frames queued in the root state.
We can see that the new version never goes over 1 and therefore never call unnecessary renders.

New version using the build from the linked PR
https://codesandbox.io/p/sandbox/basic-demo-forked-92gy2c?file=%2Fsrc%2FApp.js
Old version ( you can see how the frames stack up to 60 )
https://codesandbox.io/p/sandbox/invalidate-fix-forked-7sqggj?file=%2Fsrc%2FApp.js%3A43%2C28

I believe the majority of the ecosystem that use invalidate will keep working fine as long as they were already calling invalidate correctly.

from react-three-fiber.

CodyJasonBennett avatar CodyJasonBennett commented on June 5, 2024 1

Out since v8.16.1. This was the intended behavior, so I'm considering it a bugfix.

from react-three-fiber.

CodyJasonBennett avatar CodyJasonBennett commented on June 5, 2024

Implemented in #3185.

from react-three-fiber.

AlaricBaraou avatar AlaricBaraou commented on June 5, 2024

Sorry the PR I linked previously (#3187) wasn't about this issue, it was a relatively unrelated issue and duplicate of my previous PR (#3185).
That PR was just about fixing how the parameter was passed but doesn't fix anything here.

This is the PR I intended to do and that would fix this issue.
#3197

edit: I updated the initial issue description to link to the correct PR

from react-three-fiber.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.