import type { Armature , Pose } from '../../armature/index' ; import { IKChain } from './IKChain' ; class IKRig { items : Map < string , IKChain > = new Map ( ) ; constructor ( ) { } bindPose ( pose ) { let ch ; for ( ch of this . items . values ( ) ) ch . bindToPose ( pose ) ; return this ; } updateBoneLengths ( pose ) { let ch ; for ( ch of this . items . values ( ) ) { ch . resetLengths ( pose ) ; } return this ; } get ( name ) { return this . items . get ( name ) ; } add ( arm , name , bNames ) { const chain = new IKChain ( bNames , arm ) ; this . items . set ( name , chain ) ; return chain ; } } export default IKRig ;