@galacean/engine-core 0.0.0-experimental-double11.5 → 0.0.0-experimental-double11.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 +17 -0
- package/dist/main.js.map +1 -1
- package/dist/miniprogram.js +17 -0
- package/dist/module.js +17 -0
- package/dist/module.js.map +1 -1
- package/package.json +3 -3
package/dist/miniprogram.js
CHANGED
|
@@ -14510,6 +14510,23 @@ var Collision = function Collision() {
|
|
|
14510
14510
|
target.constraints = this.constraints;
|
|
14511
14511
|
target.collisionDetectionMode = this.collisionDetectionMode;
|
|
14512
14512
|
};
|
|
14513
|
+
/**
|
|
14514
|
+
* @internal
|
|
14515
|
+
*/ _proto._onUpdate = function _onUpdate() {
|
|
14516
|
+
if (this._updateFlag.flag) {
|
|
14517
|
+
var transform = this.entity.transform;
|
|
14518
|
+
if (this.isKinematic) {
|
|
14519
|
+
this._nativeCollider.move(transform.worldPosition, transform.worldRotationQuaternion);
|
|
14520
|
+
} else {
|
|
14521
|
+
this._nativeCollider.setWorldTransform(transform.worldPosition, transform.worldRotationQuaternion);
|
|
14522
|
+
}
|
|
14523
|
+
var worldScale = transform.lossyWorldScale;
|
|
14524
|
+
for(var i = 0, n = this.shapes.length; i < n; i++){
|
|
14525
|
+
this.shapes[i]._nativeShape.setWorldScale(worldScale);
|
|
14526
|
+
}
|
|
14527
|
+
this._updateFlag.flag = false;
|
|
14528
|
+
}
|
|
14529
|
+
};
|
|
14513
14530
|
_proto._setLinearVelocity = function _setLinearVelocity() {
|
|
14514
14531
|
this._nativeCollider.setLinearVelocity(this._linearVelocity);
|
|
14515
14532
|
};
|
package/dist/module.js
CHANGED
|
@@ -14505,6 +14505,23 @@ var Collision = function Collision() {
|
|
|
14505
14505
|
target.constraints = this.constraints;
|
|
14506
14506
|
target.collisionDetectionMode = this.collisionDetectionMode;
|
|
14507
14507
|
};
|
|
14508
|
+
/**
|
|
14509
|
+
* @internal
|
|
14510
|
+
*/ _proto._onUpdate = function _onUpdate() {
|
|
14511
|
+
if (this._updateFlag.flag) {
|
|
14512
|
+
var transform = this.entity.transform;
|
|
14513
|
+
if (this.isKinematic) {
|
|
14514
|
+
this._nativeCollider.move(transform.worldPosition, transform.worldRotationQuaternion);
|
|
14515
|
+
} else {
|
|
14516
|
+
this._nativeCollider.setWorldTransform(transform.worldPosition, transform.worldRotationQuaternion);
|
|
14517
|
+
}
|
|
14518
|
+
var worldScale = transform.lossyWorldScale;
|
|
14519
|
+
for(var i = 0, n = this.shapes.length; i < n; i++){
|
|
14520
|
+
this.shapes[i]._nativeShape.setWorldScale(worldScale);
|
|
14521
|
+
}
|
|
14522
|
+
this._updateFlag.flag = false;
|
|
14523
|
+
}
|
|
14524
|
+
};
|
|
14508
14525
|
_proto._setLinearVelocity = function _setLinearVelocity() {
|
|
14509
14526
|
this._nativeCollider.setLinearVelocity(this._linearVelocity);
|
|
14510
14527
|
};
|