@galacean/engine 0.0.0-experimental-double11.12 → 0.0.0-experimental-double11.13

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
@@ -17901,7 +17901,7 @@
17901
17901
  var objects = Utils.objectValues(this._referResourcePool);
17902
17902
  for(var i = 0, len = objects.length; i < len; i++){
17903
17903
  if (!objects[i].isGCIgnored || forceDestroy) {
17904
- objects[i].destroy();
17904
+ objects[i].destroy(forceDestroy);
17905
17905
  }
17906
17906
  }
17907
17907
  };
@@ -21539,9 +21539,6 @@
21539
21539
  _proto._destroy = function _destroy() {
21540
21540
  this._sceneManager._destroyAllScene();
21541
21541
  this._resourceManager._destroy();
21542
- this._whiteTexture2D.destroy(true);
21543
- this._magentaTexture2D.destroy(true);
21544
- this._magentaTextureCube.destroy(true);
21545
21542
  this._textDefaultFont = null;
21546
21543
  this._fontMap = null;
21547
21544
  this.inputManager._destroy();
@@ -40174,6 +40171,7 @@
40174
40171
  _proto.initialize = function initialize(engine, configuration) {
40175
40172
  if (configuration.ktx2Loader) {
40176
40173
  var options = configuration.ktx2Loader;
40174
+ if (options.priorityFormats) exports.KTX2Loader._priorityFormats = options.priorityFormats;
40177
40175
  if (this._isKhronosSupported(options.priorityFormats, engine) && options.workerCount !== 0) {
40178
40176
  return exports.KTX2Loader._getKhronosTranscoder(options.workerCount).init();
40179
40177
  } else {
@@ -40202,17 +40200,7 @@
40202
40200
  exports.KTX2TargetFormat.PVRTC,
40203
40201
  exports.KTX2TargetFormat.R8G8B8A8
40204
40202
  ];
40205
- var supportedList = new Array();
40206
- if (Array.isArray(priorityFormats[0])) {
40207
- for(var i = 0; i < priorityFormats.length; i++){
40208
- supportedList.push(exports.KTX2Loader._detectSupportedFormat(engine._hardwareRenderer, priorityFormats[i]));
40209
- }
40210
- } else {
40211
- supportedList.push(exports.KTX2Loader._detectSupportedFormat(engine._hardwareRenderer, priorityFormats));
40212
- }
40213
- return supportedList.every(function(format) {
40214
- return KhronosTranscoder.transcoderMap[format];
40215
- });
40203
+ return !!KhronosTranscoder.transcoderMap[exports.KTX2Loader._detectSupportedFormat(engine._hardwareRenderer, priorityFormats)];
40216
40204
  };
40217
40205
  /**
40218
40206
  * Destroy ktx2 transcoder worker.
@@ -40226,7 +40214,8 @@
40226
40214
  /** @internal */ KTX2Loader1._parseBuffer = function _parseBuffer(buffer, engine, params) {
40227
40215
  var _params;
40228
40216
  var ktx2Container = new KTX2Container(buffer);
40229
- var formatPriorities = (_params = params) == null ? void 0 : _params.priorityFormats;
40217
+ var _params_priorityFormats;
40218
+ var formatPriorities = (_params_priorityFormats = (_params = params) == null ? void 0 : _params.priorityFormats) != null ? _params_priorityFormats : exports.KTX2Loader._priorityFormats;
40230
40219
  var targetFormat = exports.KTX2Loader._decideTargetFormat(engine, ktx2Container, formatPriorities);
40231
40220
  var transcodeResultPromise;
40232
40221
  if (exports.KTX2Loader._isBinomialInit || !KhronosTranscoder.transcoderMap[targetFormat] || !ktx2Container.isUASTC) {
@@ -40293,13 +40282,6 @@
40293
40282
  return targetFormat;
40294
40283
  };
40295
40284
  KTX2Loader1._detectSupportedFormat = function _detectSupportedFormat(renderer, priorityFormats) {
40296
- if (priorityFormats === void 0) priorityFormats = [
40297
- exports.KTX2TargetFormat.ASTC,
40298
- exports.KTX2TargetFormat.ETC,
40299
- exports.KTX2TargetFormat.BC7,
40300
- exports.KTX2TargetFormat.BC1_BC3,
40301
- exports.KTX2TargetFormat.PVRTC
40302
- ];
40303
40285
  for(var i = 0; i < priorityFormats.length; i++){
40304
40286
  var capabilities = this._supportedMap[priorityFormats[i]];
40305
40287
  if (!capabilities) return null;
@@ -40342,6 +40324,14 @@
40342
40324
  return KTX2Loader1;
40343
40325
  }(Loader), function() {
40344
40326
  _KTX2Loader._isBinomialInit = false;
40327
+ }(), function() {
40328
+ _KTX2Loader._priorityFormats = [
40329
+ exports.KTX2TargetFormat.BC7,
40330
+ exports.KTX2TargetFormat.ASTC,
40331
+ exports.KTX2TargetFormat.BC1_BC3,
40332
+ exports.KTX2TargetFormat.ETC,
40333
+ exports.KTX2TargetFormat.PVRTC
40334
+ ];
40345
40335
  }(), function() {
40346
40336
  var _obj;
40347
40337
  _KTX2Loader._supportedMap = (_obj = {}, _obj[exports.KTX2TargetFormat.ASTC] = [
@@ -43352,7 +43342,7 @@
43352
43342
  ], GALACEAN_animation_event);
43353
43343
 
43354
43344
  //@ts-ignore
43355
- var version = "0.0.0-experimental-double11.12";
43345
+ var version = "0.0.0-experimental-double11.13";
43356
43346
  console.log("Galacean engine version: " + version);
43357
43347
  for(var key in CoreObjects){
43358
43348
  Loader.registerClass(key, CoreObjects[key]);