@galacean/engine 1.3.8 → 1.3.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
@@ -24750,6 +24750,7 @@
24750
24750
  */ SystemInfo._initialize = function _initialize() {
24751
24751
  {
24752
24752
  if (typeof navigator == "undefined") {
24753
+ SystemInfo._isBrowser = false;
24753
24754
  return;
24754
24755
  }
24755
24756
  var userAgent = navigator.userAgent;
@@ -24861,6 +24862,9 @@
24861
24862
  (function() {
24862
24863
  /** The operating system is running on. */ SystemInfo.operatingSystem = "";
24863
24864
  })();
24865
+ (function() {
24866
+ /** @internal */ SystemInfo._isBrowser = true;
24867
+ })();
24864
24868
  (function() {
24865
24869
  /** Whether the system support SIMD. */ SystemInfo._simdSupported = null;
24866
24870
  })();
@@ -48063,9 +48067,14 @@
48063
48067
  var _this;
48064
48068
  _this = GLTFExtensionParser1.call(this) || this;
48065
48069
  _this._supportWebP = false;
48066
- var testCanvas = document.createElement("canvas");
48067
- testCanvas.width = testCanvas.height = 1;
48068
- _this._supportWebP = testCanvas.toDataURL("image/webp").indexOf("data:image/webp") == 0;
48070
+ // @ts-ignore
48071
+ if (SystemInfo._isBrowser) {
48072
+ var testCanvas = document.createElement("canvas");
48073
+ testCanvas.width = testCanvas.height = 1;
48074
+ _this._supportWebP = testCanvas.toDataURL("image/webp").indexOf("data:image/webp") == 0;
48075
+ } else {
48076
+ _this._supportWebP = false;
48077
+ }
48069
48078
  return _this;
48070
48079
  };
48071
48080
  _inherits(EXT_texture_webp, GLTFExtensionParser1);
@@ -48092,7 +48101,7 @@
48092
48101
  ], EXT_texture_webp);
48093
48102
 
48094
48103
  //@ts-ignore
48095
- var version = "1.3.8";
48104
+ var version = "1.3.9";
48096
48105
  console.log("Galacean engine version: " + version);
48097
48106
  for(var key in CoreObjects){
48098
48107
  Loader.registerClass(key, CoreObjects[key]);