Skip to content

SkinnedMesh: Update "applyBoneTransform" to optionally take Vector4, support direction or position transformation#33091

Merged
gkjohnson merged 3 commits intomrdoob:devfrom
gkjohnson:adjust-applybonematrix
Mar 1, 2026
Merged

SkinnedMesh: Update "applyBoneTransform" to optionally take Vector4, support direction or position transformation#33091
gkjohnson merged 3 commits intomrdoob:devfrom
gkjohnson:adjust-applybonematrix

Conversation

@gkjohnson
Copy link
Collaborator

Related issue: --

Description

Previously there was no way to transform directions like vertex normals or tangents with SkinnedMesh. This PR updates the "applyBoneTransform" to take both a Vector3 or a Vector4. If a Vector3 is passed then it is assumed to be a position vector, as before. If a Vector4 is passed then homogenous coordinates can be used to treat it as either a direction (w === 0) or a position (w === 1).

Adjustment made for SkinnedMesh support in the path tracer.

@gkjohnson gkjohnson added this to the r184 milestone Feb 28, 2026
@github-actions
Copy link

github-actions bot commented Feb 28, 2026

📦 Bundle size

Full ESM build, minified and gzipped.

Before After Diff
WebGL 359.57
85.37
359.57
85.37
+0 B
+0 B
WebGPU 626.97
174.23
626.97
174.23
+0 B
+0 B
WebGPU Nodes 625.55
173.98
625.55
173.98
+0 B
+0 B

🌳 Bundle size after tree-shaking

Minimal build including a renderer, camera, empty scene, and dependencies.

Before After Diff
WebGL 491.31
119.78
491.31
119.78
+0 B
+0 B
WebGPU 700.59
189.23
700.59
189.23
+0 B
+0 B
WebGPU Nodes 649.8
176.59
649.8
176.59
+0 B
+0 B

@gkjohnson gkjohnson merged commit ea6e975 into mrdoob:dev Mar 1, 2026
10 checks passed
@gkjohnson gkjohnson deleted the adjust-applybonematrix branch March 1, 2026 11:14
@sunag sunag mentioned this pull request Mar 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants