@galacean/engine 1.5.1 → 1.5.3

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
@@ -30726,13 +30726,14 @@
30726
30726
  } else {
30727
30727
  cameras.forEach(function(camera) {
30728
30728
  componentsManager.callCameraOnBeginRender(camera);
30729
- // `pixelViewport` width or height is `0` will cause internal render target create error and return can save performance
30730
30729
  var pixelViewport = camera.pixelViewport;
30731
- if (pixelViewport.width !== 0 || pixelViewport.height !== 0) {
30732
- Logger.warn("Camera pixelViewport width or height is 0.");
30730
+ // `pixelViewport` width or height is `0` will cause internal render target create error and return can save performance
30731
+ if (pixelViewport.width !== 0 && pixelViewport.height !== 0) {
30733
30732
  // Update post process manager
30734
30733
  scene.postProcessManager._update(camera);
30735
30734
  camera.render();
30735
+ } else {
30736
+ Logger.warn("Camera pixelViewport width or height is 0.");
30736
30737
  }
30737
30738
  componentsManager.callCameraOnEndRender(camera);
30738
30739
  // Temp solution for webgl implement bug
@@ -41250,7 +41251,8 @@
41250
41251
  // Based on the specific version of the engine implementation, when actualBoundingBoxLeft is not supported, width is used to represent the rendering width, and `textAlign` uses the default value `start` and direction is left to right.
41251
41252
  // Some devices do not support actualBoundingBoxLeft and actualBoundingBoxRight in TextMetrics.
41252
41253
  // Examples: Google Pixel 2 XL (Android 11), Honor 6X (Android 8).
41253
- if (!("actualBoundingBoxLeft" in TextMetrics.prototype)) {
41254
+ // In WeChat Mini Games, TextMetrics may be reported as not defined, so a check for window.TextMetrics is added.
41255
+ if (window.TextMetrics && !("actualBoundingBoxLeft" in TextMetrics.prototype)) {
41254
41256
  Object.defineProperties(TextMetrics.prototype, {
41255
41257
  actualBoundingBoxLeft: {
41256
41258
  get: function get() {
@@ -51142,7 +51144,7 @@
51142
51144
  ], EXT_texture_webp);
51143
51145
 
51144
51146
  //@ts-ignore
51145
- var version = "1.5.1";
51147
+ var version = "1.5.3";
51146
51148
  console.log("Galacean Engine Version: " + version);
51147
51149
  for(var key in CoreObjects){
51148
51150
  Loader.registerClass(key, CoreObjects[key]);