Skip to content

Commit

Permalink
Merge pull request #1540 from pixiv/deprecate-removeunnecessaryjoints
Browse files Browse the repository at this point in the history
feat: put a deprecation warning to VRMUtils.removeUnnecessaryJoints
  • Loading branch information
0b5vr authored Nov 26, 2024
2 parents e3e48f1 + e2016fc commit 6a7642c
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions packages/three-vrm/src/VRMUtils/removeUnnecessaryJoints.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ import * as THREE from 'three';
* Also, this function might significantly improve the performance of mesh skinning.
*
* @param root Root object that will be traversed
*
* @deprecated `removeUnnecessaryJoints` is deprecated. Use `combineSkeletons` instead. `combineSkeletons` contributes more to the performance improvement. This function will be removed in the next major version.
*/
export function removeUnnecessaryJoints(
root: THREE.Object3D,
Expand All @@ -27,6 +29,10 @@ export function removeUnnecessaryJoints(
experimentalSameBoneCounts?: boolean;
},
): void {
console.warn(
'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.',
);

const experimentalSameBoneCounts = options?.experimentalSameBoneCounts ?? false;

// Traverse an entire tree, and collect all skinned meshes
Expand Down

0 comments on commit 6a7642c

Please sign in to comment.