import * as THREE from 'three' ; import { GLTF } from 'three/examples/jsm/loaders/GLTFLoader' ; import { VRMSpringBoneImporter } from '../springbone/VRMSpringBoneImporter' ; import { VRMSpringBoneManagerDebug } from './VRMSpringBoneManagerDebug' ; import { VRMSchema } from '../types' ; import { VRMSpringBoneDebug } from './VRMSpringBoneDebug' ; import { VRMSpringBoneParameters } from '../springbone/VRMSpringBoneParameters' ; export class VRMSpringBoneImporterDebug extends VRMSpringBoneImporter { public async import ( gltf ) { const vrmExt = gltf . parser . json . extensions ?. VRM ; if ( ! vrmExt ) return null ; const schemaSecondaryAnimation = vrmExt . secondaryAnimation ; if ( ! schemaSecondaryAnimation ) return null ; const colliderGroups = await this . _importColliderMeshGroups ( gltf , schemaSecondaryAnimation ) ; const springBoneGroupList = await this . _importSpringBoneGroupList ( gltf , schemaSecondaryAnimation , colliderGroups ) ; return new VRMSpringBoneManagerDebug ( colliderGroups , springBoneGroupList ) ; } protected _createSpringBone ( bone , params ) { return new VRMSpringBoneDebug ( bone , params ) ; } }