Skip to content

Commit

Permalink
docs: Reword and improve the doc comment of removeUnnecessaryJoints
Browse files Browse the repository at this point in the history
… and its option `experimentalSameBoneCounts`
  • Loading branch information
0b5vr committed Jul 11, 2024
1 parent b4a3bb1 commit 5df50f7
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions packages/three-vrm/src/VRMUtils/removeUnnecessaryJoints.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
import * as THREE from 'three';

/**
* Traverse given object and remove unnecessarily bound joints from every `THREE.SkinnedMesh`.
* Some environments like mobile devices have a lower limit of bones and might be unable to perform mesh skinning, this function might resolve such an issue.
* Also this function might greatly improve the performance of mesh skinning.
* Traverse the given object and remove unnecessarily bound joints from every `THREE.SkinnedMesh`.
*
* Some environments like mobile devices have a lower limit of bones
* and might be unable to perform mesh skinning with many bones.
* This function might resolve such an issue.
*
* Also, this function might significantly improve the performance of mesh skinning.
*
* @param root Root object that will be traversed
*/
Expand All @@ -13,9 +17,11 @@ export function removeUnnecessaryJoints(
/**
* If `true`, this function will compensate skeletons with dummy bones to keep the bone count same between skeletons.
*
* This option might be effective for the shader compilation performance that matters to the initial rendering time,
* This option might be effective for the shader compilation performance that matters to the initial rendering time in WebGPURenderer,
* especially when the model loaded has many materials and the dependent bone count is different between them.
*
* Consider this parameter as experimental. We might modify or delete this API without notice in the future.
*
* `false` by default.
*/
experimentalSameBoneCounts?: boolean;
Expand Down

0 comments on commit 5df50f7

Please sign in to comment.