@galacean/engine-physics-physx 0.9.17 → 0.9.19
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.map +1 -1
- package/dist/miniprogram.js +19 -26
- package/dist/module.js.map +1 -1
- package/package.json +4 -4
- package/types/PhysXPhysicsScene.d.ts +86 -0
package/dist/miniprogram.js
CHANGED
|
@@ -21261,6 +21261,7 @@ var DirtyFlag;
|
|
|
21261
21261
|
curKeyframeIndex: 0,
|
|
21262
21262
|
value: null
|
|
21263
21263
|
};
|
|
21264
|
+
this.updateMark = 0;
|
|
21264
21265
|
this.target = target;
|
|
21265
21266
|
this.type = type;
|
|
21266
21267
|
this.property = property;
|
|
@@ -22701,9 +22702,9 @@ exports.AnimatorLayerBlendingMode = void 0;
|
|
|
22701
22702
|
_this = Component.call(this, entity) || this;
|
|
22702
22703
|
/** Culling mode of this Animator. */ _this.cullingMode = exports.AnimatorCullingMode.None;
|
|
22703
22704
|
/** The playback speed of the Animator, 1.0 is normal playback speed. */ _this.speed = 1.0;
|
|
22705
|
+
_this._updateMark = 0;
|
|
22704
22706
|
_this._animatorLayersData = [];
|
|
22705
22707
|
_this._curveOwnerPool = Object.create(null);
|
|
22706
|
-
_this._needRevertCurveOwners = [];
|
|
22707
22708
|
_this._animationEventHandlerPool = new ClassPool(AnimationEventHandler);
|
|
22708
22709
|
_this._tempAnimatorStateInfo = {
|
|
22709
22710
|
layerIndex: -1,
|
|
@@ -22732,7 +22733,7 @@ exports.AnimatorLayerBlendingMode = void 0;
|
|
|
22732
22733
|
return;
|
|
22733
22734
|
}
|
|
22734
22735
|
if (!state.clip) {
|
|
22735
|
-
|
|
22736
|
+
Logger.warn("The state named " + stateName + " has no AnimationClip data.");
|
|
22736
22737
|
return;
|
|
22737
22738
|
}
|
|
22738
22739
|
var animatorLayerData = this._getAnimatorLayerData(playLayerIndex);
|
|
@@ -22788,7 +22789,7 @@ exports.AnimatorLayerBlendingMode = void 0;
|
|
|
22788
22789
|
return;
|
|
22789
22790
|
}
|
|
22790
22791
|
deltaTime *= this.speed;
|
|
22791
|
-
this.
|
|
22792
|
+
this._updateMark++;
|
|
22792
22793
|
for(var i1 = 0, n1 = animatorController.layers.length; i1 < n1; i1++){
|
|
22793
22794
|
var animatorLayerData = this._getAnimatorLayerData(i1);
|
|
22794
22795
|
if (animatorLayerData.layerState === LayerState.Standby) {
|
|
@@ -22838,7 +22839,6 @@ exports.AnimatorLayerBlendingMode = void 0;
|
|
|
22838
22839
|
}
|
|
22839
22840
|
}
|
|
22840
22841
|
this._animatorLayersData.length = 0;
|
|
22841
|
-
this._needRevertCurveOwners.length = 0;
|
|
22842
22842
|
this._curveOwnerPool = {};
|
|
22843
22843
|
this._animationEventHandlerPool.resetPool();
|
|
22844
22844
|
if (this._controllerUpdateFlag) {
|
|
@@ -22889,27 +22889,16 @@ exports.AnimatorLayerBlendingMode = void 0;
|
|
|
22889
22889
|
var _curveOwnerPool, _instanceId, _propertyOwners, _property, _layerCurveOwnerPool, _instanceId1, _layerPropertyOwners, _property1;
|
|
22890
22890
|
var property = curve.property;
|
|
22891
22891
|
var instanceId = targetEntity.instanceId;
|
|
22892
|
-
var needRevert = false;
|
|
22893
|
-
if (this.animatorController.layers[layerIndex].blendingMode === exports.AnimatorLayerBlendingMode.Additive && layerIndex > 0) {
|
|
22894
|
-
needRevert = true;
|
|
22895
|
-
}
|
|
22896
22892
|
// Get owner
|
|
22897
22893
|
var propertyOwners = (_curveOwnerPool = curveOwnerPool)[_instanceId = instanceId] || (_curveOwnerPool[_instanceId] = Object.create(null));
|
|
22898
22894
|
var owner = (_propertyOwners = propertyOwners)[_property = property] || (_propertyOwners[_property] = curve._createCurveOwner(targetEntity));
|
|
22899
|
-
//@todo: There is performance waste here, which will be handled together with organizing AnimatorStateData later. The logic is changing from runtime to initialization.
|
|
22900
|
-
if (needRevert) {
|
|
22901
|
-
this._needRevertCurveOwners.push(owner);
|
|
22902
|
-
} else {
|
|
22903
|
-
var index = this._needRevertCurveOwners.indexOf(owner);
|
|
22904
|
-
index > -1 && this._needRevertCurveOwners.splice(index, 1);
|
|
22905
|
-
}
|
|
22906
22895
|
// Get layer owner
|
|
22907
22896
|
var layerPropertyOwners = (_layerCurveOwnerPool = layerCurveOwnerPool)[_instanceId1 = instanceId] || (_layerCurveOwnerPool[_instanceId1] = Object.create(null));
|
|
22908
22897
|
var layerOwner = (_layerPropertyOwners = layerPropertyOwners)[_property1 = property] || (_layerPropertyOwners[_property1] = curve._createCurveLayerOwner(owner));
|
|
22909
22898
|
curveLayerOwner[i] = layerOwner;
|
|
22910
22899
|
} else {
|
|
22911
22900
|
curveLayerOwner[i] = null;
|
|
22912
|
-
|
|
22901
|
+
Logger.warn("The entity don't have the child entity which path is " + curve.relativePath + ".");
|
|
22913
22902
|
}
|
|
22914
22903
|
}
|
|
22915
22904
|
};
|
|
@@ -23035,6 +23024,7 @@ exports.AnimatorLayerBlendingMode = void 0;
|
|
|
23035
23024
|
if (!owner) continue;
|
|
23036
23025
|
var curve = curveBindings[i].curve;
|
|
23037
23026
|
if (curve.keys.length) {
|
|
23027
|
+
this._checkRevertOwner(owner, additive);
|
|
23038
23028
|
var value = owner.evaluateValue(curve, clipTime, additive);
|
|
23039
23029
|
aniUpdate && owner.applyValue(value, weight, additive);
|
|
23040
23030
|
finished && layerOwner.saveFinalValue();
|
|
@@ -23080,6 +23070,7 @@ exports.AnimatorLayerBlendingMode = void 0;
|
|
|
23080
23070
|
if (!owner) continue;
|
|
23081
23071
|
var srcCurveIndex = layerOwner.crossSrcCurveIndex;
|
|
23082
23072
|
var destCurveIndex = layerOwner.crossDestCurveIndex;
|
|
23073
|
+
this._checkRevertOwner(owner, additive);
|
|
23083
23074
|
var value = owner.evaluateCrossFadeValue(srcCurveIndex >= 0 ? srcCurves[srcCurveIndex].curve : null, destCurveIndex >= 0 ? destCurves[destCurveIndex].curve : null, srcClipTime, destClipTime, crossWeight, additive);
|
|
23084
23075
|
aniUpdate && owner.applyValue(value, weight, additive);
|
|
23085
23076
|
finished && layerOwner.saveFinalValue();
|
|
@@ -23126,6 +23117,7 @@ exports.AnimatorLayerBlendingMode = void 0;
|
|
|
23126
23117
|
var owner = layerOwner == null ? void 0 : layerOwner.curveOwner;
|
|
23127
23118
|
if (!owner) continue;
|
|
23128
23119
|
var curveIndex = layerOwner.crossDestCurveIndex;
|
|
23120
|
+
this._checkRevertOwner(owner, additive);
|
|
23129
23121
|
var value = layerOwner.curveOwner.crossFadeFromPoseAndApplyValue(curveIndex >= 0 ? curveBindings[curveIndex].curve : null, destClipTime, crossWeight, additive);
|
|
23130
23122
|
aniUpdate && owner.applyValue(value, weight, additive);
|
|
23131
23123
|
finished && layerOwner.saveFinalValue();
|
|
@@ -23152,6 +23144,7 @@ exports.AnimatorLayerBlendingMode = void 0;
|
|
|
23152
23144
|
var layerOwner = curveLayerOwner[i];
|
|
23153
23145
|
var owner = layerOwner == null ? void 0 : layerOwner.curveOwner;
|
|
23154
23146
|
if (!owner) continue;
|
|
23147
|
+
this._checkRevertOwner(owner, additive);
|
|
23155
23148
|
owner.applyValue(layerOwner.finalValue, weight, additive);
|
|
23156
23149
|
}
|
|
23157
23150
|
};
|
|
@@ -23207,7 +23200,7 @@ exports.AnimatorLayerBlendingMode = void 0;
|
|
|
23207
23200
|
return;
|
|
23208
23201
|
}
|
|
23209
23202
|
if (!crossState.clip) {
|
|
23210
|
-
|
|
23203
|
+
Logger.warn("The state named " + name + " has no AnimationClip data.");
|
|
23211
23204
|
return;
|
|
23212
23205
|
}
|
|
23213
23206
|
var animatorLayerData = this._getAnimatorLayerData(playLayerIndex);
|
|
@@ -23219,12 +23212,12 @@ exports.AnimatorLayerBlendingMode = void 0;
|
|
|
23219
23212
|
destPlayData.reset(crossState, animatorStateData, offset);
|
|
23220
23213
|
switch(layerState){
|
|
23221
23214
|
case LayerState.Standby:
|
|
23215
|
+
case LayerState.Finished:
|
|
23222
23216
|
animatorLayerData.layerState = LayerState.FixedCrossFading;
|
|
23223
23217
|
this._clearCrossData(animatorLayerData);
|
|
23224
23218
|
this._prepareStandbyCrossFading(animatorLayerData);
|
|
23225
23219
|
break;
|
|
23226
23220
|
case LayerState.Playing:
|
|
23227
|
-
case LayerState.Finished:
|
|
23228
23221
|
animatorLayerData.layerState = LayerState.CrossFading;
|
|
23229
23222
|
this._clearCrossData(animatorLayerData);
|
|
23230
23223
|
this._prepareCrossFading(animatorLayerData);
|
|
@@ -23321,11 +23314,11 @@ exports.AnimatorLayerBlendingMode = void 0;
|
|
|
23321
23314
|
}
|
|
23322
23315
|
}
|
|
23323
23316
|
};
|
|
23324
|
-
_proto.
|
|
23325
|
-
|
|
23326
|
-
|
|
23327
|
-
curveOwners[i].revertDefaultValue();
|
|
23317
|
+
_proto._checkRevertOwner = function _checkRevertOwner(owner, additive) {
|
|
23318
|
+
if (additive && owner.updateMark !== this._updateMark) {
|
|
23319
|
+
owner.revertDefaultValue();
|
|
23328
23320
|
}
|
|
23321
|
+
owner.updateMark = this._updateMark;
|
|
23329
23322
|
};
|
|
23330
23323
|
_create_class$2(Animator, [
|
|
23331
23324
|
{
|
|
@@ -23355,13 +23348,13 @@ __decorate$1([
|
|
|
23355
23348
|
], Animator.prototype, "_controllerUpdateFlag", void 0);
|
|
23356
23349
|
__decorate$1([
|
|
23357
23350
|
ignoreClone
|
|
23358
|
-
], Animator.prototype, "
|
|
23351
|
+
], Animator.prototype, "_updateMark", void 0);
|
|
23359
23352
|
__decorate$1([
|
|
23360
23353
|
ignoreClone
|
|
23361
|
-
], Animator.prototype, "
|
|
23354
|
+
], Animator.prototype, "_animatorLayersData", void 0);
|
|
23362
23355
|
__decorate$1([
|
|
23363
23356
|
ignoreClone
|
|
23364
|
-
], Animator.prototype, "
|
|
23357
|
+
], Animator.prototype, "_curveOwnerPool", void 0);
|
|
23365
23358
|
__decorate$1([
|
|
23366
23359
|
ignoreClone
|
|
23367
23360
|
], Animator.prototype, "_animationEventHandlerPool", void 0);
|
|
@@ -36256,7 +36249,7 @@ function _interopNamespace(e) {
|
|
|
36256
36249
|
}
|
|
36257
36250
|
var CoreObjects__namespace = /*#__PURE__*/ _interopNamespace(CoreObjects);
|
|
36258
36251
|
//@ts-ignore
|
|
36259
|
-
var version = "0.9.
|
|
36252
|
+
var version = "0.9.19";
|
|
36260
36253
|
console.log("Galacean engine version: " + version);
|
|
36261
36254
|
for(var key in CoreObjects__namespace){
|
|
36262
36255
|
CoreObjects.Loader.registerClass(key, CoreObjects__namespace[key]);
|