@galacean/engine-loader 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/main.js CHANGED
@@ -6885,9 +6885,14 @@ var EXT_texture_webp = /*#__PURE__*/ function(GLTFExtensionParser1) {
6885
6885
  var _this;
6886
6886
  _this = GLTFExtensionParser1.call(this) || this;
6887
6887
  _this._supportWebP = false;
6888
- var testCanvas = document.createElement("canvas");
6889
- testCanvas.width = testCanvas.height = 1;
6890
- _this._supportWebP = testCanvas.toDataURL("image/webp").indexOf("data:image/webp") == 0;
6888
+ // @ts-ignore
6889
+ if (engineCore.SystemInfo._isBrowser) {
6890
+ var testCanvas = document.createElement("canvas");
6891
+ testCanvas.width = testCanvas.height = 1;
6892
+ _this._supportWebP = testCanvas.toDataURL("image/webp").indexOf("data:image/webp") == 0;
6893
+ } else {
6894
+ _this._supportWebP = false;
6895
+ }
6891
6896
  return _this;
6892
6897
  }
6893
6898
  var _proto = EXT_texture_webp.prototype;