Skip to content

Commit 6a7642c

Browse files
authored
Merge pull request #1540 from pixiv/deprecate-removeunnecessaryjoints
feat: put a deprecation warning to VRMUtils.removeUnnecessaryJoints
2 parents e3e48f1 + e2016fc commit 6a7642c

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

packages/three-vrm/src/VRMUtils/removeUnnecessaryJoints.ts

+6
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ import * as THREE from 'three';
1010
* Also, this function might significantly improve the performance of mesh skinning.
1111
*
1212
* @param root Root object that will be traversed
13+
*
14+
* @deprecated `removeUnnecessaryJoints` is deprecated. Use `combineSkeletons` instead. `combineSkeletons` contributes more to the performance improvement. This function will be removed in the next major version.
1315
*/
1416
export function removeUnnecessaryJoints(
1517
root: THREE.Object3D,
@@ -27,6 +29,10 @@ export function removeUnnecessaryJoints(
2729
experimentalSameBoneCounts?: boolean;
2830
},
2931
): void {
32+
console.warn(
33+
'VRMUtils.removeUnnecessaryJoints: removeUnnecessaryJoints is deprecated. Use combineSkeletons instead. combineSkeletons contributes more to the performance improvement. This function will be removed in the next major version.',
34+
);
35+
3036
const experimentalSameBoneCounts = options?.experimentalSameBoneCounts ?? false;
3137

3238
// Traverse an entire tree, and collect all skinned meshes

0 commit comments

Comments
 (0)