@realsee/five 6.6.0-alpha.5 → 6.6.0-alpha.7

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 (79) hide show
  1. package/docs/classes/five.Fetcher.html +2 -2
  2. package/docs/classes/five.Five.html +30 -30
  3. package/docs/classes/five.NetworkSubscribe.html +1 -1
  4. package/docs/classes/five.Tileset.html +1 -1
  5. package/docs/classes/five.Work.html +2 -2
  6. package/docs/classes/plugins.BasePlugin.Controller.html +5 -5
  7. package/docs/interfaces/five.AddableObject.html +3 -3
  8. package/docs/interfaces/five.AjaxOptions.html +5 -5
  9. package/docs/interfaces/five.FiveInitArgs.html +2 -2
  10. package/docs/interfaces/five.FiveLoadOptions.html +1 -1
  11. package/docs/interfaces/five.ImageOptions.html +1 -1
  12. package/docs/interfaces/five.ModelLike.html +2 -2
  13. package/docs/interfaces/five.NetworkAbortError.html +1 -1
  14. package/docs/interfaces/five.NetworkFirbiddenError.html +1 -1
  15. package/docs/interfaces/five.NetworkOptions.html +4 -4
  16. package/docs/interfaces/five.NetworkProxyError.html +1 -1
  17. package/docs/interfaces/five.NetworkResponseError.html +2 -2
  18. package/docs/interfaces/five.NetworkTimeoutError.html +1 -1
  19. package/docs/interfaces/five.PanoCircleMeshInterface.html +3 -3
  20. package/docs/interfaces/five.TextureOptions.html +1 -1
  21. package/docs/interfaces/five.TilesetHeader.html +2 -2
  22. package/docs/interfaces/plugins.BackgroundPluginController.html +4 -4
  23. package/docs/interfaces/plugins.BackgroundPluginType.EventMap.html +3 -3
  24. package/docs/interfaces/plugins.ItemMaskController.html +4 -4
  25. package/docs/interfaces/plugins.OrientationPluginController.html +3 -3
  26. package/docs/interfaces/plugins.PanoAnimeController.html +4 -4
  27. package/docs/interfaces/plugins.TrajectoryController.html +5 -5
  28. package/docs/interfaces/react.FiveInjectionTypes.html +10 -10
  29. package/docs/types/five.AjaxResponseType.html +1 -1
  30. package/docs/types/five.AjaxResponseTypeMapping.html +1 -1
  31. package/docs/types/five.EventTypes.html +1 -1
  32. package/docs/types/five.Mode.html +1 -1
  33. package/docs/types/five.Models.html +1 -1
  34. package/docs/types/five.NetWorkMeta.html +2 -2
  35. package/docs/types/five.NetworkError.html +1 -1
  36. package/docs/types/five.NetworkErrorCallback.html +1 -1
  37. package/docs/types/five.NetworkProgressCallback.html +1 -1
  38. package/docs/types/five.NetworkResponse.html +2 -2
  39. package/docs/types/five.NetworkState.html +1 -1
  40. package/docs/types/five.NetworkSuccessCallback.html +1 -1
  41. package/docs/types/five.NetworkType.html +1 -1
  42. package/docs/types/five.SubscribeEventMap.html +1 -1
  43. package/docs/types/plugins.PanoAnimePluginType.PluginData.html +1 -1
  44. package/docs/types/plugins.PanoAnimePluginType.ServerData.html +1 -1
  45. package/docs/types/react.StoreActionMapType.html +1 -1
  46. package/docs/types/vue.FiveModelIntersectRaycaster.html +1 -1
  47. package/docs/types/vue.Project2d.html +1 -1
  48. package/docs/variables/five.controllersDefaultInitArgs.html +1 -1
  49. package/docs/variables/react.useFiveScene.html +1 -1
  50. package/five/index.js +49 -49
  51. package/five/index.mjs +1734 -1739
  52. package/gltf-loader/index.js +3 -3
  53. package/gltf-loader/index.mjs +3 -3
  54. package/line/index.js +3 -3
  55. package/line/index.mjs +3 -3
  56. package/package.json +2 -2
  57. package/plugins/index.js +2 -2
  58. package/plugins/index.mjs +2 -2
  59. package/react/index.js +2 -2
  60. package/react/index.mjs +2 -2
  61. package/shader-lib/index.js +2 -2
  62. package/shader-lib/index.mjs +2 -2
  63. package/sticker/index.js +3 -3
  64. package/sticker/index.mjs +3 -3
  65. package/umd/five-gltf-loader.js +3 -3
  66. package/umd/five-line.js +3 -3
  67. package/umd/five-plugins.js +2 -2
  68. package/umd/five-react.js +2 -2
  69. package/umd/five-shader-lib.js +2 -2
  70. package/umd/five-sticker.js +3 -3
  71. package/umd/five-vfx.js +2 -2
  72. package/umd/five-vue.js +2 -2
  73. package/umd/five.js +49 -49
  74. package/vfx/index.js +2 -2
  75. package/vfx/index.mjs +2 -2
  76. package/vue/index.js +2 -2
  77. package/vue/index.mjs +2 -2
  78. package/work-downloader/index.js +3 -3
  79. package/work-downloader/index.mjs +94 -87
package/vfx/index.js CHANGED
@@ -1,8 +1,8 @@
1
1
  /**
2
2
  * @license
3
3
  * @realsee/five
4
- * Generated: 8/26/2025
5
- * Version: 6.6.0-alpha.5
4
+ * Generated: 9/1/2025
5
+ * Version: 6.6.0-alpha.7
6
6
  * Terms:
7
7
  * Realsee SDK License Agreement
8
8
  * Update: July 28, 2021
package/vfx/index.mjs CHANGED
@@ -1,8 +1,8 @@
1
1
  /**
2
2
  * @license
3
3
  * @realsee/five
4
- * Generated: 8/26/2025
5
- * Version: 6.6.0-alpha.5
4
+ * Generated: 9/1/2025
5
+ * Version: 6.6.0-alpha.7
6
6
  * Terms:
7
7
  * Realsee SDK License Agreement
8
8
  * Update: July 28, 2021
package/vue/index.js CHANGED
@@ -1,8 +1,8 @@
1
1
  /**
2
2
  * @license
3
3
  * @realsee/five
4
- * Generated: 8/26/2025
5
- * Version: 6.6.0-alpha.5
4
+ * Generated: 9/1/2025
5
+ * Version: 6.6.0-alpha.7
6
6
  * Terms:
7
7
  * Realsee SDK License Agreement
8
8
  * Update: July 28, 2021
package/vue/index.mjs CHANGED
@@ -1,8 +1,8 @@
1
1
  /**
2
2
  * @license
3
3
  * @realsee/five
4
- * Generated: 8/26/2025
5
- * Version: 6.6.0-alpha.5
4
+ * Generated: 9/1/2025
5
+ * Version: 6.6.0-alpha.7
6
6
  * Terms:
7
7
  * Realsee SDK License Agreement
8
8
  * Update: July 28, 2021
@@ -1,8 +1,8 @@
1
1
  /**
2
2
  * @license
3
3
  * @realsee/five
4
- * Generated: 8/26/2025
5
- * Version: 6.6.0-alpha.5
4
+ * Generated: 9/1/2025
5
+ * Version: 6.6.0-alpha.7
6
6
  * Terms:
7
7
  * Realsee SDK License Agreement
8
8
  * Update: July 28, 2021
@@ -252,4 +252,4 @@
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
- */"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const q=require("node:fs"),N=require("node:fs/promises"),y=require("node:path"),H=require("node:stream"),K=require("sharp");function P(n,e,r,i){function a(t){return t instanceof r?t:new r(function(o){o(t)})}return new(r||(r=Promise))(function(t,o){function u(c){try{s(i.next(c))}catch(f){o(f)}}function l(c){try{s(i.throw(c))}catch(f){o(f)}}function s(c){c.done?t(c.value):a(c.value).then(u,l)}s((i=i.apply(n,e||[])).next())})}function k(n,e){var r={label:0,sent:function(){if(t[0]&1)throw t[1];return t[1]},trys:[],ops:[]},i,a,t,o=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return o.next=u(0),o.throw=u(1),o.return=u(2),typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function u(s){return function(c){return l([s,c])}}function l(s){if(i)throw new TypeError("Generator is already executing.");for(;o&&(o=0,s[0]&&(r=0)),r;)try{if(i=1,a&&(t=s[0]&2?a.return:s[0]?a.throw||((t=a.return)&&t.call(a),0):a.next)&&!(t=t.call(a,s[1])).done)return t;switch(a=0,t&&(s=[s[0]&2,t.value]),s[0]){case 0:case 1:t=s;break;case 4:return r.label++,{value:s[1],done:!1};case 5:r.label++,a=s[1],s=[0];continue;case 7:s=r.ops.pop(),r.trys.pop();continue;default:if(t=r.trys,!(t=t.length>0&&t[t.length-1])&&(s[0]===6||s[0]===2)){r=0;continue}if(s[0]===3&&(!t||s[1]>t[0]&&s[1]<t[3])){r.label=s[1];break}if(s[0]===6&&r.label<t[1]){r.label=t[1],t=s;break}if(t&&r.label<t[2]){r.label=t[2],r.ops.push(s);break}t[2]&&r.ops.pop(),r.trys.pop();continue}s=e.call(n,r)}catch(c){s=[6,c],a=0}finally{i=t=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}}function F(n,e){if(e&&e[e.length-1]!=="/"&&(e+="/"),n.length>e.length&&n.startsWith(e))return n.slice(e.length);throw new Error("".concat(n," is not starting with ").concat(e))}function Q(){for(var n=[],e=0;e<arguments.length;e++)n[e]=arguments[e];var r=[];n=n.map(function(u){return(u!=null?u:"").trim()}).filter(function(u){return u.length>0&&!/^\/+$/.test(u)});for(var i=0;i<n.length;i++){var a=i===0,t=i===n.length-1,o=n[i];a||(o=o.replace(/^\.\//,"").replace(/^\/+/,"")),t||(o=o.replace(/\/+$/,"")),r.push(o)}return r.join("/")}var V=1024*1024*5;function U(n,e,r){return P(this,void 0,void 0,function(){var i,a,t,o;return k(this,function(u){switch(u.label){case 0:return q.existsSync(e)?[2,e]:[4,r(n)];case 1:return i=u.sent(),i.ok&&i.body?[4,N.mkdir(y.dirname(e),{recursive:!0})]:[3,6];case 2:return u.sent(),a=Number((o=i.headers.get("content-length"))!==null&&o!==void 0?o:"Infinity"),a>V?[2,new Promise(function(l,s){var c=H.Readable.fromWeb(i.body),f=q.createWriteStream(e);c.pipe(f),c.on("error",s),f.on("finish",function(){return l(e)})})]:[3,3];case 3:return[4,i.arrayBuffer()];case 4:return t=u.sent(),[4,N.writeFile(e,Buffer.from(t))];case 5:return u.sent(),[2,e];case 6:throw new Error("url: ".concat(n,"(").concat(i.statusText,")"))}})})}function M(n,e){return P(this,void 0,void 0,function(){var r,i,a,t,o,u,l,s,c,f;return k(this,function(v){return r=y.extname(n).slice(1)||"jpg",i=e.cut,a=e.size,t=e.format,o=t===void 0?r:t,u=K(n),i&&(u=u.extract({left:i[0],top:i[1],width:i[2],height:i[3]})),a&&(u=u.resize(a)),o&&(u=u.toFormat(o)),l="",e.toFilename?l=e.toFilename(n,{cut:e.cut,size:e.size,format:e.format}):(s="",c="",f=o,i&&(s=i.join("x")),a&&(c="".concat(a,"x")),f===r&&!c&&!s&&(f=""),l=[n,s,c,f].filter(function(h){return h.length>0}).join(".")),l!==n&&!q.existsSync(l)?[2,u.toFile(l).then(function(){return l})]:[2,l]})})}function G(n){var e=[];if(n.content&&(n.content.uri?e.push(n.content.uri):n.content.url&&e.push(n.content.url)),n.children)for(var r=0,i=n.children;r<i.length;r++){var a=i[r],t=G(a);t.length>0&&e.push.apply(e,t)}return e}function Y(n,e,r){return P(this,void 0,void 0,function(){var i,a,t;return k(this,function(o){switch(o.label){case 0:return i=new URL(n,e).href,a=y.join(r.distPath,F(i,r.baseURL)),t=U(i,a,r.fetch),r.log(function(u){return"download: ".concat(i," -> ").concat(u)},t),[4,t];case 1:return o.sent(),/\.json$/.test(n)?[4,X(i,r)]:[3,3];case 2:o.sent(),o.label=3;case 3:return[2]}})})}function X(n,e){return P(this,void 0,void 0,function(){var r,i,a,t,o,u,l,s,c,f,v,h,d,m,p,w,g,L,j;return k(this,function(b){switch(b.label){case 0:return r=y.join(e.distPath,F(n,e.baseURL)),i=U(n,r,e.fetch),e.log(function(R){return"download: ".concat(n," -> ").concat(R)},i),[4,i];case 1:return b.sent(),o=(t=JSON).parse,[4,N.readFile(r,"utf8")];case 2:return a=o.apply(t,[b.sent()]),a.asset.overview?(u=new URL(a.asset.overview.imageFile,n).href,l=y.join(e.distPath,F(u,e.baseURL)),s=U(u,l,e.fetch),e.log(function(R){return"download: ".concat(u," -> ").concat(R)},s),[4,s]):[3,4];case 3:b.sent(),b.label=4;case 4:if(!a.asset.trajectories)return[3,8];c=function(R){var z,O,S;return k(this,function(_){switch(_.label){case 0:return z=new URL(R.file,n).href,O=y.join(e.distPath,F(z,e.baseURL)),S=U(z,O,e.fetch),e.log(function($){return"download: ".concat(z," -> ").concat($)},S),[4,S];case 1:return _.sent(),[2]}})},f=0,v=a.asset.trajectories.list,b.label=5;case 5:return f<v.length?(h=v[f],[5,c(h)]):[3,8];case 6:b.sent(),b.label=7;case 7:return f++,[3,5];case 8:d=G(a.root),m=6,p=0,b.label=9;case 9:if(!(p<d.length))return[3,12];for(w=[],g=0;g<m;g++)L=d[p+g],L&&(j=Y(L,n,e),w.push(j));return[4,Promise.all(w)];case 10:b.sent(),b.label=11;case 11:return p+=m,[3,9];case 12:return[2]}})})}function Z(n,e){return P(this,void 0,void 0,function(){var r,i,a,t,o,w,u,l,s,c,f,v,h,d,m,p,w;return k(this,function(g){switch(g.label){case 0:return e.log("process model"),n.model?(r=n.model,i=r.textures,a=r.layers,t=r.file,o=r.textureBase,t?(e.log("process model file"),w=n.getURL(t),u=y.join(e.distPath,F(w,e.baseURL)),l=U(w,u,e.fetch),e.log(function(L){return"download: ".concat(t," -> ").concat(L)},l),[4,l]):[3,5]):[3,9];case 1:if(g.sent(),!i)return[3,5];s=function(L){var j,b,R,z,O,S,_,$,W,I,B,A,C;return k(this,function(J){switch(J.label){case 0:return j=Q(n.getURL(o!=null?o:""),L),b=y.join(e.distPath,F(j,e.baseURL)),R=U(j,b,e.fetch),e.log(function(D){return"download: ".concat(j," -> ").concat(D)},R),[4,R];case 1:for(J.sent(),z=e.imageOptions.format,z.length===0&&z.push(void 0),O=e.imageOptions.size,O.length===0&&O.push(void 0),S=[],_=0,$=z;_<$.length;_++)for(W=$[_],I=0,B=O;I<B.length;I++)A=B[I],C=M(b,{format:W,size:A,toFilename:e.imageProcessingFilename}),e.log(function(D){return"imageProcessing: ".concat(b," -> ").concat(D)},C),S.push(C);return[4,Promise.all(S)];case 2:return J.sent(),[2]}})},c=0,f=i,g.label=2;case 2:return c<f.length?(v=f[c],[5,s(v)]):[3,5];case 3:g.sent(),g.label=4;case 4:return c++,[3,2];case 5:if(!a)return[3,9];h=0,d=a,g.label=6;case 6:return h<d.length?(m=d[h],p=m.tileset,e.log("process model layer"),w=n.getURL(p),[4,X(w,e)]):[3,9];case 7:g.sent(),g.label=8;case 8:return h++,[3,6];case 9:return[2]}})})}function T(n,e,r){return P(this,void 0,void 0,function(){var i,a,t,o,u,l,s,c,f,v,h,d,m;return k(this,function(p){switch(p.label){case 0:return i=y.join(r.distPath,F(n,r.baseURL)),a=U(n,i,r.fetch),r.log(function(w){return"download: ".concat(n," -> ").concat(w)},a),[4,a];case 1:if(p.sent(),t=Math.pow(2,e.level),o=r.imageOptions.format,o.length===0&&o.push(void 0),u=[],t>1)for(l=0;l<t;l++)for(s=0;s<t;s++)for(c=0,f=o;c<f.length;c++)v=f[c],h=[e.size/t*s,e.size/t*l,e.size/t,e.size/t],d=e.scale>=1?void 0:e.scale*e.size/t,e.level===1&&e.scale>=.5&&(v==="jpg"||/\.jpg$/.test(i))&&(d=void 0),m=M(i,{format:v,size:d,cut:h,toFilename:r.imageProcessingFilename}),r.log(function(w){return"imageProcessing: ".concat(i," -> ").concat(w)},m),u.push(m);return[4,Promise.all(u)];case 2:return p.sent(),[2]}})})}function x(n,e){return P(this,void 0,void 0,function(){return k(this,function(r){switch(r.label){case 0:return[4,Promise.all([T(n.work.getURL(n.front),n,e),T(n.work.getURL(n.back),n,e),T(n.work.getURL(n.left),n,e),T(n.work.getURL(n.right),n,e),T(n.work.getURL(n.up),n,e),T(n.work.getURL(n.down),n,e)])];case 1:return r.sent(),[2]}})})}function E(n,e){return P(this,void 0,void 0,function(){var r,i,a,t,o,u,l,s,c,f,v,h;return k(this,function(d){switch(d.label){case 0:return r=y.join(e.distPath,F(n,e.baseURL)),i=U(n,r,e.fetch),e.log(function(m){return"download: ".concat(n," -> ").concat(m)},i),[4,i];case 1:for(d.sent(),a=e.imageOptions.format,a.length===0&&a.push(void 0),t=e.imageOptions.size,t.length===0&&t.push(void 0),o=[],u=0,l=a;u<l.length;u++)for(s=l[u],c=0,f=t;c<f.length;c++)v=f[c],h=M(r,{format:s,size:v,toFilename:e.imageProcessingFilename}),e.log(function(m){return"imageProcessing: ".concat(r," -> ").concat(m)},h),o.push(h);return[4,Promise.all(o)];case 2:return d.sent(),[2]}})})}function ee(n,e){return P(this,void 0,void 0,function(){var r;return k(this,function(i){switch(i.label){case 0:return r=n.images,[4,Promise.all([E(r.work.getURL(r.front),e),E(r.work.getURL(r.back),e),E(r.work.getURL(r.left),e),E(r.work.getURL(r.right),e),E(r.work.getURL(r.up),e),E(r.work.getURL(r.down),e)])];case 1:return i.sent(),r.tiles?[4,Promise.all(r.tiles.map(function(a){return x(a,e)}))]:[3,3];case 2:i.sent(),i.label=3;case 3:return[2]}})})}function re(n,e){return P(this,void 0,void 0,function(){var r,i,a,t,o;return k(this,function(u){switch(u.label){case 0:r=n.observers,i=0,a=r,u.label=1;case 1:return i<a.length?(t=a[i],o=ee(t,e),e.log("process observer #".concat(t.index," derived: ").concat(t.derivedIdStr),o),[4,o]):[3,4];case 2:u.sent(),u.label=3;case 3:return i++,[3,1];case 4:return[2]}})})}function ne(n,e){if(e){var r=Date.now();e.then(function(a){var t=Date.now()-r,o=typeof n=="function"?n(a):n;console.log(o+"(".concat(t,"ms)"))}).catch(function(){})}else{var i=typeof n=="function"?n(null):n;console.log(i)}}function te(n){return P(this,arguments,void 0,function(e,r){var i,a,t,o,u,l,s,c,f,v,h,d,m,p,w;return r===void 0&&(r={}),k(this,function(g){switch(g.label){case 0:if(i=e.baseURL,a="",r.distPath)a=y.resolve(process.cwd(),r.distPath);else for(a=y.resolve(process.cwd(),(l=e.workCode)!==null&&l!==void 0?l:"work-".concat(Date.now()));q.existsSync(a);)/.-(\d+)$/.test(a)?a=a.replace(/.-(\d+)$/,function(L,j){return"-"+(Number(j)+1)}):a=a+"-1";return t={baseURL:i,distPath:a,fetch:(s=r.fetch)!==null&&s!==void 0?s:fetch,imageOptions:{size:(f=(c=r.imageOptions)===null||c===void 0?void 0:c.size)!==null&&f!==void 0?f:[],format:(h=(v=r.imageOptions)===null||v===void 0?void 0:v.format)!==null&&h!==void 0?h:[]},textureOptions:{size:(m=(d=r.textureOptions)===null||d===void 0?void 0:d.size)!==null&&m!==void 0?m:[],format:(w=(p=r.textureOptions)===null||p===void 0?void 0:p.format)!==null&&w!==void 0?w:[]},log:r.log?ne:(function(){return Promise.resolve()}),imageProcessingFilename:r.imageProcessingFilename},t.log(JSON.stringify(t,null," ")),[4,N.mkdir(a,{recursive:!0})];case 1:return g.sent(),o="work.json",u=y.resolve(a,o),[4,N.writeFile(u,JSON.stringify(e.toJSON(),null," "))];case 2:return g.sent(),[4,re(e,t)];case 3:return g.sent(),[4,Z(e,t)];case 4:return g.sent(),[2]}})})}exports.download=te;
255
+ */"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const q=require("node:fs"),N=require("node:fs/promises"),y=require("node:path"),H=require("node:stream"),K=require("sharp");function P(n,e,r,i){function a(t){return t instanceof r?t:new r(function(o){o(t)})}return new(r||(r=Promise))(function(t,o){function u(c){try{s(i.next(c))}catch(f){o(f)}}function l(c){try{s(i.throw(c))}catch(f){o(f)}}function s(c){c.done?t(c.value):a(c.value).then(u,l)}s((i=i.apply(n,e||[])).next())})}function k(n,e){var r={label:0,sent:function(){if(t[0]&1)throw t[1];return t[1]},trys:[],ops:[]},i,a,t,o=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return o.next=u(0),o.throw=u(1),o.return=u(2),typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function u(s){return function(c){return l([s,c])}}function l(s){if(i)throw new TypeError("Generator is already executing.");for(;o&&(o=0,s[0]&&(r=0)),r;)try{if(i=1,a&&(t=s[0]&2?a.return:s[0]?a.throw||((t=a.return)&&t.call(a),0):a.next)&&!(t=t.call(a,s[1])).done)return t;switch(a=0,t&&(s=[s[0]&2,t.value]),s[0]){case 0:case 1:t=s;break;case 4:return r.label++,{value:s[1],done:!1};case 5:r.label++,a=s[1],s=[0];continue;case 7:s=r.ops.pop(),r.trys.pop();continue;default:if(t=r.trys,!(t=t.length>0&&t[t.length-1])&&(s[0]===6||s[0]===2)){r=0;continue}if(s[0]===3&&(!t||s[1]>t[0]&&s[1]<t[3])){r.label=s[1];break}if(s[0]===6&&r.label<t[1]){r.label=t[1],t=s;break}if(t&&r.label<t[2]){r.label=t[2],r.ops.push(s);break}t[2]&&r.ops.pop(),r.trys.pop();continue}s=e.call(n,r)}catch(c){s=[6,c],a=0}finally{i=t=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}}function F(n,e){if(e&&e[e.length-1]!=="/"&&(e+="/"),n.length>e.length&&n.startsWith(e))return n.slice(e.length);throw new Error("".concat(n," is not starting with ").concat(e))}function Q(){for(var n=[],e=0;e<arguments.length;e++)n[e]=arguments[e];var r=[];n=n.map(function(u){return(u!=null?u:"").trim()}).filter(function(u){return u.length>0&&!/^\/+$/.test(u)});for(var i=0;i<n.length;i++){var a=i===0,t=i===n.length-1,o=n[i];a||(o=o.replace(/^\.\//,"").replace(/^\/+/,"")),t||(o=o.replace(/\/+$/,"")),r.push(o)}return r.join("/")}var V=1024*1024*5;function U(n,e,r){return P(this,void 0,void 0,function(){var i,a,t,o;return k(this,function(u){switch(u.label){case 0:return q.existsSync(e)?[2,e]:[4,r(n)];case 1:return i=u.sent(),i.ok&&i.body?[4,N.mkdir(y.dirname(e),{recursive:!0})]:[3,6];case 2:return u.sent(),a=Number((o=i.headers.get("content-length"))!==null&&o!==void 0?o:"Infinity"),a>V?[2,new Promise(function(l,s){var c=H.Readable.fromWeb(i.body),f=q.createWriteStream(e);c.pipe(f),c.on("error",s),f.on("finish",function(){return l(e)})})]:[3,3];case 3:return[4,i.arrayBuffer()];case 4:return t=u.sent(),[4,N.writeFile(e,Buffer.from(t))];case 5:return u.sent(),[2,e];case 6:throw new Error("url: ".concat(n,"(").concat(i.statusText,")"))}})})}function B(n,e){return P(this,void 0,void 0,function(){var r,i,a,t,o,u,l,s,c,f;return k(this,function(g){return r=y.extname(n).slice(1)||"jpg",i=e.cut,a=e.size,t=e.format,o=t===void 0?r:t,u=K(n),i&&(u=u.extract({left:i[0],top:i[1],width:i[2],height:i[3]})),a&&(u=u.resize(a)),o&&(u=u.toFormat(o)),l="",e.toFilename?l=e.toFilename(n,{cut:e.cut,size:e.size,format:e.format}):(s="",c="",f=o,i&&(s=i.join("x")),a&&(c="".concat(a,"x")),f===r&&!c&&!s&&(f=""),l=[n,s,c,f].filter(function(d){return d.length>0}).join(".")),l!==n&&!q.existsSync(l)?[2,u.toFile(l).then(function(){return l})]:[2,l]})})}function G(n){var e=[];if(n.content&&(n.content.uri?e.push(n.content.uri):n.content.url&&e.push(n.content.url)),n.children)for(var r=0,i=n.children;r<i.length;r++){var a=i[r],t=G(a);t.length>0&&e.push.apply(e,t)}return e}function Y(n,e,r){return P(this,void 0,void 0,function(){var i,a,t;return k(this,function(o){switch(o.label){case 0:return i=new URL(n,e).href,a=y.join(r.distPath,F(i,r.baseURL)),t=U(i,a,r.fetch),r.log(function(u){return"download: ".concat(i," -> ").concat(u)},t),[4,t];case 1:return o.sent(),/\.json$/.test(n)?[4,X(i,r)]:[3,3];case 2:o.sent(),o.label=3;case 3:return[2]}})})}function X(n,e){return P(this,void 0,void 0,function(){var r,i,a,t,o,u,l,s,c,f,g,d,v,m,p,w,h,L,j;return k(this,function(b){switch(b.label){case 0:return r=y.join(e.distPath,F(n,e.baseURL)),i=U(n,r,e.fetch),e.log(function(z){return"download: ".concat(n," -> ").concat(z)},i),[4,i];case 1:return b.sent(),o=(t=JSON).parse,[4,N.readFile(r,"utf8")];case 2:return a=o.apply(t,[b.sent()]),a.asset.overview?(u=new URL(a.asset.overview.imageFile,n).href,l=y.join(e.distPath,F(u,e.baseURL)),s=U(u,l,e.fetch),e.log(function(z){return"download: ".concat(u," -> ").concat(z)},s),[4,s]):[3,4];case 3:b.sent(),b.label=4;case 4:if(!a.asset.trajectories)return[3,8];c=function(z){var R,O,S;return k(this,function(_){switch(_.label){case 0:return R=new URL(z.file,n).href,O=y.join(e.distPath,F(R,e.baseURL)),S=U(R,O,e.fetch),e.log(function($){return"download: ".concat(R," -> ").concat($)},S),[4,S];case 1:return _.sent(),[2]}})},f=0,g=a.asset.trajectories.list,b.label=5;case 5:return f<g.length?(d=g[f],[5,c(d)]):[3,8];case 6:b.sent(),b.label=7;case 7:return f++,[3,5];case 8:v=G(a.root),m=6,p=0,b.label=9;case 9:if(!(p<v.length))return[3,12];for(w=[],h=0;h<m;h++)L=v[p+h],L&&(j=Y(L,n,e),w.push(j));return[4,Promise.all(w)];case 10:b.sent(),b.label=11;case 11:return p+=m,[3,9];case 12:return[2]}})})}function Z(n,e){return P(this,void 0,void 0,function(){var r,i,a,t,o,w,u,l,s,c,f,g,d,v,m,p,w;return k(this,function(h){switch(h.label){case 0:return e.log("process model"),n.model?(r=n.model,i=r.textures,a=r.layers,t=r.file,o=r.textureBase,t?(e.log("process model file"),w=n.getURL(t),u=y.join(e.distPath,F(w,e.baseURL)),l=U(w,u,e.fetch),e.log(function(L){return"download: ".concat(t," -> ").concat(L)},l),[4,l]):[3,5]):[3,9];case 1:if(h.sent(),!i)return[3,5];s=function(L){var j,b,z,R,O,S,_,$,W,I,C,A,J;return k(this,function(D){switch(D.label){case 0:return j=Q(n.getURL(o!=null?o:""),L),b=y.join(e.distPath,F(j,e.baseURL)),z=U(j,b,e.fetch),e.log(function(M){return"download: ".concat(j," -> ").concat(M)},z),[4,z];case 1:for(D.sent(),R=e.imageOptions.format,R.length===0&&R.push(void 0),O=e.imageOptions.size,O.length===0&&O.push(void 0),S=[],_=0,$=R;_<$.length;_++)for(W=$[_],I=0,C=O;I<C.length;I++)A=C[I],J=B(b,{format:W,size:A,toFilename:e.imageProcessingFilename}),e.log(function(M){return"imageProcessing: ".concat(b," -> ").concat(M)},J),S.push(J);return[4,Promise.all(S)];case 2:return D.sent(),[2]}})},c=0,f=i,h.label=2;case 2:return c<f.length?(g=f[c],[5,s(g)]):[3,5];case 3:h.sent(),h.label=4;case 4:return c++,[3,2];case 5:if(!a)return[3,9];d=0,v=a,h.label=6;case 6:return d<v.length?(m=v[d],p=m.tileset,e.log("process model layer"),w=n.getURL(p),[4,X(w,e)]):[3,9];case 7:h.sent(),h.label=8;case 8:return d++,[3,6];case 9:return[2]}})})}function T(n,e,r){return P(this,void 0,void 0,function(){var i,a,t,o,u,l,s,c,f,g,d,v,m,p;return k(this,function(w){switch(w.label){case 0:return i=y.join(r.distPath,F(n,r.baseURL)),a=U(n,i,r.fetch),r.log(function(h){return"download: ".concat(n," -> ").concat(h)},a),[4,a];case 1:if(w.sent(),t=Math.pow(2,e.level),o=r.imageOptions.format,o.length===0&&o.push(void 0),u=[],t>1)for(l=0;l<t;l++)for(s=0;s<t;s++)for(c=0,f=o;c<f.length;c++)g=f[c],d=[e.size/t*s,e.size/t*l,e.size/t,e.size/t],v=e.scale>=1?void 0:e.scale*e.size/t,m=B(i,{format:g,size:v,cut:d,toFilename:r.imageProcessingFilename}),r.log(function(h){return"imageProcessing: ".concat(i," -> ").concat(h)},m),u.push(m),e.level===1&&e.scale>=.5&&(g==="jpg"||/\.jpg$/.test(i))&&(p=B(i,{format:g,size:void 0,cut:d,toFilename:r.imageProcessingFilename}),r.log(function(h){return"imageProcessing: ".concat(i," -> ").concat(h)},p),u.push(p));return[4,Promise.all(u)];case 2:return w.sent(),[2]}})})}function x(n,e){return P(this,void 0,void 0,function(){return k(this,function(r){switch(r.label){case 0:return[4,Promise.all([T(n.work.getURL(n.front),n,e),T(n.work.getURL(n.back),n,e),T(n.work.getURL(n.left),n,e),T(n.work.getURL(n.right),n,e),T(n.work.getURL(n.up),n,e),T(n.work.getURL(n.down),n,e)])];case 1:return r.sent(),[2]}})})}function E(n,e){return P(this,void 0,void 0,function(){var r,i,a,t,o,u,l,s,c,f,g,d;return k(this,function(v){switch(v.label){case 0:return r=y.join(e.distPath,F(n,e.baseURL)),i=U(n,r,e.fetch),e.log(function(m){return"download: ".concat(n," -> ").concat(m)},i),[4,i];case 1:for(v.sent(),a=e.imageOptions.format,a.length===0&&a.push(void 0),t=e.imageOptions.size,t.length===0&&t.push(void 0),o=[],u=0,l=a;u<l.length;u++)for(s=l[u],c=0,f=t;c<f.length;c++)g=f[c],d=B(r,{format:s,size:g,toFilename:e.imageProcessingFilename}),e.log(function(m){return"imageProcessing: ".concat(r," -> ").concat(m)},d),o.push(d);return[4,Promise.all(o)];case 2:return v.sent(),[2]}})})}function ee(n,e){return P(this,void 0,void 0,function(){var r;return k(this,function(i){switch(i.label){case 0:return r=n.images,[4,Promise.all([E(r.work.getURL(r.front),e),E(r.work.getURL(r.back),e),E(r.work.getURL(r.left),e),E(r.work.getURL(r.right),e),E(r.work.getURL(r.up),e),E(r.work.getURL(r.down),e)])];case 1:return i.sent(),r.tiles?[4,Promise.all(r.tiles.map(function(a){return x(a,e)}))]:[3,3];case 2:i.sent(),i.label=3;case 3:return[2]}})})}function re(n,e){return P(this,void 0,void 0,function(){var r,i,a,t,o;return k(this,function(u){switch(u.label){case 0:r=n.observers,i=0,a=r,u.label=1;case 1:return i<a.length?(t=a[i],o=ee(t,e),e.log("process observer #".concat(t.index," derived: ").concat(t.derivedIdStr),o),[4,o]):[3,4];case 2:u.sent(),u.label=3;case 3:return i++,[3,1];case 4:return[2]}})})}function ne(n,e){if(e){var r=Date.now();e.then(function(a){var t=Date.now()-r,o=typeof n=="function"?n(a):n;console.log(o+"(".concat(t,"ms)"))}).catch(function(){})}else{var i=typeof n=="function"?n(null):n;console.log(i)}}function te(n){return P(this,arguments,void 0,function(e,r){var i,a,t,o,u,l,s,c,f,g,d,v,m,p,w;return r===void 0&&(r={}),k(this,function(h){switch(h.label){case 0:if(i=e.baseURL,a="",r.distPath)a=y.resolve(process.cwd(),r.distPath);else for(a=y.resolve(process.cwd(),(l=e.workCode)!==null&&l!==void 0?l:"work-".concat(Date.now()));q.existsSync(a);)/.-(\d+)$/.test(a)?a=a.replace(/.-(\d+)$/,function(L,j){return"-"+(Number(j)+1)}):a=a+"-1";return t={baseURL:i,distPath:a,fetch:(s=r.fetch)!==null&&s!==void 0?s:fetch,imageOptions:{size:(f=(c=r.imageOptions)===null||c===void 0?void 0:c.size)!==null&&f!==void 0?f:[],format:(d=(g=r.imageOptions)===null||g===void 0?void 0:g.format)!==null&&d!==void 0?d:[]},textureOptions:{size:(m=(v=r.textureOptions)===null||v===void 0?void 0:v.size)!==null&&m!==void 0?m:[],format:(w=(p=r.textureOptions)===null||p===void 0?void 0:p.format)!==null&&w!==void 0?w:[]},log:r.log?ne:(function(){return Promise.resolve()}),imageProcessingFilename:r.imageProcessingFilename},t.log(JSON.stringify(t,null," ")),[4,N.mkdir(a,{recursive:!0})];case 1:return h.sent(),o="work.json",u=y.resolve(a,o),[4,N.writeFile(u,JSON.stringify(e.toJSON(),null," "))];case 2:return h.sent(),[4,re(e,t)];case 3:return h.sent(),[4,Z(e,t)];case 4:return h.sent(),[2]}})})}exports.download=te;
@@ -1,8 +1,8 @@
1
1
  /**
2
2
  * @license
3
3
  * @realsee/five
4
- * Generated: 8/26/2025
5
- * Version: 6.6.0-alpha.5
4
+ * Generated: 9/1/2025
5
+ * Version: 6.6.0-alpha.7
6
6
  * Terms:
7
7
  * Realsee SDK License Agreement
8
8
  * Update: July 28, 2021
@@ -252,9 +252,9 @@
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 W } from "node:fs";
255
+ */import { createWriteStream as Q, existsSync as M } from "node:fs";
256
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 U, resolve as D } from "node:path";
257
+ import { dirname as Y, extname as Z, join as F, resolve as W } from "node:path";
258
258
  import { Readable as x } from "node:stream";
259
259
  import ee from "sharp";
260
260
  function k(n, e, r, a) {
@@ -344,7 +344,7 @@ function y(n, e) {
344
344
  return { value: s[0] ? s[1] : void 0, done: !0 };
345
345
  }
346
346
  }
347
- function F(n, e) {
347
+ function U(n, e) {
348
348
  if (e && e[e.length - 1] !== "/" && (e += "/"), n.length > e.length && n.startsWith(e))
349
349
  return n.slice(e.length);
350
350
  throw new Error("".concat(n, " is not starting with ").concat(e));
@@ -371,7 +371,7 @@ function O(n, e, r) {
371
371
  return y(this, function(u) {
372
372
  switch (u.label) {
373
373
  case 0:
374
- return W(e) ? [2, e] : [4, r(n)];
374
+ return M(e) ? [2, e] : [4, r(n)];
375
375
  case 1:
376
376
  return a = u.sent(), a.ok && a.body ? [4, q(Y(e), { recursive: !0 })] : [3, 6];
377
377
  case 2:
@@ -393,18 +393,18 @@ function O(n, e, r) {
393
393
  });
394
394
  });
395
395
  }
396
- function M(n, e) {
396
+ function I(n, e) {
397
397
  return k(this, void 0, void 0, function() {
398
398
  var r, a, i, t, o, u, f, s, c, l;
399
- return y(this, function(v) {
399
+ return y(this, function(g) {
400
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({
401
401
  left: a[0],
402
402
  top: a[1],
403
403
  width: a[2],
404
404
  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(h) {
406
- return h.length > 0;
407
- }).join(".")), f !== n && !W(f) ? [2, u.toFile(f).then(function() {
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
408
  return f;
409
409
  })] : [2, f];
410
410
  });
@@ -425,7 +425,7 @@ function te(n, e, r) {
425
425
  return y(this, function(o) {
426
426
  switch (o.label) {
427
427
  case 0:
428
- return a = new URL(n, e).href, i = U(r.distPath, F(a, r.baseURL)), t = O(a, i, r.fetch), r.log(function(u) {
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
429
  return "download: ".concat(a, " -> ").concat(u);
430
430
  }, t), [4, t];
431
431
  case 1:
@@ -443,30 +443,30 @@ function te(n, e, r) {
443
443
  }
444
444
  function K(n, e) {
445
445
  return k(this, void 0, void 0, function() {
446
- var r, a, i, t, o, u, f, s, c, l, v, h, d, m, p, w, g, L, P;
446
+ var r, a, i, t, o, u, f, s, c, l, g, d, v, m, p, w, h, L, P;
447
447
  return y(this, function(b) {
448
448
  switch (b.label) {
449
449
  case 0:
450
- return r = U(e.distPath, F(n, e.baseURL)), a = O(n, r, e.fetch), e.log(function(R) {
451
- return "download: ".concat(n, " -> ").concat(R);
450
+ return r = F(e.distPath, U(n, e.baseURL)), a = O(n, r, e.fetch), e.log(function(z) {
451
+ return "download: ".concat(n, " -> ").concat(z);
452
452
  }, a), [4, a];
453
453
  case 1:
454
454
  return b.sent(), o = (t = JSON).parse, [4, V(r, "utf8")];
455
455
  case 2:
456
- return i = o.apply(t, [b.sent()]), i.asset.overview ? (u = new URL(i.asset.overview.imageFile, n).href, f = U(e.distPath, F(u, e.baseURL)), s = O(u, f, e.fetch), e.log(function(R) {
457
- return "download: ".concat(u, " -> ").concat(R);
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);
458
458
  }, s), [4, s]) : [3, 4];
459
459
  case 3:
460
460
  b.sent(), b.label = 4;
461
461
  case 4:
462
462
  if (!i.asset.trajectories) return [3, 8];
463
- c = function(R) {
464
- var z, j, S;
463
+ c = function(z) {
464
+ var R, j, S;
465
465
  return y(this, function(_) {
466
466
  switch (_.label) {
467
467
  case 0:
468
- return z = new URL(R.file, n).href, j = U(e.distPath, F(z, e.baseURL)), S = O(z, j, e.fetch), e.log(function($) {
469
- return "download: ".concat(z, " -> ").concat($);
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
470
  }, S), [4, S];
471
471
  case 1:
472
472
  return _.sent(), [
@@ -475,19 +475,19 @@ function K(n, e) {
475
475
  ];
476
476
  }
477
477
  });
478
- }, l = 0, v = i.asset.trajectories.list, b.label = 5;
478
+ }, l = 0, g = i.asset.trajectories.list, b.label = 5;
479
479
  case 5:
480
- return l < v.length ? (h = v[l], [5, c(h)]) : [3, 8];
480
+ return l < g.length ? (d = g[l], [5, c(d)]) : [3, 8];
481
481
  case 6:
482
482
  b.sent(), b.label = 7;
483
483
  case 7:
484
484
  return l++, [3, 5];
485
485
  case 8:
486
- d = H(i.root), m = 6, p = 0, b.label = 9;
486
+ v = H(i.root), m = 6, p = 0, b.label = 9;
487
487
  case 9:
488
- if (!(p < d.length)) return [3, 12];
489
- for (w = [], g = 0; g < m; g++)
490
- L = d[p + g], L && (P = te(L, n, e), w.push(P));
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
491
  return [4, Promise.all(w)];
492
492
  case 10:
493
493
  b.sent(), b.label = 11;
@@ -504,57 +504,57 @@ function K(n, e) {
504
504
  }
505
505
  function ae(n, e) {
506
506
  return k(this, void 0, void 0, function() {
507
- var r, a, i, t, o, w, u, f, s, c, l, v, h, d, m, p, w;
508
- return y(this, function(g) {
509
- switch (g.label) {
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) {
509
+ switch (h.label) {
510
510
  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 = U(e.distPath, F(w, e.baseURL)), f = O(w, u, e.fetch), e.log(function(L) {
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
512
  return "download: ".concat(t, " -> ").concat(L);
513
513
  }, f), [4, f]) : [3, 5]) : [3, 9];
514
514
  case 1:
515
- if (g.sent(), !a) return [3, 5];
515
+ if (h.sent(), !a) return [3, 5];
516
516
  s = function(L) {
517
- var P, b, R, z, j, S, _, $, A, N, I, G, B;
518
- return y(this, function(C) {
519
- switch (C.label) {
517
+ var P, b, z, R, j, S, _, $, A, N, B, G, C;
518
+ return y(this, function(J) {
519
+ switch (J.label) {
520
520
  case 0:
521
- return P = re(n.getURL(o != null ? o : ""), L), b = U(e.distPath, F(P, e.baseURL)), R = O(P, b, e.fetch), e.log(function(J) {
522
- return "download: ".concat(P, " -> ").concat(J);
523
- }, R), [4, R];
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);
523
+ }, z), [4, z];
524
524
  case 1:
525
- for (C.sent(), z = e.imageOptions.format, z.length === 0 && z.push(void 0), j = e.imageOptions.size, j.length === 0 && j.push(void 0), S = [], _ = 0, $ = z; _ < $.length; _++)
526
- for (A = $[_], N = 0, I = j; N < I.length; N++)
527
- G = I[N], B = M(b, {
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
528
  format: A,
529
529
  size: G,
530
530
  toFilename: e.imageProcessingFilename
531
- }), e.log(function(J) {
532
- return "imageProcessing: ".concat(b, " -> ").concat(J);
533
- }, B), S.push(B);
531
+ }), e.log(function(D) {
532
+ return "imageProcessing: ".concat(b, " -> ").concat(D);
533
+ }, C), S.push(C);
534
534
  return [4, Promise.all(S)];
535
535
  case 2:
536
- return C.sent(), [
536
+ return J.sent(), [
537
537
  2
538
538
  /*return*/
539
539
  ];
540
540
  }
541
541
  });
542
- }, c = 0, l = a, g.label = 2;
542
+ }, c = 0, l = a, h.label = 2;
543
543
  case 2:
544
- return c < l.length ? (v = l[c], [5, s(v)]) : [3, 5];
544
+ return c < l.length ? (g = l[c], [5, s(g)]) : [3, 5];
545
545
  case 3:
546
- g.sent(), g.label = 4;
546
+ h.sent(), h.label = 4;
547
547
  case 4:
548
548
  return c++, [3, 2];
549
549
  case 5:
550
550
  if (!i) return [3, 9];
551
- h = 0, d = i, g.label = 6;
551
+ d = 0, v = i, h.label = 6;
552
552
  case 6:
553
- return h < d.length ? (m = d[h], p = m.tileset, e.log("process model layer"), w = n.getURL(p), [4, K(w, e)]) : [3, 9];
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];
554
554
  case 7:
555
- g.sent(), g.label = 8;
555
+ h.sent(), h.label = 8;
556
556
  case 8:
557
- return h++, [3, 6];
557
+ return d++, [3, 6];
558
558
  case 9:
559
559
  return [
560
560
  2
@@ -566,34 +566,41 @@ function ae(n, e) {
566
566
  }
567
567
  function E(n, e, r) {
568
568
  return k(this, void 0, void 0, function() {
569
- var a, i, t, o, u, f, s, c, l, v, h, d, m;
570
- return y(this, function(p) {
571
- switch (p.label) {
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) {
572
572
  case 0:
573
- return a = U(r.distPath, F(n, r.baseURL)), i = O(n, a, r.fetch), r.log(function(w) {
574
- return "download: ".concat(n, " -> ").concat(w);
573
+ return a = F(r.distPath, U(n, r.baseURL)), i = O(n, a, r.fetch), r.log(function(h) {
574
+ return "download: ".concat(n, " -> ").concat(h);
575
575
  }, i), [4, i];
576
576
  case 1:
577
- if (p.sent(), t = Math.pow(2, e.level), o = r.imageOptions.format, o.length === 0 && o.push(void 0), u = [], t > 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
578
  for (f = 0; f < t; f++)
579
579
  for (s = 0; s < t; s++)
580
580
  for (c = 0, l = o; c < l.length; c++)
581
- v = l[c], h = [
581
+ g = l[c], d = [
582
582
  e.size / t * s,
583
583
  e.size / t * f,
584
584
  e.size / t,
585
585
  e.size / t
586
- ], d = e.scale >= 1 ? void 0 : e.scale * e.size / t, e.level === 1 && e.scale >= 0.5 && (v === "jpg" || /\.jpg$/.test(a)) && (d = void 0), m = M(a, {
587
- format: v,
588
- size: d,
589
- cut: h,
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
590
  toFilename: r.imageProcessingFilename
591
- }), r.log(function(w) {
592
- return "imageProcessing: ".concat(a, " -> ").concat(w);
593
- }, m), u.push(m);
591
+ }), r.log(function(h) {
592
+ 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,
595
+ size: void 0,
596
+ cut: d,
597
+ toFilename: r.imageProcessingFilename
598
+ }), r.log(function(h) {
599
+ return "imageProcessing: ".concat(a, " -> ").concat(h);
600
+ }, p), u.push(p));
594
601
  return [4, Promise.all(u)];
595
602
  case 2:
596
- return p.sent(), [
603
+ return w.sent(), [
597
604
  2
598
605
  /*return*/
599
606
  ];
@@ -625,26 +632,26 @@ function ie(n, e) {
625
632
  }
626
633
  function T(n, e) {
627
634
  return k(this, void 0, void 0, function() {
628
- var r, a, i, t, o, u, f, s, c, l, v, h;
629
- return y(this, function(d) {
630
- switch (d.label) {
635
+ var r, a, i, t, o, u, f, s, c, l, g, d;
636
+ return y(this, function(v) {
637
+ switch (v.label) {
631
638
  case 0:
632
- return r = U(e.distPath, F(n, e.baseURL)), a = O(n, r, e.fetch), e.log(function(m) {
639
+ return r = F(e.distPath, U(n, e.baseURL)), a = O(n, r, e.fetch), e.log(function(m) {
633
640
  return "download: ".concat(n, " -> ").concat(m);
634
641
  }, a), [4, a];
635
642
  case 1:
636
- for (d.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++)
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++)
637
644
  for (s = f[u], c = 0, l = t; c < l.length; c++)
638
- v = l[c], h = M(r, {
645
+ g = l[c], d = I(r, {
639
646
  format: s,
640
- size: v,
647
+ size: g,
641
648
  toFilename: e.imageProcessingFilename
642
649
  }), e.log(function(m) {
643
650
  return "imageProcessing: ".concat(r, " -> ").concat(m);
644
- }, h), o.push(h);
651
+ }, d), o.push(d);
645
652
  return [4, Promise.all(o)];
646
653
  case 2:
647
- return d.sent(), [
654
+ return v.sent(), [
648
655
  2
649
656
  /*return*/
650
657
  ];
@@ -718,14 +725,14 @@ function ue(n, e) {
718
725
  }
719
726
  function ge(n) {
720
727
  return k(this, arguments, void 0, function(e, r) {
721
- var a, i, t, o, u, f, s, c, l, v, h, d, m, p, w;
722
- return r === void 0 && (r = {}), y(this, function(g) {
723
- switch (g.label) {
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) {
730
+ switch (h.label) {
724
731
  case 0:
725
732
  if (a = e.baseURL, i = "", r.distPath)
726
- i = D(process.cwd(), r.distPath);
733
+ i = W(process.cwd(), r.distPath);
727
734
  else
728
- for (i = D(process.cwd(), (f = e.workCode) !== null && f !== void 0 ? f : "work-".concat(Date.now())); W(i); )
735
+ for (i = W(process.cwd(), (f = e.workCode) !== null && f !== void 0 ? f : "work-".concat(Date.now())); M(i); )
729
736
  /.-(\d+)$/.test(i) ? i = i.replace(/.-(\d+)$/, function(L, P) {
730
737
  return "-" + (Number(P) + 1);
731
738
  }) : i = i + "-1";
@@ -735,10 +742,10 @@ function ge(n) {
735
742
  fetch: (s = r.fetch) !== null && s !== void 0 ? s : fetch,
736
743
  imageOptions: {
737
744
  size: (l = (c = r.imageOptions) === null || c === void 0 ? void 0 : c.size) !== null && l !== void 0 ? l : [],
738
- format: (h = (v = r.imageOptions) === null || v === void 0 ? void 0 : v.format) !== null && h !== void 0 ? h : []
745
+ format: (d = (g = r.imageOptions) === null || g === void 0 ? void 0 : g.format) !== null && d !== void 0 ? d : []
739
746
  },
740
747
  textureOptions: {
741
- size: (m = (d = r.textureOptions) === null || d === void 0 ? void 0 : d.size) !== null && m !== void 0 ? m : [],
748
+ size: (m = (v = r.textureOptions) === null || v === void 0 ? void 0 : v.size) !== null && m !== void 0 ? m : [],
742
749
  format: (w = (p = r.textureOptions) === null || p === void 0 ? void 0 : p.format) !== null && w !== void 0 ? w : []
743
750
  },
744
751
  log: r.log ? ue : (function() {
@@ -747,13 +754,13 @@ function ge(n) {
747
754
  imageProcessingFilename: r.imageProcessingFilename
748
755
  }, t.log(JSON.stringify(t, null, " ")), [4, q(i, { recursive: !0 })];
749
756
  case 1:
750
- return g.sent(), o = "work.json", u = D(i, o), [4, X(u, JSON.stringify(e.toJSON(), null, " "))];
757
+ return h.sent(), o = "work.json", u = W(i, o), [4, X(u, JSON.stringify(e.toJSON(), null, " "))];
751
758
  case 2:
752
- return g.sent(), [4, oe(e, t)];
759
+ return h.sent(), [4, oe(e, t)];
753
760
  case 3:
754
- return g.sent(), [4, ae(e, t)];
761
+ return h.sent(), [4, ae(e, t)];
755
762
  case 4:
756
- return g.sent(), [
763
+ return h.sent(), [
757
764
  2
758
765
  /*return*/
759
766
  ];