Use matrix traits as transform source-of-truth#661
Conversation
🦋 Changeset detectedLatest commit: 256e06c The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
|
@claude review plz |
|
Claude finished @micheal-parks's task in 3m 56s —— View job PR Review
This is a substantial, well-reasoned refactor. Replacing the Pose SoA traits with Matrix4 AoS traits is the right call — the comment in One bugSee inline: Other issues (see inline comments)
Things that look good
|
|
@claude final review plz |
|
Claude finished @micheal-parks's task in 5m 28s —— View job Final Review
All issues from the first review have been addressed. This is in good shape to merge. Previous issues — resolved
New findings (minor)See inline comments:
Things that look correct
|
|
|
||
| // Initialize the state with the current value of the trait. | ||
| let value = $derived(entity?.get(trait)) | ||
| let value = $state.raw<TraitRecord<T>>() |
There was a problem hiding this comment.
Reactivity bugfix, will need to add it to my upstream koota PR
| } | ||
| } | ||
|
|
||
| useTask( |
mattmacf98
left a comment
There was a problem hiding this comment.
approved with comments to:
- double check microtask is 1-1 with animation frame
- move transform math stuff to lib/three (to be renamed lib/math)
This PR replaces our current pose traits with matrices, and introduces a world matrix resolver that runs on trait updates. This has the following benefits:
Followups
After this, the remaining refactor steps are:
<Portal>and render all objects based onMatrixWorld.