mirror of
https://github.com/cocos/cocos4.git
synced 2026-12-03 01:12:42 +08:00
df6b7b5e60
* better joint texture layout * still need to update world matrix when batching * shouldn't update instancing attributes for implant psos * fix copy framebuffer to buffer * fix texture multiple upload * wording
29 lines
939 B
TypeScript
29 lines
939 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 { 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();
|
|
}
|
|
}
|