Properties

combineMorphs: (vrm: VRMCore) => void = combineMorphs

Type declaration

    • (vrm: VRMCore): void
    • Combine morph targets by VRM expressions.

      This function prevents crashes caused by the limitation of the number of morph targets, especially on mobile devices.

      Parameters

      Returns void

combineSkeletons: (root: Object3D) => void = combineSkeletons

Type declaration

    • (root: Object3D): void
    • Traverses the given object and combines the skeletons of skinned meshes.

      Each frame the bone matrices are computed for every skeleton. Combining skeletons reduces the number of calculations needed, improving performance.

      Parameters

      • root: Object3D

        Root object that will be traversed

      Returns void

deepDispose: (object3D: Object3D) => void = deepDispose
removeUnnecessaryJoints: (
    root: Object3D,
    options?: { experimentalSameBoneCounts?: boolean },
) => void = removeUnnecessaryJoints

Type declaration

    • (root: Object3D, options?: { experimentalSameBoneCounts?: boolean }): void
    • 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.

      Parameters

      • root: Object3D

        Root object that will be traversed

      • Optionaloptions: { experimentalSameBoneCounts?: boolean }
        • OptionalexperimentalSameBoneCounts?: boolean

          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 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.

      Returns void

      removeUnnecessaryJoints is deprecated. Use combineSkeletons instead. combineSkeletons contributes more to the performance improvement. This function will be removed in the next major version.

removeUnnecessaryVertices: (root: Object3D) => void = removeUnnecessaryVertices

Type declaration

    • (root: Object3D): void
    • Traverse given object and remove unnecessary vertices from every BufferGeometries. This only processes buffer geometries with index buffer.

      Three.js creates morph textures for each geometries and it sometimes consumes unnecessary amount of VRAM for certain models. This function will optimize geometries to reduce the size of morph texture. See: https://github.com/mrdoob/three.js/issues/23095

      Parameters

      • root: Object3D

        Root object that will be traversed

      Returns void

rotateVRM0: (vrm: VRM) => void = rotateVRM0

Type declaration

    • (vrm: VRM): void
    • If the given VRM is VRM0.0, rotate the vrm.scene by 180 degrees around the Y axis.

      Parameters

      • vrm: VRM

        The target VRM

      Returns void