mirror of
https://github.com/cocos/cocos4.git
synced 2026-12-06 19:42:39 +08:00
2d431f7ec4
* submodel joints data * map VB joint indices on demand * fix joint mapping * fix shadows * minor
29 lines
953 B
TypeScript
29 lines
953 B
TypeScript
// Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd.
|
|
import { AnimationClip } from '../animation/animation-clip';
|
|
import { Skeleton } from '../assets';
|
|
import { GFXDevice } from '../gfx/device';
|
|
import { JointsAnimationInfo, JointsTexturePool } from './models/skeletal-animation-utils';
|
|
|
|
export class DataPoolManager {
|
|
public jointsTexturePool: JointsTexturePool;
|
|
public jointsAnimationInfo: JointsAnimationInfo;
|
|
|
|
constructor (device: GFXDevice) {
|
|
this.jointsTexturePool = new JointsTexturePool(device);
|
|
this.jointsAnimationInfo = new JointsAnimationInfo(device);
|
|
}
|
|
|
|
public releaseSkeleton (skeleton: Skeleton) {
|
|
this.jointsTexturePool.releaseSkeleton(skeleton);
|
|
}
|
|
|
|
public releaseAnimationClip (clip: AnimationClip) {
|
|
this.jointsTexturePool.releaseAnimationClip(clip);
|
|
}
|
|
|
|
public clear () {
|
|
this.jointsTexturePool.clear();
|
|
this.jointsAnimationInfo.clear();
|
|
}
|
|
}
|