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