@galacean/engine-core 1.1.0-beta.6 → 1.1.0-beta.8
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 +346 -64
- package/dist/main.js.map +1 -1
- package/dist/miniprogram.js +346 -64
- package/dist/module.js +336 -65
- package/dist/module.js.map +1 -1
- package/package.json +3 -3
- package/types/Background.d.ts +6 -0
- package/types/DisorderedArray.d.ts +1 -1
- package/types/particle/index.d.ts +9 -0
- package/types/particle/modules/ParticleGeneratorModule.d.ts +0 -1
- package/types/physics/Collider.d.ts +3 -1
- package/types/physics/PhysicsMaterial.d.ts +1 -0
- package/types/physics/joint/HingeJoint.d.ts +1 -1
- package/types/physics/joint/Joint.d.ts +4 -3
- package/types/physics/shape/ColliderShape.d.ts +2 -1
- package/types/physics/shape/SphereColliderShape.d.ts +1 -0
package/dist/module.js
CHANGED
|
@@ -549,6 +549,7 @@ function _instanceof(left, right) {
|
|
|
549
549
|
for(var i = 0; i < length; i++){
|
|
550
550
|
CloneManager.cloneProperty(sourceProperty, targetPropertyA, i, cloneMode);
|
|
551
551
|
}
|
|
552
|
+
break;
|
|
552
553
|
default:
|
|
553
554
|
var _target, _k;
|
|
554
555
|
var targetOProperty = (_target = target)[_k = k] || (_target[_k] = new sourceProperty.constructor());
|
|
@@ -2830,14 +2831,14 @@ var DependentMode;
|
|
|
2830
2831
|
}
|
|
2831
2832
|
return end;
|
|
2832
2833
|
};
|
|
2833
|
-
_proto.forEach = function forEach(callbackFn) {
|
|
2834
|
+
_proto.forEach = function forEach(callbackFn, swapFn) {
|
|
2834
2835
|
this._startLoop();
|
|
2835
2836
|
var elements = this._elements;
|
|
2836
2837
|
for(var i = 0; i < this.length; i++){
|
|
2837
2838
|
var element = elements[i];
|
|
2838
2839
|
element && callbackFn(element);
|
|
2839
2840
|
}
|
|
2840
|
-
this._endLoop();
|
|
2841
|
+
this._endLoop(swapFn);
|
|
2841
2842
|
};
|
|
2842
2843
|
_proto.forEachAndClean = function forEachAndClean(callbackFn) {
|
|
2843
2844
|
this._startLoop();
|
|
@@ -2854,16 +2855,24 @@ var DependentMode;
|
|
|
2854
2855
|
_proto._startLoop = function _startLoop() {
|
|
2855
2856
|
this._isLooping = true;
|
|
2856
2857
|
};
|
|
2857
|
-
_proto._endLoop = function _endLoop() {
|
|
2858
|
+
_proto._endLoop = function _endLoop(swapFn) {
|
|
2858
2859
|
this._isLooping = false;
|
|
2859
2860
|
if (this._blankCount) {
|
|
2861
|
+
var from = 0;
|
|
2862
|
+
var to = this.length - 1;
|
|
2860
2863
|
var elements = this._elements;
|
|
2861
|
-
|
|
2862
|
-
|
|
2863
|
-
|
|
2864
|
-
|
|
2865
|
-
|
|
2866
|
-
|
|
2864
|
+
partition: do {
|
|
2865
|
+
while(elements[from])if (++from >= to) {
|
|
2866
|
+
break partition;
|
|
2867
|
+
}
|
|
2868
|
+
while(!elements[to])if (from >= --to) {
|
|
2869
|
+
break partition;
|
|
2870
|
+
}
|
|
2871
|
+
var swapElement = elements[to];
|
|
2872
|
+
swapFn(swapElement, from);
|
|
2873
|
+
elements[from++] = swapElement;
|
|
2874
|
+
elements[to--] = null;
|
|
2875
|
+
}while (from < to);
|
|
2867
2876
|
this.length -= this._blankCount;
|
|
2868
2877
|
this._blankCount = 0;
|
|
2869
2878
|
}
|
|
@@ -13280,11 +13289,15 @@ var rePropName = RegExp(// Match anything that isn't a dot or bracket.
|
|
|
13280
13289
|
if (this._currentEnteredEntity) {
|
|
13281
13290
|
this._currentEnteredEntity._scripts.forEach(function(element) {
|
|
13282
13291
|
element.onPointerExit(_this);
|
|
13292
|
+
}, function(element, index) {
|
|
13293
|
+
element._entityScriptsIndex = index;
|
|
13283
13294
|
});
|
|
13284
13295
|
}
|
|
13285
13296
|
if (rayCastEntity) {
|
|
13286
13297
|
rayCastEntity._scripts.forEach(function(element) {
|
|
13287
13298
|
element.onPointerEnter(_this);
|
|
13299
|
+
}, function(element, index) {
|
|
13300
|
+
element._entityScriptsIndex = index;
|
|
13288
13301
|
});
|
|
13289
13302
|
}
|
|
13290
13303
|
this._currentEnteredEntity = rayCastEntity;
|
|
@@ -13297,6 +13310,8 @@ var rePropName = RegExp(// Match anything that isn't a dot or bracket.
|
|
|
13297
13310
|
if (rayCastEntity) {
|
|
13298
13311
|
rayCastEntity._scripts.forEach(function(element) {
|
|
13299
13312
|
element.onPointerDown(_this);
|
|
13313
|
+
}, function(element, index) {
|
|
13314
|
+
element._entityScriptsIndex = index;
|
|
13300
13315
|
});
|
|
13301
13316
|
}
|
|
13302
13317
|
this._currentPressedEntity = rayCastEntity;
|
|
@@ -13308,6 +13323,8 @@ var rePropName = RegExp(// Match anything that isn't a dot or bracket.
|
|
|
13308
13323
|
if (this._currentPressedEntity) {
|
|
13309
13324
|
this._currentPressedEntity._scripts.forEach(function(element) {
|
|
13310
13325
|
element.onPointerDrag(_this);
|
|
13326
|
+
}, function(element, index) {
|
|
13327
|
+
element._entityScriptsIndex = index;
|
|
13311
13328
|
});
|
|
13312
13329
|
}
|
|
13313
13330
|
};
|
|
@@ -13321,6 +13338,8 @@ var rePropName = RegExp(// Match anything that isn't a dot or bracket.
|
|
|
13321
13338
|
pressedEntity._scripts.forEach(function(element) {
|
|
13322
13339
|
sameTarget && element.onPointerClick(_this);
|
|
13323
13340
|
element.onPointerUp(_this);
|
|
13341
|
+
}, function(element, index) {
|
|
13342
|
+
element._entityScriptsIndex = index;
|
|
13324
13343
|
});
|
|
13325
13344
|
this._currentPressedEntity = null;
|
|
13326
13345
|
}
|
|
@@ -13894,11 +13913,24 @@ var Collider = /*#__PURE__*/ function(Component1) {
|
|
|
13894
13913
|
};
|
|
13895
13914
|
/**
|
|
13896
13915
|
* @internal
|
|
13916
|
+
*/ _proto._cloneTo = function _cloneTo(target) {
|
|
13917
|
+
var shapes = target._shapes;
|
|
13918
|
+
for(var i = 0, n = shapes.length; i < n; i++){
|
|
13919
|
+
target._addPhysicsShape(shapes[i]);
|
|
13920
|
+
}
|
|
13921
|
+
};
|
|
13922
|
+
/**
|
|
13923
|
+
* @internal
|
|
13897
13924
|
*/ _proto._onDestroy = function _onDestroy() {
|
|
13898
13925
|
Component1.prototype._onDestroy.call(this);
|
|
13899
13926
|
this.clearShapes();
|
|
13900
13927
|
this._nativeCollider.destroy();
|
|
13901
13928
|
};
|
|
13929
|
+
_proto._addPhysicsShape = function _addPhysicsShape(shape) {
|
|
13930
|
+
shape._collider = this;
|
|
13931
|
+
this._nativeCollider.addShape(shape._nativeShape);
|
|
13932
|
+
this._phasedActiveInScene && this.scene.physics._addColliderShape(shape);
|
|
13933
|
+
};
|
|
13902
13934
|
_create_class(Collider, [
|
|
13903
13935
|
{
|
|
13904
13936
|
key: "shapes",
|
|
@@ -13914,6 +13946,15 @@ var Collider = /*#__PURE__*/ function(Component1) {
|
|
|
13914
13946
|
__decorate([
|
|
13915
13947
|
ignoreClone
|
|
13916
13948
|
], Collider.prototype, "_index", void 0);
|
|
13949
|
+
__decorate([
|
|
13950
|
+
ignoreClone
|
|
13951
|
+
], Collider.prototype, "_nativeCollider", void 0);
|
|
13952
|
+
__decorate([
|
|
13953
|
+
ignoreClone
|
|
13954
|
+
], Collider.prototype, "_updateFlag", void 0);
|
|
13955
|
+
__decorate([
|
|
13956
|
+
deepClone
|
|
13957
|
+
], Collider.prototype, "_shapes", void 0);
|
|
13917
13958
|
Collider = __decorate([
|
|
13918
13959
|
dependentComponents(Transform, DependentMode.CheckOnly)
|
|
13919
13960
|
], Collider);
|
|
@@ -13938,11 +13979,15 @@ var Collision = function Collision() {
|
|
|
13938
13979
|
var collision = PhysicsScene._collision;
|
|
13939
13980
|
collision.shape = shape2;
|
|
13940
13981
|
element.onCollisionEnter(collision);
|
|
13982
|
+
}, function(element, index) {
|
|
13983
|
+
element._entityScriptsIndex = index;
|
|
13941
13984
|
});
|
|
13942
13985
|
shape2.collider.entity._scripts.forEach(function(element) {
|
|
13943
13986
|
var collision = PhysicsScene._collision;
|
|
13944
13987
|
collision.shape = shape1;
|
|
13945
13988
|
element.onCollisionEnter(collision);
|
|
13989
|
+
}, function(element, index) {
|
|
13990
|
+
element._entityScriptsIndex = index;
|
|
13946
13991
|
});
|
|
13947
13992
|
};
|
|
13948
13993
|
this._onContactExit = function(obj1, obj2) {
|
|
@@ -13953,11 +13998,15 @@ var Collision = function Collision() {
|
|
|
13953
13998
|
var collision = PhysicsScene._collision;
|
|
13954
13999
|
collision.shape = shape2;
|
|
13955
14000
|
element.onCollisionExit(collision);
|
|
14001
|
+
}, function(element, index) {
|
|
14002
|
+
element._entityScriptsIndex = index;
|
|
13956
14003
|
});
|
|
13957
14004
|
shape2.collider.entity._scripts.forEach(function(element) {
|
|
13958
14005
|
var collision = PhysicsScene._collision;
|
|
13959
14006
|
collision.shape = shape1;
|
|
13960
14007
|
element.onCollisionExit(collision);
|
|
14008
|
+
}, function(element, index) {
|
|
14009
|
+
element._entityScriptsIndex = index;
|
|
13961
14010
|
});
|
|
13962
14011
|
};
|
|
13963
14012
|
this._onContactStay = function(obj1, obj2) {
|
|
@@ -13968,11 +14017,15 @@ var Collision = function Collision() {
|
|
|
13968
14017
|
var collision = PhysicsScene._collision;
|
|
13969
14018
|
collision.shape = shape2;
|
|
13970
14019
|
element.onCollisionStay(collision);
|
|
14020
|
+
}, function(element, index) {
|
|
14021
|
+
element._entityScriptsIndex = index;
|
|
13971
14022
|
});
|
|
13972
14023
|
shape2.collider.entity._scripts.forEach(function(element) {
|
|
13973
14024
|
var collision = PhysicsScene._collision;
|
|
13974
14025
|
collision.shape = shape1;
|
|
13975
14026
|
element.onCollisionStay(collision);
|
|
14027
|
+
}, function(element, index) {
|
|
14028
|
+
element._entityScriptsIndex = index;
|
|
13976
14029
|
});
|
|
13977
14030
|
};
|
|
13978
14031
|
this._onTriggerEnter = function(obj1, obj2) {
|
|
@@ -13981,9 +14034,13 @@ var Collision = function Collision() {
|
|
|
13981
14034
|
var shape2 = physicalObjectsMap[obj2];
|
|
13982
14035
|
shape1.collider.entity._scripts.forEach(function(element) {
|
|
13983
14036
|
element.onTriggerEnter(shape2);
|
|
14037
|
+
}, function(element, index) {
|
|
14038
|
+
element._entityScriptsIndex = index;
|
|
13984
14039
|
});
|
|
13985
14040
|
shape2.collider.entity._scripts.forEach(function(element) {
|
|
13986
14041
|
element.onTriggerEnter(shape1);
|
|
14042
|
+
}, function(element, index) {
|
|
14043
|
+
element._entityScriptsIndex = index;
|
|
13987
14044
|
});
|
|
13988
14045
|
};
|
|
13989
14046
|
this._onTriggerExit = function(obj1, obj2) {
|
|
@@ -13992,9 +14049,13 @@ var Collision = function Collision() {
|
|
|
13992
14049
|
var shape2 = physicalObjectsMap[obj2];
|
|
13993
14050
|
shape1.collider.entity._scripts.forEach(function(element) {
|
|
13994
14051
|
element.onTriggerExit(shape2);
|
|
14052
|
+
}, function(element, index) {
|
|
14053
|
+
element._entityScriptsIndex = index;
|
|
13995
14054
|
});
|
|
13996
14055
|
shape2.collider.entity._scripts.forEach(function(element) {
|
|
13997
14056
|
element.onTriggerExit(shape1);
|
|
14057
|
+
}, function(element, index) {
|
|
14058
|
+
element._entityScriptsIndex = index;
|
|
13998
14059
|
});
|
|
13999
14060
|
};
|
|
14000
14061
|
this._onTriggerStay = function(obj1, obj2) {
|
|
@@ -14003,9 +14064,13 @@ var Collision = function Collision() {
|
|
|
14003
14064
|
var shape2 = physicalObjectsMap[obj2];
|
|
14004
14065
|
shape1.collider.entity._scripts.forEach(function(element) {
|
|
14005
14066
|
element.onTriggerStay(shape2);
|
|
14067
|
+
}, function(element, index) {
|
|
14068
|
+
element._entityScriptsIndex = index;
|
|
14006
14069
|
});
|
|
14007
14070
|
shape2.collider.entity._scripts.forEach(function(element) {
|
|
14008
14071
|
element.onTriggerStay(shape1);
|
|
14072
|
+
}, function(element, index) {
|
|
14073
|
+
element._entityScriptsIndex = index;
|
|
14009
14074
|
});
|
|
14010
14075
|
};
|
|
14011
14076
|
this._scene = scene;
|
|
@@ -14038,6 +14103,9 @@ var Collision = function Collision() {
|
|
|
14038
14103
|
}
|
|
14039
14104
|
var onRaycast = function(obj) {
|
|
14040
14105
|
var shape = _this._scene.engine._physicalObjectsMap[obj];
|
|
14106
|
+
if (!shape) {
|
|
14107
|
+
return false;
|
|
14108
|
+
}
|
|
14041
14109
|
return shape.collider.entity.layer & layerMask && shape.isSceneQuery;
|
|
14042
14110
|
};
|
|
14043
14111
|
if (hitResult != undefined) {
|
|
@@ -14262,7 +14330,6 @@ var Collision = function Collision() {
|
|
|
14262
14330
|
*/ _proto._onLateUpdate = function _onLateUpdate() {
|
|
14263
14331
|
var position = this.entity.transform.worldPosition;
|
|
14264
14332
|
this._nativeCollider.getWorldPosition(position);
|
|
14265
|
-
this.entity.transform.worldPosition = position;
|
|
14266
14333
|
this._updateFlag.flag = false;
|
|
14267
14334
|
};
|
|
14268
14335
|
/**
|
|
@@ -14419,6 +14486,25 @@ var Collision = function Collision() {
|
|
|
14419
14486
|
this._nativeCollider.getWorldTransform(worldPosition, worldRotationQuaternion);
|
|
14420
14487
|
this._updateFlag.flag = false;
|
|
14421
14488
|
};
|
|
14489
|
+
/**
|
|
14490
|
+
* @internal
|
|
14491
|
+
*/ _proto._cloneTo = function _cloneTo(target) {
|
|
14492
|
+
Collider1.prototype._cloneTo.call(this, target);
|
|
14493
|
+
target.linearDamping = this.linearDamping;
|
|
14494
|
+
target.angularDamping = this.angularDamping;
|
|
14495
|
+
target.linearVelocity = this.linearVelocity;
|
|
14496
|
+
target.angularVelocity = this.angularVelocity;
|
|
14497
|
+
target.mass = this.mass;
|
|
14498
|
+
target.centerOfMass = this.centerOfMass;
|
|
14499
|
+
target.inertiaTensor = this.inertiaTensor;
|
|
14500
|
+
target.maxAngularVelocity = this.maxAngularVelocity;
|
|
14501
|
+
target.maxDepenetrationVelocity = this.maxDepenetrationVelocity;
|
|
14502
|
+
target.sleepThreshold = this.sleepThreshold;
|
|
14503
|
+
target.solverIterations = this.solverIterations;
|
|
14504
|
+
target.isKinematic = this.isKinematic;
|
|
14505
|
+
target.constraints = this.constraints;
|
|
14506
|
+
target.collisionDetectionMode = this.collisionDetectionMode;
|
|
14507
|
+
};
|
|
14422
14508
|
_proto._setLinearVelocity = function _setLinearVelocity() {
|
|
14423
14509
|
this._nativeCollider.setLinearVelocity(this._linearVelocity);
|
|
14424
14510
|
};
|
|
@@ -14627,6 +14713,48 @@ var Collision = function Collision() {
|
|
|
14627
14713
|
]);
|
|
14628
14714
|
return DynamicCollider;
|
|
14629
14715
|
}(Collider);
|
|
14716
|
+
__decorate([
|
|
14717
|
+
ignoreClone
|
|
14718
|
+
], DynamicCollider.prototype, "_linearDamping", void 0);
|
|
14719
|
+
__decorate([
|
|
14720
|
+
ignoreClone
|
|
14721
|
+
], DynamicCollider.prototype, "_angularDamping", void 0);
|
|
14722
|
+
__decorate([
|
|
14723
|
+
ignoreClone
|
|
14724
|
+
], DynamicCollider.prototype, "_linearVelocity", void 0);
|
|
14725
|
+
__decorate([
|
|
14726
|
+
ignoreClone
|
|
14727
|
+
], DynamicCollider.prototype, "_angularVelocity", void 0);
|
|
14728
|
+
__decorate([
|
|
14729
|
+
ignoreClone
|
|
14730
|
+
], DynamicCollider.prototype, "_mass", void 0);
|
|
14731
|
+
__decorate([
|
|
14732
|
+
ignoreClone
|
|
14733
|
+
], DynamicCollider.prototype, "_centerOfMass", void 0);
|
|
14734
|
+
__decorate([
|
|
14735
|
+
ignoreClone
|
|
14736
|
+
], DynamicCollider.prototype, "_inertiaTensor", void 0);
|
|
14737
|
+
__decorate([
|
|
14738
|
+
ignoreClone
|
|
14739
|
+
], DynamicCollider.prototype, "_maxAngularVelocity", void 0);
|
|
14740
|
+
__decorate([
|
|
14741
|
+
ignoreClone
|
|
14742
|
+
], DynamicCollider.prototype, "_maxDepenetrationVelocity", void 0);
|
|
14743
|
+
__decorate([
|
|
14744
|
+
ignoreClone
|
|
14745
|
+
], DynamicCollider.prototype, "_solverIterations", void 0);
|
|
14746
|
+
__decorate([
|
|
14747
|
+
ignoreClone
|
|
14748
|
+
], DynamicCollider.prototype, "_isKinematic", void 0);
|
|
14749
|
+
__decorate([
|
|
14750
|
+
ignoreClone
|
|
14751
|
+
], DynamicCollider.prototype, "_constraints", void 0);
|
|
14752
|
+
__decorate([
|
|
14753
|
+
ignoreClone
|
|
14754
|
+
], DynamicCollider.prototype, "_collisionDetectionMode", void 0);
|
|
14755
|
+
__decorate([
|
|
14756
|
+
ignoreClone
|
|
14757
|
+
], DynamicCollider.prototype, "_sleepThreshold", void 0);
|
|
14630
14758
|
var CollisionDetectionMode;
|
|
14631
14759
|
(function(CollisionDetectionMode) {
|
|
14632
14760
|
CollisionDetectionMode[CollisionDetectionMode["Discrete"] = 0] = "Discrete";
|
|
@@ -14679,7 +14807,8 @@ var DynamicColliderConstraints;
|
|
|
14679
14807
|
/**
|
|
14680
14808
|
* @internal
|
|
14681
14809
|
*/ _proto._destroy = function _destroy() {
|
|
14682
|
-
this._nativeMaterial.destroy();
|
|
14810
|
+
!this._destroyed && this._nativeMaterial.destroy();
|
|
14811
|
+
this._destroyed = true;
|
|
14683
14812
|
};
|
|
14684
14813
|
_create_class(PhysicsMaterial, [
|
|
14685
14814
|
{
|
|
@@ -14794,24 +14923,37 @@ var Joint = /*#__PURE__*/ function(Component1) {
|
|
|
14794
14923
|
function Joint(entity) {
|
|
14795
14924
|
var _this;
|
|
14796
14925
|
_this = Component1.call(this, entity) || this;
|
|
14797
|
-
_this.
|
|
14798
|
-
_this.
|
|
14926
|
+
_this._colliderInfo = new JointColliderInfo();
|
|
14927
|
+
_this._connectedColliderInfo = new JointColliderInfo();
|
|
14799
14928
|
_this._force = 0;
|
|
14800
14929
|
_this._torque = 0;
|
|
14801
|
-
_this.
|
|
14930
|
+
_this._connectedColliderInfo.localPosition = new Vector3();
|
|
14802
14931
|
return _this;
|
|
14803
14932
|
}
|
|
14933
|
+
var _proto = Joint.prototype;
|
|
14934
|
+
/**
|
|
14935
|
+
* @internal
|
|
14936
|
+
*/ _proto._cloneTo = function _cloneTo(target) {
|
|
14937
|
+
target.connectedCollider = this.connectedCollider;
|
|
14938
|
+
target.connectedAnchor = this.connectedAnchor;
|
|
14939
|
+
target.connectedMassScale = this.connectedMassScale;
|
|
14940
|
+
target.connectedInertiaScale = this.connectedInertiaScale;
|
|
14941
|
+
target.massScale = this.massScale;
|
|
14942
|
+
target.inertiaScale = this.inertiaScale;
|
|
14943
|
+
target.breakForce = this.breakForce;
|
|
14944
|
+
target.breakTorque = this.breakTorque;
|
|
14945
|
+
};
|
|
14804
14946
|
_create_class(Joint, [
|
|
14805
14947
|
{
|
|
14806
14948
|
key: "connectedCollider",
|
|
14807
14949
|
get: /**
|
|
14808
14950
|
* The connected collider.
|
|
14809
14951
|
*/ function get() {
|
|
14810
|
-
return this.
|
|
14952
|
+
return this._connectedColliderInfo.collider;
|
|
14811
14953
|
},
|
|
14812
14954
|
set: function set(value) {
|
|
14813
|
-
if (this.
|
|
14814
|
-
this.
|
|
14955
|
+
if (this._connectedColliderInfo.collider !== value) {
|
|
14956
|
+
this._connectedColliderInfo.collider = value;
|
|
14815
14957
|
this._nativeJoint.setConnectedCollider(value._nativeCollider);
|
|
14816
14958
|
}
|
|
14817
14959
|
}
|
|
@@ -14822,10 +14964,10 @@ var Joint = /*#__PURE__*/ function(Component1) {
|
|
|
14822
14964
|
* The connected anchor position.
|
|
14823
14965
|
* @remarks If connectedCollider is set, this anchor is relative offset, or the anchor is world position.
|
|
14824
14966
|
*/ function get() {
|
|
14825
|
-
return this.
|
|
14967
|
+
return this._connectedColliderInfo.localPosition;
|
|
14826
14968
|
},
|
|
14827
14969
|
set: function set(value) {
|
|
14828
|
-
var connectedAnchor = this.
|
|
14970
|
+
var connectedAnchor = this._connectedColliderInfo.localPosition;
|
|
14829
14971
|
if (value !== connectedAnchor) {
|
|
14830
14972
|
connectedAnchor.copyFrom(value);
|
|
14831
14973
|
}
|
|
@@ -14837,11 +14979,11 @@ var Joint = /*#__PURE__*/ function(Component1) {
|
|
|
14837
14979
|
get: /**
|
|
14838
14980
|
* The scale to apply to the inverse mass of collider 0 for resolving this constraint.
|
|
14839
14981
|
*/ function get() {
|
|
14840
|
-
return this.
|
|
14982
|
+
return this._connectedColliderInfo.massScale;
|
|
14841
14983
|
},
|
|
14842
14984
|
set: function set(value) {
|
|
14843
|
-
if (value !== this.
|
|
14844
|
-
this.
|
|
14985
|
+
if (value !== this._connectedColliderInfo.massScale) {
|
|
14986
|
+
this._connectedColliderInfo.massScale = value;
|
|
14845
14987
|
this._nativeJoint.setConnectedMassScale(value);
|
|
14846
14988
|
}
|
|
14847
14989
|
}
|
|
@@ -14851,11 +14993,11 @@ var Joint = /*#__PURE__*/ function(Component1) {
|
|
|
14851
14993
|
get: /**
|
|
14852
14994
|
* The scale to apply to the inverse inertia of collider0 for resolving this constraint.
|
|
14853
14995
|
*/ function get() {
|
|
14854
|
-
return this.
|
|
14996
|
+
return this._connectedColliderInfo.inertiaScale;
|
|
14855
14997
|
},
|
|
14856
14998
|
set: function set(value) {
|
|
14857
|
-
if (value !== this.
|
|
14858
|
-
this.
|
|
14999
|
+
if (value !== this._connectedColliderInfo.inertiaScale) {
|
|
15000
|
+
this._connectedColliderInfo.inertiaScale = value;
|
|
14859
15001
|
this._nativeJoint.setConnectedInertiaScale(value);
|
|
14860
15002
|
}
|
|
14861
15003
|
}
|
|
@@ -14865,11 +15007,11 @@ var Joint = /*#__PURE__*/ function(Component1) {
|
|
|
14865
15007
|
get: /**
|
|
14866
15008
|
* The scale to apply to the inverse mass of collider 1 for resolving this constraint.
|
|
14867
15009
|
*/ function get() {
|
|
14868
|
-
return this.
|
|
15010
|
+
return this._colliderInfo.massScale;
|
|
14869
15011
|
},
|
|
14870
15012
|
set: function set(value) {
|
|
14871
|
-
if (value !== this.
|
|
14872
|
-
this.
|
|
15013
|
+
if (value !== this._colliderInfo.massScale) {
|
|
15014
|
+
this._colliderInfo.massScale = value;
|
|
14873
15015
|
this._nativeJoint.setMassScale(value);
|
|
14874
15016
|
}
|
|
14875
15017
|
}
|
|
@@ -14879,11 +15021,11 @@ var Joint = /*#__PURE__*/ function(Component1) {
|
|
|
14879
15021
|
get: /**
|
|
14880
15022
|
* The scale to apply to the inverse inertia of collider1 for resolving this constraint.
|
|
14881
15023
|
*/ function get() {
|
|
14882
|
-
return this.
|
|
15024
|
+
return this._colliderInfo.inertiaScale;
|
|
14883
15025
|
},
|
|
14884
15026
|
set: function set(value) {
|
|
14885
|
-
if (value !== this.
|
|
14886
|
-
this.
|
|
15027
|
+
if (value !== this._colliderInfo.inertiaScale) {
|
|
15028
|
+
this._colliderInfo.inertiaScale = value;
|
|
14887
15029
|
this._nativeJoint.setInertiaScale(value);
|
|
14888
15030
|
}
|
|
14889
15031
|
}
|
|
@@ -14919,12 +15061,27 @@ var Joint = /*#__PURE__*/ function(Component1) {
|
|
|
14919
15061
|
]);
|
|
14920
15062
|
return Joint;
|
|
14921
15063
|
}(Component);
|
|
15064
|
+
__decorate([
|
|
15065
|
+
ignoreClone
|
|
15066
|
+
], Joint.prototype, "_colliderInfo", void 0);
|
|
15067
|
+
__decorate([
|
|
15068
|
+
ignoreClone
|
|
15069
|
+
], Joint.prototype, "_connectedColliderInfo", void 0);
|
|
15070
|
+
__decorate([
|
|
15071
|
+
ignoreClone
|
|
15072
|
+
], Joint.prototype, "_nativeJoint", void 0);
|
|
15073
|
+
__decorate([
|
|
15074
|
+
ignoreClone
|
|
15075
|
+
], Joint.prototype, "_force", void 0);
|
|
15076
|
+
__decorate([
|
|
15077
|
+
ignoreClone
|
|
15078
|
+
], Joint.prototype, "_torque", void 0);
|
|
14922
15079
|
Joint = __decorate([
|
|
14923
15080
|
dependentComponents(Collider, DependentMode.CheckOnly)
|
|
14924
15081
|
], Joint);
|
|
14925
15082
|
/**
|
|
14926
15083
|
* @internal
|
|
14927
|
-
*/ var
|
|
15084
|
+
*/ var JointColliderInfo = function JointColliderInfo() {
|
|
14928
15085
|
this.collider = null;
|
|
14929
15086
|
this.massScale = 0;
|
|
14930
15087
|
this.inertiaScale = 0;
|
|
@@ -14941,7 +15098,7 @@ Joint = __decorate([
|
|
|
14941
15098
|
/**
|
|
14942
15099
|
* @internal
|
|
14943
15100
|
*/ _proto._onAwake = function _onAwake() {
|
|
14944
|
-
var collider = this.
|
|
15101
|
+
var collider = this._colliderInfo;
|
|
14945
15102
|
collider.collider = this.entity.getComponent(Collider);
|
|
14946
15103
|
this._nativeJoint = PhysicsScene._nativePhysics.createFixedJoint(collider.collider._nativeCollider);
|
|
14947
15104
|
};
|
|
@@ -14975,11 +15132,22 @@ Joint = __decorate([
|
|
|
14975
15132
|
/**
|
|
14976
15133
|
* @internal
|
|
14977
15134
|
*/ _proto._onAwake = function _onAwake() {
|
|
14978
|
-
var collider = this.
|
|
15135
|
+
var collider = this._colliderInfo;
|
|
14979
15136
|
collider.localPosition = new Vector3();
|
|
14980
15137
|
collider.collider = this.entity.getComponent(Collider);
|
|
14981
15138
|
this._nativeJoint = PhysicsScene._nativePhysics.createHingeJoint(collider.collider._nativeCollider);
|
|
14982
15139
|
};
|
|
15140
|
+
/**
|
|
15141
|
+
* @internal
|
|
15142
|
+
*/ _proto._cloneTo = function _cloneTo(target) {
|
|
15143
|
+
target.axis = this.axis;
|
|
15144
|
+
target.swingOffset = this.swingOffset;
|
|
15145
|
+
target.useLimits = this.useLimits;
|
|
15146
|
+
target.useMotor = this.useMotor;
|
|
15147
|
+
target.useSpring = this.useSpring;
|
|
15148
|
+
target.motor = this.motor;
|
|
15149
|
+
target.limits = this.limits;
|
|
15150
|
+
};
|
|
14983
15151
|
_create_class(HingeJoint, [
|
|
14984
15152
|
{
|
|
14985
15153
|
key: "axis",
|
|
@@ -15001,10 +15169,10 @@ Joint = __decorate([
|
|
|
15001
15169
|
get: /**
|
|
15002
15170
|
* The swing offset.
|
|
15003
15171
|
*/ function get() {
|
|
15004
|
-
return this.
|
|
15172
|
+
return this._colliderInfo.localPosition;
|
|
15005
15173
|
},
|
|
15006
15174
|
set: function set(value) {
|
|
15007
|
-
var swingOffset = this.
|
|
15175
|
+
var swingOffset = this._colliderInfo.localPosition;
|
|
15008
15176
|
if (value !== swingOffset) {
|
|
15009
15177
|
swingOffset.copyFrom(value);
|
|
15010
15178
|
}
|
|
@@ -15107,6 +15275,21 @@ Joint = __decorate([
|
|
|
15107
15275
|
]);
|
|
15108
15276
|
return HingeJoint;
|
|
15109
15277
|
}(Joint);
|
|
15278
|
+
__decorate([
|
|
15279
|
+
ignoreClone
|
|
15280
|
+
], HingeJoint.prototype, "_axis", void 0);
|
|
15281
|
+
__decorate([
|
|
15282
|
+
ignoreClone
|
|
15283
|
+
], HingeJoint.prototype, "_hingeFlags", void 0);
|
|
15284
|
+
__decorate([
|
|
15285
|
+
ignoreClone
|
|
15286
|
+
], HingeJoint.prototype, "_useSpring", void 0);
|
|
15287
|
+
__decorate([
|
|
15288
|
+
ignoreClone
|
|
15289
|
+
], HingeJoint.prototype, "_jointMonitor", void 0);
|
|
15290
|
+
__decorate([
|
|
15291
|
+
ignoreClone
|
|
15292
|
+
], HingeJoint.prototype, "_limits", void 0);
|
|
15110
15293
|
|
|
15111
15294
|
/**
|
|
15112
15295
|
* A joint that maintains an upper or lower bound (or both) on the distance between two points on different objects.
|
|
@@ -15126,21 +15309,31 @@ Joint = __decorate([
|
|
|
15126
15309
|
/**
|
|
15127
15310
|
* @internal
|
|
15128
15311
|
*/ _proto._onAwake = function _onAwake() {
|
|
15129
|
-
var collider = this.
|
|
15312
|
+
var collider = this._colliderInfo;
|
|
15130
15313
|
collider.localPosition = new Vector3();
|
|
15131
15314
|
collider.collider = this.entity.getComponent(Collider);
|
|
15132
15315
|
this._nativeJoint = PhysicsScene._nativePhysics.createSpringJoint(collider.collider._nativeCollider);
|
|
15133
15316
|
};
|
|
15317
|
+
/**
|
|
15318
|
+
* @internal
|
|
15319
|
+
*/ _proto._cloneTo = function _cloneTo(target) {
|
|
15320
|
+
target.swingOffset = this.swingOffset;
|
|
15321
|
+
target.minDistance = this.minDistance;
|
|
15322
|
+
target.maxDistance = this.maxDistance;
|
|
15323
|
+
target.tolerance = this.tolerance;
|
|
15324
|
+
target.stiffness = this.stiffness;
|
|
15325
|
+
target.damping = this.damping;
|
|
15326
|
+
};
|
|
15134
15327
|
_create_class(SpringJoint, [
|
|
15135
15328
|
{
|
|
15136
15329
|
key: "swingOffset",
|
|
15137
15330
|
get: /**
|
|
15138
15331
|
* The swing offset.
|
|
15139
15332
|
*/ function get() {
|
|
15140
|
-
return this.
|
|
15333
|
+
return this._colliderInfo.localPosition;
|
|
15141
15334
|
},
|
|
15142
15335
|
set: function set(value) {
|
|
15143
|
-
var swingOffset = this.
|
|
15336
|
+
var swingOffset = this._colliderInfo.localPosition;
|
|
15144
15337
|
if (value !== swingOffset) {
|
|
15145
15338
|
swingOffset.copyFrom(value);
|
|
15146
15339
|
}
|
|
@@ -15265,6 +15458,15 @@ Joint = __decorate([
|
|
|
15265
15458
|
var _proto = ColliderShape.prototype;
|
|
15266
15459
|
/**
|
|
15267
15460
|
* @internal
|
|
15461
|
+
*/ _proto._cloneTo = function _cloneTo(target) {
|
|
15462
|
+
target.contactOffset = this.contactOffset;
|
|
15463
|
+
target.rotation = this.rotation;
|
|
15464
|
+
target.position = this.position;
|
|
15465
|
+
target.isTrigger = this.isTrigger;
|
|
15466
|
+
target.material = this.material;
|
|
15467
|
+
};
|
|
15468
|
+
/**
|
|
15469
|
+
* @internal
|
|
15268
15470
|
*/ _proto._destroy = function _destroy() {
|
|
15269
15471
|
this._material._destroy();
|
|
15270
15472
|
this._nativeShape.destroy();
|
|
@@ -15366,6 +15568,30 @@ Joint = __decorate([
|
|
|
15366
15568
|
(function() {
|
|
15367
15569
|
ColliderShape._idGenerator = 0;
|
|
15368
15570
|
})();
|
|
15571
|
+
__decorate([
|
|
15572
|
+
ignoreClone
|
|
15573
|
+
], ColliderShape.prototype, "_collider", void 0);
|
|
15574
|
+
__decorate([
|
|
15575
|
+
ignoreClone
|
|
15576
|
+
], ColliderShape.prototype, "_nativeShape", void 0);
|
|
15577
|
+
__decorate([
|
|
15578
|
+
ignoreClone
|
|
15579
|
+
], ColliderShape.prototype, "_id", void 0);
|
|
15580
|
+
__decorate([
|
|
15581
|
+
ignoreClone
|
|
15582
|
+
], ColliderShape.prototype, "_material", void 0);
|
|
15583
|
+
__decorate([
|
|
15584
|
+
ignoreClone
|
|
15585
|
+
], ColliderShape.prototype, "_isTrigger", void 0);
|
|
15586
|
+
__decorate([
|
|
15587
|
+
ignoreClone
|
|
15588
|
+
], ColliderShape.prototype, "_rotation", void 0);
|
|
15589
|
+
__decorate([
|
|
15590
|
+
ignoreClone
|
|
15591
|
+
], ColliderShape.prototype, "_position", void 0);
|
|
15592
|
+
__decorate([
|
|
15593
|
+
ignoreClone
|
|
15594
|
+
], ColliderShape.prototype, "_contactOffset", void 0);
|
|
15369
15595
|
|
|
15370
15596
|
/**
|
|
15371
15597
|
* Physical collider shape for box.
|
|
@@ -15382,6 +15608,12 @@ Joint = __decorate([
|
|
|
15382
15608
|
return _this;
|
|
15383
15609
|
}
|
|
15384
15610
|
var _proto = BoxColliderShape.prototype;
|
|
15611
|
+
/**
|
|
15612
|
+
* @internal
|
|
15613
|
+
*/ _proto._cloneTo = function _cloneTo(target) {
|
|
15614
|
+
ColliderShape1.prototype._cloneTo.call(this, target);
|
|
15615
|
+
target.size = this.size;
|
|
15616
|
+
};
|
|
15385
15617
|
_proto._setSize = function _setSize() {
|
|
15386
15618
|
this._nativeShape.setSize(this._size);
|
|
15387
15619
|
};
|
|
@@ -15402,6 +15634,9 @@ Joint = __decorate([
|
|
|
15402
15634
|
]);
|
|
15403
15635
|
return BoxColliderShape;
|
|
15404
15636
|
}(ColliderShape);
|
|
15637
|
+
__decorate([
|
|
15638
|
+
ignoreClone
|
|
15639
|
+
], BoxColliderShape.prototype, "_size", void 0);
|
|
15405
15640
|
|
|
15406
15641
|
/**
|
|
15407
15642
|
* Physical collider shape for sphere.
|
|
@@ -15414,6 +15649,11 @@ Joint = __decorate([
|
|
|
15414
15649
|
_this._nativeShape = PhysicsScene._nativePhysics.createSphereColliderShape(_this._id, _this._radius, _this._material._nativeMaterial);
|
|
15415
15650
|
return _this;
|
|
15416
15651
|
}
|
|
15652
|
+
var _proto = SphereColliderShape.prototype;
|
|
15653
|
+
_proto._cloneTo = function _cloneTo(target) {
|
|
15654
|
+
ColliderShape1.prototype._cloneTo.call(this, target);
|
|
15655
|
+
target.radius = this.radius;
|
|
15656
|
+
};
|
|
15417
15657
|
_create_class(SphereColliderShape, [
|
|
15418
15658
|
{
|
|
15419
15659
|
key: "radius",
|
|
@@ -15432,6 +15672,9 @@ Joint = __decorate([
|
|
|
15432
15672
|
]);
|
|
15433
15673
|
return SphereColliderShape;
|
|
15434
15674
|
}(ColliderShape);
|
|
15675
|
+
__decorate([
|
|
15676
|
+
ignoreClone
|
|
15677
|
+
], SphereColliderShape.prototype, "_radius", void 0);
|
|
15435
15678
|
|
|
15436
15679
|
/**
|
|
15437
15680
|
* Physical collider shape plane.
|
|
@@ -15459,6 +15702,15 @@ Joint = __decorate([
|
|
|
15459
15702
|
_this._nativeShape = PhysicsScene._nativePhysics.createCapsuleColliderShape(_this._id, _this._radius, _this._height, _this._material._nativeMaterial);
|
|
15460
15703
|
return _this;
|
|
15461
15704
|
}
|
|
15705
|
+
var _proto = CapsuleColliderShape.prototype;
|
|
15706
|
+
/**
|
|
15707
|
+
* @internal
|
|
15708
|
+
*/ _proto._cloneTo = function _cloneTo(target) {
|
|
15709
|
+
ColliderShape1.prototype._cloneTo.call(this, target);
|
|
15710
|
+
target.radius = this.radius;
|
|
15711
|
+
target.height = this.height;
|
|
15712
|
+
target.upAxis = this.upAxis;
|
|
15713
|
+
};
|
|
15462
15714
|
_create_class(CapsuleColliderShape, [
|
|
15463
15715
|
{
|
|
15464
15716
|
key: "radius",
|
|
@@ -15505,6 +15757,15 @@ Joint = __decorate([
|
|
|
15505
15757
|
]);
|
|
15506
15758
|
return CapsuleColliderShape;
|
|
15507
15759
|
}(ColliderShape);
|
|
15760
|
+
__decorate([
|
|
15761
|
+
ignoreClone
|
|
15762
|
+
], CapsuleColliderShape.prototype, "_radius", void 0);
|
|
15763
|
+
__decorate([
|
|
15764
|
+
ignoreClone
|
|
15765
|
+
], CapsuleColliderShape.prototype, "_height", void 0);
|
|
15766
|
+
__decorate([
|
|
15767
|
+
ignoreClone
|
|
15768
|
+
], CapsuleColliderShape.prototype, "_upAxis", void 0);
|
|
15508
15769
|
|
|
15509
15770
|
/**
|
|
15510
15771
|
* Pointer Manager.
|
|
@@ -17069,13 +17330,12 @@ ShaderPool.init();
|
|
|
17069
17330
|
/**
|
|
17070
17331
|
* @internal
|
|
17071
17332
|
*/ _proto._resizeBackgroundTexture = function _resizeBackgroundTexture() {
|
|
17333
|
+
var _this = this, texture = _this._texture, mesh = _this._mesh;
|
|
17072
17334
|
if (!this._texture) {
|
|
17073
17335
|
return;
|
|
17074
17336
|
}
|
|
17075
|
-
var
|
|
17076
|
-
var
|
|
17077
|
-
var _this = this, _backgroundTextureMesh = _this._mesh;
|
|
17078
|
-
var positions = _backgroundTextureMesh.getPositions();
|
|
17337
|
+
var _this__engine_canvas = this._engine.canvas, width = _this__engine_canvas.width, height = _this__engine_canvas.height;
|
|
17338
|
+
var positions = mesh.getPositions();
|
|
17079
17339
|
switch(this._textureFillMode){
|
|
17080
17340
|
case BackgroundTextureFillMode.Fill:
|
|
17081
17341
|
positions[0].set(-1, -1, 1);
|
|
@@ -17084,22 +17344,22 @@ ShaderPool.init();
|
|
|
17084
17344
|
positions[3].set(1, 1, 1);
|
|
17085
17345
|
break;
|
|
17086
17346
|
case BackgroundTextureFillMode.AspectFitWidth:
|
|
17087
|
-
var fitWidthScale =
|
|
17347
|
+
var fitWidthScale = texture.height * width / texture.width / height;
|
|
17088
17348
|
positions[0].set(-1, -fitWidthScale, 1);
|
|
17089
17349
|
positions[1].set(1, -fitWidthScale, 1);
|
|
17090
17350
|
positions[2].set(-1, fitWidthScale, 1);
|
|
17091
17351
|
positions[3].set(1, fitWidthScale, 1);
|
|
17092
17352
|
break;
|
|
17093
17353
|
case BackgroundTextureFillMode.AspectFitHeight:
|
|
17094
|
-
var fitHeightScale =
|
|
17354
|
+
var fitHeightScale = texture.width * height / texture.height / width;
|
|
17095
17355
|
positions[0].set(-fitHeightScale, -1, 1);
|
|
17096
17356
|
positions[1].set(fitHeightScale, -1, 1);
|
|
17097
17357
|
positions[2].set(-fitHeightScale, 1, 1);
|
|
17098
17358
|
positions[3].set(fitHeightScale, 1, 1);
|
|
17099
17359
|
break;
|
|
17100
17360
|
}
|
|
17101
|
-
|
|
17102
|
-
|
|
17361
|
+
mesh.setPositions(positions);
|
|
17362
|
+
mesh.uploadData(false);
|
|
17103
17363
|
};
|
|
17104
17364
|
_proto._initMesh = function _initMesh(engine) {
|
|
17105
17365
|
this._mesh = this._createPlane(engine);
|
|
@@ -17150,13 +17410,13 @@ ShaderPool.init();
|
|
|
17150
17410
|
(_this__texture = this._texture) == null ? void 0 : _this__texture._addReferCount(-1);
|
|
17151
17411
|
this._texture = value;
|
|
17152
17412
|
this._material.shaderData.setTexture("material_BaseTexture", value);
|
|
17413
|
+
this._resizeBackgroundTexture();
|
|
17153
17414
|
}
|
|
17154
17415
|
}
|
|
17155
17416
|
},
|
|
17156
17417
|
{
|
|
17157
17418
|
key: "textureFillMode",
|
|
17158
17419
|
get: /**
|
|
17159
|
-
* @internal
|
|
17160
17420
|
* Background texture fill mode.
|
|
17161
17421
|
* @remarks When `mode` is `BackgroundMode.Texture`, the property will take effects.
|
|
17162
17422
|
* @defaultValue `BackgroundTextureFillMode.FitHeight`
|
|
@@ -17274,33 +17534,37 @@ ShaderPool.init();
|
|
|
17274
17534
|
};
|
|
17275
17535
|
_proto.callScriptOnUpdate = function callScriptOnUpdate(deltaTime) {
|
|
17276
17536
|
this._onUpdateScripts.forEach(function(element) {
|
|
17277
|
-
|
|
17278
|
-
|
|
17279
|
-
|
|
17537
|
+
element._started && element.onUpdate(deltaTime);
|
|
17538
|
+
}, function(element, index) {
|
|
17539
|
+
element._onUpdateIndex = index;
|
|
17280
17540
|
});
|
|
17281
17541
|
};
|
|
17282
17542
|
_proto.callScriptOnLateUpdate = function callScriptOnLateUpdate(deltaTime) {
|
|
17283
17543
|
this._onLateUpdateScripts.forEach(function(element) {
|
|
17284
|
-
|
|
17285
|
-
|
|
17286
|
-
|
|
17544
|
+
element._started && element.onLateUpdate(deltaTime);
|
|
17545
|
+
}, function(element, index) {
|
|
17546
|
+
element._onLateUpdateIndex = index;
|
|
17287
17547
|
});
|
|
17288
17548
|
};
|
|
17289
17549
|
_proto.callScriptOnPhysicsUpdate = function callScriptOnPhysicsUpdate() {
|
|
17290
17550
|
this._onPhysicsUpdateScripts.forEach(function(element) {
|
|
17291
|
-
|
|
17292
|
-
|
|
17293
|
-
|
|
17551
|
+
element._started && element.onPhysicsUpdate();
|
|
17552
|
+
}, function(element, index) {
|
|
17553
|
+
element._onPhysicsUpdateIndex = index;
|
|
17294
17554
|
});
|
|
17295
17555
|
};
|
|
17296
17556
|
_proto.callAnimationUpdate = function callAnimationUpdate(deltaTime) {
|
|
17297
17557
|
this._onUpdateAnimations.forEach(function(element) {
|
|
17298
17558
|
element.engine.time.frameCount > element._playFrameCount && element.update(deltaTime);
|
|
17559
|
+
}, function(element, index) {
|
|
17560
|
+
element._onUpdateIndex = index;
|
|
17299
17561
|
});
|
|
17300
17562
|
};
|
|
17301
17563
|
_proto.callRendererOnUpdate = function callRendererOnUpdate(deltaTime) {
|
|
17302
17564
|
this._onUpdateRenderers.forEach(function(element) {
|
|
17303
17565
|
element.update(deltaTime);
|
|
17566
|
+
}, function(element, index) {
|
|
17567
|
+
element._onUpdateIndex = index;
|
|
17304
17568
|
});
|
|
17305
17569
|
};
|
|
17306
17570
|
_proto.handlingInvalidScripts = function handlingInvalidScripts() {
|
|
@@ -17318,11 +17582,15 @@ ShaderPool.init();
|
|
|
17318
17582
|
_proto.callCameraOnBeginRender = function callCameraOnBeginRender(camera) {
|
|
17319
17583
|
camera.entity._scripts.forEach(function(element) {
|
|
17320
17584
|
element.onBeginRender(camera);
|
|
17585
|
+
}, function(element, index) {
|
|
17586
|
+
element._entityScriptsIndex = index;
|
|
17321
17587
|
});
|
|
17322
17588
|
};
|
|
17323
17589
|
_proto.callCameraOnEndRender = function callCameraOnEndRender(camera) {
|
|
17324
17590
|
camera.entity._scripts.forEach(function(element) {
|
|
17325
17591
|
element.onEndRender(camera);
|
|
17592
|
+
}, function(element, index) {
|
|
17593
|
+
element._entityScriptsIndex = index;
|
|
17326
17594
|
});
|
|
17327
17595
|
};
|
|
17328
17596
|
_proto.getActiveChangedTempList = function getActiveChangedTempList() {
|
|
@@ -24181,6 +24449,9 @@ var DirtyFlag;
|
|
|
24181
24449
|
this.property = property;
|
|
24182
24450
|
this.component = target.getComponent(type);
|
|
24183
24451
|
this.cureType = cureType;
|
|
24452
|
+
var isBlendShape = _instanceof(this.component, SkinnedMeshRenderer);
|
|
24453
|
+
// @todo: Temp solution with blendShape
|
|
24454
|
+
this._isCopyMode = cureType._isCopyMode && !isBlendShape;
|
|
24184
24455
|
var assemblerType = AnimationCurveOwner.getAssemblerType(type, property);
|
|
24185
24456
|
this._assembler = new assemblerType();
|
|
24186
24457
|
this._assembler.initialize(this);
|
|
@@ -24212,7 +24483,7 @@ var DirtyFlag;
|
|
|
24212
24483
|
this._assembler.setTargetValue(this.defaultValue);
|
|
24213
24484
|
};
|
|
24214
24485
|
_proto.getEvaluateValue = function getEvaluateValue(out) {
|
|
24215
|
-
if (this.
|
|
24486
|
+
if (this._isCopyMode) {
|
|
24216
24487
|
this.cureType._setValue(this.baseEvaluateData.value, out);
|
|
24217
24488
|
return out;
|
|
24218
24489
|
} else {
|
|
@@ -24220,14 +24491,14 @@ var DirtyFlag;
|
|
|
24220
24491
|
}
|
|
24221
24492
|
};
|
|
24222
24493
|
_proto.saveDefaultValue = function saveDefaultValue() {
|
|
24223
|
-
if (this.
|
|
24494
|
+
if (this._isCopyMode) {
|
|
24224
24495
|
this.cureType._setValue(this.referenceTargetValue, this.defaultValue);
|
|
24225
24496
|
} else {
|
|
24226
24497
|
this.defaultValue = this._assembler.getTargetValue();
|
|
24227
24498
|
}
|
|
24228
24499
|
};
|
|
24229
24500
|
_proto.saveFixedPoseValue = function saveFixedPoseValue() {
|
|
24230
|
-
if (this.
|
|
24501
|
+
if (this._isCopyMode) {
|
|
24231
24502
|
this.cureType._setValue(this.referenceTargetValue, this.fixedPoseValue);
|
|
24232
24503
|
} else {
|
|
24233
24504
|
this.fixedPoseValue = this._assembler.getTargetValue();
|
|
@@ -24236,7 +24507,7 @@ var DirtyFlag;
|
|
|
24236
24507
|
_proto.applyValue = function applyValue(value, weight, additive) {
|
|
24237
24508
|
var cureType = this.cureType;
|
|
24238
24509
|
if (additive) {
|
|
24239
|
-
if (
|
|
24510
|
+
if (this._isCopyMode) {
|
|
24240
24511
|
cureType._additiveValue(value, weight, this.referenceTargetValue);
|
|
24241
24512
|
} else {
|
|
24242
24513
|
var assembler = this._assembler;
|
|
@@ -24246,13 +24517,13 @@ var DirtyFlag;
|
|
|
24246
24517
|
}
|
|
24247
24518
|
} else {
|
|
24248
24519
|
if (weight === 1.0) {
|
|
24249
|
-
if (
|
|
24520
|
+
if (this._isCopyMode) {
|
|
24250
24521
|
cureType._setValue(value, this.referenceTargetValue);
|
|
24251
24522
|
} else {
|
|
24252
24523
|
this._assembler.setTargetValue(value);
|
|
24253
24524
|
}
|
|
24254
24525
|
} else {
|
|
24255
|
-
if (
|
|
24526
|
+
if (this._isCopyMode) {
|
|
24256
24527
|
var targetValue = this.referenceTargetValue;
|
|
24257
24528
|
cureType._lerpValue(targetValue, value, weight, targetValue);
|
|
24258
24529
|
} else {
|
|
@@ -24264,7 +24535,7 @@ var DirtyFlag;
|
|
|
24264
24535
|
}
|
|
24265
24536
|
};
|
|
24266
24537
|
_proto._lerpValue = function _lerpValue(srcValue, destValue, crossWeight) {
|
|
24267
|
-
if (this.
|
|
24538
|
+
if (this._isCopyMode) {
|
|
24268
24539
|
return this.cureType._lerpValue(srcValue, destValue, crossWeight, this.baseEvaluateData.value);
|
|
24269
24540
|
} else {
|
|
24270
24541
|
this.baseEvaluateData.value = this.cureType._lerpValue(srcValue, destValue, crossWeight);
|
|
@@ -29896,5 +30167,5 @@ var cacheDir = new Vector3();
|
|
|
29896
30167
|
return CubeProbe;
|
|
29897
30168
|
}(Probe);
|
|
29898
30169
|
|
|
29899
|
-
export { AmbientLight, AnimationArrayCurve, AnimationBoolCurve, AnimationClip, AnimationClipCurveBinding, AnimationColorCurve, AnimationCurve, AnimationEvent, AnimationFloatArrayCurve, AnimationFloatCurve, AnimationQuaternionCurve, AnimationRectCurve, AnimationRefCurve, AnimationVector2Curve, AnimationVector3Curve, AnimationVector4Curve, Animator, AnimatorConditionMode, AnimatorController, AnimatorControllerLayer, AnimatorCullingMode, AnimatorLayerBlendingMode, AnimatorState, AnimatorStateMachine, AnimatorStateTransition, AssetPromise, AssetType, Background, BackgroundMode, BackgroundTextureFillMode, BaseMaterial, Basic2DBatcher, BasicRenderPipeline, BlendFactor, BlendMode, BlendOperation, BlendShape, BlendShapeFrame, BlendState, BlinnPhongMaterial, BoolUpdateFlag, BoxColliderShape, BoxShape, Buffer, BufferBindFlag, BufferMesh, BufferUsage, BufferUtil, Burst, Camera, CameraClearFlags, CapsuleColliderShape, CharacterController, CircleShape, CloneManager, Collider, ColliderShape, ColliderShapeUpAxis, CollisionDetectionMode, ColorSpace, ColorWriteMask, CompareFunction, Component, ConeEmitType, ConeShape, ContentRestorer, ControllerCollisionFlag, ControllerNonWalkableMode, CubeProbe, CullMode, CurveKey, DataType, DependentMode, DepthState, DepthTextureMode, DiffuseMode, DirectLight, DynamicCollider, DynamicColliderConstraints, Engine, EngineObject, Entity, EventDispatcher, FixedJoint, FogMode, Font, FontStyle, GLCapabilityType, HemisphereShape, HingeJoint, HitResult, IndexBufferBinding, IndexFormat, InputManager, InterpolationType, Joint, JointLimits, JointMotor, Keyframe, Keys, Layer, Light, Loader, Logger, Material, Mesh, MeshRenderer, MeshTopology, ModelMesh, OverflowMode, PBRBaseMaterial, PBRMaterial, PBRSpecularMaterial, ParticleCompositeCurve, ParticleCurve, ParticleCurveMode, ParticleGenerator, ParticleGradientMode, ParticleMaterial, ParticleRenderMode, ParticleRenderer, ParticleScaleMode, ParticleShapeArcMode, ParticleSimulationSpace, ParticleStopMode, PhysicsMaterial, PhysicsMaterialCombineMode, PhysicsScene, PipelineStage, PlaneColliderShape, Platform, PointLight, Pointer, PointerButton, PointerPhase, Primitive, PrimitiveMesh, Probe, RasterState, ReferResource, RenderBufferDepthFormat, RenderFace, RenderPass, RenderQueue, RenderQueueType, RenderState, RenderStateElementKey as RenderStateDataKey, RenderTarget, RenderTargetBlendState, Renderer, ResourceManager, Scene, SceneManager, Script, SetDataOptions, Shader, ShaderData, ShaderFactory, ShaderMacro, ShaderMacroCollection, ShaderPass, ShaderProperty, ShaderPropertyType, ShaderTagKey, ShadowCascadesMode, ShadowResolution, ShadowType, Skin, SkinnedMeshRenderer, Sky, SkyBoxMaterial, SkyProceduralMaterial, SphereColliderShape, SphereShape, SpotLight, SpringJoint, Sprite, SpriteAtlas, SpriteDrawMode, SpriteMask, SpriteMaskInteraction, SpriteMaskLayer, SpriteRenderer, SpriteTileMode, StateMachineScript, StaticCollider, StencilOperation, StencilState, SubMesh, SubShader, SunMode, SystemInfo, TextHorizontalAlignment, TextRenderer, TextUtils, TextVerticalAlignment, Texture, Texture2D, Texture2DArray, TextureCoordinate, TextureCube, TextureCubeFace, TextureDepthCompareFunction, TextureFilterMode, TextureFormat, TextureUsage, TextureWrapMode, Time, TrailMaterial, TrailRenderer, Transform, UnlitMaterial, Utils, VertexAttribute, VertexBufferBinding, VertexElement, VertexElementFormat, WrapMode, assignmentClone, deepClone, dependentComponents, ignoreClone, request, resourceLoader, shallowClone };
|
|
30170
|
+
export { AmbientLight, AnimationArrayCurve, AnimationBoolCurve, AnimationClip, AnimationClipCurveBinding, AnimationColorCurve, AnimationCurve, AnimationEvent, AnimationFloatArrayCurve, AnimationFloatCurve, AnimationQuaternionCurve, AnimationRectCurve, AnimationRefCurve, AnimationVector2Curve, AnimationVector3Curve, AnimationVector4Curve, Animator, AnimatorConditionMode, AnimatorController, AnimatorControllerLayer, AnimatorCullingMode, AnimatorLayerBlendingMode, AnimatorState, AnimatorStateMachine, AnimatorStateTransition, AssetPromise, AssetType, Background, BackgroundMode, BackgroundTextureFillMode, BaseMaterial, Basic2DBatcher, BasicRenderPipeline, BlendFactor, BlendMode, BlendOperation, BlendShape, BlendShapeFrame, BlendState, BlinnPhongMaterial, BoolUpdateFlag, BoxColliderShape, BoxShape, Buffer, BufferBindFlag, BufferMesh, BufferUsage, BufferUtil, Burst, Camera, CameraClearFlags, CapsuleColliderShape, CharacterController, CircleShape, CloneManager, Collider, ColliderShape, ColliderShapeUpAxis, CollisionDetectionMode, ColorOverLifetimeModule, ColorSpace, ColorWriteMask, CompareFunction, Component, ConeEmitType, ConeShape, ContentRestorer, ControllerCollisionFlag, ControllerNonWalkableMode, CubeProbe, CullMode, CurveKey, DataType, DependentMode, DepthState, DepthTextureMode, DiffuseMode, DirectLight, DynamicCollider, DynamicColliderConstraints, EmissionModule, Engine, EngineObject, Entity, EventDispatcher, FixedJoint, FogMode, Font, FontStyle, GLCapabilityType, GradientAlphaKey, GradientColorKey, HemisphereShape, HingeJoint, HitResult, IndexBufferBinding, IndexFormat, InputManager, InterpolationType, Joint, JointLimits, JointMotor, Keyframe, Keys, Layer, Light, Loader, Logger, MainModule, Material, Mesh, MeshRenderer, MeshTopology, ModelMesh, OverflowMode, PBRBaseMaterial, PBRMaterial, PBRSpecularMaterial, ParticleCompositeCurve, ParticleCompositeGradient, ParticleCurve, ParticleCurveMode, ParticleGenerator, ParticleGradient, ParticleGradientMode, ParticleMaterial, ParticleRenderMode, ParticleRenderer, ParticleScaleMode, ParticleShapeArcMode, ParticleSimulationSpace, ParticleStopMode, PhysicsMaterial, PhysicsMaterialCombineMode, PhysicsScene, PipelineStage, PlaneColliderShape, Platform, PointLight, Pointer, PointerButton, PointerPhase, Primitive, PrimitiveMesh, Probe, RasterState, ReferResource, RenderBufferDepthFormat, RenderFace, RenderPass, RenderQueue, RenderQueueType, RenderState, RenderStateElementKey as RenderStateDataKey, RenderTarget, RenderTargetBlendState, Renderer, ResourceManager, RotationOverLifetimeModule, Scene, SceneManager, Script, SetDataOptions, Shader, ShaderData, ShaderFactory, ShaderMacro, ShaderMacroCollection, ShaderPass, ShaderProperty, ShaderPropertyType, ShaderTagKey, ShadowCascadesMode, ShadowResolution, ShadowType, SizeOverLifetimeModule, Skin, SkinnedMeshRenderer, Sky, SkyBoxMaterial, SkyProceduralMaterial, SphereColliderShape, SphereShape, SpotLight, SpringJoint, Sprite, SpriteAtlas, SpriteDrawMode, SpriteMask, SpriteMaskInteraction, SpriteMaskLayer, SpriteRenderer, SpriteTileMode, StateMachineScript, StaticCollider, StencilOperation, StencilState, SubMesh, SubShader, SunMode, SystemInfo, TextHorizontalAlignment, TextRenderer, TextUtils, TextVerticalAlignment, Texture, Texture2D, Texture2DArray, TextureCoordinate, TextureCube, TextureCubeFace, TextureDepthCompareFunction, TextureFilterMode, TextureFormat, TextureSheetAnimationModule, TextureUsage, TextureWrapMode, Time, TrailMaterial, TrailRenderer, Transform, UnlitMaterial, Utils, VelocityOverLifetimeModule, VertexAttribute, VertexBufferBinding, VertexElement, VertexElementFormat, WrapMode, assignmentClone, deepClone, dependentComponents, ignoreClone, request, resourceLoader, shallowClone };
|
|
29900
30171
|
//# sourceMappingURL=module.js.map
|