@realsee/five-webgpu 1.0.0-alpha.10 → 1.0.0-alpha.11

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 (181) hide show
  1. package/_virtual/_rolldown/runtime.js +2 -2
  2. package/five/index.js +50 -50
  3. package/five/index.mjs +1149 -1186
  4. package/five/renderer/postprocessing/passes/pass.js +2 -2
  5. package/five/renderer/postprocessing/passes/pass.mjs +2 -2
  6. package/five/renderer/tools/full-screen-quad.js +2 -2
  7. package/five/renderer/tools/full-screen-quad.mjs +2 -2
  8. package/five/utils/calculateThreeMouse.js +2 -2
  9. package/five/utils/calculateThreeMouse.mjs +2 -2
  10. package/five/utils/distance.js +2 -2
  11. package/five/utils/distance.mjs +2 -2
  12. package/five/utils/isNil.js +2 -2
  13. package/five/utils/isNil.mjs +2 -2
  14. package/five/utils/uuid.js +2 -2
  15. package/five/utils/uuid.mjs +2 -2
  16. package/gltf-loader/index.js +3 -3
  17. package/gltf-loader/index.mjs +3 -3
  18. package/line/index.js +3 -3
  19. package/line/index.mjs +3 -3
  20. package/package.json +1 -1
  21. package/plugins/BackgroundPlugin/Controller.js +3 -3
  22. package/plugins/BackgroundPlugin/Controller.mjs +3 -3
  23. package/plugins/BackgroundPlugin/index.js +2 -2
  24. package/plugins/BackgroundPlugin/index.mjs +2 -2
  25. package/plugins/BasePlugin/index.js +2 -2
  26. package/plugins/BasePlugin/index.mjs +2 -2
  27. package/plugins/CSS2DPlugin/Controller.js +3 -3
  28. package/plugins/CSS2DPlugin/Controller.mjs +3 -3
  29. package/plugins/CSS2DPlugin/index.js +2 -2
  30. package/plugins/CSS2DPlugin/index.mjs +2 -2
  31. package/plugins/CSS2DPlugin/style.css_raw.js +2 -2
  32. package/plugins/CSS2DPlugin/style.css_raw.mjs +2 -2
  33. package/plugins/CSS3DPlugin/Controller.js +3 -3
  34. package/plugins/CSS3DPlugin/Controller.mjs +3 -3
  35. package/plugins/CSS3DPlugin/index.js +2 -2
  36. package/plugins/CSS3DPlugin/index.mjs +2 -2
  37. package/plugins/CSS3DPlugin/style.css_raw.js +2 -2
  38. package/plugins/CSS3DPlugin/style.css_raw.mjs +2 -2
  39. package/plugins/FloorplanPlugin/Controller.js +3 -3
  40. package/plugins/FloorplanPlugin/Controller.mjs +3 -3
  41. package/plugins/FloorplanPlugin/index.js +2 -2
  42. package/plugins/FloorplanPlugin/index.mjs +2 -2
  43. package/plugins/FloorplanPlugin/render/assets.js +2 -2
  44. package/plugins/FloorplanPlugin/render/assets.mjs +2 -2
  45. package/plugins/FloorplanPlugin/render/index.js +2 -2
  46. package/plugins/FloorplanPlugin/render/index.mjs +2 -2
  47. package/plugins/FloorplanPlugin/render/isPointInPolygon.js +2 -2
  48. package/plugins/FloorplanPlugin/render/isPointInPolygon.mjs +2 -2
  49. package/plugins/FloorplanPlugin/render/renderFloor.js +2 -2
  50. package/plugins/FloorplanPlugin/render/renderFloor.mjs +2 -2
  51. package/plugins/FloorplanPlugin/render/roomLabelVisibility.js +2 -2
  52. package/plugins/FloorplanPlugin/render/roomLabelVisibility.mjs +2 -2
  53. package/plugins/FloorplanPlugin/render/style.css_raw.js +2 -2
  54. package/plugins/FloorplanPlugin/render/style.css_raw.mjs +2 -2
  55. package/plugins/FloorplanPlugin/utils/changeMode.js +3 -3
  56. package/plugins/FloorplanPlugin/utils/changeMode.mjs +3 -3
  57. package/plugins/FloorplanPlugin/utils/changeModelCanvasOpacity.js +2 -2
  58. package/plugins/FloorplanPlugin/utils/changeModelCanvasOpacity.mjs +2 -2
  59. package/plugins/FloorplanPlugin/utils/correctFiveState.js +3 -3
  60. package/plugins/FloorplanPlugin/utils/correctFiveState.mjs +3 -3
  61. package/plugins/FloorplanPlugin/utils/equal.js +2 -2
  62. package/plugins/FloorplanPlugin/utils/equal.mjs +2 -2
  63. package/plugins/FloorplanPlugin/utils/filter.js +2 -2
  64. package/plugins/FloorplanPlugin/utils/filter.mjs +2 -2
  65. package/plugins/FloorplanPlugin/utils/fiveModelLoad.js +3 -3
  66. package/plugins/FloorplanPlugin/utils/fiveModelLoad.mjs +3 -3
  67. package/plugins/FloorplanPlugin/utils/formatData.js +3 -3
  68. package/plugins/FloorplanPlugin/utils/formatData.mjs +3 -3
  69. package/plugins/FloorplanPlugin/utils/formatFloorplanJson.js +2 -2
  70. package/plugins/FloorplanPlugin/utils/formatFloorplanJson.mjs +2 -2
  71. package/plugins/FloorplanPlugin/utils/formatPosition.js +2 -2
  72. package/plugins/FloorplanPlugin/utils/formatPosition.mjs +2 -2
  73. package/plugins/FloorplanPlugin/utils/getDistanceFromModel.js +2 -2
  74. package/plugins/FloorplanPlugin/utils/getDistanceFromModel.mjs +2 -2
  75. package/plugins/FloorplanPlugin/utils/getPxmm.js +2 -2
  76. package/plugins/FloorplanPlugin/utils/getPxmm.mjs +2 -2
  77. package/plugins/FloorplanPlugin/utils/isTruelyObject.js +2 -2
  78. package/plugins/FloorplanPlugin/utils/isTruelyObject.mjs +2 -2
  79. package/plugins/FloorplanPlugin/utils/nearlyEqual.js +2 -2
  80. package/plugins/FloorplanPlugin/utils/nearlyEqual.mjs +2 -2
  81. package/plugins/FloorplanPlugin/utils/polylabel.js +2 -2
  82. package/plugins/FloorplanPlugin/utils/polylabel.mjs +2 -2
  83. package/plugins/FloorplanPlugin/utils/to.js +3 -3
  84. package/plugins/FloorplanPlugin/utils/to.mjs +3 -3
  85. package/plugins/GaussianSplattingEntranceAnimationPlugin/Controller.js +3 -3
  86. package/plugins/GaussianSplattingEntranceAnimationPlugin/Controller.mjs +3 -3
  87. package/plugins/GaussianSplattingEntranceAnimationPlugin/index.js +2 -2
  88. package/plugins/GaussianSplattingEntranceAnimationPlugin/index.mjs +2 -2
  89. package/plugins/Object3DHelperPlugin/Controller.js +3 -3
  90. package/plugins/Object3DHelperPlugin/Controller.mjs +3 -3
  91. package/plugins/Object3DHelperPlugin/Controllers/BaseController.js +2 -2
  92. package/plugins/Object3DHelperPlugin/Controllers/BaseController.mjs +2 -2
  93. package/plugins/Object3DHelperPlugin/Controllers/BoundingBoxController.js +2 -2
  94. package/plugins/Object3DHelperPlugin/Controllers/BoundingBoxController.mjs +2 -2
  95. package/plugins/Object3DHelperPlugin/Controllers/MoveController.js +2 -2
  96. package/plugins/Object3DHelperPlugin/Controllers/MoveController.mjs +2 -2
  97. package/plugins/Object3DHelperPlugin/Controllers/RotateController.js +2 -2
  98. package/plugins/Object3DHelperPlugin/Controllers/RotateController.mjs +2 -2
  99. package/plugins/Object3DHelperPlugin/FiveControllerWrapper.js +2 -2
  100. package/plugins/Object3DHelperPlugin/FiveControllerWrapper.mjs +2 -2
  101. package/plugins/Object3DHelperPlugin/Helper/BaseHelper.js +2 -2
  102. package/plugins/Object3DHelperPlugin/Helper/BaseHelper.mjs +2 -2
  103. package/plugins/Object3DHelperPlugin/Helper/BoundingBoxHelper.js +2 -2
  104. package/plugins/Object3DHelperPlugin/Helper/BoundingBoxHelper.mjs +2 -2
  105. package/plugins/Object3DHelperPlugin/Helper/MoveHelper.js +2 -2
  106. package/plugins/Object3DHelperPlugin/Helper/MoveHelper.mjs +2 -2
  107. package/plugins/Object3DHelperPlugin/Helper/RotateHelper.js +2 -2
  108. package/plugins/Object3DHelperPlugin/Helper/RotateHelper.mjs +2 -2
  109. package/plugins/Object3DHelperPlugin/constant.js +2 -2
  110. package/plugins/Object3DHelperPlugin/constant.mjs +2 -2
  111. package/plugins/Object3DHelperPlugin/index.js +2 -2
  112. package/plugins/Object3DHelperPlugin/index.mjs +2 -2
  113. package/plugins/Object3DHelperPlugin/utils/ArrowGroup.js +2 -2
  114. package/plugins/Object3DHelperPlugin/utils/ArrowGroup.mjs +2 -2
  115. package/plugins/Object3DHelperPlugin/utils/CenterHandle.js +2 -2
  116. package/plugins/Object3DHelperPlugin/utils/CenterHandle.mjs +2 -2
  117. package/plugins/Object3DHelperPlugin/utils/PlaneHandle.js +2 -2
  118. package/plugins/Object3DHelperPlugin/utils/PlaneHandle.mjs +2 -2
  119. package/plugins/Object3DHelperPlugin/utils/calculateScaleByCamera.js +2 -2
  120. package/plugins/Object3DHelperPlugin/utils/calculateScaleByCamera.mjs +2 -2
  121. package/plugins/Object3DHelperPlugin/utils/cameraHooks.js +2 -2
  122. package/plugins/Object3DHelperPlugin/utils/cameraHooks.mjs +2 -2
  123. package/plugins/Object3DHelperPlugin/utils/direction.js +2 -2
  124. package/plugins/Object3DHelperPlugin/utils/direction.mjs +2 -2
  125. package/plugins/Object3DHelperPlugin/utils/getMouseRaycaster.js +2 -2
  126. package/plugins/Object3DHelperPlugin/utils/getMouseRaycaster.mjs +2 -2
  127. package/plugins/Object3DHelperPlugin/utils/getOrthographicCameraDirection.js +2 -2
  128. package/plugins/Object3DHelperPlugin/utils/getOrthographicCameraDirection.mjs +2 -2
  129. package/plugins/Object3DHelperPlugin/utils/setObjectQuaternion.js +2 -2
  130. package/plugins/Object3DHelperPlugin/utils/setObjectQuaternion.mjs +2 -2
  131. package/plugins/Object3DHelperPlugin/utils/solidGuide.js +2 -2
  132. package/plugins/Object3DHelperPlugin/utils/solidGuide.mjs +2 -2
  133. package/plugins/Object3DHelperPlugin/utils/tipsDom.js +2 -2
  134. package/plugins/Object3DHelperPlugin/utils/tipsDom.mjs +2 -2
  135. package/plugins/PanoAnimePlugin/Controller.js +3 -3
  136. package/plugins/PanoAnimePlugin/Controller.mjs +3 -3
  137. package/plugins/PanoAnimePlugin/index.js +2 -2
  138. package/plugins/PanoAnimePlugin/index.mjs +2 -2
  139. package/plugins/WordPassPlugin/Controller.js +3 -3
  140. package/plugins/WordPassPlugin/Controller.mjs +3 -3
  141. package/plugins/WordPassPlugin/hersheyFont.js +2 -2
  142. package/plugins/WordPassPlugin/hersheyFont.mjs +2 -2
  143. package/plugins/WordPassPlugin/index.js +2 -2
  144. package/plugins/WordPassPlugin/index.mjs +2 -2
  145. package/plugins/WordPassPlugin/textToStrokeOrderStrokes.js +3 -3
  146. package/plugins/WordPassPlugin/textToStrokeOrderStrokes.mjs +4 -4
  147. package/plugins/WordPassPlugin/word-pass.js +3 -3
  148. package/plugins/WordPassPlugin/word-pass.mjs +3 -3
  149. package/plugins/index.js +2 -2
  150. package/plugins/index.mjs +2 -2
  151. package/plugins/thirdParty/CSS2DRenderer.js +2 -2
  152. package/plugins/thirdParty/CSS2DRenderer.mjs +2 -2
  153. package/plugins/thirdParty/CSS3DRenderer.js +2 -2
  154. package/plugins/thirdParty/CSS3DRenderer.mjs +2 -2
  155. package/plugins/thirdParty/doctorstrange-model.js +2 -2
  156. package/plugins/thirdParty/doctorstrange-model.mjs +2 -2
  157. package/plugins/thirdParty/domevents.js +2 -2
  158. package/plugins/thirdParty/domevents.mjs +2 -2
  159. package/plugins/utils/absoluteUrl.js +2 -2
  160. package/plugins/utils/absoluteUrl.mjs +2 -2
  161. package/plugins/utils/calculatePath.js +2 -2
  162. package/plugins/utils/calculatePath.mjs +2 -2
  163. package/plugins/utils/clamp.js +2 -2
  164. package/plugins/utils/clamp.mjs +2 -2
  165. package/plugins/utils/uuid.js +2 -2
  166. package/plugins/utils/uuid.mjs +2 -2
  167. package/react/index.js +2 -2
  168. package/react/index.mjs +2 -2
  169. package/sticker/index.js +3 -3
  170. package/sticker/index.mjs +3 -3
  171. package/umd/five-gltf-loader.js +3 -3
  172. package/umd/five-line.js +3 -3
  173. package/umd/five-plugins.js +2 -2
  174. package/umd/five-react.js +2 -2
  175. package/umd/five-sticker.js +3 -3
  176. package/umd/five-vfx.js +2 -2
  177. package/umd/five.js +3 -3
  178. package/vfx/index.js +2 -2
  179. package/vfx/index.mjs +2 -2
  180. package/work-downloader/index.js +3 -3
  181. package/work-downloader/index.mjs +152 -180
package/vfx/index.js CHANGED
@@ -1,8 +1,8 @@
1
1
  /**
2
2
  * @license
3
3
  * @realsee/five-webgpu
4
- * Generated: 10/26/2026
5
- * Version: 1.0.0-alpha.10
4
+ * Generated: 10/27/2026
5
+ * Version: 1.0.0-alpha.11
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-webgpu
4
- * Generated: 10/26/2026
5
- * Version: 1.0.0-alpha.10
4
+ * Generated: 10/27/2026
5
+ * Version: 1.0.0-alpha.11
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-webgpu
4
- * Generated: 10/26/2026
5
- * Version: 1.0.0-alpha.10
4
+ * Generated: 10/27/2026
5
+ * Version: 1.0.0-alpha.11
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
- */Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},s=(n,r,a)=>(a=n==null?{}:e(i(n)),o(r||!n||!n.__esModule?t(a,`default`,{value:n,enumerable:!0}):a,n));let c=require("node:fs"),l=require("node:fs/promises"),u=require("node:path"),d=require("node:stream"),f=require("sharp");f=s(f,1);function p(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||(n=Promise))(function(n,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){e.done?n(e.value):i(e.value).then(o,s)}c((r=r.apply(e,t||[])).next())})}function m(e,t){if(t&&t[t.length-1]!==`/`&&(t+=`/`),e.length>t.length&&e.startsWith(t))return e.slice(t.length);throw Error(`${e} is not starting with ${t}`)}function h(...e){let t=[];e=e.map(e=>(e==null?``:e).trim()).filter(e=>e.length>0&&!/^\/+$/.test(e));for(let n=0;n<e.length;n++){let r=n===0,i=n===e.length-1,a=e[n];r||(a=a.replace(/^\.\//,``).replace(/^\/+/,``)),i||(a=a.replace(/\/+$/,``)),t.push(a)}return t.join(`/`)}var g=1024*1024*5;function _(e,t,n){return p(this,void 0,void 0,function*(){var r;if((0,c.existsSync)(t))return t;let i=yield n(e);if(i.ok&&i.body){if(yield(0,l.mkdir)((0,u.dirname)(t),{recursive:!0}),Number((r=i.headers.get(`content-length`))==null?`Infinity`:r)>g)return new Promise((e,n)=>{let r=d.Readable.fromWeb(i.body),a=(0,c.createWriteStream)(t);r.pipe(a),r.on(`error`,n),a.on(`finish`,()=>e(t))});{let e=yield i.arrayBuffer();return yield(0,l.writeFile)(t,Buffer.from(e)),t}}throw Error(`url: ${e}(${i.statusText})`)})}var v=[`jpg`,`png`],y=95;function b(e,t){let n=(0,u.extname)(e).slice(1)||`jpg`,{cut:r,size:i,format:a=n}=t,o=``;if(t.toFilename)o=t.toFilename(e,{cut:t.cut,size:t.size,format:t.format});else{let t=``,s=``,c=a;r&&(t=r.join(`x`)),i&&(s=`${i}x`),c===n&&!s&&!t&&(c=``),o=[e,t,s,c].filter(e=>e.length>0).join(`.`)}return o}function x(e,t){return p(this,void 0,void 0,function*(){let n=(0,u.extname)(e).slice(1)||`jpg`,{cut:r,size:i,format:a=n}=t,o=e;if((r||i)&&a!==n&&v.includes(a)){let n=b(e,{format:a,toFilename:t.toFilename});n!==o&&(0,c.existsSync)(n)&&(o=n)}let s=(0,f.default)(o);r&&(s=s.extract({left:r[0],top:r[1],width:r[2],height:r[3]})),i&&(s=s.resize(i)),s=s.toFormat(a,{quality:y});let l=b(e,t);return l!==e&&!(0,c.existsSync)(l)?s.toFile(l).then(()=>l):l})}function S(e){let t=[];if(e.content&&(e.content.uri?t.push(e.content.uri):e.content.url&&t.push(e.content.url)),e.children)for(let n of e.children){let e=S(n);if(e.length>0)for(let n=0;n<e.length;n++)t.push(e[n])}return t}function C(e,t,n){return p(this,void 0,void 0,function*(){let r=new URL(e,t).href,i=_(r,(0,u.join)(n.distPath,m(r,n.baseURL)),n.fetch);n.log(e=>`download: ${r} -> ${e}`,i),yield i,/\.json$/.test(e)&&(yield w(r,n))})}function w(e,t){return p(this,void 0,void 0,function*(){let n=(0,u.join)(t.distPath,m(e,t.baseURL)),r=_(e,n,t.fetch);t.log(t=>`download: ${e} -> ${t}`,r),yield r;let i=JSON.parse(yield(0,l.readFile)(n,`utf8`));if(i.asset.overview){let n=new URL(i.asset.overview.imageFile,e).href,r=_(n,(0,u.join)(t.distPath,m(n,t.baseURL)),t.fetch);t.log(e=>`download: ${n} -> ${e}`,r),yield r}if(i.asset.trajectories)for(let n of i.asset.trajectories.list){let r=new URL(n.file,e).href,i=_(r,(0,u.join)(t.distPath,m(r,t.baseURL)),t.fetch);t.log(e=>`download: ${r} -> ${e}`,i),yield i}let a=S(i.root);for(let n=0;n<a.length;n+=6){let r=[];for(let i=0;i<6;i++){let o=a[n+i];if(o){let n=C(o,e,t);r.push(n)}}yield Promise.all(r)}})}function T(e,t){return p(this,void 0,void 0,function*(){if(t.log(`process model`),e.model){let{textures:n,layers:r,file:i,textureBase:a}=e.model;if(i){t.log(`process model file`);let r=e.getURL(i),o=_(r,(0,u.join)(t.distPath,m(r,t.baseURL)),t.fetch);if(t.log(e=>`download: ${i} -> ${e}`,o),yield o,n)for(let r of n){let n=h(e.getURL(a==null?``:a),r),i=(0,u.join)(t.distPath,m(n,t.baseURL)),o=_(n,i,t.fetch);t.log(e=>`download: ${n} -> ${e}`,o),yield o;let s=t.imageOptions.format;s.length===0&&s.push(void 0);let c=t.imageOptions.size;c.length===0&&c.push(void 0);let l=[];for(let e of s)for(let n of c){let r=x(i,{format:e,size:n,toFilename:t.imageProcessingFilename});t.log(e=>`imageProcessing: ${i} -> ${e}`,r),l.push(r)}yield Promise.all(l)}}if(r)for(let n of r){let{tileset:r}=n;t.log(`process model layer`),yield w(e.getURL(r),t)}}})}var E=[`front`,`back`,`left`,`right`,`up`,`down`];function D(e,t,n){return p(this,void 0,void 0,function*(){let r=(0,u.join)(n.distPath,m(e,n.baseURL)),i=_(e,r,n.fetch);n.log(t=>`download: ${e} -> ${t}`,i),yield i;let a=Math.pow(2,t.level),o=n.imageOptions.format;o.length===0&&o.push(void 0);let s=[];if(a>1)for(let e=0;e<a;e++)for(let i=0;i<a;i++)for(let c of o){let o=[t.size/a*i,t.size/a*e,t.size/a,t.size/a],l=x(r,{format:c,size:t.scale>=1?void 0:t.scale*t.size/a,cut:o,toFilename:n.imageProcessingFilename});if(n.log(e=>`imageProcessing: ${r} -> ${e}`,l),s.push(l),t.level===1&&t.scale>=.5&&(c===`jpg`||/\.jpg$/.test(r))){let e=x(r,{format:c,size:void 0,cut:o,toFilename:n.imageProcessingFilename});n.log(e=>`imageProcessing: ${r} -> ${e}`,e),s.push(e)}}yield Promise.all(s)})}function O(e,t){return p(this,void 0,void 0,function*(){let n=E.map(n=>D(e.work.getURL(e[n]),e,t));if(e.gainmap){let r=e.gainmap;n.push(...E.map(n=>D(e.work.getURL(r[n]),e,t)))}yield Promise.all(n)})}function k(e,t,n){return p(this,void 0,void 0,function*(){let r=(0,u.join)(n.distPath,m(e,n.baseURL)),i=_(e,r,n.fetch);n.log(t=>`download: ${e} -> ${t}`,i),yield i;let a=n.imageOptions.format;a.length===0&&a.push(void 0);let o=n.imageOptions.size;o.length===0&&o.push(void 0);for(let r of t){let t=e.replace(/cube\_\d+/,`cube_${r}`),i=(0,u.join)(n.distPath,m(t,n.baseURL)),o=_(t,i,n.fetch);n.log(e=>`download ${t} -> ${i}`,o),yield o;for(let e of a){let t=x(i,{format:e,toFilename:n.imageProcessingFilename});n.log(e=>`imageProcessing: ${i} -> ${e}`,t),yield t}}let s=[];for(let e of a)for(let t of o){let i=x(r,{format:e,size:t,toFilename:n.imageProcessingFilename});n.log(e=>`imageProcessing: ${r} -> ${e}`,i),s.push(i)}yield Promise.all(s)})}function A(e,t){return p(this,void 0,void 0,function*(){let n=_(e,(0,u.join)(t.distPath,m(e,t.baseURL)),t.fetch);t.log(t=>`download: ${e} -> ${t}`,n),yield n})}function j(e,t){return p(this,void 0,void 0,function*(){let{images:n}=e,r=E.map(e=>k(n.work.getURL(n[e]),n.sizeList,t));if(n.gainmap){let e=n.gainmap;r.push(...E.map(r=>k(n.work.getURL(e[r]),n.sizeList,t))),r.push(A(n.work.getURL(e.cfg),t))}yield Promise.all(r),n.tiles&&(yield Promise.all(n.tiles.map(e=>O(e,t))))})}function M(e,t){return p(this,void 0,void 0,function*(){let{observers:n}=e;for(let e of n){let n=j(e,t);t.log(`process observer #${e.index} derived: ${e.derivedIdStr}`,n),yield n}})}function N(e,t){if(t){let n=Date.now();t.then(t=>{let r=Date.now()-n,i=typeof e==`function`?e(t):e;console.log(i+`(${r}ms)`)}).catch(()=>{})}else{let t=typeof e==`function`?e(null):e;console.log(t)}}function P(e){return p(this,arguments,void 0,function*(e,t={}){var n,r,i,a,o,s,d,f,p,m;let h=e.baseURL,g=``;if(t.distPath)g=(0,u.resolve)(process.cwd(),t.distPath);else for(g=(0,u.resolve)(process.cwd(),(n=e.workCode)==null?`work-${Date.now()}`:n);(0,c.existsSync)(g);)/.-(\d+)$/.test(g)?g=g.replace(/.-(\d+)$/,(e,t)=>`-`+(Number(t)+1)):g+=`-1`;let _={baseURL:h,distPath:g,fetch:(r=t.fetch)==null?fetch:r,imageOptions:{size:(a=(i=t.imageOptions)==null?void 0:i.size)==null?[]:a,format:(s=(o=t.imageOptions)==null?void 0:o.format)==null?[]:s},textureOptions:{size:(f=(d=t.textureOptions)==null?void 0:d.size)==null?[]:f,format:(m=(p=t.textureOptions)==null?void 0:p.format)==null?[]:m},log:t.log?N:(()=>Promise.resolve()),imageProcessingFilename:t.imageProcessingFilename};_.log(JSON.stringify(_,null,` `)),yield(0,l.mkdir)(g,{recursive:!0}),yield(0,l.writeFile)((0,u.resolve)(g,`work.json`),JSON.stringify(e.toJSON(),null,` `)),yield M(e,_),yield T(e,_)})}exports.download=P;
255
+ */Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},s=(n,r,a)=>(a=n==null?{}:e(i(n)),o(r||!n||!n.__esModule?t(a,`default`,{value:n,enumerable:!0}):a,n));let c=require("tslib"),l=require("node:fs"),u=require("node:fs/promises"),d=require("node:path"),f=require("node:stream"),p=require("sharp");p=s(p,1);function m(e,t){if(t&&t[t.length-1]!==`/`&&(t+=`/`),e.length>t.length&&e.startsWith(t))return e.slice(t.length);throw Error(`${e} is not starting with ${t}`)}function h(...e){let t=[];e=e.map(e=>(e==null?``:e).trim()).filter(e=>e.length>0&&!/^\/+$/.test(e));for(let n=0;n<e.length;n++){let r=n===0,i=n===e.length-1,a=e[n];r||(a=a.replace(/^\.\//,``).replace(/^\/+/,``)),i||(a=a.replace(/\/+$/,``)),t.push(a)}return t.join(`/`)}var g=1024*1024*5;function _(e,t,n){return(0,c.__awaiter)(this,void 0,void 0,function*(){var r;if((0,l.existsSync)(t))return t;let i=yield n(e);if(i.ok&&i.body){if(yield(0,u.mkdir)((0,d.dirname)(t),{recursive:!0}),Number((r=i.headers.get(`content-length`))==null?`Infinity`:r)>g)return new Promise((e,n)=>{let r=f.Readable.fromWeb(i.body),a=(0,l.createWriteStream)(t);r.pipe(a),r.on(`error`,n),a.on(`finish`,()=>e(t))});{let e=yield i.arrayBuffer();return yield(0,u.writeFile)(t,Buffer.from(e)),t}}throw Error(`url: ${e}(${i.statusText})`)})}var v=[`jpg`,`png`],y=95;function b(e,t){let n=(0,d.extname)(e).slice(1)||`jpg`,{cut:r,size:i,format:a=n}=t,o=``;if(t.toFilename)o=t.toFilename(e,{cut:t.cut,size:t.size,format:t.format});else{let t=``,s=``,c=a;r&&(t=r.join(`x`)),i&&(s=`${i}x`),c===n&&!s&&!t&&(c=``),o=[e,t,s,c].filter(e=>e.length>0).join(`.`)}return o}function x(e,t){return(0,c.__awaiter)(this,void 0,void 0,function*(){let n=(0,d.extname)(e).slice(1)||`jpg`,{cut:r,size:i,format:a=n}=t,o=e;if((r||i)&&a!==n&&v.includes(a)){let n=b(e,{format:a,toFilename:t.toFilename});n!==o&&(0,l.existsSync)(n)&&(o=n)}let s=(0,p.default)(o);r&&(s=s.extract({left:r[0],top:r[1],width:r[2],height:r[3]})),i&&(s=s.resize(i)),s=s.toFormat(a,{quality:y});let c=b(e,t);return c!==e&&!(0,l.existsSync)(c)?s.toFile(c).then(()=>c):c})}function S(e){let t=[];if(e.content&&(e.content.uri?t.push(e.content.uri):e.content.url&&t.push(e.content.url)),e.children)for(let n of e.children){let e=S(n);if(e.length>0)for(let n=0;n<e.length;n++)t.push(e[n])}return t}function C(e,t,n){return(0,c.__awaiter)(this,void 0,void 0,function*(){let r=new URL(e,t).href,i=_(r,(0,d.join)(n.distPath,m(r,n.baseURL)),n.fetch);n.log(e=>`download: ${r} -> ${e}`,i),yield i,/\.json$/.test(e)&&(yield w(r,n))})}function w(e,t){return(0,c.__awaiter)(this,void 0,void 0,function*(){let n=(0,d.join)(t.distPath,m(e,t.baseURL)),r=_(e,n,t.fetch);t.log(t=>`download: ${e} -> ${t}`,r),yield r;let i=JSON.parse(yield(0,u.readFile)(n,`utf8`));if(i.asset.overview){let n=new URL(i.asset.overview.imageFile,e).href,r=_(n,(0,d.join)(t.distPath,m(n,t.baseURL)),t.fetch);t.log(e=>`download: ${n} -> ${e}`,r),yield r}if(i.asset.trajectories)for(let n of i.asset.trajectories.list){let r=new URL(n.file,e).href,i=_(r,(0,d.join)(t.distPath,m(r,t.baseURL)),t.fetch);t.log(e=>`download: ${r} -> ${e}`,i),yield i}let a=S(i.root);for(let n=0;n<a.length;n+=6){let r=[];for(let i=0;i<6;i++){let o=a[n+i];if(o){let n=C(o,e,t);r.push(n)}}yield Promise.all(r)}})}function T(e,t){return(0,c.__awaiter)(this,void 0,void 0,function*(){if(t.log(`process model`),e.model){let{textures:n,layers:r,file:i,textureBase:a}=e.model;if(i){t.log(`process model file`);let r=e.getURL(i),o=_(r,(0,d.join)(t.distPath,m(r,t.baseURL)),t.fetch);if(t.log(e=>`download: ${i} -> ${e}`,o),yield o,n)for(let r of n){let n=h(e.getURL(a==null?``:a),r),i=(0,d.join)(t.distPath,m(n,t.baseURL)),o=_(n,i,t.fetch);t.log(e=>`download: ${n} -> ${e}`,o),yield o;let s=t.imageOptions.format;s.length===0&&s.push(void 0);let c=t.imageOptions.size;c.length===0&&c.push(void 0);let l=[];for(let e of s)for(let n of c){let r=x(i,{format:e,size:n,toFilename:t.imageProcessingFilename});t.log(e=>`imageProcessing: ${i} -> ${e}`,r),l.push(r)}yield Promise.all(l)}}if(r)for(let n of r){let{tileset:r}=n;t.log(`process model layer`),yield w(e.getURL(r),t)}}})}var E=[`front`,`back`,`left`,`right`,`up`,`down`];function D(e,t,n){return(0,c.__awaiter)(this,void 0,void 0,function*(){let r=(0,d.join)(n.distPath,m(e,n.baseURL)),i=_(e,r,n.fetch);n.log(t=>`download: ${e} -> ${t}`,i),yield i;let a=Math.pow(2,t.level),o=n.imageOptions.format;o.length===0&&o.push(void 0);let s=[];if(a>1)for(let e=0;e<a;e++)for(let i=0;i<a;i++)for(let c of o){let o=[t.size/a*i,t.size/a*e,t.size/a,t.size/a],l=x(r,{format:c,size:t.scale>=1?void 0:t.scale*t.size/a,cut:o,toFilename:n.imageProcessingFilename});if(n.log(e=>`imageProcessing: ${r} -> ${e}`,l),s.push(l),t.level===1&&t.scale>=.5&&(c===`jpg`||/\.jpg$/.test(r))){let e=x(r,{format:c,size:void 0,cut:o,toFilename:n.imageProcessingFilename});n.log(e=>`imageProcessing: ${r} -> ${e}`,e),s.push(e)}}yield Promise.all(s)})}function O(e,t){return(0,c.__awaiter)(this,void 0,void 0,function*(){let n=E.map(n=>D(e.work.getURL(e[n]),e,t));if(e.gainmap){let r=e.gainmap;n.push(...E.map(n=>D(e.work.getURL(r[n]),e,t)))}yield Promise.all(n)})}function k(e,t,n){return(0,c.__awaiter)(this,void 0,void 0,function*(){let r=(0,d.join)(n.distPath,m(e,n.baseURL)),i=_(e,r,n.fetch);n.log(t=>`download: ${e} -> ${t}`,i),yield i;let a=n.imageOptions.format;a.length===0&&a.push(void 0);let o=n.imageOptions.size;o.length===0&&o.push(void 0);for(let r of t){let t=e.replace(/cube\_\d+/,`cube_${r}`),i=(0,d.join)(n.distPath,m(t,n.baseURL)),o=_(t,i,n.fetch);n.log(e=>`download ${t} -> ${i}`,o),yield o;for(let e of a){let t=x(i,{format:e,toFilename:n.imageProcessingFilename});n.log(e=>`imageProcessing: ${i} -> ${e}`,t),yield t}}let s=[];for(let e of a)for(let t of o){let i=x(r,{format:e,size:t,toFilename:n.imageProcessingFilename});n.log(e=>`imageProcessing: ${r} -> ${e}`,i),s.push(i)}yield Promise.all(s)})}function A(e,t){return(0,c.__awaiter)(this,void 0,void 0,function*(){let n=_(e,(0,d.join)(t.distPath,m(e,t.baseURL)),t.fetch);t.log(t=>`download: ${e} -> ${t}`,n),yield n})}function j(e,t){return(0,c.__awaiter)(this,void 0,void 0,function*(){let{images:n}=e,r=E.map(e=>k(n.work.getURL(n[e]),n.sizeList,t));if(n.gainmap){let e=n.gainmap;r.push(...E.map(r=>k(n.work.getURL(e[r]),n.sizeList,t))),r.push(A(n.work.getURL(e.cfg),t))}yield Promise.all(r),n.tiles&&(yield Promise.all(n.tiles.map(e=>O(e,t))))})}function M(e,t){return(0,c.__awaiter)(this,void 0,void 0,function*(){let{observers:n}=e;for(let e of n){let n=j(e,t);t.log(`process observer #${e.index} derived: ${e.derivedIdStr}`,n),yield n}})}function N(e,t){if(t){let n=Date.now();t.then(t=>{let r=Date.now()-n,i=typeof e==`function`?e(t):e;console.log(i+`(${r}ms)`)}).catch(()=>{})}else{let t=typeof e==`function`?e(null):e;console.log(t)}}function P(e){return(0,c.__awaiter)(this,arguments,void 0,function*(e,t={}){var n,r,i,a,o,s,c,f,p,m;let h=e.baseURL,g=``;if(t.distPath)g=(0,d.resolve)(process.cwd(),t.distPath);else for(g=(0,d.resolve)(process.cwd(),(n=e.workCode)==null?`work-${Date.now()}`:n);(0,l.existsSync)(g);)/.-(\d+)$/.test(g)?g=g.replace(/.-(\d+)$/,(e,t)=>`-`+(Number(t)+1)):g+=`-1`;let _={baseURL:h,distPath:g,fetch:(r=t.fetch)==null?fetch:r,imageOptions:{size:(a=(i=t.imageOptions)==null?void 0:i.size)==null?[]:a,format:(s=(o=t.imageOptions)==null?void 0:o.format)==null?[]:s},textureOptions:{size:(f=(c=t.textureOptions)==null?void 0:c.size)==null?[]:f,format:(m=(p=t.textureOptions)==null?void 0:p.format)==null?[]:m},log:t.log?N:(()=>Promise.resolve()),imageProcessingFilename:t.imageProcessingFilename};_.log(JSON.stringify(_,null,` `)),yield(0,u.mkdir)(g,{recursive:!0}),yield(0,u.writeFile)((0,d.resolve)(g,`work.json`),JSON.stringify(e.toJSON(),null,` `)),yield M(e,_),yield T(e,_)})}exports.download=P;
@@ -1,8 +1,8 @@
1
1
  /**
2
2
  * @license
3
3
  * @realsee/five-webgpu
4
- * Generated: 10/26/2026
5
- * Version: 1.0.0-alpha.10
4
+ * Generated: 10/27/2026
5
+ * Version: 1.0.0-alpha.11
6
6
  * Terms:
7
7
  * Realsee SDK License Agreement
8
8
  * Update: July 28, 2021
@@ -252,40 +252,12 @@
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 e, existsSync as t } from "node:fs";
256
- import { mkdir as n, readFile as r, writeFile as i } from "node:fs/promises";
257
- import { dirname as a, extname as o, join as s, resolve as c } from "node:path";
258
- import { Readable as l } from "node:stream";
259
- import u from "sharp";
260
- //#region node_modules/tslib/tslib.es6.mjs
261
- function d(e, t, n, r) {
262
- function i(e) {
263
- return e instanceof n ? e : new n(function(t) {
264
- t(e);
265
- });
266
- }
267
- return new (n || (n = Promise))(function(n, a) {
268
- function o(e) {
269
- try {
270
- c(r.next(e));
271
- } catch (e) {
272
- a(e);
273
- }
274
- }
275
- function s(e) {
276
- try {
277
- c(r.throw(e));
278
- } catch (e) {
279
- a(e);
280
- }
281
- }
282
- function c(e) {
283
- e.done ? n(e.value) : i(e.value).then(o, s);
284
- }
285
- c((r = r.apply(e, t || [])).next());
286
- });
287
- }
288
- //#endregion
255
+ */import { __awaiter as e } from "tslib";
256
+ import { createWriteStream as t, existsSync as n } from "node:fs";
257
+ import { mkdir as r, readFile as i, writeFile as a } from "node:fs/promises";
258
+ import { dirname as o, extname as s, join as c, resolve as l } from "node:path";
259
+ import { Readable as u } from "node:stream";
260
+ import d from "sharp";
289
261
  //#region build/work-downloader/utils/relative-url.js
290
262
  function f(e, t) {
291
263
  if (t && t[t.length - 1] !== "/" && (t += "/"), e.length > t.length && e.startsWith(t)) return e.slice(t.length);
@@ -305,64 +277,64 @@ function p(...e) {
305
277
  //#endregion
306
278
  //#region build/work-downloader/utils/download-to-file.js
307
279
  var m = 1024 * 1024 * 5;
308
- function h(r, o, s) {
309
- return d(this, void 0, void 0, function* () {
310
- var c;
311
- if (t(o)) return o;
312
- let u = yield s(r);
313
- if (u.ok && u.body) {
314
- if (yield n(a(o), { recursive: !0 }), Number((c = u.headers.get("content-length")) == null ? "Infinity" : c) > m) return new Promise((t, n) => {
315
- let r = l.fromWeb(u.body), i = e(o);
316
- r.pipe(i), r.on("error", n), i.on("finish", () => t(o));
280
+ function h(i, s, c) {
281
+ return e(this, void 0, void 0, function* () {
282
+ var e;
283
+ if (n(s)) return s;
284
+ let l = yield c(i);
285
+ if (l.ok && l.body) {
286
+ if (yield r(o(s), { recursive: !0 }), Number((e = l.headers.get("content-length")) == null ? "Infinity" : e) > m) return new Promise((e, n) => {
287
+ let r = u.fromWeb(l.body), i = t(s);
288
+ r.pipe(i), r.on("error", n), i.on("finish", () => e(s));
317
289
  });
318
290
  {
319
- let e = yield u.arrayBuffer();
320
- return yield i(o, Buffer.from(e)), o;
291
+ let e = yield l.arrayBuffer();
292
+ return yield a(s, Buffer.from(e)), s;
321
293
  }
322
294
  }
323
- throw Error(`url: ${r}(${u.statusText})`);
295
+ throw Error(`url: ${i}(${l.statusText})`);
324
296
  });
325
297
  }
326
298
  //#endregion
327
299
  //#region build/work-downloader/utils/image-processing.js
328
300
  var g = ["jpg", "png"], _ = 95;
329
301
  function v(e, t) {
330
- let n = o(e).slice(1) || "jpg", { cut: r, size: i, format: a = n } = t, s = "";
331
- if (t.toFilename) s = t.toFilename(e, {
302
+ let n = s(e).slice(1) || "jpg", { cut: r, size: i, format: a = n } = t, o = "";
303
+ if (t.toFilename) o = t.toFilename(e, {
332
304
  cut: t.cut,
333
305
  size: t.size,
334
306
  format: t.format
335
307
  });
336
308
  else {
337
- let t = "", o = "", c = a;
338
- r && (t = r.join("x")), i && (o = `${i}x`), c === n && !o && !t && (c = ""), s = [
309
+ let t = "", s = "", c = a;
310
+ r && (t = r.join("x")), i && (s = `${i}x`), c === n && !s && !t && (c = ""), o = [
339
311
  e,
340
312
  t,
341
- o,
313
+ s,
342
314
  c
343
315
  ].filter((e) => e.length > 0).join(".");
344
316
  }
345
- return s;
317
+ return o;
346
318
  }
347
- function y(e, n) {
348
- return d(this, void 0, void 0, function* () {
349
- let r = o(e).slice(1) || "jpg", { cut: i, size: a, format: s = r } = n, c = e;
350
- if ((i || a) && s !== r && g.includes(s)) {
351
- let r = v(e, {
352
- format: s,
353
- toFilename: n.toFilename
319
+ function y(t, r) {
320
+ return e(this, void 0, void 0, function* () {
321
+ let e = s(t).slice(1) || "jpg", { cut: i, size: a, format: o = e } = r, c = t;
322
+ if ((i || a) && o !== e && g.includes(o)) {
323
+ let e = v(t, {
324
+ format: o,
325
+ toFilename: r.toFilename
354
326
  });
355
- r !== c && t(r) && (c = r);
327
+ e !== c && n(e) && (c = e);
356
328
  }
357
- let l = u(c);
329
+ let l = d(c);
358
330
  i && (l = l.extract({
359
331
  left: i[0],
360
332
  top: i[1],
361
333
  width: i[2],
362
334
  height: i[3]
363
- })), a && (l = l.resize(a)), l = l.toFormat(s, { quality: _ });
364
- let d = v(e, n);
365
- return d !== e && !t(d) ? l.toFile(d).then(() => d) : d;
335
+ })), a && (l = l.resize(a)), l = l.toFormat(o, { quality: _ });
336
+ let u = v(t, r);
337
+ return u !== t && !n(u) ? l.toFile(u).then(() => u) : u;
366
338
  });
367
339
  }
368
340
  //#endregion
@@ -375,33 +347,33 @@ function b(e) {
375
347
  }
376
348
  return t;
377
349
  }
378
- function x(e, t, n) {
379
- return d(this, void 0, void 0, function* () {
380
- let r = new URL(e, t).href, i = h(r, s(n.distPath, f(r, n.baseURL)), n.fetch);
381
- n.log((e) => `download: ${r} -> ${e}`, i), yield i, /\.json$/.test(e) && (yield S(r, n));
350
+ function x(t, n, r) {
351
+ return e(this, void 0, void 0, function* () {
352
+ let e = new URL(t, n).href, i = h(e, c(r.distPath, f(e, r.baseURL)), r.fetch);
353
+ r.log((t) => `download: ${e} -> ${t}`, i), yield i, /\.json$/.test(t) && (yield S(e, r));
382
354
  });
383
355
  }
384
- function S(e, t) {
385
- return d(this, void 0, void 0, function* () {
386
- let n = s(t.distPath, f(e, t.baseURL)), i = h(e, n, t.fetch);
387
- t.log((t) => `download: ${e} -> ${t}`, i), yield i;
388
- let a = JSON.parse(yield r(n, "utf8"));
356
+ function S(t, n) {
357
+ return e(this, void 0, void 0, function* () {
358
+ let e = c(n.distPath, f(t, n.baseURL)), r = h(t, e, n.fetch);
359
+ n.log((e) => `download: ${t} -> ${e}`, r), yield r;
360
+ let a = JSON.parse(yield i(e, "utf8"));
389
361
  if (a.asset.overview) {
390
- let n = new URL(a.asset.overview.imageFile, e).href, r = h(n, s(t.distPath, f(n, t.baseURL)), t.fetch);
391
- t.log((e) => `download: ${n} -> ${e}`, r), yield r;
362
+ let e = new URL(a.asset.overview.imageFile, t).href, r = h(e, c(n.distPath, f(e, n.baseURL)), n.fetch);
363
+ n.log((t) => `download: ${e} -> ${t}`, r), yield r;
392
364
  }
393
- if (a.asset.trajectories) for (let n of a.asset.trajectories.list) {
394
- let r = new URL(n.file, e).href, i = h(r, s(t.distPath, f(r, t.baseURL)), t.fetch);
395
- t.log((e) => `download: ${r} -> ${e}`, i), yield i;
365
+ if (a.asset.trajectories) for (let e of a.asset.trajectories.list) {
366
+ let r = new URL(e.file, t).href, i = h(r, c(n.distPath, f(r, n.baseURL)), n.fetch);
367
+ n.log((e) => `download: ${r} -> ${e}`, i), yield i;
396
368
  }
397
369
  let o = b(a.root);
398
- for (let n = 0; n < o.length; n += 6) {
370
+ for (let e = 0; e < o.length; e += 6) {
399
371
  let r = [];
400
372
  for (let i = 0; i < 6; i++) {
401
- let a = o[n + i];
373
+ let a = o[e + i];
402
374
  if (a) {
403
- let n = x(a, e, t);
404
- r.push(n);
375
+ let e = x(a, t, n);
376
+ r.push(e);
405
377
  }
406
378
  }
407
379
  yield Promise.all(r);
@@ -410,35 +382,35 @@ function S(e, t) {
410
382
  }
411
383
  //#endregion
412
384
  //#region build/work-downloader/components/model.js
413
- function C(e, t) {
414
- return d(this, void 0, void 0, function* () {
415
- if (t.log("process model"), e.model) {
416
- let { textures: n, layers: r, file: i, textureBase: a } = e.model;
385
+ function C(t, n) {
386
+ return e(this, void 0, void 0, function* () {
387
+ if (n.log("process model"), t.model) {
388
+ let { textures: e, layers: r, file: i, textureBase: a } = t.model;
417
389
  if (i) {
418
- t.log("process model file");
419
- let r = e.getURL(i), o = h(r, s(t.distPath, f(r, t.baseURL)), t.fetch);
420
- if (t.log((e) => `download: ${i} -> ${e}`, o), yield o, n) for (let r of n) {
421
- let n = p(e.getURL(a == null ? "" : a), r), i = s(t.distPath, f(n, t.baseURL)), o = h(n, i, t.fetch);
422
- t.log((e) => `download: ${n} -> ${e}`, o), yield o;
423
- let c = t.imageOptions.format;
424
- c.length === 0 && c.push(void 0);
425
- let l = t.imageOptions.size;
390
+ n.log("process model file");
391
+ let r = t.getURL(i), o = h(r, c(n.distPath, f(r, n.baseURL)), n.fetch);
392
+ if (n.log((e) => `download: ${i} -> ${e}`, o), yield o, e) for (let r of e) {
393
+ let e = p(t.getURL(a == null ? "" : a), r), i = c(n.distPath, f(e, n.baseURL)), o = h(e, i, n.fetch);
394
+ n.log((t) => `download: ${e} -> ${t}`, o), yield o;
395
+ let s = n.imageOptions.format;
396
+ s.length === 0 && s.push(void 0);
397
+ let l = n.imageOptions.size;
426
398
  l.length === 0 && l.push(void 0);
427
399
  let u = [];
428
- for (let e of c) for (let n of l) {
400
+ for (let e of s) for (let t of l) {
429
401
  let r = y(i, {
430
402
  format: e,
431
- size: n,
432
- toFilename: t.imageProcessingFilename
403
+ size: t,
404
+ toFilename: n.imageProcessingFilename
433
405
  });
434
- t.log((e) => `imageProcessing: ${i} -> ${e}`, r), u.push(r);
406
+ n.log((e) => `imageProcessing: ${i} -> ${e}`, r), u.push(r);
435
407
  }
436
408
  yield Promise.all(u);
437
409
  }
438
410
  }
439
- if (r) for (let n of r) {
440
- let { tileset: r } = n;
441
- t.log("process model layer"), yield S(e.getURL(r), t);
411
+ if (r) for (let e of r) {
412
+ let { tileset: r } = e;
413
+ n.log("process model layer"), yield S(t.getURL(r), n);
442
414
  }
443
415
  }
444
416
  });
@@ -453,101 +425,101 @@ var w = [
453
425
  "up",
454
426
  "down"
455
427
  ];
456
- function T(e, t, n) {
457
- return d(this, void 0, void 0, function* () {
458
- let r = s(n.distPath, f(e, n.baseURL)), i = h(e, r, n.fetch);
459
- n.log((t) => `download: ${e} -> ${t}`, i), yield i;
460
- let a = Math.pow(2, t.level), o = n.imageOptions.format;
428
+ function T(t, n, r) {
429
+ return e(this, void 0, void 0, function* () {
430
+ let e = c(r.distPath, f(t, r.baseURL)), i = h(t, e, r.fetch);
431
+ r.log((e) => `download: ${t} -> ${e}`, i), yield i;
432
+ let a = Math.pow(2, n.level), o = r.imageOptions.format;
461
433
  o.length === 0 && o.push(void 0);
462
- let c = [];
463
- if (a > 1) for (let e = 0; e < a; e++) for (let i = 0; i < a; i++) for (let s of o) {
434
+ let s = [];
435
+ if (a > 1) for (let t = 0; t < a; t++) for (let i = 0; i < a; i++) for (let c of o) {
464
436
  let o = [
465
- t.size / a * i,
466
- t.size / a * e,
467
- t.size / a,
468
- t.size / a
469
- ], l = y(r, {
470
- format: s,
471
- size: t.scale >= 1 ? void 0 : t.scale * t.size / a,
437
+ n.size / a * i,
438
+ n.size / a * t,
439
+ n.size / a,
440
+ n.size / a
441
+ ], l = y(e, {
442
+ format: c,
443
+ size: n.scale >= 1 ? void 0 : n.scale * n.size / a,
472
444
  cut: o,
473
- toFilename: n.imageProcessingFilename
445
+ toFilename: r.imageProcessingFilename
474
446
  });
475
- if (n.log((e) => `imageProcessing: ${r} -> ${e}`, l), c.push(l), t.level === 1 && t.scale >= .5 && (s === "jpg" || /\.jpg$/.test(r))) {
476
- let e = y(r, {
477
- format: s,
447
+ if (r.log((t) => `imageProcessing: ${e} -> ${t}`, l), s.push(l), n.level === 1 && n.scale >= .5 && (c === "jpg" || /\.jpg$/.test(e))) {
448
+ let t = y(e, {
449
+ format: c,
478
450
  size: void 0,
479
451
  cut: o,
480
- toFilename: n.imageProcessingFilename
452
+ toFilename: r.imageProcessingFilename
481
453
  });
482
- n.log((e) => `imageProcessing: ${r} -> ${e}`, e), c.push(e);
454
+ r.log((t) => `imageProcessing: ${e} -> ${t}`, t), s.push(t);
483
455
  }
484
456
  }
485
- yield Promise.all(c);
457
+ yield Promise.all(s);
486
458
  });
487
459
  }
488
- function E(e, t) {
489
- return d(this, void 0, void 0, function* () {
490
- let n = w.map((n) => T(e.work.getURL(e[n]), e, t));
491
- if (e.gainmap) {
492
- let r = e.gainmap;
493
- n.push(...w.map((n) => T(e.work.getURL(r[n]), e, t)));
460
+ function E(t, n) {
461
+ return e(this, void 0, void 0, function* () {
462
+ let e = w.map((e) => T(t.work.getURL(t[e]), t, n));
463
+ if (t.gainmap) {
464
+ let r = t.gainmap;
465
+ e.push(...w.map((e) => T(t.work.getURL(r[e]), t, n)));
494
466
  }
495
- yield Promise.all(n);
467
+ yield Promise.all(e);
496
468
  });
497
469
  }
498
- function D(e, t, n) {
499
- return d(this, void 0, void 0, function* () {
500
- let r = s(n.distPath, f(e, n.baseURL)), i = h(e, r, n.fetch);
501
- n.log((t) => `download: ${e} -> ${t}`, i), yield i;
502
- let a = n.imageOptions.format;
470
+ function D(t, n, r) {
471
+ return e(this, void 0, void 0, function* () {
472
+ let e = c(r.distPath, f(t, r.baseURL)), i = h(t, e, r.fetch);
473
+ r.log((e) => `download: ${t} -> ${e}`, i), yield i;
474
+ let a = r.imageOptions.format;
503
475
  a.length === 0 && a.push(void 0);
504
- let o = n.imageOptions.size;
476
+ let o = r.imageOptions.size;
505
477
  o.length === 0 && o.push(void 0);
506
- for (let r of t) {
507
- let t = e.replace(/cube\_\d+/, `cube_${r}`), i = s(n.distPath, f(t, n.baseURL)), o = h(t, i, n.fetch);
508
- n.log((e) => `download ${t} -> ${i}`, o), yield o;
478
+ for (let e of n) {
479
+ let n = t.replace(/cube\_\d+/, `cube_${e}`), i = c(r.distPath, f(n, r.baseURL)), o = h(n, i, r.fetch);
480
+ r.log((e) => `download ${n} -> ${i}`, o), yield o;
509
481
  for (let e of a) {
510
482
  let t = y(i, {
511
483
  format: e,
512
- toFilename: n.imageProcessingFilename
484
+ toFilename: r.imageProcessingFilename
513
485
  });
514
- n.log((e) => `imageProcessing: ${i} -> ${e}`, t), yield t;
486
+ r.log((e) => `imageProcessing: ${i} -> ${e}`, t), yield t;
515
487
  }
516
488
  }
517
- let c = [];
518
- for (let e of a) for (let t of o) {
519
- let i = y(r, {
520
- format: e,
521
- size: t,
522
- toFilename: n.imageProcessingFilename
489
+ let s = [];
490
+ for (let t of a) for (let n of o) {
491
+ let i = y(e, {
492
+ format: t,
493
+ size: n,
494
+ toFilename: r.imageProcessingFilename
523
495
  });
524
- n.log((e) => `imageProcessing: ${r} -> ${e}`, i), c.push(i);
496
+ r.log((t) => `imageProcessing: ${e} -> ${t}`, i), s.push(i);
525
497
  }
526
- yield Promise.all(c);
498
+ yield Promise.all(s);
527
499
  });
528
500
  }
529
- function O(e, t) {
530
- return d(this, void 0, void 0, function* () {
531
- let n = h(e, s(t.distPath, f(e, t.baseURL)), t.fetch);
532
- t.log((t) => `download: ${e} -> ${t}`, n), yield n;
501
+ function O(t, n) {
502
+ return e(this, void 0, void 0, function* () {
503
+ let e = h(t, c(n.distPath, f(t, n.baseURL)), n.fetch);
504
+ n.log((e) => `download: ${t} -> ${e}`, e), yield e;
533
505
  });
534
506
  }
535
- function k(e, t) {
536
- return d(this, void 0, void 0, function* () {
537
- let { images: n } = e, r = w.map((e) => D(n.work.getURL(n[e]), n.sizeList, t));
538
- if (n.gainmap) {
539
- let e = n.gainmap;
540
- r.push(...w.map((r) => D(n.work.getURL(e[r]), n.sizeList, t))), r.push(O(n.work.getURL(e.cfg), t));
507
+ function k(t, n) {
508
+ return e(this, void 0, void 0, function* () {
509
+ let { images: e } = t, r = w.map((t) => D(e.work.getURL(e[t]), e.sizeList, n));
510
+ if (e.gainmap) {
511
+ let t = e.gainmap;
512
+ r.push(...w.map((r) => D(e.work.getURL(t[r]), e.sizeList, n))), r.push(O(e.work.getURL(t.cfg), n));
541
513
  }
542
- yield Promise.all(r), n.tiles && (yield Promise.all(n.tiles.map((e) => E(e, t))));
514
+ yield Promise.all(r), e.tiles && (yield Promise.all(e.tiles.map((e) => E(e, n))));
543
515
  });
544
516
  }
545
- function A(e, t) {
546
- return d(this, void 0, void 0, function* () {
547
- let { observers: n } = e;
548
- for (let e of n) {
549
- let n = k(e, t);
550
- t.log(`process observer #${e.index} derived: ${e.derivedIdStr}`, n), yield n;
517
+ function A(t, n) {
518
+ return e(this, void 0, void 0, function* () {
519
+ let { observers: e } = t;
520
+ for (let t of e) {
521
+ let e = k(t, n);
522
+ n.log(`process observer #${t.index} derived: ${t.derivedIdStr}`, e), yield e;
551
523
  }
552
524
  });
553
525
  }
@@ -567,28 +539,28 @@ function j(e, t) {
567
539
  }
568
540
  //#endregion
569
541
  //#region build/work-downloader/download.js
570
- function M(e) {
571
- return d(this, arguments, void 0, function* (e, r = {}) {
572
- var a, o, s, l, u, d, f, p, m, h;
542
+ function M(t) {
543
+ return e(this, arguments, void 0, function* (e, t = {}) {
544
+ var i, o, s, c, u, d, f, p, m, h;
573
545
  let g = e.baseURL, _ = "";
574
- if (r.distPath) _ = c(process.cwd(), r.distPath);
575
- else for (_ = c(process.cwd(), (a = e.workCode) == null ? `work-${Date.now()}` : a); t(_);) /.-(\d+)$/.test(_) ? _ = _.replace(/.-(\d+)$/, (e, t) => "-" + (Number(t) + 1)) : _ += "-1";
546
+ if (t.distPath) _ = l(process.cwd(), t.distPath);
547
+ else for (_ = l(process.cwd(), (i = e.workCode) == null ? `work-${Date.now()}` : i); n(_);) /.-(\d+)$/.test(_) ? _ = _.replace(/.-(\d+)$/, (e, t) => "-" + (Number(t) + 1)) : _ += "-1";
576
548
  let v = {
577
549
  baseURL: g,
578
550
  distPath: _,
579
- fetch: (o = r.fetch) == null ? fetch : o,
551
+ fetch: (o = t.fetch) == null ? fetch : o,
580
552
  imageOptions: {
581
- size: (l = (s = r.imageOptions) == null ? void 0 : s.size) == null ? [] : l,
582
- format: (d = (u = r.imageOptions) == null ? void 0 : u.format) == null ? [] : d
553
+ size: (c = (s = t.imageOptions) == null ? void 0 : s.size) == null ? [] : c,
554
+ format: (d = (u = t.imageOptions) == null ? void 0 : u.format) == null ? [] : d
583
555
  },
584
556
  textureOptions: {
585
- size: (p = (f = r.textureOptions) == null ? void 0 : f.size) == null ? [] : p,
586
- format: (h = (m = r.textureOptions) == null ? void 0 : m.format) == null ? [] : h
557
+ size: (p = (f = t.textureOptions) == null ? void 0 : f.size) == null ? [] : p,
558
+ format: (h = (m = t.textureOptions) == null ? void 0 : m.format) == null ? [] : h
587
559
  },
588
- log: r.log ? j : (() => Promise.resolve()),
589
- imageProcessingFilename: r.imageProcessingFilename
560
+ log: t.log ? j : (() => Promise.resolve()),
561
+ imageProcessingFilename: t.imageProcessingFilename
590
562
  };
591
- v.log(JSON.stringify(v, null, " ")), yield n(_, { recursive: !0 }), yield i(c(_, "work.json"), JSON.stringify(e.toJSON(), null, " ")), yield A(e, v), yield C(e, v);
563
+ v.log(JSON.stringify(v, null, " ")), yield r(_, { recursive: !0 }), yield a(l(_, "work.json"), JSON.stringify(e.toJSON(), null, " ")), yield A(e, v), yield C(e, v);
592
564
  });
593
565
  }
594
566
  //#endregion