@galacean/engine-core 0.0.0-experimental-double11.8 → 0.0.0-experimental-double11.10

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 CHANGED
@@ -15893,6 +15893,7 @@ __decorate([
15893
15893
  case "pointercancel":
15894
15894
  pointer.phase = exports.PointerPhase.Leave;
15895
15895
  pointer._firePointerExitAndEnter(null);
15896
+ break;
15896
15897
  }
15897
15898
  }
15898
15899
  events.length = 0;
@@ -16020,7 +16021,7 @@ __decorate([
16020
16021
  var point = PointerManager._tempPoint, ray = PointerManager._tempRay, hitResult = PointerManager._tempHitResult;
16021
16022
  for(var i = scenes.length - 1; i >= 0; i--){
16022
16023
  var scene = scenes[i];
16023
- if (scene.destroyed) {
16024
+ if (!scene.isActive || scene.destroyed) {
16024
16025
  continue;
16025
16026
  }
16026
16027
  var cameras = scene._activeCameras;
@@ -16761,57 +16762,56 @@ ShaderPool.init();
16761
16762
  this._textRenderDataPool.resetPool();
16762
16763
  var _this = this, inputManager = _this.inputManager, physicsInitialized = _this._physicsInitialized;
16763
16764
  inputManager._update();
16764
- var loopScenes = this._sceneManager._scenes.getLoopArray();
16765
- var sceneCount = loopScenes.length;
16765
+ var scenes = this._sceneManager._scenes.getLoopArray();
16766
+ var sceneCount = scenes.length;
16766
16767
  // Sort cameras and fire script `onStart`
16767
16768
  for(var i = 0; i < sceneCount; i++){
16768
- var scene = loopScenes[i];
16769
- if (scene.destroyed) continue;
16769
+ var scene = scenes[i];
16770
+ if (!scene.isActive || scene.destroyed) continue;
16770
16771
  scene._cameraNeedSorting && scene._sortCameras();
16771
16772
  scene._componentsManager.callScriptOnStart();
16772
16773
  }
16773
16774
  // Update physics and fire `onPhysicsUpdate`
16774
16775
  if (physicsInitialized) {
16775
16776
  for(var i1 = 0; i1 < sceneCount; i1++){
16776
- var scene1 = loopScenes[i1];
16777
- if (scene1.destroyed) continue;
16777
+ var scene1 = scenes[i1];
16778
+ if (!scene1.isActive || scene1.destroyed) continue;
16778
16779
  scene1.physics._update(deltaTime);
16779
16780
  }
16780
16781
  }
16781
16782
  // Fire `onPointerXX`
16782
- physicsInitialized && inputManager._firePointerScript(loopScenes);
16783
+ physicsInitialized && inputManager._firePointerScript(scenes);
16783
16784
  // Fire `onUpdate`
16784
16785
  for(var i2 = 0; i2 < sceneCount; i2++){
16785
- var scene2 = loopScenes[i2];
16786
- if (scene2.destroyed) continue;
16786
+ var scene2 = scenes[i2];
16787
+ if (!scene2.isActive || scene2.destroyed) continue;
16787
16788
  scene2._componentsManager.callScriptOnUpdate(deltaTime);
16788
16789
  }
16789
16790
  // Update `Animator` logic
16790
16791
  for(var i3 = 0; i3 < sceneCount; i3++){
16791
- var scene3 = loopScenes[i3];
16792
- if (scene3.destroyed) continue;
16792
+ var scene3 = scenes[i3];
16793
+ if (!scene3.isActive || scene3.destroyed) continue;
16793
16794
  scene3._componentsManager.callAnimationUpdate(deltaTime);
16794
16795
  }
16795
16796
  // Fire `onLateUpdate`
16796
16797
  for(var i4 = 0; i4 < sceneCount; i4++){
16797
- var scene4 = loopScenes[i4];
16798
- if (scene4.destroyed) continue;
16798
+ var scene4 = scenes[i4];
16799
+ if (!scene4.isActive || scene4.destroyed) continue;
16799
16800
  scene4._componentsManager.callScriptOnLateUpdate(deltaTime);
16800
16801
  }
16801
16802
  // Render scene and fire `onBeginRender` and `onEndRender`
16802
16803
  if (!this._isDeviceLost) {
16803
- this._render(loopScenes);
16804
- }
16805
- // Handling invalid scripts and fire `onDestroy`
16806
- for(var i5 = 0; i5 < sceneCount; i5++){
16807
- var scene5 = loopScenes[i5];
16808
- if (scene5.destroyed) continue;
16809
- if (!this._waitingDestroy) {
16810
- scene5._componentsManager.handlingInvalidScripts();
16811
- }
16804
+ this._render(scenes);
16812
16805
  }
16813
16806
  if (this._waitingDestroy) {
16814
16807
  this._destroy();
16808
+ } else {
16809
+ // Handling invalid scripts and fire `onDestroy`
16810
+ for(var i5 = 0; i5 < sceneCount; i5++){
16811
+ var scene5 = scenes[i5];
16812
+ if (!scene5.isActive || scene5.destroyed) continue;
16813
+ scene5._componentsManager.handlingInvalidScripts();
16814
+ }
16815
16815
  }
16816
16816
  if (this._waitingGC) {
16817
16817
  this._gc();
@@ -16890,19 +16890,19 @@ ShaderPool.init();
16890
16890
  };
16891
16891
  /**
16892
16892
  * @internal
16893
- */ _proto._render = function _render(loopScenes) {
16893
+ */ _proto._render = function _render(scenes) {
16894
16894
  // Update `Renderer` logic and shader data
16895
- for(var i = 0, n = loopScenes.length; i < n; i++){
16896
- var scene = loopScenes[i];
16897
- if (scene.destroyed) continue;
16898
- var deltaTime = this.time.deltaTime;
16895
+ var deltaTime = this.time.deltaTime;
16896
+ for(var i = 0, n = scenes.length; i < n; i++){
16897
+ var scene = scenes[i];
16898
+ if (!scene.isActive || scene.destroyed) continue;
16899
16899
  scene._componentsManager.callRendererOnUpdate(deltaTime);
16900
16900
  scene._updateShaderData();
16901
16901
  }
16902
16902
  // Fire script `onBeginRender` and `onEndRender`
16903
- for(var i1 = 0, n1 = loopScenes.length; i1 < n1; i1++){
16904
- var scene1 = loopScenes[i1];
16905
- if (scene1.destroyed) continue;
16903
+ for(var i1 = 0, n1 = scenes.length; i1 < n1; i1++){
16904
+ var scene1 = scenes[i1];
16905
+ if (!scene1.isActive || scene1.destroyed) continue;
16906
16906
  var cameras = scene1._activeCameras;
16907
16907
  var cameraCount = cameras.length;
16908
16908
  if (cameraCount > 0) {