Files
cocos4/cocos/core/renderer/data-pool-manager.ts
T
Yun Hsiao Wu df6b7b5e60 better joint texture layout (#6372)
* 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
2020-03-20 18:26:29 +08:00

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();
}
}