Tresjs / tres

Declarative ThreeJS using Vue Components
https://tresjs.org
MIT License
1.91k stars 85 forks source link

refactor: update and maintain __tres parent/objects graph #741

Closed andretchen0 closed 1 week ago

andretchen0 commented 1 week ago

The existing parent/objects fields on __tres were unused. These are required for proper disposal of primitives – among other things.

With this PR, the parent/objects graph is now maintained when nodes are inserted and removed in nodeOps.

Context

This is a refactor in support of #701 . It builds on #741 .

netlify[bot] commented 1 week ago

Deploy Preview for tresjs-docs ready!

Name Link
Latest commit 76090a9f645af46b633445ba864c63dd2ce0e43d
Latest deploy log https://app.netlify.com/sites/tresjs-docs/deploys/66798bac6912dc00087a1b8f
Deploy Preview https://deploy-preview-741--tresjs-docs.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

andretchen0 commented 1 week ago

@alvarosabu , I've pushed changes. Does that resolve the issues you raised?

alvarosabu commented 1 week ago

@alvarosabu , I've pushed changes. Does that resolve the issues you raised?

Indeed, thanks for the fixes, do you want to address abstracting the utility functions in the scope of this PR or do you prefer to handle it on a future one?

andretchen0 commented 1 week ago

@alvarosabu , I've pushed changes. Does that resolve the issues you raised?

Indeed, thanks for the fixes, do you want to address abstracting the utility functions in the scope of this PR or do you prefer to handle it on a future one?

Hey @alvarosabu ,

I've moved the out of nodeOps and simplified them in the next PR in this series, so I'll go ahead and merge here.