question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Rework updateWorldMatrix / scene.autoUpdate

See original GitHub issue

I think I would perhaps be able to implement a smarter system of handling matrixWorldNeedsUpdate based on a tri-state value (“no update needed”, “I need update”, “some children need update”). With such implementation it would not be necessary to always traverse all objects in scene.updateMatrixWorld, which I think is the main performance reason why people are disabling scene.autoUpdate and resort to calling updateMatrixWorld manually.

I think the implementation would be mostly backwards compatible (i.e. handling updateMatrixWorld manually would still be possible, and the interface would not change when relying on automatic updates).

@WestLangley @mrdoob @Mugen87 Before I start experimenting with this, I would like to know what is the general sentiment here regarding such change. Would it be welcome, or do you prefer the things to stay as they are? If you feel this is a step in right direction, are there any special requirements / restrictions you would require from such change?

Issue Analytics

  • State:open
  • Created 3 years ago
  • Reactions:10
  • Comments:16 (9 by maintainers)

github_iconTop GitHub Comments

2reactions
WestLangleycommented, Mar 3, 2021

…and we wait for making matrices private for now.

Many users set the object matrix directly in their app. It is a feature that has been supported since the inception of three.js, and it is a feature we must continue to support.

2reactions
Mugen87commented, Mar 2, 2021

Related #14138, #18344, #20220 (and actually many more^^).

I think you should closely study these discussions first before you try something new.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Scene#autoUpdate – three.js docs
Scene. Scenes allow you to set up what and where is to be rendered by three.js. This is where you place objects, lights...
Read more >
localToWorld uses matrix from the previous frame #20220
The only way to fix this is to use updateWorldMatrix (or render the scene) to force matrix update. In my case this causes...
Read more >
Three.js update object's matrix and scale? - Stack Overflow
matrix= my matrix; It works fine. But later when I need to perform a scale on z. Nothing happened, I guess it's because...
Read more >
Team:Munich/Hardware/threeJS - iGEM 2018
setFromEuler: function ( euler, update ) { ... updateWorldMatrix: function ( updateParents, updateChildren ) { ... autoUpdate === true ) scene.
Read more >
Utsubo on Twitter: "By default, #threejs will automatically ...
As the scene graph gets bigger, the number of matrix updates increases, ... in Object3D#updateWorldMatrix or Object3D#updateMatrixWorld if ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found