@galacean/engine 0.0.0-experimental-double11.5 → 0.0.0-experimental-double11.7

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
@@ -12362,7 +12362,7 @@
12362
12362
  ignoreClone
12363
12363
  ], exports.Renderer.prototype, "_globalShaderMacro", void 0);
12364
12364
  __decorate$1([
12365
- deepClone
12365
+ ignoreClone
12366
12366
  ], exports.Renderer.prototype, "_bounds", void 0);
12367
12367
  __decorate$1([
12368
12368
  ignoreClone
@@ -19262,6 +19262,23 @@
19262
19262
  target.constraints = this.constraints;
19263
19263
  target.collisionDetectionMode = this.collisionDetectionMode;
19264
19264
  };
19265
+ /**
19266
+ * @internal
19267
+ */ _proto._onUpdate = function _onUpdate() {
19268
+ if (this._updateFlag.flag) {
19269
+ var transform = this.entity.transform;
19270
+ if (this.isKinematic) {
19271
+ this._nativeCollider.move(transform.worldPosition, transform.worldRotationQuaternion);
19272
+ } else {
19273
+ this._nativeCollider.setWorldTransform(transform.worldPosition, transform.worldRotationQuaternion);
19274
+ }
19275
+ var worldScale = transform.lossyWorldScale;
19276
+ for(var i = 0, n = this.shapes.length; i < n; i++){
19277
+ this.shapes[i]._nativeShape.setWorldScale(worldScale);
19278
+ }
19279
+ this._updateFlag.flag = false;
19280
+ }
19281
+ };
19265
19282
  _proto._setLinearVelocity = function _setLinearVelocity() {
19266
19283
  this._nativeCollider.setLinearVelocity(this._linearVelocity);
19267
19284
  };
@@ -39773,6 +39790,10 @@
39773
39790
  cleanup();
39774
39791
  throw new Error("Invalid or unsupported .ktx2 file");
39775
39792
  }
39793
+ if (!ktx2File.startTranscoding()) {
39794
+ cleanup();
39795
+ throw new Error("KTX2 startTranscoding failed");
39796
+ }
39776
39797
  var width = ktx2File.getWidth();
39777
39798
  var height = ktx2File.getHeight();
39778
39799
  var layerCount = ktx2File.getLayers() || 1;
@@ -42701,32 +42722,26 @@
42701
42722
  // parse ambient light
42702
42723
  var ambient = data.scene.ambient;
42703
42724
  var useCustomAmbient = ambient.specularMode === "Custom";
42725
+ var useSH = ambient.diffuseMode === exports.DiffuseMode.SphericalHarmonics;
42726
+ scene.ambientLight.diffuseIntensity = ambient.diffuseIntensity;
42727
+ scene.ambientLight.specularIntensity = ambient.specularIntensity;
42728
+ scene.ambientLight.diffuseMode = ambient.diffuseMode;
42729
+ scene.ambientLight.diffuseSolidColor.copyFrom(ambient.diffuseSolidColor);
42730
+ scene.ambientLight.specularTextureDecodeRGBM = true;
42704
42731
  if (useCustomAmbient && ambient.customAmbientLight) {
42705
- // @ts-ignore
42706
- // prettier-ignore
42707
- var customAmbientPromise = resourceManager.getResourceByRef(ambient.customAmbientLight).then(function(ambientLight) {
42708
- scene.ambientLight = ambientLight;
42709
- scene.ambientLight.diffuseIntensity = ambient.diffuseIntensity;
42710
- scene.ambientLight.specularIntensity = ambient.specularIntensity;
42711
- scene.ambientLight.diffuseMode = ambient.diffuseMode;
42712
- scene.ambientLight.diffuseSolidColor.copyFrom(ambient.diffuseSolidColor);
42713
- });
42714
- promises.push(customAmbientPromise);
42715
- } else if (!useCustomAmbient && ambient.ambientLight) {
42716
- // @ts-ignore
42717
- // prettier-ignore
42718
- var ambientLightPromise = resourceManager.getResourceByRef(ambient.ambientLight).then(function(ambientLight) {
42719
- scene.ambientLight = ambientLight;
42720
- scene.ambientLight.diffuseIntensity = ambient.diffuseIntensity;
42721
- scene.ambientLight.specularIntensity = ambient.specularIntensity;
42722
- scene.ambientLight.diffuseMode = ambient.diffuseMode;
42723
- scene.ambientLight.diffuseSolidColor.copyFrom(ambient.diffuseSolidColor);
42724
- });
42725
- promises.push(ambientLightPromise);
42726
- } else {
42727
- scene.ambientLight.diffuseIntensity = ambient.diffuseIntensity;
42728
- scene.ambientLight.specularIntensity = ambient.specularIntensity;
42729
- scene.ambientLight.diffuseSolidColor.copyFrom(ambient.diffuseSolidColor);
42732
+ promises.push(resourceManager.getResourceByRef(ambient.customAmbientLight).then(function(ambientLight) {
42733
+ scene.ambientLight.specularTexture = ambientLight.specularTexture;
42734
+ }));
42735
+ }
42736
+ if (ambient.ambientLight && (!useCustomAmbient || useSH)) {
42737
+ promises.push(resourceManager.getResourceByRef(ambient.ambientLight).then(function(ambientLight) {
42738
+ if (!useCustomAmbient) {
42739
+ scene.ambientLight.specularTexture = ambientLight.specularTexture;
42740
+ }
42741
+ if (useSH) {
42742
+ scene.ambientLight.diffuseSphericalHarmonics = ambientLight.diffuseSphericalHarmonics;
42743
+ }
42744
+ }));
42730
42745
  }
42731
42746
  var background = data.scene.background;
42732
42747
  scene.background.mode = background.mode;
@@ -42783,13 +42798,13 @@
42783
42798
  "scene"
42784
42799
  ], true)
42785
42800
  ], SceneLoader);
42786
- ReflectionParser.registerCustomParseComponent("TextRenderer", /*#__PURE__*/ _async_to_generator(function(instance, item, engine) {
42801
+ ReflectionParser.registerCustomParseComponent("TextRenderer", /*#__PURE__*/ _async_to_generator(function(instance, item) {
42787
42802
  var props;
42788
42803
  return __generator(this, function(_state) {
42789
42804
  props = item.props;
42790
42805
  if (!props.font) {
42791
42806
  // @ts-ignore
42792
- instance.font = Font.createFromOS(engine, props.fontFamily || "Arial");
42807
+ instance.font = Font.createFromOS(instance.engine, props.fontFamily || "Arial");
42793
42808
  }
42794
42809
  return [
42795
42810
  2,
@@ -43279,7 +43294,7 @@
43279
43294
  ], GALACEAN_animation_event);
43280
43295
 
43281
43296
  //@ts-ignore
43282
- var version = "0.0.0-experimental-double11.5";
43297
+ var version = "0.0.0-experimental-double11.7";
43283
43298
  console.log("Galacean engine version: " + version);
43284
43299
  for(var key in CoreObjects){
43285
43300
  Loader.registerClass(key, CoreObjects[key]);