@galacean/engine 1.0.0-beta.18 → 1.0.0-beta.20

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/browser.js CHANGED
@@ -8817,6 +8817,23 @@
8817
8817
  scale.z < 0 && (isInvert = !isInvert);
8818
8818
  return isInvert;
8819
8819
  };
8820
+ _proto._onDestroy = function _onDestroy() {
8821
+ Component.prototype._onDestroy.call(this);
8822
+ //@ts-ignore
8823
+ this._worldPosition._onValueChanged = null;
8824
+ //@ts-ignore
8825
+ this._rotation._onValueChanged = null;
8826
+ //@ts-ignore
8827
+ this._worldRotation._onValueChanged = null;
8828
+ //@ts-ignore
8829
+ this._rotationQuaternion._onValueChanged = null;
8830
+ //@ts-ignore
8831
+ this._worldRotationQuaternion._onValueChanged = null;
8832
+ //@ts-ignore
8833
+ this._position._onValueChanged = null;
8834
+ //@ts-ignore
8835
+ this._scale._onValueChanged = null;
8836
+ };
8820
8837
  /**
8821
8838
  * Get worldMatrix: Will trigger the worldMatrix update of itself and all parent entities.
8822
8839
  * Get worldPosition: Will trigger the worldMatrix, local position update of itself and the worldMatrix update of all parent entities.
@@ -9508,6 +9525,7 @@
9508
9525
  return component;
9509
9526
  }
9510
9527
  }
9528
+ return null;
9511
9529
  };
9512
9530
  /**
9513
9531
  * Get components which match the type.
@@ -10492,6 +10510,7 @@
10492
10510
  var _this = this;
10493
10511
  /** @internal */ this._initialized = false;
10494
10512
  this._restTime = 0;
10513
+ this._fixedTimeStep = 1 / 60;
10495
10514
  this._colliders = new DisorderedArray();
10496
10515
  this._gravity = new Vector3(0, -9.81, 0);
10497
10516
  this._physicalObjectsMap = {};
@@ -10603,7 +10622,6 @@
10603
10622
  script1._waitHandlingInValid || script1.onTriggerStay(shape1);
10604
10623
  }
10605
10624
  };
10606
- /** The fixed time step in seconds at which physics are performed. */ this.fixedTimeStep = 1 / 60;
10607
10625
  this._engine = engine;
10608
10626
  this._setGravity = this._setGravity.bind(this);
10609
10627
  //@ts-ignore
@@ -10663,7 +10681,7 @@
10663
10681
  * Call on every frame to update pose of objects.
10664
10682
  * @internal
10665
10683
  */ _proto._update = function _update(deltaTime) {
10666
- var _this = this, fixedTimeStep = _this.fixedTimeStep, nativePhysicsManager = _this._nativePhysicsManager;
10684
+ var _this = this, fixedTimeStep = _this._fixedTimeStep, nativePhysicsManager = _this._nativePhysicsManager;
10667
10685
  var componentsManager = this._engine._componentsManager;
10668
10686
  var simulateTime = this._restTime + deltaTime;
10669
10687
  var step = Math.floor(simulateTime / fixedTimeStep);
@@ -10771,6 +10789,15 @@
10771
10789
  gravity.copyFrom(value);
10772
10790
  }
10773
10791
  }
10792
+ },
10793
+ {
10794
+ key: "fixedTimeStep",
10795
+ get: /** The fixed time step in seconds at which physics are performed. */ function get() {
10796
+ return this._fixedTimeStep;
10797
+ },
10798
+ set: function set(value) {
10799
+ this._fixedTimeStep = Math.max(value, MathUtil$1.zeroTolerance);
10800
+ }
10774
10801
  }
10775
10802
  ]);
10776
10803
  return PhysicsManager;
@@ -14311,6 +14338,7 @@
14311
14338
  CloneManager.deepCloneObject(this.renderStates, target.renderStates);
14312
14339
  };
14313
14340
  _proto._addReferCount = function _addReferCount(value) {
14341
+ if (this._destroyed) return;
14314
14342
  ReferResource.prototype._addReferCount.call(this, value);
14315
14343
  this.shaderData._addReferCount(value);
14316
14344
  };
@@ -38549,7 +38577,7 @@
38549
38577
  ], GALACEAN_animation_event);
38550
38578
 
38551
38579
  //@ts-ignore
38552
- var version = "1.0.0-beta.18";
38580
+ var version = "1.0.0-beta.20";
38553
38581
  console.log("Galacean engine version: " + version);
38554
38582
  for(var key in CoreObjects){
38555
38583
  Loader.registerClass(key, CoreObjects[key]);