@galacean/engine-core 1.3.3 → 1.3.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/main.js +36 -20
- package/dist/main.js.map +1 -1
- package/dist/miniprogram.js +36 -20
- package/dist/module.js +36 -20
- package/dist/module.js.map +1 -1
- package/package.json +3 -3
- package/types/physics/CharacterController.d.ts +1 -0
package/dist/miniprogram.js
CHANGED
|
@@ -10760,6 +10760,9 @@ var SubRenderElement = /*#__PURE__*/ function() {
|
|
|
10760
10760
|
__decorate([
|
|
10761
10761
|
assignmentClone
|
|
10762
10762
|
], SpriteMask.prototype, "influenceLayers", void 0);
|
|
10763
|
+
__decorate([
|
|
10764
|
+
ignoreClone
|
|
10765
|
+
], SpriteMask.prototype, "_renderElement", void 0);
|
|
10763
10766
|
__decorate([
|
|
10764
10767
|
ignoreClone
|
|
10765
10768
|
], SpriteMask.prototype, "_subChunk", void 0);
|
|
@@ -11170,9 +11173,12 @@ var /**
|
|
|
11170
11173
|
// Safari gets data confusion through getImageData when the canvas width is not an integer.
|
|
11171
11174
|
// The measure text width of some special invisible characters may be 0, so make sure the width is at least 1.
|
|
11172
11175
|
// @todo: Text layout may vary from standard and not support emoji.
|
|
11173
|
-
var
|
|
11176
|
+
var _context_measureText = context.measureText(measureString), actualBoundingBoxLeft = _context_measureText.actualBoundingBoxLeft, actualBoundingBoxRight = _context_measureText.actualBoundingBoxRight, actualWidth = _context_measureText.width;
|
|
11174
11177
|
// In some case (ex: " "), actualBoundingBoxRight and actualBoundingBoxLeft will be 0, so use width.
|
|
11175
|
-
|
|
11178
|
+
// TODO: With testing, actualBoundingBoxLeft + actualBoundingBoxRight is the actual rendering width
|
|
11179
|
+
// but the space rules between characters are unclear. Using actualBoundingBoxRight + Math.abs(actualBoundingBoxLeft) is the closest to the native effect.
|
|
11180
|
+
var width = Math.max(1, Math.round(Math.max(actualBoundingBoxRight + Math.abs(actualBoundingBoxLeft), actualWidth)));
|
|
11181
|
+
// Make sure enough width.
|
|
11176
11182
|
var baseline = Math.ceil(context.measureText(TextUtils._measureBaseline).width);
|
|
11177
11183
|
var height = baseline * TextUtils._heightMultiplier;
|
|
11178
11184
|
baseline = TextUtils._baselineMultiplier * baseline | 0;
|
|
@@ -11186,7 +11192,11 @@ var /**
|
|
|
11186
11192
|
context.clearRect(0, 0, width, height);
|
|
11187
11193
|
context.textBaseline = "middle";
|
|
11188
11194
|
context.fillStyle = "#fff";
|
|
11189
|
-
|
|
11195
|
+
if (actualBoundingBoxLeft > 0) {
|
|
11196
|
+
context.fillText(measureString, actualBoundingBoxLeft, baseline);
|
|
11197
|
+
} else {
|
|
11198
|
+
context.fillText(measureString, 0, baseline);
|
|
11199
|
+
}
|
|
11190
11200
|
var colorData = context.getImageData(0, 0, width, height).data;
|
|
11191
11201
|
var len = colorData.length;
|
|
11192
11202
|
var top = -1;
|
|
@@ -11230,9 +11240,9 @@ var /**
|
|
|
11230
11240
|
y: 0,
|
|
11231
11241
|
w: width,
|
|
11232
11242
|
h: size,
|
|
11233
|
-
offsetX: 0,
|
|
11243
|
+
offsetX: actualBoundingBoxLeft > 0 ? actualBoundingBoxLeft : 0,
|
|
11234
11244
|
offsetY: (ascent - descent) * 0.5,
|
|
11235
|
-
xAdvance:
|
|
11245
|
+
xAdvance: Math.round(actualWidth),
|
|
11236
11246
|
uvs: [
|
|
11237
11247
|
new miniprogram.Vector2(),
|
|
11238
11248
|
new miniprogram.Vector2(),
|
|
@@ -11801,7 +11811,7 @@ var /**
|
|
|
11801
11811
|
j === firstRow && (minX = Math.min(minX, left));
|
|
11802
11812
|
maxX = Math.max(maxX, right);
|
|
11803
11813
|
}
|
|
11804
|
-
startX += charInfo.xAdvance;
|
|
11814
|
+
startX += charInfo.xAdvance + charInfo.offsetX;
|
|
11805
11815
|
}
|
|
11806
11816
|
}
|
|
11807
11817
|
startY -= lineHeight;
|
|
@@ -12631,8 +12641,6 @@ var BufferUtil = /*#__PURE__*/ function() {
|
|
|
12631
12641
|
_this = ReferResource1.call(this, engine) || this;
|
|
12632
12642
|
/** @internal */ _this._renderStates = [] // todo: later will as a part of shaderData when shader effect frame is OK, that is more powerful and flexible.
|
|
12633
12643
|
;
|
|
12634
|
-
/** @internal */ _this._priority = 0 // todo: temporary resolution of submesh rendering order issue.
|
|
12635
|
-
;
|
|
12636
12644
|
_this._shaderData = new ShaderData(ShaderDataGroup.Material);
|
|
12637
12645
|
_this.shader = shader;
|
|
12638
12646
|
return _this;
|
|
@@ -18882,7 +18890,7 @@ var ObjectPool = /*#__PURE__*/ function() {
|
|
|
18882
18890
|
* @internal
|
|
18883
18891
|
*/ var PrimitiveChunkManager = /*#__PURE__*/ function() {
|
|
18884
18892
|
function PrimitiveChunkManager(engine, maxVertexCount) {
|
|
18885
|
-
if (maxVertexCount === void 0) maxVertexCount =
|
|
18893
|
+
if (maxVertexCount === void 0) maxVertexCount = 4096;
|
|
18886
18894
|
this.engine = engine;
|
|
18887
18895
|
this.maxVertexCount = maxVertexCount;
|
|
18888
18896
|
this.primitiveChunks = new Array();
|
|
@@ -18923,9 +18931,6 @@ var ObjectPool = /*#__PURE__*/ function() {
|
|
|
18923
18931
|
};
|
|
18924
18932
|
return PrimitiveChunkManager;
|
|
18925
18933
|
}();
|
|
18926
|
-
(function() {
|
|
18927
|
-
/** The maximum number of vertex. */ PrimitiveChunkManager.MAX_VERTEX_COUNT = 4096;
|
|
18928
|
-
})();
|
|
18929
18934
|
|
|
18930
18935
|
/**
|
|
18931
18936
|
* @internal
|
|
@@ -20928,6 +20933,8 @@ var Collision = function Collision() {
|
|
|
20928
20933
|
_this._setUpDirection = _this._setUpDirection.bind(_assert_this_initialized(_this));
|
|
20929
20934
|
//@ts-ignore
|
|
20930
20935
|
_this._upDirection._onValueChanged = _this._setUpDirection;
|
|
20936
|
+
// sync world position to physical space
|
|
20937
|
+
_this._onUpdate();
|
|
20931
20938
|
return _this;
|
|
20932
20939
|
}
|
|
20933
20940
|
var _proto = CharacterController.prototype;
|
|
@@ -20938,7 +20945,9 @@ var Collision = function Collision() {
|
|
|
20938
20945
|
* @param elapsedTime - Time elapsed since last call
|
|
20939
20946
|
* @return flags - The ControllerCollisionFlag
|
|
20940
20947
|
*/ _proto.move = function move(disp, minDist, elapsedTime) {
|
|
20941
|
-
|
|
20948
|
+
var flags = this._nativeCollider.move(disp, minDist, elapsedTime);
|
|
20949
|
+
this._syncWorldPositionFromPhysicalSpace();
|
|
20950
|
+
return flags;
|
|
20942
20951
|
};
|
|
20943
20952
|
/**
|
|
20944
20953
|
* Add collider shape on this controller.
|
|
@@ -20974,8 +20983,7 @@ var Collision = function Collision() {
|
|
|
20974
20983
|
/**
|
|
20975
20984
|
* @internal
|
|
20976
20985
|
*/ _proto._onLateUpdate = function _onLateUpdate() {
|
|
20977
|
-
|
|
20978
|
-
this._nativeCollider.getWorldPosition(position);
|
|
20986
|
+
this._syncWorldPositionFromPhysicalSpace();
|
|
20979
20987
|
this._updateFlag.flag = false;
|
|
20980
20988
|
};
|
|
20981
20989
|
/**
|
|
@@ -20998,6 +21006,9 @@ var Collision = function Collision() {
|
|
|
20998
21006
|
physics._removeColliderShape(shapes[i]);
|
|
20999
21007
|
}
|
|
21000
21008
|
};
|
|
21009
|
+
_proto._syncWorldPositionFromPhysicalSpace = function _syncWorldPositionFromPhysicalSpace() {
|
|
21010
|
+
this._nativeCollider.getWorldPosition(this.entity.transform.worldPosition);
|
|
21011
|
+
};
|
|
21001
21012
|
_proto._setUpDirection = function _setUpDirection() {
|
|
21002
21013
|
this._nativeCollider.setUpDirection(this._upDirection);
|
|
21003
21014
|
};
|
|
@@ -28682,7 +28693,9 @@ exports.AnimatorLayerBlendingMode = void 0;
|
|
|
28682
28693
|
// Precalculate to get the transition
|
|
28683
28694
|
srcPlayData.update(playDeltaTime);
|
|
28684
28695
|
var clipTime = srcPlayData.clipTime, isForwards = srcPlayData.isForwards;
|
|
28685
|
-
var
|
|
28696
|
+
var transitions = state.transitions;
|
|
28697
|
+
var anyStateTransitions = layer.stateMachine.anyStateTransitions;
|
|
28698
|
+
var transition = anyStateTransitions.length && this._applyTransitionsByCondition(layerIndex, layerData, layer, state, anyStateTransitions, aniUpdate) || transitions.length && this._applyStateTransitions(layerIndex, layerData, layer, isForwards, srcPlayData, transitions, lastClipTime, clipTime, playDeltaTime, aniUpdate);
|
|
28686
28699
|
var playCostTime;
|
|
28687
28700
|
if (transition) {
|
|
28688
28701
|
var clipDuration = state.clip.length;
|
|
@@ -28766,7 +28779,7 @@ exports.AnimatorLayerBlendingMode = void 0;
|
|
|
28766
28779
|
playedTime - dstPlayDeltaTime > transitionDuration ? // -(transitionDuration - playedTime)
|
|
28767
28780
|
playedTime - transitionDuration : dstPlayDeltaTime;
|
|
28768
28781
|
}
|
|
28769
|
-
var actualCostTime = dstPlaySpeed === 0 ?
|
|
28782
|
+
var actualCostTime = dstPlaySpeed === 0 ? deltaTime : dstPlayCostTime / dstPlaySpeed;
|
|
28770
28783
|
var srcPlayCostTime = actualCostTime * srcPlaySpeed;
|
|
28771
28784
|
srcPlayData.update(srcPlayCostTime);
|
|
28772
28785
|
destPlayData.update(dstPlayCostTime);
|
|
@@ -28774,6 +28787,7 @@ exports.AnimatorLayerBlendingMode = void 0;
|
|
|
28774
28787
|
(crossWeight >= 1.0 - miniprogram.MathUtil.zeroTolerance || transitionDuration === 0) && (crossWeight = 1.0);
|
|
28775
28788
|
var crossFadeFinished = crossWeight === 1.0;
|
|
28776
28789
|
if (crossFadeFinished) {
|
|
28790
|
+
srcPlayData.playState = AnimatorStatePlayState.Finished;
|
|
28777
28791
|
this._preparePlayOwner(layerData, destState);
|
|
28778
28792
|
this._evaluatePlayingState(destPlayData, weight, additive, aniUpdate);
|
|
28779
28793
|
} else {
|
|
@@ -28828,7 +28842,7 @@ exports.AnimatorLayerBlendingMode = void 0;
|
|
|
28828
28842
|
playedTime - playDeltaTime > transitionDuration ? // -(transitionDuration - playedTime)
|
|
28829
28843
|
playedTime - transitionDuration : playDeltaTime;
|
|
28830
28844
|
}
|
|
28831
|
-
var actualCostTime = playSpeed === 0 ?
|
|
28845
|
+
var actualCostTime = playSpeed === 0 ? deltaTime : dstPlayCostTime / playSpeed;
|
|
28832
28846
|
destPlayData.update(dstPlayCostTime);
|
|
28833
28847
|
var crossWeight = Math.abs(destPlayData.frameTime) / transitionDuration;
|
|
28834
28848
|
(crossWeight >= 1.0 - miniprogram.MathUtil.zeroTolerance || transitionDuration === 0) && (crossWeight = 1.0);
|
|
@@ -28868,14 +28882,16 @@ exports.AnimatorLayerBlendingMode = void 0;
|
|
|
28868
28882
|
}
|
|
28869
28883
|
};
|
|
28870
28884
|
_proto._updateFinishedState = function _updateFinishedState(layerIndex, layerData, layer, weight, additive, deltaTime, aniUpdate) {
|
|
28871
|
-
|
|
28885
|
+
layer.stateMachine;
|
|
28872
28886
|
var playData = layerData.srcPlayData;
|
|
28873
28887
|
var state = playData.state;
|
|
28874
28888
|
var actualSpeed = state.speed * this.speed;
|
|
28875
28889
|
var actualDeltaTime = actualSpeed * deltaTime;
|
|
28876
28890
|
playData.updateOrientation(actualDeltaTime);
|
|
28877
28891
|
var clipTime = playData.clipTime, isForwards = playData.isForwards;
|
|
28878
|
-
var
|
|
28892
|
+
var transitions = state.transitions;
|
|
28893
|
+
var anyStateTransitions = layer.stateMachine.anyStateTransitions;
|
|
28894
|
+
var transition = anyStateTransitions.length && this._applyTransitionsByCondition(layerIndex, layerData, layer, state, anyStateTransitions, aniUpdate) || transitions.length && this._applyStateTransitions(layerIndex, layerData, layer, isForwards, playData, transitions, clipTime, clipTime, actualDeltaTime, aniUpdate);
|
|
28879
28895
|
if (transition) {
|
|
28880
28896
|
this._updateState(layerIndex, layerData, layer, deltaTime, aniUpdate);
|
|
28881
28897
|
} else {
|
package/dist/module.js
CHANGED
|
@@ -10755,6 +10755,9 @@ var SubRenderElement = /*#__PURE__*/ function() {
|
|
|
10755
10755
|
__decorate([
|
|
10756
10756
|
assignmentClone
|
|
10757
10757
|
], SpriteMask.prototype, "influenceLayers", void 0);
|
|
10758
|
+
__decorate([
|
|
10759
|
+
ignoreClone
|
|
10760
|
+
], SpriteMask.prototype, "_renderElement", void 0);
|
|
10758
10761
|
__decorate([
|
|
10759
10762
|
ignoreClone
|
|
10760
10763
|
], SpriteMask.prototype, "_subChunk", void 0);
|
|
@@ -11165,9 +11168,12 @@ var /**
|
|
|
11165
11168
|
// Safari gets data confusion through getImageData when the canvas width is not an integer.
|
|
11166
11169
|
// The measure text width of some special invisible characters may be 0, so make sure the width is at least 1.
|
|
11167
11170
|
// @todo: Text layout may vary from standard and not support emoji.
|
|
11168
|
-
var
|
|
11171
|
+
var _context_measureText = context.measureText(measureString), actualBoundingBoxLeft = _context_measureText.actualBoundingBoxLeft, actualBoundingBoxRight = _context_measureText.actualBoundingBoxRight, actualWidth = _context_measureText.width;
|
|
11169
11172
|
// In some case (ex: " "), actualBoundingBoxRight and actualBoundingBoxLeft will be 0, so use width.
|
|
11170
|
-
|
|
11173
|
+
// TODO: With testing, actualBoundingBoxLeft + actualBoundingBoxRight is the actual rendering width
|
|
11174
|
+
// but the space rules between characters are unclear. Using actualBoundingBoxRight + Math.abs(actualBoundingBoxLeft) is the closest to the native effect.
|
|
11175
|
+
var width = Math.max(1, Math.round(Math.max(actualBoundingBoxRight + Math.abs(actualBoundingBoxLeft), actualWidth)));
|
|
11176
|
+
// Make sure enough width.
|
|
11171
11177
|
var baseline = Math.ceil(context.measureText(TextUtils._measureBaseline).width);
|
|
11172
11178
|
var height = baseline * TextUtils._heightMultiplier;
|
|
11173
11179
|
baseline = TextUtils._baselineMultiplier * baseline | 0;
|
|
@@ -11181,7 +11187,11 @@ var /**
|
|
|
11181
11187
|
context.clearRect(0, 0, width, height);
|
|
11182
11188
|
context.textBaseline = "middle";
|
|
11183
11189
|
context.fillStyle = "#fff";
|
|
11184
|
-
|
|
11190
|
+
if (actualBoundingBoxLeft > 0) {
|
|
11191
|
+
context.fillText(measureString, actualBoundingBoxLeft, baseline);
|
|
11192
|
+
} else {
|
|
11193
|
+
context.fillText(measureString, 0, baseline);
|
|
11194
|
+
}
|
|
11185
11195
|
var colorData = context.getImageData(0, 0, width, height).data;
|
|
11186
11196
|
var len = colorData.length;
|
|
11187
11197
|
var top = -1;
|
|
@@ -11225,9 +11235,9 @@ var /**
|
|
|
11225
11235
|
y: 0,
|
|
11226
11236
|
w: width,
|
|
11227
11237
|
h: size,
|
|
11228
|
-
offsetX: 0,
|
|
11238
|
+
offsetX: actualBoundingBoxLeft > 0 ? actualBoundingBoxLeft : 0,
|
|
11229
11239
|
offsetY: (ascent - descent) * 0.5,
|
|
11230
|
-
xAdvance:
|
|
11240
|
+
xAdvance: Math.round(actualWidth),
|
|
11231
11241
|
uvs: [
|
|
11232
11242
|
new Vector2(),
|
|
11233
11243
|
new Vector2(),
|
|
@@ -11796,7 +11806,7 @@ var /**
|
|
|
11796
11806
|
j === firstRow && (minX = Math.min(minX, left));
|
|
11797
11807
|
maxX = Math.max(maxX, right);
|
|
11798
11808
|
}
|
|
11799
|
-
startX += charInfo.xAdvance;
|
|
11809
|
+
startX += charInfo.xAdvance + charInfo.offsetX;
|
|
11800
11810
|
}
|
|
11801
11811
|
}
|
|
11802
11812
|
startY -= lineHeight;
|
|
@@ -12626,8 +12636,6 @@ var BufferUtil = /*#__PURE__*/ function() {
|
|
|
12626
12636
|
_this = ReferResource1.call(this, engine) || this;
|
|
12627
12637
|
/** @internal */ _this._renderStates = [] // todo: later will as a part of shaderData when shader effect frame is OK, that is more powerful and flexible.
|
|
12628
12638
|
;
|
|
12629
|
-
/** @internal */ _this._priority = 0 // todo: temporary resolution of submesh rendering order issue.
|
|
12630
|
-
;
|
|
12631
12639
|
_this._shaderData = new ShaderData(ShaderDataGroup.Material);
|
|
12632
12640
|
_this.shader = shader;
|
|
12633
12641
|
return _this;
|
|
@@ -18877,7 +18885,7 @@ var ObjectPool = /*#__PURE__*/ function() {
|
|
|
18877
18885
|
* @internal
|
|
18878
18886
|
*/ var PrimitiveChunkManager = /*#__PURE__*/ function() {
|
|
18879
18887
|
function PrimitiveChunkManager(engine, maxVertexCount) {
|
|
18880
|
-
if (maxVertexCount === void 0) maxVertexCount =
|
|
18888
|
+
if (maxVertexCount === void 0) maxVertexCount = 4096;
|
|
18881
18889
|
this.engine = engine;
|
|
18882
18890
|
this.maxVertexCount = maxVertexCount;
|
|
18883
18891
|
this.primitiveChunks = new Array();
|
|
@@ -18918,9 +18926,6 @@ var ObjectPool = /*#__PURE__*/ function() {
|
|
|
18918
18926
|
};
|
|
18919
18927
|
return PrimitiveChunkManager;
|
|
18920
18928
|
}();
|
|
18921
|
-
(function() {
|
|
18922
|
-
/** The maximum number of vertex. */ PrimitiveChunkManager.MAX_VERTEX_COUNT = 4096;
|
|
18923
|
-
})();
|
|
18924
18929
|
|
|
18925
18930
|
/**
|
|
18926
18931
|
* @internal
|
|
@@ -20923,6 +20928,8 @@ var Collision = function Collision() {
|
|
|
20923
20928
|
_this._setUpDirection = _this._setUpDirection.bind(_assert_this_initialized(_this));
|
|
20924
20929
|
//@ts-ignore
|
|
20925
20930
|
_this._upDirection._onValueChanged = _this._setUpDirection;
|
|
20931
|
+
// sync world position to physical space
|
|
20932
|
+
_this._onUpdate();
|
|
20926
20933
|
return _this;
|
|
20927
20934
|
}
|
|
20928
20935
|
var _proto = CharacterController.prototype;
|
|
@@ -20933,7 +20940,9 @@ var Collision = function Collision() {
|
|
|
20933
20940
|
* @param elapsedTime - Time elapsed since last call
|
|
20934
20941
|
* @return flags - The ControllerCollisionFlag
|
|
20935
20942
|
*/ _proto.move = function move(disp, minDist, elapsedTime) {
|
|
20936
|
-
|
|
20943
|
+
var flags = this._nativeCollider.move(disp, minDist, elapsedTime);
|
|
20944
|
+
this._syncWorldPositionFromPhysicalSpace();
|
|
20945
|
+
return flags;
|
|
20937
20946
|
};
|
|
20938
20947
|
/**
|
|
20939
20948
|
* Add collider shape on this controller.
|
|
@@ -20969,8 +20978,7 @@ var Collision = function Collision() {
|
|
|
20969
20978
|
/**
|
|
20970
20979
|
* @internal
|
|
20971
20980
|
*/ _proto._onLateUpdate = function _onLateUpdate() {
|
|
20972
|
-
|
|
20973
|
-
this._nativeCollider.getWorldPosition(position);
|
|
20981
|
+
this._syncWorldPositionFromPhysicalSpace();
|
|
20974
20982
|
this._updateFlag.flag = false;
|
|
20975
20983
|
};
|
|
20976
20984
|
/**
|
|
@@ -20993,6 +21001,9 @@ var Collision = function Collision() {
|
|
|
20993
21001
|
physics._removeColliderShape(shapes[i]);
|
|
20994
21002
|
}
|
|
20995
21003
|
};
|
|
21004
|
+
_proto._syncWorldPositionFromPhysicalSpace = function _syncWorldPositionFromPhysicalSpace() {
|
|
21005
|
+
this._nativeCollider.getWorldPosition(this.entity.transform.worldPosition);
|
|
21006
|
+
};
|
|
20996
21007
|
_proto._setUpDirection = function _setUpDirection() {
|
|
20997
21008
|
this._nativeCollider.setUpDirection(this._upDirection);
|
|
20998
21009
|
};
|
|
@@ -28677,7 +28688,9 @@ var AnimatorLayerBlendingMode;
|
|
|
28677
28688
|
// Precalculate to get the transition
|
|
28678
28689
|
srcPlayData.update(playDeltaTime);
|
|
28679
28690
|
var clipTime = srcPlayData.clipTime, isForwards = srcPlayData.isForwards;
|
|
28680
|
-
var
|
|
28691
|
+
var transitions = state.transitions;
|
|
28692
|
+
var anyStateTransitions = layer.stateMachine.anyStateTransitions;
|
|
28693
|
+
var transition = anyStateTransitions.length && this._applyTransitionsByCondition(layerIndex, layerData, layer, state, anyStateTransitions, aniUpdate) || transitions.length && this._applyStateTransitions(layerIndex, layerData, layer, isForwards, srcPlayData, transitions, lastClipTime, clipTime, playDeltaTime, aniUpdate);
|
|
28681
28694
|
var playCostTime;
|
|
28682
28695
|
if (transition) {
|
|
28683
28696
|
var clipDuration = state.clip.length;
|
|
@@ -28761,7 +28774,7 @@ var AnimatorLayerBlendingMode;
|
|
|
28761
28774
|
playedTime - dstPlayDeltaTime > transitionDuration ? // -(transitionDuration - playedTime)
|
|
28762
28775
|
playedTime - transitionDuration : dstPlayDeltaTime;
|
|
28763
28776
|
}
|
|
28764
|
-
var actualCostTime = dstPlaySpeed === 0 ?
|
|
28777
|
+
var actualCostTime = dstPlaySpeed === 0 ? deltaTime : dstPlayCostTime / dstPlaySpeed;
|
|
28765
28778
|
var srcPlayCostTime = actualCostTime * srcPlaySpeed;
|
|
28766
28779
|
srcPlayData.update(srcPlayCostTime);
|
|
28767
28780
|
destPlayData.update(dstPlayCostTime);
|
|
@@ -28769,6 +28782,7 @@ var AnimatorLayerBlendingMode;
|
|
|
28769
28782
|
(crossWeight >= 1.0 - MathUtil.zeroTolerance || transitionDuration === 0) && (crossWeight = 1.0);
|
|
28770
28783
|
var crossFadeFinished = crossWeight === 1.0;
|
|
28771
28784
|
if (crossFadeFinished) {
|
|
28785
|
+
srcPlayData.playState = AnimatorStatePlayState.Finished;
|
|
28772
28786
|
this._preparePlayOwner(layerData, destState);
|
|
28773
28787
|
this._evaluatePlayingState(destPlayData, weight, additive, aniUpdate);
|
|
28774
28788
|
} else {
|
|
@@ -28823,7 +28837,7 @@ var AnimatorLayerBlendingMode;
|
|
|
28823
28837
|
playedTime - playDeltaTime > transitionDuration ? // -(transitionDuration - playedTime)
|
|
28824
28838
|
playedTime - transitionDuration : playDeltaTime;
|
|
28825
28839
|
}
|
|
28826
|
-
var actualCostTime = playSpeed === 0 ?
|
|
28840
|
+
var actualCostTime = playSpeed === 0 ? deltaTime : dstPlayCostTime / playSpeed;
|
|
28827
28841
|
destPlayData.update(dstPlayCostTime);
|
|
28828
28842
|
var crossWeight = Math.abs(destPlayData.frameTime) / transitionDuration;
|
|
28829
28843
|
(crossWeight >= 1.0 - MathUtil.zeroTolerance || transitionDuration === 0) && (crossWeight = 1.0);
|
|
@@ -28863,14 +28877,16 @@ var AnimatorLayerBlendingMode;
|
|
|
28863
28877
|
}
|
|
28864
28878
|
};
|
|
28865
28879
|
_proto._updateFinishedState = function _updateFinishedState(layerIndex, layerData, layer, weight, additive, deltaTime, aniUpdate) {
|
|
28866
|
-
|
|
28880
|
+
layer.stateMachine;
|
|
28867
28881
|
var playData = layerData.srcPlayData;
|
|
28868
28882
|
var state = playData.state;
|
|
28869
28883
|
var actualSpeed = state.speed * this.speed;
|
|
28870
28884
|
var actualDeltaTime = actualSpeed * deltaTime;
|
|
28871
28885
|
playData.updateOrientation(actualDeltaTime);
|
|
28872
28886
|
var clipTime = playData.clipTime, isForwards = playData.isForwards;
|
|
28873
|
-
var
|
|
28887
|
+
var transitions = state.transitions;
|
|
28888
|
+
var anyStateTransitions = layer.stateMachine.anyStateTransitions;
|
|
28889
|
+
var transition = anyStateTransitions.length && this._applyTransitionsByCondition(layerIndex, layerData, layer, state, anyStateTransitions, aniUpdate) || transitions.length && this._applyStateTransitions(layerIndex, layerData, layer, isForwards, playData, transitions, clipTime, clipTime, actualDeltaTime, aniUpdate);
|
|
28874
28890
|
if (transition) {
|
|
28875
28891
|
this._updateState(layerIndex, layerData, layer, deltaTime, aniUpdate);
|
|
28876
28892
|
} else {
|