@realsee/five 6.7.0-alpha.3 → 6.7.0-alpha.31

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.
Files changed (211) hide show
  1. package/docs/assets/hierarchy.js +1 -1
  2. package/docs/assets/navigation.js +1 -1
  3. package/docs/assets/search.js +1 -1
  4. package/docs/classes/five.AdaptiveLuminancePass.html +22 -0
  5. package/docs/classes/five.AnimationFrameLoop.html +4 -4
  6. package/docs/classes/five.BoundingMesh.html +4 -0
  7. package/docs/classes/five.Camera.html +6 -5
  8. package/docs/classes/five.EffectComposer.html +21 -0
  9. package/docs/classes/five.EyeDomeLightingPass.html +21 -0
  10. package/docs/classes/five.Five.html +90 -76
  11. package/docs/classes/five.FivePass.html +18 -0
  12. package/docs/classes/five.FiveRenderer.html +9 -0
  13. package/docs/classes/five.FullScreenQuad.html +6 -0
  14. package/docs/classes/five.InternalWebGLRenderer.html +1 -1
  15. package/docs/classes/five.Model.html +32 -31
  16. package/docs/classes/five.ModelScene.html +23 -20
  17. package/docs/classes/five.NetworkSubscribe.html +1 -1
  18. package/docs/classes/five.PBMContainer.html +1 -1
  19. package/docs/classes/five.PBMGroup.html +1 -1
  20. package/docs/classes/five.PBMMesh.html +1 -1
  21. package/docs/classes/five.PBMMeshMaterial.html +6 -7
  22. package/docs/classes/five.PBMPointCloud.html +1 -1
  23. package/docs/classes/five.PBMPointCloudMaterial.html +5 -6
  24. package/docs/classes/five.PBMSkinnedMesh.html +1 -1
  25. package/docs/classes/five.PanoCircleMesh.html +3 -3
  26. package/docs/classes/five.PanoCircleMeshCustom.html +4 -4
  27. package/docs/classes/five.PanoCircleMeshSolid.html +5 -5
  28. package/docs/classes/five.Parameter.html +44 -47
  29. package/docs/classes/five.Scene.html +1 -1
  30. package/docs/classes/five.Subscribe.html +1 -1
  31. package/docs/classes/five.TextureLoader.html +2 -2
  32. package/docs/classes/five.Tile3D.html +21 -21
  33. package/docs/classes/five.TileNode.html +4 -3
  34. package/docs/classes/five.Tileset.html +4 -4
  35. package/docs/classes/five.TrajectoryNode.html +1 -1
  36. package/docs/classes/five.Work.html +16 -16
  37. package/docs/classes/five.WorkResolvedObserver.html +20 -21
  38. package/docs/classes/gltf-loader.DDSLoader.html +1 -1
  39. package/docs/classes/gltf-loader.DRACOLoader.html +1 -1
  40. package/docs/classes/gltf-loader.GLTFLoader.html +1 -1
  41. package/docs/classes/gltf-loader.GLTFObject.html +1 -1
  42. package/docs/classes/gltf-loader.THREEGLTFLoader.html +1 -1
  43. package/docs/classes/line.Line.html +1 -1
  44. package/docs/classes/line.LineGeometry.html +1 -1
  45. package/docs/classes/line.LineMaterial.html +1 -1
  46. package/docs/classes/line.LineSegmentsGeometry.html +1 -1
  47. package/docs/classes/line.THREE_Line2.html +1 -1
  48. package/docs/classes/line.THREE_LineSegments2.html +1 -1
  49. package/docs/classes/plugins.BasePlugin.Controller.html +1 -1
  50. package/docs/classes/plugins.RoundedBoxGeometry.html +1 -1
  51. package/docs/classes/sticker.Sticker.html +1 -1
  52. package/docs/classes/vfx.Airflow.html +1 -1
  53. package/docs/classes/vfx.Flame.html +1 -1
  54. package/docs/classes/vfx.Particle.html +1 -1
  55. package/docs/classes/vfx.ParticleGPU.html +1 -1
  56. package/docs/classes/vfx.SpotLight.html +1 -1
  57. package/docs/functions/five.parseWork.html +1 -1
  58. package/docs/functions/five.workToJson.html +1 -1
  59. package/docs/functions/plugins.DynamicPathLinePlugin.html +1 -0
  60. package/docs/functions/react.withFive.html +1 -1
  61. package/docs/functions/vue.useFiveWorks.html +2 -2
  62. package/docs/hierarchy.html +1 -1
  63. package/docs/interfaces/five.AddableObject.html +1 -1
  64. package/docs/interfaces/five.AjaxOptions.html +1 -1
  65. package/docs/interfaces/five.AnimationFrame.html +3 -2
  66. package/docs/interfaces/five.AnimationFrameContext.html +2 -2
  67. package/docs/interfaces/five.BaseEvent.html +1 -1
  68. package/docs/interfaces/five.EventCallback.html +1 -1
  69. package/docs/interfaces/five.FiveInitArgs.html +3 -3
  70. package/docs/interfaces/five.FiveLoadOptions.html +8 -10
  71. package/docs/interfaces/five.GestureEvent.html +1 -1
  72. package/docs/interfaces/five.ImageOptions.html +1 -1
  73. package/docs/interfaces/five.IntersectEvent.html +1 -1
  74. package/docs/interfaces/five.IntersectMesh.html +2 -2
  75. package/docs/interfaces/five.IntersectMeshInterface.html +1 -1
  76. package/docs/interfaces/five.Intersection.html +1 -1
  77. package/docs/interfaces/five.LoosePanoWork.html +2 -2
  78. package/docs/interfaces/five.LooseWork.html +2 -2
  79. package/docs/interfaces/five.LooseWorkInitial.html +2 -2
  80. package/docs/interfaces/five.LooseWorkModel.html +4 -2
  81. package/docs/interfaces/five.LooseWorkObserver.html +3 -2
  82. package/docs/interfaces/five.LooseWorkPanorama.html +8 -8
  83. package/docs/interfaces/five.LooseWorkWithExtrinsics.html +7 -7
  84. package/docs/interfaces/five.ModeChangeEvent.html +2 -2
  85. package/docs/interfaces/five.ModelControllerCustomInitArgs.html +5 -3
  86. package/docs/interfaces/five.ModelEvent.html +2 -2
  87. package/docs/interfaces/five.ModelOptions.html +11 -0
  88. package/docs/interfaces/five.ModelSceneEvent.html +2 -2
  89. package/docs/interfaces/five.MovePanoOptions.html +9 -7
  90. package/docs/interfaces/five.NetworkAbortError.html +1 -1
  91. package/docs/interfaces/five.NetworkFirbiddenError.html +1 -1
  92. package/docs/interfaces/five.NetworkOptions.html +1 -1
  93. package/docs/interfaces/five.NetworkProxyError.html +1 -1
  94. package/docs/interfaces/five.NetworkResourceEvent.html +2 -2
  95. package/docs/interfaces/five.NetworkResponseError.html +1 -1
  96. package/docs/interfaces/five.NetworkTimeoutError.html +1 -1
  97. package/docs/interfaces/five.ObjectEvent.html +2 -2
  98. package/docs/interfaces/five.PBMMaterial.html +1 -1
  99. package/docs/interfaces/five.PBMMeshMaterialParameters.html +2 -3
  100. package/docs/interfaces/five.PBMPointCloudMaterialParameters.html +2 -3
  101. package/docs/interfaces/five.PanoCircleMeshInterface.html +1 -1
  102. package/docs/interfaces/five.PanoCircleMeshSolidOptions.html +2 -2
  103. package/docs/interfaces/five.PanoEvent.html +1 -1
  104. package/docs/interfaces/five.PanoTextureEvent.html +1 -1
  105. package/docs/interfaces/five.PanoramaControllerCustomInitArgs.html +12 -10
  106. package/docs/interfaces/five.PanoramaLikeControllerCustomInitArgs.html +5 -3
  107. package/docs/interfaces/five.ParameterMaterialValue.html +29 -31
  108. package/docs/interfaces/five.ParameterTilesetValue.html +15 -16
  109. package/docs/interfaces/five.ParameterValue.html +43 -46
  110. package/docs/interfaces/five.Pass.html +9 -0
  111. package/docs/interfaces/five.Pose.html +1 -1
  112. package/docs/interfaces/five.RenderEvent.html +2 -2
  113. package/docs/interfaces/five.ResolvedParameterValue.html +43 -46
  114. package/docs/interfaces/five.State.html +1 -1
  115. package/docs/interfaces/five.StateEvent.html +1 -1
  116. package/docs/interfaces/five.TextureOptions.html +1 -1
  117. package/docs/interfaces/five.TilesetOptions.html +2 -2
  118. package/docs/interfaces/five.TopviewControllerCustomInitArgs.html +7 -3
  119. package/docs/interfaces/five.VRPanoramaControllerCustomInitArgs.html +12 -10
  120. package/docs/interfaces/five.ViewLayer.html +21 -21
  121. package/docs/interfaces/five.WorkCubeImage.html +2 -2
  122. package/docs/interfaces/five.WorkImage.html +5 -3
  123. package/docs/interfaces/five.WorkInitial.html +8 -8
  124. package/docs/interfaces/five.WorkModel.html +11 -7
  125. package/docs/interfaces/five.WorkModelJson.html +3 -2
  126. package/docs/interfaces/five.WorkModelLayer.html +7 -2
  127. package/docs/interfaces/five.WorkModelLayerJson.html +2 -2
  128. package/docs/interfaces/five.WorkObserver.html +21 -22
  129. package/docs/interfaces/five.WorkObserverJson.html +4 -2
  130. package/docs/interfaces/five.WorkPanoramaJson.html +2 -2
  131. package/docs/interfaces/five.WorkPanoramasJson.html +2 -2
  132. package/docs/interfaces/five.WorkTile.html +4 -4
  133. package/docs/interfaces/five.WorkVideo.html +4 -4
  134. package/docs/interfaces/five.WorksEvent.html +2 -3
  135. package/docs/interfaces/five.XRControllerEvent.html +1 -1
  136. package/docs/interfaces/five.XRGestureEvent.html +1 -1
  137. package/docs/interfaces/five.XRPanoramaControllerCustomInitArgs.html +12 -10
  138. package/docs/interfaces/five.XRSessionEvent.html +1 -1
  139. package/docs/interfaces/plugins.BackgroundPluginController.html +1 -1
  140. package/docs/interfaces/plugins.BackgroundPluginType.EventMap.html +1 -1
  141. package/docs/interfaces/plugins.BasePlugin.State.html +1 -1
  142. package/docs/interfaces/plugins.DynamicPathLinePluginController.html +83 -0
  143. package/docs/interfaces/plugins.DynamicPathLinePluginType.Config.html +36 -0
  144. package/docs/interfaces/plugins.DynamicPathLinePluginType.EventMap.html +26 -0
  145. package/docs/interfaces/plugins.DynamicPathLinePluginType.Params.html +6 -0
  146. package/docs/interfaces/plugins.DynamicPathLinePluginType.PathConfig.html +28 -0
  147. package/docs/interfaces/plugins.DynamicPathLinePluginType.State.html +10 -0
  148. package/docs/interfaces/plugins.ItemMaskController.html +1 -1
  149. package/docs/interfaces/plugins.ItemMaskPluginType.EventMap.html +1 -1
  150. package/docs/interfaces/plugins.ItemMaskPluginType.State.html +1 -1
  151. package/docs/interfaces/plugins.OrientationPluginController.html +1 -1
  152. package/docs/interfaces/plugins.OrientationPluginType.EventMap.html +1 -1
  153. package/docs/interfaces/plugins.OrientationPluginType.State.html +1 -1
  154. package/docs/interfaces/plugins.PanoAnimeController.html +1 -1
  155. package/docs/interfaces/plugins.PanoAnimePluginType.EventMap.html +1 -1
  156. package/docs/interfaces/plugins.PanoAnimePluginType.State.html +1 -1
  157. package/docs/interfaces/plugins.PluginTemplateType.EventMap.html +1 -1
  158. package/docs/interfaces/plugins.PluginTemplateType.State.html +1 -1
  159. package/docs/interfaces/plugins.TrajectoryController.html +1 -1
  160. package/docs/interfaces/react.FiveInjectionTypes.html +4 -4
  161. package/docs/modules/five.html +1 -1
  162. package/docs/modules/plugins.DynamicPathLinePluginType.html +1 -0
  163. package/docs/modules/plugins.html +1 -1
  164. package/docs/types/five.AnimationFrameLoopType.html +1 -1
  165. package/docs/types/five.Models.html +4 -4
  166. package/docs/types/five.MovePanoEffect.html +3 -2
  167. package/docs/types/five.ParseOptions.html +6 -6
  168. package/docs/types/five.PostProcessingType.html +1 -1
  169. package/docs/types/five.RequestAnimationFrameArgs.html +1 -0
  170. package/docs/types/five.TilesetFrameState.html +2 -3
  171. package/docs/types/plugins.BasePlugin.EventMap.html +1 -1
  172. package/docs/types/plugins.DynamicPathLinePluginType.PluginData.html +3 -0
  173. package/docs/types/plugins.DynamicPathLinePluginType.ServerData.html +3 -0
  174. package/docs/types/vue.FiveProviderComponent.html +1 -1
  175. package/five/index.d.ts +317 -85
  176. package/five/index.js +299 -198
  177. package/five/index.mjs +13092 -12692
  178. package/gltf-loader/index.js +3 -3
  179. package/gltf-loader/index.mjs +3 -3
  180. package/line/index.js +3 -3
  181. package/line/index.mjs +3 -3
  182. package/package.json +1 -1
  183. package/plugins/index.d.ts +314 -0
  184. package/plugins/index.js +296 -15
  185. package/plugins/index.mjs +2615 -1503
  186. package/react/index.d.ts +1 -1
  187. package/react/index.js +2 -2
  188. package/react/index.mjs +2 -2
  189. package/shader-lib/index.d.ts +24 -1
  190. package/shader-lib/index.js +22 -13
  191. package/shader-lib/index.mjs +408 -171
  192. package/sticker/index.js +3 -3
  193. package/sticker/index.mjs +3 -3
  194. package/umd/five-gltf-loader.js +3 -3
  195. package/umd/five-line.js +3 -3
  196. package/umd/five-plugins.js +296 -15
  197. package/umd/five-react.js +2 -2
  198. package/umd/five-shader-lib.js +22 -13
  199. package/umd/five-sticker.js +3 -3
  200. package/umd/five-vfx.js +2 -2
  201. package/umd/five-vue.js +2 -2
  202. package/umd/five.js +299 -198
  203. package/vfx/index.js +2 -2
  204. package/vfx/index.mjs +2 -2
  205. package/vue/index.d.ts +1 -1
  206. package/vue/index.js +2 -2
  207. package/vue/index.mjs +2 -2
  208. package/work-downloader/index.js +3 -3
  209. package/work-downloader/index.mjs +309 -257
  210. package/docs/interfaces/five.ModelLike.html +0 -3
  211. package/docs/types/five.Tile3dOptions.html +0 -1
@@ -1,8 +1,8 @@
1
1
  /**
2
2
  * @license
3
3
  * @realsee/five
4
- * Generated: 9/26/2025
5
- * Version: 6.7.0-alpha.3
4
+ * Generated: 12/18/2025
5
+ * Version: 6.7.0-alpha.31
6
6
  * Terms:
7
7
  * Realsee SDK License Agreement
8
8
  * Update: July 28, 2021
@@ -252,54 +252,54 @@
252
252
  * No amendment to or modification of this Agreement will be binding unless in
253
253
  * writing and signed by Realsee. You and Realsee hereto confirm that this
254
254
  * Agreement and all related documents shall be drafted in English.
255
- */import { createWriteStream as Q, existsSync as M } from "node:fs";
256
- import { writeFile as X, mkdir as q, readFile as V } from "node:fs/promises";
257
- import { dirname as Y, extname as Z, join as F, resolve as W } from "node:path";
258
- import { Readable as x } from "node:stream";
259
- import ee from "sharp";
260
- function k(n, e, r, a) {
255
+ */import { createWriteStream as Y, existsSync as J } from "node:fs";
256
+ import { writeFile as X, mkdir as H, readFile as Z } from "node:fs/promises";
257
+ import { dirname as x, extname as K, join as _, resolve as M } from "node:path";
258
+ import { Readable as ee } from "node:stream";
259
+ import re from "sharp";
260
+ function U(n, r, e, a) {
261
261
  function i(t) {
262
- return t instanceof r ? t : new r(function(o) {
263
- o(t);
262
+ return t instanceof e ? t : new e(function(u) {
263
+ u(t);
264
264
  });
265
265
  }
266
- return new (r || (r = Promise))(function(t, o) {
267
- function u(c) {
266
+ return new (e || (e = Promise))(function(t, u) {
267
+ function o(c) {
268
268
  try {
269
269
  s(a.next(c));
270
- } catch (l) {
271
- o(l);
270
+ } catch (f) {
271
+ u(f);
272
272
  }
273
273
  }
274
- function f(c) {
274
+ function l(c) {
275
275
  try {
276
276
  s(a.throw(c));
277
- } catch (l) {
278
- o(l);
277
+ } catch (f) {
278
+ u(f);
279
279
  }
280
280
  }
281
281
  function s(c) {
282
- c.done ? t(c.value) : i(c.value).then(u, f);
282
+ c.done ? t(c.value) : i(c.value).then(o, l);
283
283
  }
284
- s((a = a.apply(n, e || [])).next());
284
+ s((a = a.apply(n, r || [])).next());
285
285
  });
286
286
  }
287
- function y(n, e) {
288
- var r = { label: 0, sent: function() {
287
+ function L(n, r) {
288
+ var e = { label: 0, sent: function() {
289
289
  if (t[0] & 1) throw t[1];
290
290
  return t[1];
291
- }, trys: [], ops: [] }, a, i, t, o = Object.create((typeof Iterator == "function" ? Iterator : Object).prototype);
292
- return o.next = u(0), o.throw = u(1), o.return = u(2), typeof Symbol == "function" && (o[Symbol.iterator] = function() {
291
+ }, trys: [], ops: [] }, a, i, t, u = Object.create((typeof Iterator == "function" ? Iterator : Object).prototype);
292
+ return u.next = o(0), u.throw = o(1), u.return = o(2), typeof Symbol == "function" && (u[Symbol.iterator] = function() {
293
293
  return this;
294
- }), o;
295
- function u(s) {
294
+ }), u;
295
+ function o(s) {
296
296
  return function(c) {
297
- return f([s, c]);
297
+ return l([s, c]);
298
298
  };
299
299
  }
300
- function f(s) {
300
+ function l(s) {
301
301
  if (a) throw new TypeError("Generator is already executing.");
302
- for (; o && (o = 0, s[0] && (r = 0)), r; ) try {
302
+ for (; u && (u = 0, s[0] && (e = 0)), e; ) try {
303
303
  if (a = 1, i && (t = s[0] & 2 ? i.return : s[0] ? i.throw || ((t = i.return) && t.call(i), 0) : i.next) && !(t = t.call(i, s[1])).done) return t;
304
304
  switch (i = 0, t && (s = [s[0] & 2, t.value]), s[0]) {
305
305
  case 0:
@@ -307,34 +307,34 @@ function y(n, e) {
307
307
  t = s;
308
308
  break;
309
309
  case 4:
310
- return r.label++, { value: s[1], done: !1 };
310
+ return e.label++, { value: s[1], done: !1 };
311
311
  case 5:
312
- r.label++, i = s[1], s = [0];
312
+ e.label++, i = s[1], s = [0];
313
313
  continue;
314
314
  case 7:
315
- s = r.ops.pop(), r.trys.pop();
315
+ s = e.ops.pop(), e.trys.pop();
316
316
  continue;
317
317
  default:
318
- if (t = r.trys, !(t = t.length > 0 && t[t.length - 1]) && (s[0] === 6 || s[0] === 2)) {
319
- r = 0;
318
+ if (t = e.trys, !(t = t.length > 0 && t[t.length - 1]) && (s[0] === 6 || s[0] === 2)) {
319
+ e = 0;
320
320
  continue;
321
321
  }
322
322
  if (s[0] === 3 && (!t || s[1] > t[0] && s[1] < t[3])) {
323
- r.label = s[1];
323
+ e.label = s[1];
324
324
  break;
325
325
  }
326
- if (s[0] === 6 && r.label < t[1]) {
327
- r.label = t[1], t = s;
326
+ if (s[0] === 6 && e.label < t[1]) {
327
+ e.label = t[1], t = s;
328
328
  break;
329
329
  }
330
- if (t && r.label < t[2]) {
331
- r.label = t[2], r.ops.push(s);
330
+ if (t && e.label < t[2]) {
331
+ e.label = t[2], e.ops.push(s);
332
332
  break;
333
333
  }
334
- t[2] && r.ops.pop(), r.trys.pop();
334
+ t[2] && e.ops.pop(), e.trys.pop();
335
335
  continue;
336
336
  }
337
- s = e.call(n, r);
337
+ s = r.call(n, e);
338
338
  } catch (c) {
339
339
  s = [6, c], i = 0;
340
340
  } finally {
@@ -344,94 +344,110 @@ function y(n, e) {
344
344
  return { value: s[0] ? s[1] : void 0, done: !0 };
345
345
  }
346
346
  }
347
- function U(n, e) {
348
- if (e && e[e.length - 1] !== "/" && (e += "/"), n.length > e.length && n.startsWith(e))
349
- return n.slice(e.length);
350
- throw new Error("".concat(n, " is not starting with ").concat(e));
347
+ function S(n, r) {
348
+ if (r && r[r.length - 1] !== "/" && (r += "/"), n.length > r.length && n.startsWith(r))
349
+ return n.slice(r.length);
350
+ throw new Error("".concat(n, " is not starting with ").concat(r));
351
351
  }
352
- function re() {
353
- for (var n = [], e = 0; e < arguments.length; e++)
354
- n[e] = arguments[e];
355
- var r = [];
356
- n = n.map(function(u) {
357
- return (u != null ? u : "").trim();
358
- }).filter(function(u) {
359
- return u.length > 0 && !/^\/+$/.test(u);
352
+ function ne() {
353
+ for (var n = [], r = 0; r < arguments.length; r++)
354
+ n[r] = arguments[r];
355
+ var e = [];
356
+ n = n.map(function(o) {
357
+ return (o != null ? o : "").trim();
358
+ }).filter(function(o) {
359
+ return o.length > 0 && !/^\/+$/.test(o);
360
360
  });
361
361
  for (var a = 0; a < n.length; a++) {
362
- var i = a === 0, t = a === n.length - 1, o = n[a];
363
- i || (o = o.replace(/^\.\//, "").replace(/^\/+/, "")), t || (o = o.replace(/\/+$/, "")), r.push(o);
362
+ var i = a === 0, t = a === n.length - 1, u = n[a];
363
+ i || (u = u.replace(/^\.\//, "").replace(/^\/+/, "")), t || (u = u.replace(/\/+$/, "")), e.push(u);
364
364
  }
365
- return r.join("/");
365
+ return e.join("/");
366
366
  }
367
- var ne = 1024 * 1024 * 5;
368
- function O(n, e, r) {
369
- return k(this, void 0, void 0, function() {
370
- var a, i, t, o;
371
- return y(this, function(u) {
372
- switch (u.label) {
367
+ var te = 1024 * 1024 * 5;
368
+ function E(n, r, e) {
369
+ return U(this, void 0, void 0, function() {
370
+ var a, i, t, u;
371
+ return L(this, function(o) {
372
+ switch (o.label) {
373
373
  case 0:
374
- return M(e) ? [2, e] : [4, r(n)];
374
+ return J(r) ? [2, r] : [4, e(n)];
375
375
  case 1:
376
- return a = u.sent(), a.ok && a.body ? [4, q(Y(e), { recursive: !0 })] : [3, 6];
376
+ return a = o.sent(), a.ok && a.body ? [4, H(x(r), { recursive: !0 })] : [3, 6];
377
377
  case 2:
378
- return u.sent(), i = Number((o = a.headers.get("content-length")) !== null && o !== void 0 ? o : "Infinity"), i > ne ? [2, new Promise(function(f, s) {
379
- var c = x.fromWeb(a.body), l = Q(e);
380
- c.pipe(l), c.on("error", s), l.on("finish", function() {
381
- return f(e);
378
+ return o.sent(), i = Number((u = a.headers.get("content-length")) !== null && u !== void 0 ? u : "Infinity"), i > te ? [2, new Promise(function(l, s) {
379
+ var c = ee.fromWeb(a.body), f = Y(r);
380
+ c.pipe(f), c.on("error", s), f.on("finish", function() {
381
+ return l(r);
382
382
  });
383
383
  })] : [3, 3];
384
384
  case 3:
385
385
  return [4, a.arrayBuffer()];
386
386
  case 4:
387
- return t = u.sent(), [4, X(e, Buffer.from(t))];
387
+ return t = o.sent(), [4, X(r, Buffer.from(t))];
388
388
  case 5:
389
- return u.sent(), [2, e];
389
+ return o.sent(), [2, r];
390
390
  case 6:
391
391
  throw new Error("url: ".concat(n, "(").concat(a.statusText, ")"));
392
392
  }
393
393
  });
394
394
  });
395
395
  }
396
- function I(n, e) {
397
- return k(this, void 0, void 0, function() {
398
- var r, a, i, t, o, u, f, s, c, l;
399
- return y(this, function(g) {
400
- return r = Z(n).slice(1) || "jpg", a = e.cut, i = e.size, t = e.format, o = t === void 0 ? r : t, u = ee(n), a && (u = u.extract({
396
+ var ae = ["jpg", "png"], ie = 95;
397
+ function G(n, r) {
398
+ var e = K(n).slice(1) || "jpg", a = r.cut, i = r.size, t = r.format, u = t === void 0 ? e : t, o = "";
399
+ if (r.toFilename)
400
+ o = r.toFilename(n, { cut: r.cut, size: r.size, format: r.format });
401
+ else {
402
+ var l = "", s = "", c = u;
403
+ a && (l = a.join("x")), i && (s = "".concat(i, "x")), c === e && !s && !l && (c = ""), o = [n, l, s, c].filter(function(f) {
404
+ return f.length > 0;
405
+ }).join(".");
406
+ }
407
+ return o;
408
+ }
409
+ function B(n, r) {
410
+ return U(this, void 0, void 0, function() {
411
+ var e, a, i, t, u, o, l, s, c;
412
+ return L(this, function(f) {
413
+ return e = K(n).slice(1) || "jpg", a = r.cut, i = r.size, t = r.format, u = t === void 0 ? e : t, o = n, (a || i) && u !== e && ae.includes(u) && (l = G(n, {
414
+ format: u,
415
+ toFilename: r.toFilename
416
+ }), l !== o && J(l) && (o = l)), s = re(o), a && (s = s.extract({
401
417
  left: a[0],
402
418
  top: a[1],
403
419
  width: a[2],
404
420
  height: a[3]
405
- })), i && (u = u.resize(i)), o && (u = u.toFormat(o)), f = "", e.toFilename ? f = e.toFilename(n, { cut: e.cut, size: e.size, format: e.format }) : (s = "", c = "", l = o, a && (s = a.join("x")), i && (c = "".concat(i, "x")), l === r && !c && !s && (l = ""), f = [n, s, c, l].filter(function(d) {
406
- return d.length > 0;
407
- }).join(".")), f !== n && !M(f) ? [2, u.toFile(f).then(function() {
408
- return f;
409
- })] : [2, f];
421
+ })), i && (s = s.resize(i)), s = s.toFormat(u, { quality: ie }), c = G(n, r), c !== n && !J(c) ? [2, s.toFile(c).then(function() {
422
+ return c;
423
+ })] : [2, c];
410
424
  });
411
425
  });
412
426
  }
413
- function H(n) {
414
- var e = [];
415
- if (n.content && (n.content.uri ? e.push(n.content.uri) : n.content.url && e.push(n.content.url)), n.children)
416
- for (var r = 0, a = n.children; r < a.length; r++) {
417
- var i = a[r], t = H(i);
418
- t.length > 0 && e.push.apply(e, t);
427
+ function Q(n) {
428
+ var r = [];
429
+ if (n.content && (n.content.uri ? r.push(n.content.uri) : n.content.url && r.push(n.content.url)), n.children)
430
+ for (var e = 0, a = n.children; e < a.length; e++) {
431
+ var i = a[e], t = Q(i);
432
+ if (t.length > 0)
433
+ for (var u = 0; u < t.length; u++)
434
+ r.push(t[u]);
419
435
  }
420
- return e;
436
+ return r;
421
437
  }
422
- function te(n, e, r) {
423
- return k(this, void 0, void 0, function() {
438
+ function se(n, r, e) {
439
+ return U(this, void 0, void 0, function() {
424
440
  var a, i, t;
425
- return y(this, function(o) {
426
- switch (o.label) {
441
+ return L(this, function(u) {
442
+ switch (u.label) {
427
443
  case 0:
428
- return a = new URL(n, e).href, i = F(r.distPath, U(a, r.baseURL)), t = O(a, i, r.fetch), r.log(function(u) {
429
- return "download: ".concat(a, " -> ").concat(u);
444
+ return a = new URL(n, r).href, i = _(e.distPath, S(a, e.baseURL)), t = E(a, i, e.fetch), e.log(function(o) {
445
+ return "download: ".concat(a, " -> ").concat(o);
430
446
  }, t), [4, t];
431
447
  case 1:
432
- return o.sent(), /\.json$/.test(n) ? [4, K(a, r)] : [3, 3];
448
+ return u.sent(), /\.json$/.test(n) ? [4, V(a, e)] : [3, 3];
433
449
  case 2:
434
- o.sent(), o.label = 3;
450
+ u.sent(), u.label = 3;
435
451
  case 3:
436
452
  return [
437
453
  2
@@ -441,58 +457,58 @@ function te(n, e, r) {
441
457
  });
442
458
  });
443
459
  }
444
- function K(n, e) {
445
- return k(this, void 0, void 0, function() {
446
- var r, a, i, t, o, u, f, s, c, l, g, d, v, m, p, w, h, L, P;
447
- return y(this, function(b) {
448
- switch (b.label) {
460
+ function V(n, r) {
461
+ return U(this, void 0, void 0, function() {
462
+ var e, a, i, t, u, o, l, s, c, f, m, v, p, b, w, d, h, y, k;
463
+ return L(this, function(g) {
464
+ switch (g.label) {
449
465
  case 0:
450
- return r = F(e.distPath, U(n, e.baseURL)), a = O(n, r, e.fetch), e.log(function(z) {
466
+ return e = _(r.distPath, S(n, r.baseURL)), a = E(n, e, r.fetch), r.log(function(z) {
451
467
  return "download: ".concat(n, " -> ").concat(z);
452
468
  }, a), [4, a];
453
469
  case 1:
454
- return b.sent(), o = (t = JSON).parse, [4, V(r, "utf8")];
470
+ return g.sent(), u = (t = JSON).parse, [4, Z(e, "utf8")];
455
471
  case 2:
456
- return i = o.apply(t, [b.sent()]), i.asset.overview ? (u = new URL(i.asset.overview.imageFile, n).href, f = F(e.distPath, U(u, e.baseURL)), s = O(u, f, e.fetch), e.log(function(z) {
457
- return "download: ".concat(u, " -> ").concat(z);
472
+ return i = u.apply(t, [g.sent()]), i.asset.overview ? (o = new URL(i.asset.overview.imageFile, n).href, l = _(r.distPath, S(o, r.baseURL)), s = E(o, l, r.fetch), r.log(function(z) {
473
+ return "download: ".concat(o, " -> ").concat(z);
458
474
  }, s), [4, s]) : [3, 4];
459
475
  case 3:
460
- b.sent(), b.label = 4;
476
+ g.sent(), g.label = 4;
461
477
  case 4:
462
478
  if (!i.asset.trajectories) return [3, 8];
463
479
  c = function(z) {
464
- var R, j, S;
465
- return y(this, function(_) {
466
- switch (_.label) {
480
+ var F, P, R;
481
+ return L(this, function(j) {
482
+ switch (j.label) {
467
483
  case 0:
468
- return R = new URL(z.file, n).href, j = F(e.distPath, U(R, e.baseURL)), S = O(R, j, e.fetch), e.log(function($) {
469
- return "download: ".concat(R, " -> ").concat($);
470
- }, S), [4, S];
484
+ return F = new URL(z.file, n).href, P = _(r.distPath, S(F, r.baseURL)), R = E(F, P, r.fetch), r.log(function(O) {
485
+ return "download: ".concat(F, " -> ").concat(O);
486
+ }, R), [4, R];
471
487
  case 1:
472
- return _.sent(), [
488
+ return j.sent(), [
473
489
  2
474
490
  /*return*/
475
491
  ];
476
492
  }
477
493
  });
478
- }, l = 0, g = i.asset.trajectories.list, b.label = 5;
494
+ }, f = 0, m = i.asset.trajectories.list, g.label = 5;
479
495
  case 5:
480
- return l < g.length ? (d = g[l], [5, c(d)]) : [3, 8];
496
+ return f < m.length ? (v = m[f], [5, c(v)]) : [3, 8];
481
497
  case 6:
482
- b.sent(), b.label = 7;
498
+ g.sent(), g.label = 7;
483
499
  case 7:
484
- return l++, [3, 5];
500
+ return f++, [3, 5];
485
501
  case 8:
486
- v = H(i.root), m = 6, p = 0, b.label = 9;
502
+ p = Q(i.root), b = 6, w = 0, g.label = 9;
487
503
  case 9:
488
- if (!(p < v.length)) return [3, 12];
489
- for (w = [], h = 0; h < m; h++)
490
- L = v[p + h], L && (P = te(L, n, e), w.push(P));
491
- return [4, Promise.all(w)];
504
+ if (!(w < p.length)) return [3, 12];
505
+ for (d = [], h = 0; h < b; h++)
506
+ y = p[w + h], y && (k = se(y, n, r), d.push(k));
507
+ return [4, Promise.all(d)];
492
508
  case 10:
493
- b.sent(), b.label = 11;
509
+ g.sent(), g.label = 11;
494
510
  case 11:
495
- return p += m, [3, 9];
511
+ return w += b, [3, 9];
496
512
  case 12:
497
513
  return [
498
514
  2
@@ -502,59 +518,59 @@ function K(n, e) {
502
518
  });
503
519
  });
504
520
  }
505
- function ae(n, e) {
506
- return k(this, void 0, void 0, function() {
507
- var r, a, i, t, o, w, u, f, s, c, l, g, d, v, m, p, w;
508
- return y(this, function(h) {
521
+ function ue(n, r) {
522
+ return U(this, void 0, void 0, function() {
523
+ var e, a, i, t, u, d, o, l, s, c, f, m, v, p, b, w, d;
524
+ return L(this, function(h) {
509
525
  switch (h.label) {
510
526
  case 0:
511
- return e.log("process model"), n.model ? (r = n.model, a = r.textures, i = r.layers, t = r.file, o = r.textureBase, t ? (e.log("process model file"), w = n.getURL(t), u = F(e.distPath, U(w, e.baseURL)), f = O(w, u, e.fetch), e.log(function(L) {
512
- return "download: ".concat(t, " -> ").concat(L);
513
- }, f), [4, f]) : [3, 5]) : [3, 9];
527
+ return r.log("process model"), n.model ? (e = n.model, a = e.textures, i = e.layers, t = e.file, u = e.textureBase, t ? (r.log("process model file"), d = n.getURL(t), o = _(r.distPath, S(d, r.baseURL)), l = E(d, o, r.fetch), r.log(function(y) {
528
+ return "download: ".concat(t, " -> ").concat(y);
529
+ }, l), [4, l]) : [3, 5]) : [3, 9];
514
530
  case 1:
515
531
  if (h.sent(), !a) return [3, 5];
516
- s = function(L) {
517
- var P, b, z, R, j, S, _, $, A, N, B, G, C;
518
- return y(this, function(J) {
519
- switch (J.label) {
532
+ s = function(y) {
533
+ var k, g, z, F, P, R, j, O, T, $, C, A, D;
534
+ return L(this, function(W) {
535
+ switch (W.label) {
520
536
  case 0:
521
- return P = re(n.getURL(o != null ? o : ""), L), b = F(e.distPath, U(P, e.baseURL)), z = O(P, b, e.fetch), e.log(function(D) {
522
- return "download: ".concat(P, " -> ").concat(D);
537
+ return k = ne(n.getURL(u != null ? u : ""), y), g = _(r.distPath, S(k, r.baseURL)), z = E(k, g, r.fetch), r.log(function(q) {
538
+ return "download: ".concat(k, " -> ").concat(q);
523
539
  }, z), [4, z];
524
540
  case 1:
525
- for (J.sent(), R = e.imageOptions.format, R.length === 0 && R.push(void 0), j = e.imageOptions.size, j.length === 0 && j.push(void 0), S = [], _ = 0, $ = R; _ < $.length; _++)
526
- for (A = $[_], N = 0, B = j; N < B.length; N++)
527
- G = B[N], C = I(b, {
528
- format: A,
529
- size: G,
530
- toFilename: e.imageProcessingFilename
531
- }), e.log(function(D) {
532
- return "imageProcessing: ".concat(b, " -> ").concat(D);
533
- }, C), S.push(C);
534
- return [4, Promise.all(S)];
541
+ for (W.sent(), F = r.imageOptions.format, F.length === 0 && F.push(void 0), P = r.imageOptions.size, P.length === 0 && P.push(void 0), R = [], j = 0, O = F; j < O.length; j++)
542
+ for (T = O[j], $ = 0, C = P; $ < C.length; $++)
543
+ A = C[$], D = B(g, {
544
+ format: T,
545
+ size: A,
546
+ toFilename: r.imageProcessingFilename
547
+ }), r.log(function(q) {
548
+ return "imageProcessing: ".concat(g, " -> ").concat(q);
549
+ }, D), R.push(D);
550
+ return [4, Promise.all(R)];
535
551
  case 2:
536
- return J.sent(), [
552
+ return W.sent(), [
537
553
  2
538
554
  /*return*/
539
555
  ];
540
556
  }
541
557
  });
542
- }, c = 0, l = a, h.label = 2;
558
+ }, c = 0, f = a, h.label = 2;
543
559
  case 2:
544
- return c < l.length ? (g = l[c], [5, s(g)]) : [3, 5];
560
+ return c < f.length ? (m = f[c], [5, s(m)]) : [3, 5];
545
561
  case 3:
546
562
  h.sent(), h.label = 4;
547
563
  case 4:
548
564
  return c++, [3, 2];
549
565
  case 5:
550
566
  if (!i) return [3, 9];
551
- d = 0, v = i, h.label = 6;
567
+ v = 0, p = i, h.label = 6;
552
568
  case 6:
553
- return d < v.length ? (m = v[d], p = m.tileset, e.log("process model layer"), w = n.getURL(p), [4, K(w, e)]) : [3, 9];
569
+ return v < p.length ? (b = p[v], w = b.tileset, r.log("process model layer"), d = n.getURL(w), [4, V(d, r)]) : [3, 9];
554
570
  case 7:
555
571
  h.sent(), h.label = 8;
556
572
  case 8:
557
- return d++, [3, 6];
573
+ return v++, [3, 6];
558
574
  case 9:
559
575
  return [
560
576
  2
@@ -564,43 +580,43 @@ function ae(n, e) {
564
580
  });
565
581
  });
566
582
  }
567
- function E(n, e, r) {
568
- return k(this, void 0, void 0, function() {
569
- var a, i, t, o, u, f, s, c, l, g, d, v, m, p;
570
- return y(this, function(w) {
571
- switch (w.label) {
583
+ function N(n, r, e) {
584
+ return U(this, void 0, void 0, function() {
585
+ var a, i, t, u, o, l, s, c, f, m, v, p, b, w;
586
+ return L(this, function(d) {
587
+ switch (d.label) {
572
588
  case 0:
573
- return a = F(r.distPath, U(n, r.baseURL)), i = O(n, a, r.fetch), r.log(function(h) {
589
+ return a = _(e.distPath, S(n, e.baseURL)), i = E(n, a, e.fetch), e.log(function(h) {
574
590
  return "download: ".concat(n, " -> ").concat(h);
575
591
  }, i), [4, i];
576
592
  case 1:
577
- if (w.sent(), t = Math.pow(2, e.level), o = r.imageOptions.format, o.length === 0 && o.push(void 0), u = [], t > 1)
578
- for (f = 0; f < t; f++)
593
+ if (d.sent(), t = Math.pow(2, r.level), u = e.imageOptions.format, u.length === 0 && u.push(void 0), o = [], t > 1)
594
+ for (l = 0; l < t; l++)
579
595
  for (s = 0; s < t; s++)
580
- for (c = 0, l = o; c < l.length; c++)
581
- g = l[c], d = [
582
- e.size / t * s,
583
- e.size / t * f,
584
- e.size / t,
585
- e.size / t
586
- ], v = e.scale >= 1 ? void 0 : e.scale * e.size / t, m = I(a, {
587
- format: g,
588
- size: v,
589
- cut: d,
590
- toFilename: r.imageProcessingFilename
591
- }), r.log(function(h) {
596
+ for (c = 0, f = u; c < f.length; c++)
597
+ m = f[c], v = [
598
+ r.size / t * s,
599
+ r.size / t * l,
600
+ r.size / t,
601
+ r.size / t
602
+ ], p = r.scale >= 1 ? void 0 : r.scale * r.size / t, b = B(a, {
603
+ format: m,
604
+ size: p,
605
+ cut: v,
606
+ toFilename: e.imageProcessingFilename
607
+ }), e.log(function(h) {
592
608
  return "imageProcessing: ".concat(a, " -> ").concat(h);
593
- }, m), u.push(m), e.level === 1 && e.scale >= 0.5 && (g === "jpg" || /\.jpg$/.test(a)) && (p = I(a, {
594
- format: g,
609
+ }, b), o.push(b), r.level === 1 && r.scale >= 0.5 && (m === "jpg" || /\.jpg$/.test(a)) && (w = B(a, {
610
+ format: m,
595
611
  size: void 0,
596
- cut: d,
597
- toFilename: r.imageProcessingFilename
598
- }), r.log(function(h) {
612
+ cut: v,
613
+ toFilename: e.imageProcessingFilename
614
+ }), e.log(function(h) {
599
615
  return "imageProcessing: ".concat(a, " -> ").concat(h);
600
- }, p), u.push(p));
601
- return [4, Promise.all(u)];
616
+ }, w), o.push(w));
617
+ return [4, Promise.all(o)];
602
618
  case 2:
603
- return w.sent(), [
619
+ return d.sent(), [
604
620
  2
605
621
  /*return*/
606
622
  ];
@@ -608,21 +624,21 @@ function E(n, e, r) {
608
624
  });
609
625
  });
610
626
  }
611
- function ie(n, e) {
612
- return k(this, void 0, void 0, function() {
613
- return y(this, function(r) {
614
- switch (r.label) {
627
+ function oe(n, r) {
628
+ return U(this, void 0, void 0, function() {
629
+ return L(this, function(e) {
630
+ switch (e.label) {
615
631
  case 0:
616
632
  return [4, Promise.all([
617
- E(n.work.getURL(n.front), n, e),
618
- E(n.work.getURL(n.back), n, e),
619
- E(n.work.getURL(n.left), n, e),
620
- E(n.work.getURL(n.right), n, e),
621
- E(n.work.getURL(n.up), n, e),
622
- E(n.work.getURL(n.down), n, e)
633
+ N(n.work.getURL(n.front), n, r),
634
+ N(n.work.getURL(n.back), n, r),
635
+ N(n.work.getURL(n.left), n, r),
636
+ N(n.work.getURL(n.right), n, r),
637
+ N(n.work.getURL(n.up), n, r),
638
+ N(n.work.getURL(n.down), n, r)
623
639
  ])];
624
640
  case 1:
625
- return r.sent(), [
641
+ return e.sent(), [
626
642
  2
627
643
  /*return*/
628
644
  ];
@@ -630,28 +646,64 @@ function ie(n, e) {
630
646
  });
631
647
  });
632
648
  }
633
- function T(n, e) {
634
- return k(this, void 0, void 0, function() {
635
- var r, a, i, t, o, u, f, s, c, l, g, d;
636
- return y(this, function(v) {
637
- switch (v.label) {
649
+ function I(n, r, e) {
650
+ return U(this, void 0, void 0, function() {
651
+ var a, i, t, u, o, l, s, c, f, m, v, p, b, w, d, h;
652
+ return L(this, function(y) {
653
+ switch (y.label) {
638
654
  case 0:
639
- return r = F(e.distPath, U(n, e.baseURL)), a = O(n, r, e.fetch), e.log(function(m) {
640
- return "download: ".concat(n, " -> ").concat(m);
641
- }, a), [4, a];
655
+ return a = _(e.distPath, S(n, e.baseURL)), i = E(n, a, e.fetch), e.log(function(k) {
656
+ return "download: ".concat(n, " -> ").concat(k);
657
+ }, i), [4, i];
642
658
  case 1:
643
- for (v.sent(), i = e.imageOptions.format, i.length === 0 && i.push(void 0), t = e.imageOptions.size, t.length === 0 && t.push(void 0), o = [], u = 0, f = i; u < f.length; u++)
644
- for (s = f[u], c = 0, l = t; c < l.length; c++)
645
- g = l[c], d = I(r, {
646
- format: s,
647
- size: g,
648
- toFilename: e.imageProcessingFilename
649
- }), e.log(function(m) {
650
- return "imageProcessing: ".concat(r, " -> ").concat(m);
651
- }, d), o.push(d);
652
- return [4, Promise.all(o)];
659
+ y.sent(), t = e.imageOptions.format, t.length === 0 && t.push(void 0), u = e.imageOptions.size, u.length === 0 && u.push(void 0), o = function(k) {
660
+ var g, z, F, P, R, j, O;
661
+ return L(this, function(T) {
662
+ switch (T.label) {
663
+ case 0:
664
+ return g = n.replace(/cube\_\d+/, "cube_".concat(k)), z = _(e.distPath, S(g, e.baseURL)), F = E(g, z, e.fetch), e.log(function($) {
665
+ return "download ".concat(g, " -> ").concat(z);
666
+ }, F), [4, F];
667
+ case 1:
668
+ T.sent(), P = 0, R = t, T.label = 2;
669
+ case 2:
670
+ return P < R.length ? (j = R[P], O = B(z, {
671
+ format: j,
672
+ toFilename: e.imageProcessingFilename
673
+ }), e.log(function($) {
674
+ return "imageProcessing: ".concat(z, " -> ").concat($);
675
+ }, O), [4, O]) : [3, 5];
676
+ case 3:
677
+ T.sent(), T.label = 4;
678
+ case 4:
679
+ return P++, [3, 2];
680
+ case 5:
681
+ return [
682
+ 2
683
+ /*return*/
684
+ ];
685
+ }
686
+ });
687
+ }, l = 0, s = r, y.label = 2;
653
688
  case 2:
654
- return v.sent(), [
689
+ return l < s.length ? (c = s[l], [5, o(c)]) : [3, 5];
690
+ case 3:
691
+ y.sent(), y.label = 4;
692
+ case 4:
693
+ return l++, [3, 2];
694
+ case 5:
695
+ for (f = [], m = 0, v = t; m < v.length; m++)
696
+ for (p = v[m], b = 0, w = u; b < w.length; b++)
697
+ d = w[b], h = B(a, {
698
+ format: p,
699
+ size: d,
700
+ toFilename: e.imageProcessingFilename
701
+ }), e.log(function(k) {
702
+ return "imageProcessing: ".concat(a, " -> ").concat(k);
703
+ }, h), f.push(h);
704
+ return [4, Promise.all(f)];
705
+ case 6:
706
+ return y.sent(), [
655
707
  2
656
708
  /*return*/
657
709
  ];
@@ -659,23 +711,23 @@ function T(n, e) {
659
711
  });
660
712
  });
661
713
  }
662
- function se(n, e) {
663
- return k(this, void 0, void 0, function() {
664
- var r;
665
- return y(this, function(a) {
714
+ function ce(n, r) {
715
+ return U(this, void 0, void 0, function() {
716
+ var e;
717
+ return L(this, function(a) {
666
718
  switch (a.label) {
667
719
  case 0:
668
- return r = n.images, [4, Promise.all([
669
- T(r.work.getURL(r.front), e),
670
- T(r.work.getURL(r.back), e),
671
- T(r.work.getURL(r.left), e),
672
- T(r.work.getURL(r.right), e),
673
- T(r.work.getURL(r.up), e),
674
- T(r.work.getURL(r.down), e)
720
+ return e = n.images, [4, Promise.all([
721
+ I(e.work.getURL(e.front), e.sizeList, r),
722
+ I(e.work.getURL(e.back), e.sizeList, r),
723
+ I(e.work.getURL(e.left), e.sizeList, r),
724
+ I(e.work.getURL(e.right), e.sizeList, r),
725
+ I(e.work.getURL(e.up), e.sizeList, r),
726
+ I(e.work.getURL(e.down), e.sizeList, r)
675
727
  ])];
676
728
  case 1:
677
- return a.sent(), r.tiles ? [4, Promise.all(r.tiles.map(function(i) {
678
- return ie(i, e);
729
+ return a.sent(), e.tiles ? [4, Promise.all(e.tiles.map(function(i) {
730
+ return oe(i, r);
679
731
  }))] : [3, 3];
680
732
  case 2:
681
733
  a.sent(), a.label = 3;
@@ -688,17 +740,17 @@ function se(n, e) {
688
740
  });
689
741
  });
690
742
  }
691
- function oe(n, e) {
692
- return k(this, void 0, void 0, function() {
693
- var r, a, i, t, o;
694
- return y(this, function(u) {
695
- switch (u.label) {
743
+ function le(n, r) {
744
+ return U(this, void 0, void 0, function() {
745
+ var e, a, i, t, u;
746
+ return L(this, function(o) {
747
+ switch (o.label) {
696
748
  case 0:
697
- r = n.observers, a = 0, i = r, u.label = 1;
749
+ e = n.observers, a = 0, i = e, o.label = 1;
698
750
  case 1:
699
- return a < i.length ? (t = i[a], o = se(t, e), e.log("process observer #".concat(t.index, " derived: ").concat(t.derivedIdStr), o), [4, o]) : [3, 4];
751
+ return a < i.length ? (t = i[a], u = ce(t, r), r.log("process observer #".concat(t.index, " derived: ").concat(t.derivedIdStr), u), [4, u]) : [3, 4];
700
752
  case 2:
701
- u.sent(), u.label = 3;
753
+ o.sent(), o.label = 3;
702
754
  case 3:
703
755
  return a++, [3, 1];
704
756
  case 4:
@@ -710,12 +762,12 @@ function oe(n, e) {
710
762
  });
711
763
  });
712
764
  }
713
- function ue(n, e) {
714
- if (e) {
715
- var r = Date.now();
716
- e.then(function(i) {
717
- var t = Date.now() - r, o = typeof n == "function" ? n(i) : n;
718
- console.log(o + "(".concat(t, "ms)"));
765
+ function fe(n, r) {
766
+ if (r) {
767
+ var e = Date.now();
768
+ r.then(function(i) {
769
+ var t = Date.now() - e, u = typeof n == "function" ? n(i) : n;
770
+ console.log(u + "(".concat(t, "ms)"));
719
771
  }).catch(function() {
720
772
  });
721
773
  } else {
@@ -723,42 +775,42 @@ function ue(n, e) {
723
775
  console.log(a);
724
776
  }
725
777
  }
726
- function ge(n) {
727
- return k(this, arguments, void 0, function(e, r) {
728
- var a, i, t, o, u, f, s, c, l, g, d, v, m, p, w;
729
- return r === void 0 && (r = {}), y(this, function(h) {
778
+ function be(n) {
779
+ return U(this, arguments, void 0, function(r, e) {
780
+ var a, i, t, u, o, l, s, c, f, m, v, p, b, w, d;
781
+ return e === void 0 && (e = {}), L(this, function(h) {
730
782
  switch (h.label) {
731
783
  case 0:
732
- if (a = e.baseURL, i = "", r.distPath)
733
- i = W(process.cwd(), r.distPath);
784
+ if (a = r.baseURL, i = "", e.distPath)
785
+ i = M(process.cwd(), e.distPath);
734
786
  else
735
- for (i = W(process.cwd(), (f = e.workCode) !== null && f !== void 0 ? f : "work-".concat(Date.now())); M(i); )
736
- /.-(\d+)$/.test(i) ? i = i.replace(/.-(\d+)$/, function(L, P) {
737
- return "-" + (Number(P) + 1);
787
+ for (i = M(process.cwd(), (l = r.workCode) !== null && l !== void 0 ? l : "work-".concat(Date.now())); J(i); )
788
+ /.-(\d+)$/.test(i) ? i = i.replace(/.-(\d+)$/, function(y, k) {
789
+ return "-" + (Number(k) + 1);
738
790
  }) : i = i + "-1";
739
791
  return t = {
740
792
  baseURL: a,
741
793
  distPath: i,
742
- fetch: (s = r.fetch) !== null && s !== void 0 ? s : fetch,
794
+ fetch: (s = e.fetch) !== null && s !== void 0 ? s : fetch,
743
795
  imageOptions: {
744
- size: (l = (c = r.imageOptions) === null || c === void 0 ? void 0 : c.size) !== null && l !== void 0 ? l : [],
745
- format: (d = (g = r.imageOptions) === null || g === void 0 ? void 0 : g.format) !== null && d !== void 0 ? d : []
796
+ size: (f = (c = e.imageOptions) === null || c === void 0 ? void 0 : c.size) !== null && f !== void 0 ? f : [],
797
+ format: (v = (m = e.imageOptions) === null || m === void 0 ? void 0 : m.format) !== null && v !== void 0 ? v : []
746
798
  },
747
799
  textureOptions: {
748
- size: (m = (v = r.textureOptions) === null || v === void 0 ? void 0 : v.size) !== null && m !== void 0 ? m : [],
749
- format: (w = (p = r.textureOptions) === null || p === void 0 ? void 0 : p.format) !== null && w !== void 0 ? w : []
800
+ size: (b = (p = e.textureOptions) === null || p === void 0 ? void 0 : p.size) !== null && b !== void 0 ? b : [],
801
+ format: (d = (w = e.textureOptions) === null || w === void 0 ? void 0 : w.format) !== null && d !== void 0 ? d : []
750
802
  },
751
- log: r.log ? ue : (function() {
803
+ log: e.log ? fe : (function() {
752
804
  return Promise.resolve();
753
805
  }),
754
- imageProcessingFilename: r.imageProcessingFilename
755
- }, t.log(JSON.stringify(t, null, " ")), [4, q(i, { recursive: !0 })];
806
+ imageProcessingFilename: e.imageProcessingFilename
807
+ }, t.log(JSON.stringify(t, null, " ")), [4, H(i, { recursive: !0 })];
756
808
  case 1:
757
- return h.sent(), o = "work.json", u = W(i, o), [4, X(u, JSON.stringify(e.toJSON(), null, " "))];
809
+ return h.sent(), u = "work.json", o = M(i, u), [4, X(o, JSON.stringify(r.toJSON(), null, " "))];
758
810
  case 2:
759
- return h.sent(), [4, oe(e, t)];
811
+ return h.sent(), [4, le(r, t)];
760
812
  case 3:
761
- return h.sent(), [4, ae(e, t)];
813
+ return h.sent(), [4, ue(r, t)];
762
814
  case 4:
763
815
  return h.sent(), [
764
816
  2
@@ -769,5 +821,5 @@ function ge(n) {
769
821
  });
770
822
  }
771
823
  export {
772
- ge as download
824
+ be as download
773
825
  };