@galacean/engine 0.0.0-experimental-1.3-xr.5 → 0.0.0-experimental-1.3-xr.9

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
@@ -5019,7 +5019,7 @@
5019
5019
  Platform[Platform[/** Mac platform. */ "Mac"] = 3] = "Mac";
5020
5020
  Platform[Platform[/** Unknown platform. */ "Unknown"] = 4] = "Unknown";
5021
5021
  })(exports.Platform || (exports.Platform = {}));
5022
- function _assert_this_initialized$1(self) {
5022
+ function _assert_this_initialized(self) {
5023
5023
  if (self === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
5024
5024
  return self;
5025
5025
  }
@@ -5387,7 +5387,7 @@
5387
5387
  /** Whether to ignore the garbage collection check, if it is true, it will not be affected by ResourceManager.gc(). */ _this.isGCIgnored = false;
5388
5388
  _this._refCount = 0;
5389
5389
  _this._superResources = null;
5390
- engine.resourceManager._addReferResource(_assert_this_initialized$1(_this));
5390
+ engine.resourceManager._addReferResource(_assert_this_initialized(_this));
5391
5391
  return _this;
5392
5392
  };
5393
5393
  _inherits$2(ReferResource, EngineObject1);
@@ -5899,9 +5899,9 @@
5899
5899
  _this._dirtyUpdateFlag = 0x7;
5900
5900
  /** @internal */ _this._updateFlagManager = new UpdateFlagManager();
5901
5901
  _this._texture = texture;
5902
- _this._onRegionChange = _this._onRegionChange.bind(_assert_this_initialized$1(_this));
5903
- _this._onPivotChange = _this._onPivotChange.bind(_assert_this_initialized$1(_this));
5904
- _this._onBorderChange = _this._onBorderChange.bind(_assert_this_initialized$1(_this));
5902
+ _this._onRegionChange = _this._onRegionChange.bind(_assert_this_initialized(_this));
5903
+ _this._onPivotChange = _this._onPivotChange.bind(_assert_this_initialized(_this));
5904
+ _this._onBorderChange = _this._onBorderChange.bind(_assert_this_initialized(_this));
5905
5905
  // @ts-ignore
5906
5906
  _this._region._onValueChanged = _this._onRegionChange;
5907
5907
  // @ts-ignore
@@ -7032,13 +7032,13 @@
7032
7032
  _this._parentTransformCache = null;
7033
7033
  _this._dirtyFlag = 0xbc;
7034
7034
  /** @internal */ _this._updateFlagManager = new UpdateFlagManager();
7035
- _this._onPositionChanged = _this._onPositionChanged.bind(_assert_this_initialized$1(_this));
7036
- _this._onWorldPositionChanged = _this._onWorldPositionChanged.bind(_assert_this_initialized$1(_this));
7037
- _this._onRotationChanged = _this._onRotationChanged.bind(_assert_this_initialized$1(_this));
7038
- _this._onWorldRotationChanged = _this._onWorldRotationChanged.bind(_assert_this_initialized$1(_this));
7039
- _this._onRotationQuaternionChanged = _this._onRotationQuaternionChanged.bind(_assert_this_initialized$1(_this));
7040
- _this._onWorldRotationQuaternionChanged = _this._onWorldRotationQuaternionChanged.bind(_assert_this_initialized$1(_this));
7041
- _this._onScaleChanged = _this._onScaleChanged.bind(_assert_this_initialized$1(_this));
7035
+ _this._onPositionChanged = _this._onPositionChanged.bind(_assert_this_initialized(_this));
7036
+ _this._onWorldPositionChanged = _this._onWorldPositionChanged.bind(_assert_this_initialized(_this));
7037
+ _this._onRotationChanged = _this._onRotationChanged.bind(_assert_this_initialized(_this));
7038
+ _this._onWorldRotationChanged = _this._onWorldRotationChanged.bind(_assert_this_initialized(_this));
7039
+ _this._onRotationQuaternionChanged = _this._onRotationQuaternionChanged.bind(_assert_this_initialized(_this));
7040
+ _this._onWorldRotationQuaternionChanged = _this._onWorldRotationQuaternionChanged.bind(_assert_this_initialized(_this));
7041
+ _this._onScaleChanged = _this._onScaleChanged.bind(_assert_this_initialized(_this));
7042
7042
  //@ts-ignore
7043
7043
  _this._position._onValueChanged = _this._onPositionChanged;
7044
7044
  //@ts-ignore
@@ -10130,7 +10130,7 @@
10130
10130
  var _this;
10131
10131
  _this = ReferResource1.call(this, engine) || this;
10132
10132
  /** @internal */ _this._isContentLost = false;
10133
- engine.resourceManager._addGraphicResource(_assert_this_initialized$1(_this));
10133
+ engine.resourceManager._addGraphicResource(_assert_this_initialized(_this));
10134
10134
  return _this;
10135
10135
  };
10136
10136
  _inherits$2(GraphicsResource, ReferResource1);
@@ -10682,7 +10682,7 @@
10682
10682
  var shaderData = _this.shaderData;
10683
10683
  _this._overrideUpdate = _this.update !== prototype.update;
10684
10684
  _this._addResourceReferCount(_this.shaderData, 1);
10685
- _this._onTransformChanged = _this._onTransformChanged.bind(_assert_this_initialized$1(_this));
10685
+ _this._onTransformChanged = _this._onTransformChanged.bind(_assert_this_initialized(_this));
10686
10686
  _this._registerEntityTransformListener();
10687
10687
  shaderData.enableMacro(exports.Renderer._receiveShadowMacro);
10688
10688
  shaderData.setVector4(exports.Renderer._rendererLayerProperty, _this._rendererLayer);
@@ -11933,9 +11933,9 @@
11933
11933
  _this.drawMode = exports.SpriteDrawMode.Simple;
11934
11934
  _this._dirtyUpdateFlag |= 0x4;
11935
11935
  _this.setMaterial(_this._engine._spriteDefaultMaterial);
11936
- _this._onSpriteChange = _this._onSpriteChange.bind(_assert_this_initialized$1(_this));
11936
+ _this._onSpriteChange = _this._onSpriteChange.bind(_assert_this_initialized(_this));
11937
11937
  //@ts-ignore
11938
- _this._color._onValueChanged = _this._onColorChanged.bind(_assert_this_initialized$1(_this));
11938
+ _this._color._onValueChanged = _this._onColorChanged.bind(_assert_this_initialized(_this));
11939
11939
  return _this;
11940
11940
  };
11941
11941
  _inherits$2(SpriteRenderer, Renderer1);
@@ -12494,7 +12494,7 @@
12494
12494
  } else if (typeof depth === "number") {
12495
12495
  _this._depthFormat = depth;
12496
12496
  }
12497
- _this._platformRenderTarget = engine._hardwareRenderer.createPlatformRenderTarget(_assert_this_initialized$1(_this));
12497
+ _this._platformRenderTarget = engine._hardwareRenderer.createPlatformRenderTarget(_assert_this_initialized(_this));
12498
12498
  return _this;
12499
12499
  };
12500
12500
  _inherits$2(RenderTarget, GraphicsResource1);
@@ -12616,7 +12616,7 @@
12616
12616
  _this._format = format;
12617
12617
  _this._mipmapCount = _this._getMipmapCount();
12618
12618
  _this._isDepthTexture = format == exports.TextureFormat.Depth || format == exports.TextureFormat.DepthStencil || format == exports.TextureFormat.Depth16 || format == exports.TextureFormat.Depth24 || format == exports.TextureFormat.Depth32 || format == exports.TextureFormat.Depth24Stencil8 || format == exports.TextureFormat.Depth32Stencil8;
12619
- _this._platformTexture = engine._hardwareRenderer.createPlatformTexture2D(_assert_this_initialized$1(_this));
12619
+ _this._platformTexture = engine._hardwareRenderer.createPlatformTexture2D(_assert_this_initialized(_this));
12620
12620
  _this.filterMode = _this._isIntFormat() ? exports.TextureFilterMode.Point : exports.TextureFilterMode.Bilinear;
12621
12621
  _this.wrapModeU = _this.wrapModeV = exports.TextureWrapMode.Repeat;
12622
12622
  return _this;
@@ -12690,7 +12690,7 @@
12690
12690
  _this._length = length;
12691
12691
  _this._format = format;
12692
12692
  _this._mipmapCount = _this._getMipmapCount();
12693
- _this._platformTexture = engine._hardwareRenderer.createPlatformTexture2DArray(_assert_this_initialized$1(_this));
12693
+ _this._platformTexture = engine._hardwareRenderer.createPlatformTexture2DArray(_assert_this_initialized(_this));
12694
12694
  _this.filterMode = exports.TextureFilterMode.Bilinear;
12695
12695
  _this.wrapModeU = _this.wrapModeV = exports.TextureWrapMode.Repeat;
12696
12696
  return _this;
@@ -12776,7 +12776,7 @@
12776
12776
  _this._height = size;
12777
12777
  _this._format = format;
12778
12778
  _this._mipmapCount = _this._getMipmapCount();
12779
- _this._platformTexture = engine._hardwareRenderer.createPlatformTextureCube(_assert_this_initialized$1(_this));
12779
+ _this._platformTexture = engine._hardwareRenderer.createPlatformTextureCube(_assert_this_initialized(_this));
12780
12780
  _this.filterMode = exports.TextureFilterMode.Bilinear;
12781
12781
  _this.wrapModeU = _this.wrapModeV = exports.TextureWrapMode.Clamp;
12782
12782
  return _this;
@@ -13103,10 +13103,10 @@
13103
13103
  _this._isViewMatrixDirty = transform.registerWorldChangeFlag();
13104
13104
  _this._isInvViewProjDirty = transform.registerWorldChangeFlag();
13105
13105
  _this._frustumChangeFlag = transform.registerWorldChangeFlag();
13106
- _this._renderPipeline = new BasicRenderPipeline(_assert_this_initialized$1(_this));
13106
+ _this._renderPipeline = new BasicRenderPipeline(_assert_this_initialized(_this));
13107
13107
  _this._addResourceReferCount(_this.shaderData, 1);
13108
13108
  _this._updatePixelViewport();
13109
- _this._onPixelViewportChanged = _this._onPixelViewportChanged.bind(_assert_this_initialized$1(_this));
13109
+ _this._onPixelViewportChanged = _this._onPixelViewportChanged.bind(_assert_this_initialized(_this));
13110
13110
  //@ts-ignore
13111
13111
  _this._viewport._onValueChanged = _this._onPixelViewportChanged;
13112
13112
  _this.engine.canvas._sizeUpdateFlagManager.addListener(_this._onPixelViewportChanged);
@@ -15229,12 +15229,12 @@
15229
15229
  _this._flipX = false;
15230
15230
  _this._flipY = false;
15231
15231
  _this._alphaCutoff = 0.5;
15232
- SimpleSpriteAssembler.resetData(_assert_this_initialized$1(_this));
15232
+ SimpleSpriteAssembler.resetData(_assert_this_initialized(_this));
15233
15233
  _this.setMaterial(_this._engine._spriteMaskDefaultMaterial);
15234
15234
  _this.shaderData.setFloat(SpriteMask._alphaCutoffProperty, _this._alphaCutoff);
15235
15235
  _this._renderElement = new RenderElement();
15236
15236
  _this._renderElement.addSubRenderElement(new SubRenderElement());
15237
- _this._onSpriteChange = _this._onSpriteChange.bind(_assert_this_initialized$1(_this));
15237
+ _this._onSpriteChange = _this._onSpriteChange.bind(_assert_this_initialized(_this));
15238
15238
  return _this;
15239
15239
  }
15240
15240
  var _proto = SpriteMask.prototype;
@@ -16263,12 +16263,12 @@
16263
16263
  _this._verticalAlignment = exports.TextVerticalAlignment.Center;
16264
16264
  _this._enableWrapping = false;
16265
16265
  _this._overflowMode = exports.OverflowMode.Overflow;
16266
- var engine = _assert_this_initialized$1(_this).engine;
16266
+ var engine = _assert_this_initialized(_this).engine;
16267
16267
  _this._font = engine._textDefaultFont;
16268
16268
  _this._addResourceReferCount(_this._font, 1);
16269
16269
  _this.setMaterial(engine._textDefaultMaterial);
16270
16270
  //@ts-ignore
16271
- _this._color._onValueChanged = _this._onColorChanged.bind(_assert_this_initialized$1(_this));
16271
+ _this._color._onValueChanged = _this._onColorChanged.bind(_assert_this_initialized(_this));
16272
16272
  return _this;
16273
16273
  };
16274
16274
  _inherits$2(TextRenderer, Renderer1);
@@ -17456,7 +17456,7 @@
17456
17456
  _this._renderFace = exports.RenderFace.Front;
17457
17457
  _this._isTransparent = false;
17458
17458
  _this._blendMode = exports.BlendMode.Normal;
17459
- var shaderData = _assert_this_initialized$1(_this).shaderData;
17459
+ var shaderData = _assert_this_initialized(_this).shaderData;
17460
17460
  shaderData.setFloat(BaseMaterial._alphaCutoffProp, 0);
17461
17461
  shaderData.setFloat(BaseMaterial._shadowCasterRenderQueueProp, exports.RenderQueueType.Opaque);
17462
17462
  return _this;
@@ -18698,7 +18698,7 @@
18698
18698
  /** @internal */ _this._vertexElementMap = {};
18699
18699
  /** @internal */ _this._bufferStructChanged = false;
18700
18700
  _this._vertexElements = [];
18701
- _this._platformPrimitive = engine._hardwareRenderer.createPlatformPrimitive(_assert_this_initialized$1(_this));
18701
+ _this._platformPrimitive = engine._hardwareRenderer.createPlatformPrimitive(_assert_this_initialized(_this));
18702
18702
  return _this;
18703
18703
  };
18704
18704
  _inherits$2(Primitive, GraphicsResource1);
@@ -18845,7 +18845,7 @@
18845
18845
  _this._subMeshes = [];
18846
18846
  _this.name = name1;
18847
18847
  _this._primitive = new Primitive(engine);
18848
- _this._onBoundsChanged = _this._onBoundsChanged.bind(_assert_this_initialized$1(_this));
18848
+ _this._onBoundsChanged = _this._onBoundsChanged.bind(_assert_this_initialized(_this));
18849
18849
  var bounds = _this._bounds;
18850
18850
  // @ts-ignore
18851
18851
  bounds.min._onValueChanged = _this._onBoundsChanged;
@@ -19097,7 +19097,7 @@
19097
19097
  var _this;
19098
19098
  _this = Renderer1.call(this, entity) || this;
19099
19099
  _this._enableVertexColor = false;
19100
- _this._onMeshChanged = _this._onMeshChanged.bind(_assert_this_initialized$1(_this));
19100
+ _this._onMeshChanged = _this._onMeshChanged.bind(_assert_this_initialized(_this));
19101
19101
  return _this;
19102
19102
  };
19103
19103
  _inherits$2(MeshRenderer, Renderer1);
@@ -19783,7 +19783,7 @@
19783
19783
  _this._indicesChangeFlag = false;
19784
19784
  /** @deprecated */ _this._accessible = true;
19785
19785
  _this.name = name1;
19786
- _this._blendShapeManager = new BlendShapeManager(engine, _assert_this_initialized$1(_this));
19786
+ _this._blendShapeManager = new BlendShapeManager(engine, _assert_this_initialized(_this));
19787
19787
  return _this;
19788
19788
  };
19789
19789
  _inherits$2(ModelMesh, Mesh1);
@@ -22918,8 +22918,8 @@
22918
22918
  // For renderer is "ANGLE (AMD, AMD Radeon(TM) Graphics Direct3011 vs_5_0 ps_5_0, D3011)", compile shader si very slow because of max uniform is 4096.
22919
22919
  maxVertexUniformVectors = Math.min(maxVertexUniformVectors, rhi._options._maxAllowSkinUniformVectorCount);
22920
22920
  _this._maxVertexUniformVectors = maxVertexUniformVectors;
22921
- _this._onLocalBoundsChanged = _this._onLocalBoundsChanged.bind(_assert_this_initialized$1(_this));
22922
- _this._onSkinUpdated = _this._onSkinUpdated.bind(_assert_this_initialized$1(_this));
22921
+ _this._onLocalBoundsChanged = _this._onLocalBoundsChanged.bind(_assert_this_initialized(_this));
22922
+ _this._onSkinUpdated = _this._onSkinUpdated.bind(_assert_this_initialized(_this));
22923
22923
  var localBounds = _this._localBounds;
22924
22924
  // @ts-ignore
22925
22925
  localBounds.min._onValueChanged = _this._onLocalBoundsChanged;
@@ -23698,6 +23698,15 @@
23698
23698
  this._loopArrayDirty = true;
23699
23699
  };
23700
23700
  /**
23701
+ * Remove item from array that pass the specified comparison function.
23702
+ * @param filter - The comparison function
23703
+ */ _proto.findAndRemove = function findAndRemove(filter) {
23704
+ var array = this._array;
23705
+ for(var i = array.length - 1; i >= 0; i--){
23706
+ filter(array[i]) && this.removeByIndex(i);
23707
+ }
23708
+ };
23709
+ /**
23701
23710
  * The index of the item.
23702
23711
  * @param item - The item which want to get the index
23703
23712
  * @returns Index of the item
@@ -25496,7 +25505,7 @@
25496
25505
  _this._upDirection = new Vector3(0, 1, 0);
25497
25506
  _this._slopeLimit = 0.707;
25498
25507
  _this._nativeCollider = PhysicsScene._nativePhysics.createCharacterController();
25499
- _this._setUpDirection = _this._setUpDirection.bind(_assert_this_initialized$1(_this));
25508
+ _this._setUpDirection = _this._setUpDirection.bind(_assert_this_initialized(_this));
25500
25509
  //@ts-ignore
25501
25510
  _this._upDirection._onValueChanged = _this._setUpDirection;
25502
25511
  return _this;
@@ -25654,10 +25663,10 @@
25654
25663
  _this._sleepThreshold = 5e-3;
25655
25664
  var transform = _this.entity.transform;
25656
25665
  _this._nativeCollider = PhysicsScene._nativePhysics.createDynamicCollider(transform.worldPosition, transform.worldRotationQuaternion);
25657
- _this._setLinearVelocity = _this._setLinearVelocity.bind(_assert_this_initialized$1(_this));
25658
- _this._setAngularVelocity = _this._setAngularVelocity.bind(_assert_this_initialized$1(_this));
25659
- _this._setCenterOfMass = _this._setCenterOfMass.bind(_assert_this_initialized$1(_this));
25660
- _this._setInertiaTensor = _this._setInertiaTensor.bind(_assert_this_initialized$1(_this));
25666
+ _this._setLinearVelocity = _this._setLinearVelocity.bind(_assert_this_initialized(_this));
25667
+ _this._setAngularVelocity = _this._setAngularVelocity.bind(_assert_this_initialized(_this));
25668
+ _this._setCenterOfMass = _this._setCenterOfMass.bind(_assert_this_initialized(_this));
25669
+ _this._setInertiaTensor = _this._setInertiaTensor.bind(_assert_this_initialized(_this));
25661
25670
  //@ts-ignore
25662
25671
  _this._linearVelocity._onValueChanged = _this._setLinearVelocity;
25663
25672
  //@ts-ignore
@@ -26804,7 +26813,7 @@
26804
26813
  _this = ColliderShape1.call(this) || this;
26805
26814
  _this._size = new Vector3(1, 1, 1);
26806
26815
  _this._nativeShape = PhysicsScene._nativePhysics.createBoxColliderShape(_this._id, _this._size, _this._material._nativeMaterial);
26807
- _this._setSize = _this._setSize.bind(_assert_this_initialized$1(_this));
26816
+ _this._setSize = _this._setSize.bind(_assert_this_initialized(_this));
26808
26817
  //@ts-ignore
26809
26818
  _this._size._onValueChanged = _this._setSize;
26810
26819
  return _this;
@@ -27799,8 +27808,8 @@
27799
27808
  /** @internal */ _this._fontMap = {};
27800
27809
  /** @internal @todo: temporary solution */ _this._macroCollection = new ShaderMacroCollection();
27801
27810
  _this._settings = {};
27802
- _this._resourceManager = new ResourceManager(_assert_this_initialized$1(_this));
27803
- _this._sceneManager = new SceneManager(_assert_this_initialized$1(_this));
27811
+ _this._resourceManager = new ResourceManager(_assert_this_initialized(_this));
27812
+ _this._sceneManager = new SceneManager(_assert_this_initialized(_this));
27804
27813
  _this._vSyncCount = 1;
27805
27814
  _this._targetFrameRate = 60;
27806
27815
  _this._time = new Time();
@@ -27827,35 +27836,35 @@
27827
27836
  }
27828
27837
  };
27829
27838
  _this._hardwareRenderer = hardwareRenderer;
27830
- _this._hardwareRenderer.init(canvas, _this._onDeviceLost.bind(_assert_this_initialized$1(_this)), _this._onDeviceRestored.bind(_assert_this_initialized$1(_this)));
27839
+ _this._hardwareRenderer.init(canvas, _this._onDeviceLost.bind(_assert_this_initialized(_this)), _this._onDeviceRestored.bind(_assert_this_initialized(_this)));
27831
27840
  _this._canvas = canvas;
27832
- var _$_assert_this_initialized = _assert_this_initialized$1(_this), spriteDefaultMaterials = _$_assert_this_initialized._spriteDefaultMaterials;
27841
+ var _$_assert_this_initialized = _assert_this_initialized(_this), spriteDefaultMaterials = _$_assert_this_initialized._spriteDefaultMaterials;
27833
27842
  _this._spriteDefaultMaterial = spriteDefaultMaterials[exports.SpriteMaskInteraction.None] = _this._createSpriteMaterial(exports.SpriteMaskInteraction.None);
27834
27843
  spriteDefaultMaterials[exports.SpriteMaskInteraction.VisibleInsideMask] = _this._createSpriteMaterial(exports.SpriteMaskInteraction.VisibleInsideMask);
27835
27844
  spriteDefaultMaterials[exports.SpriteMaskInteraction.VisibleOutsideMask] = _this._createSpriteMaterial(exports.SpriteMaskInteraction.VisibleOutsideMask);
27836
27845
  _this._textDefaultMaterial = _this._createTextMaterial();
27837
27846
  _this._spriteMaskDefaultMaterial = _this._createSpriteMaskMaterial();
27838
- _this._textDefaultFont = Font.createFromOS(_assert_this_initialized$1(_this), "Arial");
27847
+ _this._textDefaultFont = Font.createFromOS(_assert_this_initialized(_this), "Arial");
27839
27848
  _this._textDefaultFont.isGCIgnored = true;
27840
- _this._batcherManager = new BatcherManager(_assert_this_initialized$1(_this));
27841
- _this.inputManager = new InputManager(_assert_this_initialized$1(_this), configuration.input);
27849
+ _this._batcherManager = new BatcherManager(_assert_this_initialized(_this));
27850
+ _this.inputManager = new InputManager(_assert_this_initialized(_this), configuration.input);
27842
27851
  var xrDevice = configuration.xrDevice;
27843
27852
  if (xrDevice) {
27844
27853
  _this.xrManager = new XRManager();
27845
- _this.xrManager._initialize(_assert_this_initialized$1(_this), xrDevice);
27854
+ _this.xrManager._initialize(_assert_this_initialized(_this), xrDevice);
27846
27855
  }
27847
27856
  if (!hardwareRenderer.canIUse(exports.GLCapabilityType.depthTexture)) {
27848
27857
  _this._macroCollection.enable(Engine._noDepthTextureMacro);
27849
27858
  } else {
27850
- var depthTexture2D = new Texture2D(_assert_this_initialized$1(_this), 1, 1, exports.TextureFormat.Depth16, false);
27859
+ var depthTexture2D = new Texture2D(_assert_this_initialized(_this), 1, 1, exports.TextureFormat.Depth16, false);
27851
27860
  depthTexture2D.isGCIgnored = true;
27852
27861
  _this._depthTexture2D = depthTexture2D;
27853
27862
  }
27854
- var meshMagentaMaterial = new Material(_assert_this_initialized$1(_this), Shader.find("unlit"));
27863
+ var meshMagentaMaterial = new Material(_assert_this_initialized(_this), Shader.find("unlit"));
27855
27864
  meshMagentaMaterial.isGCIgnored = true;
27856
27865
  meshMagentaMaterial.shaderData.setColor("material_BaseColor", new Color(1.0, 0.0, 1.01, 1.0));
27857
27866
  _this._meshMagentaMaterial = meshMagentaMaterial;
27858
- var particleMagentaMaterial = new Material(_assert_this_initialized$1(_this), Shader.find("particle-shader"));
27867
+ var particleMagentaMaterial = new Material(_assert_this_initialized(_this), Shader.find("particle-shader"));
27859
27868
  particleMagentaMaterial.isGCIgnored = true;
27860
27869
  particleMagentaMaterial.shaderData.setColor("material_BaseColor", new Color(1.0, 0.0, 1.01, 1.0));
27861
27870
  _this._particleMagentaMaterial = particleMagentaMaterial;
@@ -27863,8 +27872,8 @@
27863
27872
  var colorSpace = configuration.colorSpace || exports.ColorSpace.Linear;
27864
27873
  colorSpace === exports.ColorSpace.Gamma && _this._macroCollection.enable(Engine._gammaMacro);
27865
27874
  innerSettings.colorSpace = colorSpace;
27866
- _this._basicResources = new BasicResources(_assert_this_initialized$1(_this));
27867
- _this._particleBufferUtils = new ParticleBufferUtils(_assert_this_initialized$1(_this));
27875
+ _this._basicResources = new BasicResources(_assert_this_initialized(_this));
27876
+ _this._particleBufferUtils = new ParticleBufferUtils(_assert_this_initialized(_this));
27868
27877
  return _this;
27869
27878
  }
27870
27879
  var _proto = Engine.prototype;
@@ -30081,7 +30090,7 @@
30081
30090
  function Scene(engine, name1) {
30082
30091
  var _this;
30083
30092
  _this = EngineObject1.call(this, engine) || this;
30084
- /** Physics. */ _this.physics = new PhysicsScene(_assert_this_initialized$1(_this));
30093
+ /** Physics. */ _this.physics = new PhysicsScene(_assert_this_initialized(_this));
30085
30094
  /** If cast shadows. */ _this.castShadows = true;
30086
30095
  /** The resolution of the shadow maps. */ _this.shadowResolution = exports.ShadowResolution.Medium;
30087
30096
  /** The splits of two cascade distribution. */ _this.shadowTwoCascadeSplits = 1.0 / 3.0;
@@ -30097,7 +30106,7 @@
30097
30106
  /** @internal */ _this._isActiveInEngine = false;
30098
30107
  /** @internal */ _this._globalShaderMacro = new ShaderMacroCollection();
30099
30108
  /** @internal */ _this._rootEntities = [];
30100
- /** @internal */ _this._postProcessManager = new _PostProcessManager(_assert_this_initialized$1(_this));
30109
+ /** @internal */ _this._postProcessManager = new _PostProcessManager(_assert_this_initialized(_this));
30101
30110
  _this._background = new Background(_this._engine);
30102
30111
  _this._shaderData = new ShaderData(ShaderDataGroup.Scene);
30103
30112
  _this._shadowCascades = exports.ShadowCascadesMode.NoCascades;
@@ -30113,7 +30122,7 @@
30113
30122
  var shaderData = _this.shaderData;
30114
30123
  shaderData._addReferCount(1);
30115
30124
  _this.ambientLight = new AmbientLight(engine);
30116
- engine.sceneManager._allCreatedScenes.push(_assert_this_initialized$1(_this));
30125
+ engine.sceneManager._allCreatedScenes.push(_assert_this_initialized(_this));
30117
30126
  shaderData.enableMacro("SCENE_FOG_MODE", _this._fogMode.toString());
30118
30127
  shaderData.enableMacro("SCENE_SHADOW_CASCADED_COUNT", _this.shadowCascades.toString());
30119
30128
  shaderData.setColor(Scene._fogColorProperty, _this._fogColor);
@@ -34560,8 +34569,8 @@
34560
34569
  /** The pivot of particle. */ _this.pivot = new Vector3();
34561
34570
  /** @internal */ _this._generatorBounds = new BoundingBox();
34562
34571
  /** @internal */ _this._transformedBounds = new BoundingBox();
34563
- _this._onGeneratorParamsChanged = _this._onGeneratorParamsChanged.bind(_assert_this_initialized$1(_this));
34564
- _this.generator = new ParticleGenerator(_assert_this_initialized$1(_this));
34572
+ _this._onGeneratorParamsChanged = _this._onGeneratorParamsChanged.bind(_assert_this_initialized(_this));
34573
+ _this.generator = new ParticleGenerator(_assert_this_initialized(_this));
34565
34574
  _this._currentRenderModeMacro = ParticleRenderer._billboardModeMacro;
34566
34575
  _this.shaderData.enableMacro(ParticleRenderer._billboardModeMacro);
34567
34576
  _this._supportInstancedArrays = _this.engine._hardwareRenderer.canIUse(exports.GLCapabilityType.instancedArrays);
@@ -38899,6 +38908,7 @@
38899
38908
  ResourceManager: ResourceManager,
38900
38909
  ReturnableObjectPool: ReturnableObjectPool,
38901
38910
  RotationOverLifetimeModule: RotationOverLifetimeModule,
38911
+ SafeLoopArray: SafeLoopArray,
38902
38912
  Scene: Scene,
38903
38913
  SceneManager: SceneManager,
38904
38914
  Script: Script,
@@ -41990,10 +42000,6 @@
41990
42000
  SpecularMode["Sky"] = "Sky";
41991
42001
  SpecularMode["Custom"] = "Custom";
41992
42002
  })(exports.SpecularMode || (exports.SpecularMode = {}));
41993
- function _assert_this_initialized(self1) {
41994
- if (self1 === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
41995
- return self1;
41996
- }
41997
42003
  function _instanceof1(left, right) {
41998
42004
  if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
41999
42005
  return !!right[Symbol.hasInstance](left);
@@ -42089,7 +42095,7 @@
42089
42095
  this._reflectionParser = new ReflectionParser(context);
42090
42096
  };
42091
42097
  var _proto = HierarchyParser.prototype;
42092
- /** start parse the prefab or others */ _proto.start = function start() {
42098
+ /** start parse the scene or prefab or others */ _proto.start = function start() {
42093
42099
  this._parseEntities().then(this._organizeEntities).then(this._parseComponents).then(this._parsePrefabModification).then(this._parsePrefabRemovedEntities).then(this._parsePrefabRemovedComponents).then(this._clearAndResolve).then(this._resolve).catch(this._reject);
42094
42100
  };
42095
42101
  _proto._parseEntities = function _parseEntities() {
@@ -42334,22 +42340,10 @@
42334
42340
  var _this;
42335
42341
  _this = HierarchyParser1.call(this, data, context) || this;
42336
42342
  _this.scene = scene;
42337
- _this._extendParse = _this._extendParse.bind(_assert_this_initialized(_this));
42338
42343
  return _this;
42339
42344
  };
42340
42345
  _inherits(SceneParser, HierarchyParser1);
42341
42346
  var _proto = SceneParser.prototype;
42342
- /** start parse the prefab or others */ _proto.start = function start() {
42343
- this._parseEntities().then(this._organizeEntities).then(this._parseComponents).then(this._parsePrefabModification).then(this._parsePrefabRemovedEntities).then(this._parsePrefabRemovedComponents).then(this._extendParse).then(this._clearAndResolve).then(this._resolve).catch(this._reject);
42344
- };
42345
- _proto._extendParse = function _extendParse() {
42346
- var promises = [];
42347
- var _this = this, engine = _this._engine, context = _this.context, data = _this.data;
42348
- SceneParser._extendParsers.forEach(function(parser) {
42349
- promises.push(parser.parse(engine, context, data));
42350
- });
42351
- return Promise.all(promises);
42352
- };
42353
42347
  _proto._handleRootEntity = function _handleRootEntity(id) {
42354
42348
  var entityMap = this.context.entityMap;
42355
42349
  this.scene.addRootEntity(entityMap.get(id));
@@ -42374,18 +42368,6 @@
42374
42368
  };
42375
42369
  return SceneParser;
42376
42370
  }(HierarchyParser);
42377
- (function() {
42378
- SceneParser._extendParsers = new Map();
42379
- })();
42380
- /**
42381
- * Register extend parser for scene parser.
42382
- * @param key - parser key
42383
- * @returns Parser decorator
42384
- */ function registerSceneExtendParser(key) {
42385
- return function(target) {
42386
- SceneParser._extendParsers.set(key, target);
42387
- };
42388
- }
42389
42371
  exports.MeshLoader = /*#__PURE__*/ function(Loader1) {
42390
42372
  var MeshLoader = function MeshLoader() {
42391
42373
  return Loader1.apply(this, arguments);
@@ -47820,7 +47802,7 @@
47820
47802
  ], KHR_materials_anisotropy);
47821
47803
 
47822
47804
  //@ts-ignore
47823
- var version = "0.0.0-experimental-1.3-xr.5";
47805
+ var version = "0.0.0-experimental-1.3-xr.9";
47824
47806
  console.log("Galacean engine version: " + version);
47825
47807
  for(var key in CoreObjects){
47826
47808
  Loader.registerClass(key, CoreObjects[key]);
@@ -47946,6 +47928,7 @@
47946
47928
  exports.ResourceManager = ResourceManager;
47947
47929
  exports.ReturnableObjectPool = ReturnableObjectPool;
47948
47930
  exports.RotationOverLifetimeModule = RotationOverLifetimeModule;
47931
+ exports.SafeLoopArray = SafeLoopArray;
47949
47932
  exports.Scene = Scene;
47950
47933
  exports.SceneManager = SceneManager;
47951
47934
  exports.SceneParser = SceneParser;
@@ -48016,7 +47999,6 @@
48016
47999
  exports.parseSingleKTX = parseSingleKTX;
48017
48000
  exports.registerGLTFExtension = registerGLTFExtension;
48018
48001
  exports.registerGLTFParser = registerGLTFParser;
48019
- exports.registerSceneExtendParser = registerSceneExtendParser;
48020
48002
  exports.request = request;
48021
48003
  exports.resourceLoader = resourceLoader;
48022
48004
  exports.shallowClone = shallowClone;