@galacean/engine 1.6.0 → 1.6.1

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
@@ -12678,6 +12678,8 @@
12678
12678
  rotation._onValueChanged = target._onRotationChanged;
12679
12679
  // @ts-ignore
12680
12680
  scale._onValueChanged = target._onScaleChanged;
12681
+ // When cloning, other components may obtain properties such as `rotationQuaternion` in the constructor, local related dirty flags need to be corrected
12682
+ target._setDirtyFlagTrue(2 | 64);
12681
12683
  };
12682
12684
  _proto._onLocalMatrixChanging = function _onLocalMatrixChanging() {
12683
12685
  this._setDirtyFlagFalse(64);
@@ -26748,11 +26750,7 @@
26748
26750
  ], args));
26749
26751
  this._components.push(component);
26750
26752
  // @todo: temporary solution
26751
- if (_instanceof1$2(component, Transform)) {
26752
- var transform = this._transform;
26753
- this._transform = component;
26754
- transform == null ? void 0 : transform.destroy();
26755
- }
26753
+ if (_instanceof1$2(component, Transform)) this._setTransform(component);
26756
26754
  component._setActive(true, ActiveChangeFlag.All);
26757
26755
  return component;
26758
26756
  };
@@ -27181,6 +27179,16 @@
27181
27179
  }
27182
27180
  }
27183
27181
  };
27182
+ _proto._setTransform = function _setTransform(value) {
27183
+ var _this__transform;
27184
+ (_this__transform = this._transform) == null ? void 0 : _this__transform.destroy();
27185
+ this._transform = value;
27186
+ var children = this._children;
27187
+ for(var i = 0, n = children.length; i < n; i++){
27188
+ var _children_i_transform;
27189
+ (_children_i_transform = children[i].transform) == null ? void 0 : _children_i_transform._parentChange();
27190
+ }
27191
+ };
27184
27192
  /**
27185
27193
  * @deprecated
27186
27194
  */ _proto.getInvModelMatrix = function getInvModelMatrix() {
@@ -50958,7 +50966,8 @@
50958
50966
  ._request(item.url, _extends({}, item, {
50959
50967
  type: "json"
50960
50968
  })).then(function(data) {
50961
- var scene = new Scene(engine);
50969
+ var _data_name;
50970
+ var scene = new Scene(engine, (_data_name = data.name) != null ? _data_name : "");
50962
50971
  var context = new ParserContext(engine, ParserType.Scene, scene);
50963
50972
  var parser = new SceneParser(data, context, scene);
50964
50973
  parser._collectDependentAssets(data);
@@ -51058,6 +51067,19 @@
51058
51067
  if (postProcessData) {
51059
51068
  Logger.warn("Post Process is not supported in scene yet, please add PostProcess component in entity instead.");
51060
51069
  }
51070
+ // Ambient Occlusion
51071
+ var ambientOcclusion = data.scene.ambientOcclusion;
51072
+ if (ambientOcclusion) {
51073
+ var sceneAmbientOcclusion = scene.ambientOcclusion;
51074
+ sceneAmbientOcclusion.enabled = ambientOcclusion.enabledAmbientOcclusion;
51075
+ sceneAmbientOcclusion.intensity = ambientOcclusion.intensity;
51076
+ sceneAmbientOcclusion.radius = ambientOcclusion.radius;
51077
+ sceneAmbientOcclusion.bias = ambientOcclusion.bias;
51078
+ sceneAmbientOcclusion.power = ambientOcclusion.power;
51079
+ sceneAmbientOcclusion.quality = ambientOcclusion.quality;
51080
+ sceneAmbientOcclusion.bilateralThreshold = ambientOcclusion.bilateralThreshold;
51081
+ sceneAmbientOcclusion.minHorizonAngle = ambientOcclusion.minHorizonAngle;
51082
+ }
51061
51083
  return Promise.all(promises).then(function() {
51062
51084
  resolve(scene);
51063
51085
  });
@@ -51580,7 +51602,7 @@
51580
51602
  ], EXT_texture_webp);
51581
51603
 
51582
51604
  //@ts-ignore
51583
- var version = "1.6.0";
51605
+ var version = "1.6.1";
51584
51606
  console.log("Galacean Engine Version: " + version);
51585
51607
  for(var key in CoreObjects){
51586
51608
  Loader.registerClass(key, CoreObjects[key]);