Object3D: Honor matrixWorldNeedsUpdate in updateWorldMatrix().#33746
Merged
Conversation
📦 Bundle sizeFull ESM build, minified and gzipped.
🌳 Bundle size after tree-shakingMinimal build including a renderer, camera, empty scene, and dependencies.
|
Mugen87
commented
Jun 8, 2026
| */ | ||
| update() { | ||
|
|
||
| this.matrixWorldNeedsUpdate = true; |
Collaborator
Author
There was a problem hiding this comment.
Whenever a helper wires a an object's world matrix to its local matrix and sets matrixAutoUpdate to false, it must set matrixWorldNeedsUpdate to true in its update method.
WestLangley
approved these changes
Jun 8, 2026
This was referenced Jun 12, 2026
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Related issue: -
Description
Right now,
updateWorldMatrix()recomputes the world matrix unconditionally. That is not correct since unlikeupdateMatrixWorld(), the flagmatrixWorldNeedsUpdateis currently ignored.When
matrixAutoUpdateis set tofalse, the applications ownsObject3D.matrix. That means it decides when to callupdateMatrix()or it writes directly intoObject3D.matrix. In any case,matrixWorldNeedsUpdateindicates when a world matrix update is required and when not. It is auto-set byupdateMatrix()or by the application/component itself.updateWorldMatrix()must honor this flag otherwise it performs unneeded computations.The PR also updates some helpers which currently ignore this policy.
Since this is a behavior change (correction) for
updateWorldMatrix()user, it must be noted in the migration guide.