Files
cocos4/cocos/core/renderer/data-pool-manager.ts
T
2020-10-12 18:30:08 +08:00

33 lines
919 B
TypeScript

/**
* @packageDocumentation
* @hidden
*/
import { AnimationClip } from '../animation/animation-clip';
import { Skeleton } from '../assets';
import { GFXDevice } from '../gfx';
import { JointAnimationInfo, JointTexturePool } from './models/skeletal-animation-utils';
export class DataPoolManager {
public jointTexturePool: JointTexturePool;
public jointAnimationInfo: JointAnimationInfo;
constructor (device: GFXDevice) {
this.jointTexturePool = new JointTexturePool(device);
this.jointAnimationInfo = new JointAnimationInfo(device);
}
public releaseSkeleton (skeleton: Skeleton) {
this.jointTexturePool.releaseSkeleton(skeleton);
}
public releaseAnimationClip (clip: AnimationClip) {
this.jointTexturePool.releaseAnimationClip(clip);
}
public clear () {
this.jointTexturePool.clear();
this.jointAnimationInfo.clear();
}
}