@galacean/engine 0.0.0-experimental-double11.9 → 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/browser.js CHANGED
@@ -20627,6 +20627,7 @@
20627
20627
  case "pointercancel":
20628
20628
  pointer.phase = exports.PointerPhase.Leave;
20629
20629
  pointer._firePointerExitAndEnter(null);
20630
+ break;
20630
20631
  }
20631
20632
  }
20632
20633
  events.length = 0;
@@ -20754,7 +20755,7 @@
20754
20755
  var point = PointerManager._tempPoint, ray = PointerManager._tempRay, hitResult = PointerManager._tempHitResult;
20755
20756
  for(var i = scenes.length - 1; i >= 0; i--){
20756
20757
  var scene = scenes[i];
20757
- if (scene.destroyed) {
20758
+ if (!scene.isActive || scene.destroyed) {
20758
20759
  continue;
20759
20760
  }
20760
20761
  var cameras = scene._activeCameras;
@@ -21463,57 +21464,56 @@
21463
21464
  this._textRenderDataPool.resetPool();
21464
21465
  var _this = this, inputManager = _this.inputManager, physicsInitialized = _this._physicsInitialized;
21465
21466
  inputManager._update();
21466
- var loopScenes = this._sceneManager._scenes.getLoopArray();
21467
- var sceneCount = loopScenes.length;
21467
+ var scenes = this._sceneManager._scenes.getLoopArray();
21468
+ var sceneCount = scenes.length;
21468
21469
  // Sort cameras and fire script `onStart`
21469
21470
  for(var i = 0; i < sceneCount; i++){
21470
- var scene = loopScenes[i];
21471
- if (scene.destroyed) continue;
21471
+ var scene = scenes[i];
21472
+ if (!scene.isActive || scene.destroyed) continue;
21472
21473
  scene._cameraNeedSorting && scene._sortCameras();
21473
21474
  scene._componentsManager.callScriptOnStart();
21474
21475
  }
21475
21476
  // Update physics and fire `onPhysicsUpdate`
21476
21477
  if (physicsInitialized) {
21477
21478
  for(var i1 = 0; i1 < sceneCount; i1++){
21478
- var scene1 = loopScenes[i1];
21479
- if (scene1.destroyed) continue;
21479
+ var scene1 = scenes[i1];
21480
+ if (!scene1.isActive || scene1.destroyed) continue;
21480
21481
  scene1.physics._update(deltaTime);
21481
21482
  }
21482
21483
  }
21483
21484
  // Fire `onPointerXX`
21484
- physicsInitialized && inputManager._firePointerScript(loopScenes);
21485
+ physicsInitialized && inputManager._firePointerScript(scenes);
21485
21486
  // Fire `onUpdate`
21486
21487
  for(var i2 = 0; i2 < sceneCount; i2++){
21487
- var scene2 = loopScenes[i2];
21488
- if (scene2.destroyed) continue;
21488
+ var scene2 = scenes[i2];
21489
+ if (!scene2.isActive || scene2.destroyed) continue;
21489
21490
  scene2._componentsManager.callScriptOnUpdate(deltaTime);
21490
21491
  }
21491
21492
  // Update `Animator` logic
21492
21493
  for(var i3 = 0; i3 < sceneCount; i3++){
21493
- var scene3 = loopScenes[i3];
21494
- if (scene3.destroyed) continue;
21494
+ var scene3 = scenes[i3];
21495
+ if (!scene3.isActive || scene3.destroyed) continue;
21495
21496
  scene3._componentsManager.callAnimationUpdate(deltaTime);
21496
21497
  }
21497
21498
  // Fire `onLateUpdate`
21498
21499
  for(var i4 = 0; i4 < sceneCount; i4++){
21499
- var scene4 = loopScenes[i4];
21500
- if (scene4.destroyed) continue;
21500
+ var scene4 = scenes[i4];
21501
+ if (!scene4.isActive || scene4.destroyed) continue;
21501
21502
  scene4._componentsManager.callScriptOnLateUpdate(deltaTime);
21502
21503
  }
21503
21504
  // Render scene and fire `onBeginRender` and `onEndRender`
21504
21505
  if (!this._isDeviceLost) {
21505
- this._render(loopScenes);
21506
- }
21507
- // Handling invalid scripts and fire `onDestroy`
21508
- for(var i5 = 0; i5 < sceneCount; i5++){
21509
- var scene5 = loopScenes[i5];
21510
- if (scene5.destroyed) continue;
21511
- if (!this._waitingDestroy) {
21512
- scene5._componentsManager.handlingInvalidScripts();
21513
- }
21506
+ this._render(scenes);
21514
21507
  }
21515
21508
  if (this._waitingDestroy) {
21516
21509
  this._destroy();
21510
+ } else {
21511
+ // Handling invalid scripts and fire `onDestroy`
21512
+ for(var i5 = 0; i5 < sceneCount; i5++){
21513
+ var scene5 = scenes[i5];
21514
+ if (!scene5.isActive || scene5.destroyed) continue;
21515
+ scene5._componentsManager.handlingInvalidScripts();
21516
+ }
21517
21517
  }
21518
21518
  if (this._waitingGC) {
21519
21519
  this._gc();
@@ -21592,19 +21592,19 @@
21592
21592
  };
21593
21593
  /**
21594
21594
  * @internal
21595
- */ _proto._render = function _render(loopScenes) {
21595
+ */ _proto._render = function _render(scenes) {
21596
21596
  // Update `Renderer` logic and shader data
21597
- for(var i = 0, n = loopScenes.length; i < n; i++){
21598
- var scene = loopScenes[i];
21599
- if (scene.destroyed) continue;
21600
- var deltaTime = this.time.deltaTime;
21597
+ var deltaTime = this.time.deltaTime;
21598
+ for(var i = 0, n = scenes.length; i < n; i++){
21599
+ var scene = scenes[i];
21600
+ if (!scene.isActive || scene.destroyed) continue;
21601
21601
  scene._componentsManager.callRendererOnUpdate(deltaTime);
21602
21602
  scene._updateShaderData();
21603
21603
  }
21604
21604
  // Fire script `onBeginRender` and `onEndRender`
21605
- for(var i1 = 0, n1 = loopScenes.length; i1 < n1; i1++){
21606
- var scene1 = loopScenes[i1];
21607
- if (scene1.destroyed) continue;
21605
+ for(var i1 = 0, n1 = scenes.length; i1 < n1; i1++){
21606
+ var scene1 = scenes[i1];
21607
+ if (!scene1.isActive || scene1.destroyed) continue;
21608
21608
  var cameras = scene1._activeCameras;
21609
21609
  var cameraCount = cameras.length;
21610
21610
  if (cameraCount > 0) {
@@ -40267,6 +40267,7 @@
40267
40267
  ];
40268
40268
  for(var i = 0; i < priorityFormats.length; i++){
40269
40269
  var capabilities = this._supportedMap[priorityFormats[i]];
40270
+ if (!capabilities) return null;
40270
40271
  for(var j = 0; j < capabilities.length; j++){
40271
40272
  if (renderer.canIUse(capabilities[j])) {
40272
40273
  return priorityFormats[i];
@@ -43313,7 +43314,7 @@
43313
43314
  ], GALACEAN_animation_event);
43314
43315
 
43315
43316
  //@ts-ignore
43316
- var version = "0.0.0-experimental-double11.9";
43317
+ var version = "0.0.0-experimental-double11.10";
43317
43318
  console.log("Galacean engine version: " + version);
43318
43319
  for(var key in CoreObjects){
43319
43320
  Loader.registerClass(key, CoreObjects[key]);