mirror of
https://github.com/cocos/cocos4.git
synced 2026-12-02 16:52:43 +08:00
committed by
Weiliang Wang
parent
d2eb6eaca4
commit
c447bf5eff
Vendored
+27
-26
File diff suppressed because one or more lines are too long
@@ -326,9 +326,9 @@ export class AnimationState extends Playable {
|
||||
this._process();
|
||||
}
|
||||
|
||||
public _needRevers (currentIterations: number) {
|
||||
public _needReverse (currentIterations: number) {
|
||||
const wrapMode = this.wrapMode;
|
||||
let needRevers = false;
|
||||
let needReverse = false;
|
||||
|
||||
if ((wrapMode & WrapModeMask.PingPong) === WrapModeMask.PingPong) {
|
||||
const isEnd = currentIterations - (currentIterations | 0) === 0;
|
||||
@@ -338,13 +338,13 @@ export class AnimationState extends Playable {
|
||||
|
||||
const isOddIteration = currentIterations & 1;
|
||||
if (isOddIteration) {
|
||||
needRevers = !needRevers;
|
||||
needReverse = !needReverse;
|
||||
}
|
||||
}
|
||||
if ((wrapMode & WrapModeMask.Reverse) === WrapModeMask.Reverse) {
|
||||
needRevers = !needRevers;
|
||||
needReverse = !needReverse;
|
||||
}
|
||||
return needRevers;
|
||||
return needReverse;
|
||||
}
|
||||
|
||||
public getWrappedInfo (time: number, info?: WrappedInfo) {
|
||||
@@ -375,19 +375,19 @@ export class AnimationState extends Playable {
|
||||
if (time !== 0) { time += duration; }
|
||||
}
|
||||
|
||||
let needRevers = false;
|
||||
let needReverse = false;
|
||||
const shouldWrap = this._wrapMode & WrapModeMask.ShouldWrap;
|
||||
if (shouldWrap) {
|
||||
needRevers = this._needRevers(currentIterations);
|
||||
needReverse = this._needReverse(currentIterations);
|
||||
}
|
||||
|
||||
let direction = needRevers ? -1 : 1;
|
||||
let direction = needReverse ? -1 : 1;
|
||||
if (this.speed < 0) {
|
||||
direction *= -1;
|
||||
}
|
||||
|
||||
// calculate wrapped time
|
||||
if (shouldWrap && needRevers) {
|
||||
if (shouldWrap && needReverse) {
|
||||
time = duration - time;
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -710,7 +710,7 @@ class Game extends EventTarget {
|
||||
nativeWidth: Math.floor(screen.width * cc.view._devicePixelRatio),
|
||||
nativeHeight: Math.floor(screen.height * cc.view._devicePixelRatio),
|
||||
};
|
||||
// fallback if WebGL2 is actually unavailable
|
||||
// fallback if WebGL2 is actually unavailable (usually due to driver issues)
|
||||
if (!this._gfxDevice.initialize(opts) && useWebGL2) {
|
||||
this._gfxDevice = new cc.WebGLGFXDevice();
|
||||
this._gfxDevice.initialize(opts);
|
||||
|
||||
@@ -170,7 +170,7 @@ localBindingsDesc.set(UBOForwardLight.BLOCK.name, {
|
||||
blockInfo: UBOForwardLight.BLOCK,
|
||||
});
|
||||
|
||||
export const JointUniformCapacity = 65;
|
||||
export const JointUniformCapacity = 30;
|
||||
|
||||
export class UBOSkinning {
|
||||
public static MAT_JOINT_OFFSET: number = 0;
|
||||
|
||||
Reference in New Issue
Block a user