@realsee/five 6.6.0-alpha.2 → 6.6.0-alpha.20

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 (203) hide show
  1. package/docs/assets/hierarchy.js +1 -1
  2. package/docs/assets/navigation.js +1 -1
  3. package/docs/assets/search.js +1 -1
  4. package/docs/classes/five.Fetcher.html +2 -2
  5. package/docs/classes/five.Five.html +60 -58
  6. package/docs/classes/five.Model.html +33 -33
  7. package/docs/classes/five.ModelScene.html +17 -18
  8. package/docs/classes/five.NetworkSubscribe.html +1 -1
  9. package/docs/classes/five.PBMContainer.html +1 -1
  10. package/docs/classes/five.PBMGroup.html +1 -1
  11. package/docs/classes/five.PBMMesh.html +2 -2
  12. package/docs/classes/five.PBMMeshMaterial.html +6 -6
  13. package/docs/classes/five.PBMPointCloud.html +1 -1
  14. package/docs/classes/five.PBMPointCloudMaterial.html +5 -5
  15. package/docs/classes/five.PBMSkinnedMesh.html +2 -2
  16. package/docs/classes/five.PanoCircleMesh.html +1 -1
  17. package/docs/classes/five.PanoCircleMeshCustom.html +1 -1
  18. package/docs/classes/five.PanoCircleMeshSolid.html +1 -1
  19. package/docs/classes/five.Parameter.html +52 -52
  20. package/docs/classes/five.Tile3DModel.html +26 -26
  21. package/docs/classes/five.TileNode.html +2 -2
  22. package/docs/classes/five.TileRequestScheduler.html +1 -1
  23. package/docs/classes/five.Tileset.html +2 -2
  24. package/docs/classes/five.TrajectoryNode.html +1 -1
  25. package/docs/classes/five.Work.html +17 -17
  26. package/docs/classes/five.WorkResolvedObserver.html +18 -14
  27. package/docs/classes/gltf-loader.DDSLoader.html +1 -1
  28. package/docs/classes/gltf-loader.DRACOLoader.html +1 -1
  29. package/docs/classes/gltf-loader.GLTFObject.html +1 -1
  30. package/docs/classes/gltf-loader.THREEGLTFLoader.html +1 -1
  31. package/docs/classes/line.LineGeometry.html +1 -1
  32. package/docs/classes/line.LineMaterial.html +1 -1
  33. package/docs/classes/line.LineSegmentsGeometry.html +1 -1
  34. package/docs/classes/line.THREE_Line2.html +1 -1
  35. package/docs/classes/line.THREE_LineSegments2.html +1 -1
  36. package/docs/classes/plugins.BasePlugin.Controller.html +5 -5
  37. package/docs/classes/plugins.RoundedBoxGeometry.html +1 -1
  38. package/docs/classes/vfx.Airflow.html +1 -1
  39. package/docs/classes/vfx.Flame.html +1 -1
  40. package/docs/classes/vfx.Particle.html +1 -1
  41. package/docs/classes/vfx.ParticleGPU.html +19 -0
  42. package/docs/classes/vfx.SpotLight.html +1 -1
  43. package/docs/functions/five.createDebugBoundingMesh.html +1 -1
  44. package/docs/functions/five.defaultImageURLTransform.html +1 -1
  45. package/docs/functions/five.isBoundingVolume.html +1 -1
  46. package/docs/functions/five.makeBoundingVolume.html +1 -1
  47. package/docs/functions/five.parseWork.html +1 -1
  48. package/docs/functions/vue.useFiveWorks.html +2 -2
  49. package/docs/hierarchy.html +1 -1
  50. package/docs/interfaces/five.AddableObject.html +3 -3
  51. package/docs/interfaces/five.AjaxOptions.html +5 -5
  52. package/docs/interfaces/five.BaseEvent.html +1 -1
  53. package/docs/interfaces/five.BoundingVolume.html +2 -2
  54. package/docs/interfaces/five.BoxBoundingVolume.html +2 -2
  55. package/docs/interfaces/five.EventCallback.html +1 -1
  56. package/docs/interfaces/five.FiveInitArgs.html +2 -2
  57. package/docs/interfaces/five.FiveLoadOptions.html +1 -1
  58. package/docs/interfaces/five.FloorplanControllerCustomInitArgs.html +9 -9
  59. package/docs/interfaces/five.GestureEvent.html +1 -1
  60. package/docs/interfaces/five.ImageOptions.html +17 -12
  61. package/docs/interfaces/five.ImageURLOptions.html +7 -5
  62. package/docs/interfaces/five.IntersectEvent.html +1 -1
  63. package/docs/interfaces/five.IntersectMesh.html +1 -1
  64. package/docs/interfaces/five.IntersectMeshInterface.html +1 -1
  65. package/docs/interfaces/five.Intersection.html +6 -3
  66. package/docs/interfaces/five.KTX2.html +2 -2
  67. package/docs/interfaces/five.LoosePanoWork.html +2 -2
  68. package/docs/interfaces/five.LooseWork.html +2 -2
  69. package/docs/interfaces/five.LooseWorkInitial.html +2 -2
  70. package/docs/interfaces/five.LooseWorkModel.html +2 -2
  71. package/docs/interfaces/five.LooseWorkObserver.html +2 -2
  72. package/docs/interfaces/five.LooseWorkPanorama.html +4 -2
  73. package/docs/interfaces/five.LooseWorkWithExtrinsics.html +7 -7
  74. package/docs/interfaces/five.MapviewControllerCustomInitArgs.html +9 -9
  75. package/docs/interfaces/five.ModeChangeEvent.html +1 -1
  76. package/docs/interfaces/five.ModelControllerCustomInitArgs.html +1 -1
  77. package/docs/interfaces/five.ModelEvent.html +1 -1
  78. package/docs/interfaces/five.ModelLike.html +2 -2
  79. package/docs/interfaces/five.ModelSceneEvent.html +1 -1
  80. package/docs/interfaces/five.MovePanoOptions.html +1 -1
  81. package/docs/interfaces/five.NetworkAbortError.html +1 -1
  82. package/docs/interfaces/five.NetworkFirbiddenError.html +1 -1
  83. package/docs/interfaces/five.NetworkOptions.html +4 -4
  84. package/docs/interfaces/five.NetworkProxyError.html +1 -1
  85. package/docs/interfaces/five.NetworkResourceEvent.html +1 -1
  86. package/docs/interfaces/five.NetworkResponseError.html +2 -2
  87. package/docs/interfaces/five.NetworkTimeoutError.html +1 -1
  88. package/docs/interfaces/five.ObjectEvent.html +1 -1
  89. package/docs/interfaces/five.PBMMaterial.html +1 -1
  90. package/docs/interfaces/five.PBMMeshMaterialParameters.html +2 -2
  91. package/docs/interfaces/five.PBMPointCloudMaterialParameters.html +2 -2
  92. package/docs/interfaces/five.PanoCircleMeshInterface.html +3 -3
  93. package/docs/interfaces/five.PanoEvent.html +1 -1
  94. package/docs/interfaces/five.PanoTextureEvent.html +1 -1
  95. package/docs/interfaces/five.PanoramaControllerCustomInitArgs.html +1 -1
  96. package/docs/interfaces/five.PanoramaLikeControllerCustomInitArgs.html +1 -1
  97. package/docs/interfaces/five.ParameterMaterialValue.html +37 -37
  98. package/docs/interfaces/five.ParameterTilesetValue.html +15 -15
  99. package/docs/interfaces/five.ParameterValue.html +51 -51
  100. package/docs/interfaces/five.Pose.html +1 -1
  101. package/docs/interfaces/five.RegionBoundingVolume.html +2 -2
  102. package/docs/interfaces/five.RenderEvent.html +1 -1
  103. package/docs/interfaces/five.ResolvedParameterValue.html +51 -51
  104. package/docs/interfaces/five.SphereBoundingVolume.html +2 -2
  105. package/docs/interfaces/five.State.html +1 -1
  106. package/docs/interfaces/five.StateEvent.html +1 -1
  107. package/docs/interfaces/five.TextureOptions.html +13 -8
  108. package/docs/interfaces/five.Tile3DModelLoaderOptions.html +2 -2
  109. package/docs/interfaces/five.TilesetHeader.html +2 -2
  110. package/docs/interfaces/five.TopviewControllerCustomInitArgs.html +5 -5
  111. package/docs/interfaces/five.VRPanoramaControllerCustomInitArgs.html +1 -1
  112. package/docs/interfaces/five.ViewLayer.html +26 -26
  113. package/docs/interfaces/five.WorkCubeImage.html +1 -1
  114. package/docs/interfaces/five.WorkImage.html +1 -1
  115. package/docs/interfaces/five.WorkModel.html +6 -6
  116. package/docs/interfaces/five.WorkModelLayer.html +2 -2
  117. package/docs/interfaces/five.WorkObserver.html +20 -15
  118. package/docs/interfaces/five.WorkTile.html +1 -1
  119. package/docs/interfaces/five.WorksEvent.html +1 -1
  120. package/docs/interfaces/five.XRControllerEvent.html +1 -1
  121. package/docs/interfaces/five.XRGestureEvent.html +1 -1
  122. package/docs/interfaces/five.XRPanoramaControllerCustomInitArgs.html +1 -1
  123. package/docs/interfaces/five.XRSessionEvent.html +1 -1
  124. package/docs/interfaces/plugins.BackgroundPluginController.html +4 -4
  125. package/docs/interfaces/plugins.BackgroundPluginType.EventMap.html +4 -4
  126. package/docs/interfaces/plugins.ItemMaskController.html +4 -4
  127. package/docs/interfaces/plugins.ItemMaskPluginType.EventMap.html +1 -1
  128. package/docs/interfaces/plugins.ItemMaskPluginType.State.html +1 -1
  129. package/docs/interfaces/plugins.OrientationPluginController.html +3 -3
  130. package/docs/interfaces/plugins.OrientationPluginType.EventMap.html +1 -1
  131. package/docs/interfaces/plugins.OrientationPluginType.State.html +1 -1
  132. package/docs/interfaces/plugins.PanoAnimeController.html +14 -10
  133. package/docs/interfaces/plugins.PanoAnimePluginType.Config.html +2 -1
  134. package/docs/interfaces/plugins.PanoAnimePluginType.ConfigChangeEvent.html +7 -0
  135. package/docs/interfaces/plugins.PanoAnimePluginType.EventMap.html +6 -4
  136. package/docs/interfaces/plugins.PanoAnimePluginType.Params.html +2 -2
  137. package/docs/interfaces/plugins.PanoAnimePluginType.State.html +3 -3
  138. package/docs/interfaces/plugins.PluginTemplateType.EventMap.html +1 -1
  139. package/docs/interfaces/plugins.PluginTemplateType.State.html +1 -1
  140. package/docs/interfaces/plugins.TrajectoryController.html +5 -5
  141. package/docs/interfaces/react.FiveInjectionTypes.html +14 -14
  142. package/docs/interfaces/vfx.ParticleGPUArgs.html +60 -0
  143. package/docs/interfaces/vfx.ParticleGPUTweenKeyframe.html +3 -0
  144. package/docs/modules/plugins.PanoAnimePluginType.html +1 -1
  145. package/docs/modules/vfx.html +1 -1
  146. package/docs/types/five.AjaxResponseType.html +1 -1
  147. package/docs/types/five.AjaxResponseTypeMapping.html +1 -1
  148. package/docs/types/five.EventTypes.html +1 -1
  149. package/docs/types/five.Mode.html +1 -1
  150. package/docs/types/five.Models.html +5 -5
  151. package/docs/types/five.NetWorkMeta.html +2 -2
  152. package/docs/types/five.NetworkError.html +1 -1
  153. package/docs/types/five.NetworkErrorCallback.html +1 -1
  154. package/docs/types/five.NetworkProgressCallback.html +1 -1
  155. package/docs/types/five.NetworkResponse.html +2 -2
  156. package/docs/types/five.NetworkState.html +1 -1
  157. package/docs/types/five.NetworkSuccessCallback.html +1 -1
  158. package/docs/types/five.NetworkType.html +1 -1
  159. package/docs/types/five.ParseOptions.html +6 -6
  160. package/docs/types/five.SubscribeEventMap.html +1 -1
  161. package/docs/types/plugins.PanoAnimePluginType.PluginData.html +1 -1
  162. package/docs/types/plugins.PanoAnimePluginType.ServerData.html +1 -1
  163. package/docs/types/react.StoreActionMapType.html +1 -1
  164. package/docs/types/vfx.ParticleGPUType.html +1 -0
  165. package/docs/types/vue.FiveModelIntersectRaycaster.html +1 -1
  166. package/docs/types/vue.Project2d.html +1 -1
  167. package/docs/variables/five.controllersDefaultInitArgs.html +1 -1
  168. package/docs/variables/five.ktx2.html +1 -1
  169. package/docs/variables/react.useFiveScene.html +1 -1
  170. package/five/declare.d.ts +34 -0
  171. package/five/index.d.ts +55 -26
  172. package/five/index.js +77 -77
  173. package/five/index.mjs +5095 -4807
  174. package/gltf-loader/index.js +3 -3
  175. package/gltf-loader/index.mjs +3 -3
  176. package/line/index.js +3 -3
  177. package/line/index.mjs +3 -3
  178. package/package.json +2 -2
  179. package/plugins/index.d.ts +26 -1
  180. package/plugins/index.js +10 -10
  181. package/plugins/index.mjs +53 -48
  182. package/react/index.js +2 -2
  183. package/react/index.mjs +2 -2
  184. package/shader-lib/index.js +2 -2
  185. package/shader-lib/index.mjs +2 -2
  186. package/sticker/index.js +3 -3
  187. package/sticker/index.mjs +3 -3
  188. package/umd/five-gltf-loader.js +3 -3
  189. package/umd/five-line.js +3 -3
  190. package/umd/five-plugins.js +9 -9
  191. package/umd/five-react.js +2 -2
  192. package/umd/five-shader-lib.js +2 -2
  193. package/umd/five-sticker.js +3 -3
  194. package/umd/five-vfx.js +126 -19
  195. package/umd/five-vue.js +2 -2
  196. package/umd/five.js +77 -77
  197. package/vfx/index.d.ts +99 -0
  198. package/vfx/index.js +126 -19
  199. package/vfx/index.mjs +325 -119
  200. package/vue/index.js +2 -2
  201. package/vue/index.mjs +2 -2
  202. package/work-downloader/index.js +3 -3
  203. package/work-downloader/index.mjs +108 -94
package/vue/index.js CHANGED
@@ -1,8 +1,8 @@
1
1
  /**
2
2
  * @license
3
3
  * @realsee/five
4
- * Generated: 2025/8/15
5
- * Version: 6.6.0-alpha.2
4
+ * Generated: 9/23/2025
5
+ * Version: 6.6.0-alpha.20
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: 2025/8/15
5
- * Version: 6.6.0-alpha.2
4
+ * Generated: 9/23/2025
5
+ * Version: 6.6.0-alpha.20
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: 2025/8/15
5
- * Version: 6.6.0-alpha.2
4
+ * Generated: 9/23/2025
5
+ * Version: 6.6.0-alpha.20
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 I=require("node:fs"),$=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 L(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 F(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 I.existsSync(e)?[2,e]:[4,r(n)];case 1:return i=u.sent(),i.ok&&i.body?[4,$.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=I.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,$.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(d){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&&!I.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,L(i,r.baseURL)),t=F(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,d,h,g,v,p,m,w,U;return k(this,function(b){switch(b.label){case 0:return r=y.join(e.distPath,L(n,e.baseURL)),i=F(n,r,e.fetch),e.log(function(j){return"download: ".concat(n," -> ").concat(j)},i),[4,i];case 1:return b.sent(),o=(t=JSON).parse,[4,$.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,L(u,e.baseURL)),s=F(u,l,e.fetch),e.log(function(j){return"download: ".concat(u," -> ").concat(j)},s),[4,s]):[3,4];case 3:b.sent(),b.label=4;case 4:if(!a.asset.trajectories)return[3,8];c=function(j){var R,O,z;return k(this,function(S){switch(S.label){case 0:return R=new URL(j.file,n).href,O=y.join(e.distPath,L(R,e.baseURL)),z=F(R,O,e.fetch),e.log(function(_){return"download: ".concat(R," -> ").concat(_)},z),[4,z];case 1:return S.sent(),[2]}})},f=0,d=a.asset.trajectories.list,b.label=5;case 5:return f<d.length?(h=d[f],[5,c(h)]):[3,8];case 6:b.sent(),b.label=7;case 7:return f++,[3,5];case 8:for(g=G(a.root),v=[],p=0,m=g;p<m.length;p++)w=m[p],U=Y(w,n,e),v.push(U);return[4,Promise.all(v)];case 9:return b.sent(),[2]}})})}function Z(n,e){return P(this,void 0,void 0,function(){var r,i,a,t,o,m,u,l,s,c,f,d,h,g,v,p,m;return k(this,function(w){switch(w.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"),m=n.getURL(t),u=y.join(e.distPath,L(m,e.baseURL)),l=F(m,u,e.fetch),e.log(function(U){return"download: ".concat(t," -> ").concat(U)},l),[4,l]):[3,5]):[3,9];case 1:if(w.sent(),!i)return[3,5];s=function(U){var b,j,R,O,z,S,_,q,W,N,B,A,J;return k(this,function(C){switch(C.label){case 0:return b=Q(n.getURL(o!=null?o:""),U),j=y.join(e.distPath,L(b,e.baseURL)),R=F(b,j,e.fetch),e.log(function(D){return"download: ".concat(b," -> ").concat(D)},R),[4,R];case 1:for(C.sent(),O=e.imageOptions.format,O.length===0&&O.push(void 0),z=e.imageOptions.size,z.length===0&&z.push(void 0),S=[],_=0,q=O;_<q.length;_++)for(W=q[_],N=0,B=z;N<B.length;N++)A=B[N],J=M(j,{format:W,size:A,toFilename:e.imageProcessingFilename}),e.log(function(D){return"imageProcessing: ".concat(j," -> ").concat(D)},J),S.push(J);return[4,Promise.all(S)];case 2:return C.sent(),[2]}})},c=0,f=i,w.label=2;case 2:return c<f.length?(d=f[c],[5,s(d)]):[3,5];case 3:w.sent(),w.label=4;case 4:return c++,[3,2];case 5:if(!a)return[3,9];h=0,g=a,w.label=6;case 6:return h<g.length?(v=g[h],p=v.tileset,e.log("process model layer"),m=n.getURL(p),[4,X(m,e)]):[3,9];case 7:w.sent(),w.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,d,h,g,v;return k(this,function(p){switch(p.label){case 0:return i=y.join(r.distPath,L(n,r.baseURL)),a=F(n,i,r.fetch),r.log(function(m){return"download: ".concat(n," -> ").concat(m)},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++)d=f[c],h=[e.size/t*s,e.size/t*l,e.size/t,e.size/t],g=e.scale>=1?void 0:e.scale*e.size/t,e.level===1&&e.scale>=.5&&(d==="jpg"||/\.jpg$/.test(i))&&(g=void 0),v=M(i,{format:d,size:g,cut:h,toFilename:r.imageProcessingFilename}),r.log(function(m){return"imageProcessing: ".concat(i," -> ").concat(m)},v),u.push(v);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,d,h;return k(this,function(g){switch(g.label){case 0:return r=y.join(e.distPath,L(n,e.baseURL)),i=F(n,r,e.fetch),e.log(function(v){return"download: ".concat(n," -> ").concat(v)},i),[4,i];case 1:for(g.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++)d=f[c],h=M(r,{format:s,size:d,toFilename:e.imageProcessingFilename}),e.log(function(v){return"imageProcessing: ".concat(r," -> ").concat(v)},h),o.push(h);return[4,Promise.all(o)];case 2:return g.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,d,h,g,v,p,m;return r===void 0&&(r={}),k(this,function(w){switch(w.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()));I.existsSync(a);)/.-(\d+)$/.test(a)?a=a.replace(/.-(\d+)$/,function(U,b){return"-"+(Number(b)+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=(d=r.imageOptions)===null||d===void 0?void 0:d.format)!==null&&h!==void 0?h:[]},textureOptions:{size:(v=(g=r.textureOptions)===null||g===void 0?void 0:g.size)!==null&&v!==void 0?v:[],format:(m=(p=r.textureOptions)===null||p===void 0?void 0:p.format)!==null&&m!==void 0?m:[]},log:r.log?ne:(function(){return Promise.resolve()}),imageProcessingFilename:r.imageProcessingFilename},t.log(JSON.stringify(t,null," ")),[4,$.mkdir(a,{recursive:!0})];case 1:return w.sent(),o="work.json",u=y.resolve(a,o),[4,$.writeFile(u,JSON.stringify(e.toJSON(),null," "))];case 2:return w.sent(),[4,re(e,t)];case 3:return w.sent(),[4,Z(e,t)];case 4:return w.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: 2025/8/15
5
- * Version: 6.6.0-alpha.2
4
+ * Generated: 9/23/2025
5
+ * Version: 6.6.0-alpha.20
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 L, 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) {
@@ -365,13 +365,13 @@ function re() {
365
365
  return r.join("/");
366
366
  }
367
367
  var ne = 1024 * 1024 * 5;
368
- function F(n, e, r) {
368
+ function O(n, e, r) {
369
369
  return k(this, void 0, void 0, function() {
370
370
  var a, i, t, o;
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 F(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(d) {
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 = L(r.distPath, U(a, r.baseURL)), t = F(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,31 +443,31 @@ 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, d, h, g, v, p, m, w, O;
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 = L(e.distPath, U(n, e.baseURL)), a = F(n, r, e.fetch), e.log(function(P) {
451
- return "download: ".concat(n, " -> ").concat(P);
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 = L(e.distPath, U(u, e.baseURL)), s = F(u, f, e.fetch), e.log(function(P) {
457
- return "download: ".concat(u, " -> ").concat(P);
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(P) {
464
- var R, j, z;
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 R = new URL(P.file, n).href, j = L(e.distPath, U(R, e.baseURL)), z = F(R, j, e.fetch), e.log(function(S) {
469
- return "download: ".concat(R, " -> ").concat(S);
470
- }, z), [4, z];
468
+ return R = new URL(z.file, n).href, j = F(e.distPath, U(R, e.baseURL)), S = O(R, j, e.fetch), e.log(function($) {
469
+ return "download: ".concat(R, " -> ").concat($);
470
+ }, S), [4, S];
471
471
  case 1:
472
472
  return _.sent(), [
473
473
  2
@@ -475,19 +475,26 @@ function K(n, e) {
475
475
  ];
476
476
  }
477
477
  });
478
- }, l = 0, d = 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 < d.length ? (h = d[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
- for (g = H(i.root), v = [], p = 0, m = g; p < m.length; p++)
487
- w = m[p], O = te(w, n, e), v.push(O);
488
- return [4, Promise.all(v)];
486
+ v = H(i.root), m = 6, p = 0, b.label = 9;
489
487
  case 9:
490
- return b.sent(), [
488
+ if (!(p < v.length)) return [3, 12];
489
+ for (w = [], h = 0; h < m; h++)
490
+ L = v[p + h], L && (P = te(L, n, e), w.push(P));
491
+ return [4, Promise.all(w)];
492
+ case 10:
493
+ b.sent(), b.label = 11;
494
+ case 11:
495
+ return p += m, [3, 9];
496
+ case 12:
497
+ return [
491
498
  2
492
499
  /*return*/
493
500
  ];
@@ -497,34 +504,34 @@ function K(n, e) {
497
504
  }
498
505
  function ae(n, e) {
499
506
  return k(this, void 0, void 0, function() {
500
- var r, a, i, t, o, m, u, f, s, c, l, d, h, g, v, p, m;
501
- return y(this, function(w) {
502
- switch (w.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) {
503
510
  case 0:
504
- 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"), m = n.getURL(t), u = L(e.distPath, U(m, e.baseURL)), f = F(m, u, e.fetch), e.log(function(O) {
505
- return "download: ".concat(t, " -> ").concat(O);
511
+ return e.log("process model"), n.model ? (r = n.model, a = r.textures, i = r.layers, t = r.file, o = r.textureBase, t ? (e.log("process model file"), w = n.getURL(t), u = F(e.distPath, U(w, e.baseURL)), f = O(w, u, e.fetch), e.log(function(L) {
512
+ return "download: ".concat(t, " -> ").concat(L);
506
513
  }, f), [4, f]) : [3, 5]) : [3, 9];
507
514
  case 1:
508
- if (w.sent(), !a) return [3, 5];
509
- s = function(O) {
510
- var b, P, R, j, z, _, S, N, A, $, I, G, B;
515
+ if (h.sent(), !a) return [3, 5];
516
+ s = function(L) {
517
+ var P, b, z, R, j, S, _, $, A, N, B, G, C;
511
518
  return y(this, function(J) {
512
519
  switch (J.label) {
513
520
  case 0:
514
- return b = re(n.getURL(o != null ? o : ""), O), P = L(e.distPath, U(b, e.baseURL)), R = F(b, P, e.fetch), e.log(function(C) {
515
- return "download: ".concat(b, " -> ").concat(C);
516
- }, 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];
517
524
  case 1:
518
- for (J.sent(), j = e.imageOptions.format, j.length === 0 && j.push(void 0), z = e.imageOptions.size, z.length === 0 && z.push(void 0), _ = [], S = 0, N = j; S < N.length; S++)
519
- for (A = N[S], $ = 0, I = z; $ < I.length; $++)
520
- G = I[$], B = M(P, {
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, {
521
528
  format: A,
522
529
  size: G,
523
530
  toFilename: e.imageProcessingFilename
524
- }), e.log(function(C) {
525
- return "imageProcessing: ".concat(P, " -> ").concat(C);
526
- }, B), _.push(B);
527
- return [4, Promise.all(_)];
531
+ }), e.log(function(D) {
532
+ return "imageProcessing: ".concat(b, " -> ").concat(D);
533
+ }, C), S.push(C);
534
+ return [4, Promise.all(S)];
528
535
  case 2:
529
536
  return J.sent(), [
530
537
  2
@@ -532,22 +539,22 @@ function ae(n, e) {
532
539
  ];
533
540
  }
534
541
  });
535
- }, c = 0, l = a, w.label = 2;
542
+ }, c = 0, l = a, h.label = 2;
536
543
  case 2:
537
- return c < l.length ? (d = l[c], [5, s(d)]) : [3, 5];
544
+ return c < l.length ? (g = l[c], [5, s(g)]) : [3, 5];
538
545
  case 3:
539
- w.sent(), w.label = 4;
546
+ h.sent(), h.label = 4;
540
547
  case 4:
541
548
  return c++, [3, 2];
542
549
  case 5:
543
550
  if (!i) return [3, 9];
544
- h = 0, g = i, w.label = 6;
551
+ d = 0, v = i, h.label = 6;
545
552
  case 6:
546
- return h < g.length ? (v = g[h], p = v.tileset, e.log("process model layer"), m = n.getURL(p), [4, K(m, 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];
547
554
  case 7:
548
- w.sent(), w.label = 8;
555
+ h.sent(), h.label = 8;
549
556
  case 8:
550
- return h++, [3, 6];
557
+ return d++, [3, 6];
551
558
  case 9:
552
559
  return [
553
560
  2
@@ -559,34 +566,41 @@ function ae(n, e) {
559
566
  }
560
567
  function E(n, e, r) {
561
568
  return k(this, void 0, void 0, function() {
562
- var a, i, t, o, u, f, s, c, l, d, h, g, v;
563
- return y(this, function(p) {
564
- 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) {
565
572
  case 0:
566
- return a = L(r.distPath, U(n, r.baseURL)), i = F(n, a, r.fetch), r.log(function(m) {
567
- return "download: ".concat(n, " -> ").concat(m);
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);
568
575
  }, i), [4, i];
569
576
  case 1:
570
- 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)
571
578
  for (f = 0; f < t; f++)
572
579
  for (s = 0; s < t; s++)
573
580
  for (c = 0, l = o; c < l.length; c++)
574
- d = l[c], h = [
581
+ g = l[c], d = [
575
582
  e.size / t * s,
576
583
  e.size / t * f,
577
584
  e.size / t,
578
585
  e.size / t
579
- ], g = e.scale >= 1 ? void 0 : e.scale * e.size / t, e.level === 1 && e.scale >= 0.5 && (d === "jpg" || /\.jpg$/.test(a)) && (g = void 0), v = M(a, {
580
- format: d,
581
- size: g,
582
- 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
+ toFilename: r.imageProcessingFilename
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,
583
597
  toFilename: r.imageProcessingFilename
584
- }), r.log(function(m) {
585
- return "imageProcessing: ".concat(a, " -> ").concat(m);
586
- }, v), u.push(v);
598
+ }), r.log(function(h) {
599
+ return "imageProcessing: ".concat(a, " -> ").concat(h);
600
+ }, p), u.push(p));
587
601
  return [4, Promise.all(u)];
588
602
  case 2:
589
- return p.sent(), [
603
+ return w.sent(), [
590
604
  2
591
605
  /*return*/
592
606
  ];
@@ -618,26 +632,26 @@ function ie(n, e) {
618
632
  }
619
633
  function T(n, e) {
620
634
  return k(this, void 0, void 0, function() {
621
- var r, a, i, t, o, u, f, s, c, l, d, h;
622
- return y(this, function(g) {
623
- switch (g.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) {
624
638
  case 0:
625
- return r = L(e.distPath, U(n, e.baseURL)), a = F(n, r, e.fetch), e.log(function(v) {
626
- return "download: ".concat(n, " -> ").concat(v);
639
+ return r = F(e.distPath, U(n, e.baseURL)), a = O(n, r, e.fetch), e.log(function(m) {
640
+ return "download: ".concat(n, " -> ").concat(m);
627
641
  }, a), [4, a];
628
642
  case 1:
629
- for (g.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++)
630
644
  for (s = f[u], c = 0, l = t; c < l.length; c++)
631
- d = l[c], h = M(r, {
645
+ g = l[c], d = I(r, {
632
646
  format: s,
633
- size: d,
647
+ size: g,
634
648
  toFilename: e.imageProcessingFilename
635
- }), e.log(function(v) {
636
- return "imageProcessing: ".concat(r, " -> ").concat(v);
637
- }, h), o.push(h);
649
+ }), e.log(function(m) {
650
+ return "imageProcessing: ".concat(r, " -> ").concat(m);
651
+ }, d), o.push(d);
638
652
  return [4, Promise.all(o)];
639
653
  case 2:
640
- return g.sent(), [
654
+ return v.sent(), [
641
655
  2
642
656
  /*return*/
643
657
  ];
@@ -711,16 +725,16 @@ function ue(n, e) {
711
725
  }
712
726
  function ge(n) {
713
727
  return k(this, arguments, void 0, function(e, r) {
714
- var a, i, t, o, u, f, s, c, l, d, h, g, v, p, m;
715
- return r === void 0 && (r = {}), y(this, function(w) {
716
- switch (w.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) {
717
731
  case 0:
718
732
  if (a = e.baseURL, i = "", r.distPath)
719
- i = D(process.cwd(), r.distPath);
733
+ i = W(process.cwd(), r.distPath);
720
734
  else
721
- for (i = D(process.cwd(), (f = e.workCode) !== null && f !== void 0 ? f : "work-".concat(Date.now())); W(i); )
722
- /.-(\d+)$/.test(i) ? i = i.replace(/.-(\d+)$/, function(O, b) {
723
- return "-" + (Number(b) + 1);
735
+ for (i = W(process.cwd(), (f = e.workCode) !== null && f !== void 0 ? f : "work-".concat(Date.now())); M(i); )
736
+ /.-(\d+)$/.test(i) ? i = i.replace(/.-(\d+)$/, function(L, P) {
737
+ return "-" + (Number(P) + 1);
724
738
  }) : i = i + "-1";
725
739
  return t = {
726
740
  baseURL: a,
@@ -728,11 +742,11 @@ function ge(n) {
728
742
  fetch: (s = r.fetch) !== null && s !== void 0 ? s : fetch,
729
743
  imageOptions: {
730
744
  size: (l = (c = r.imageOptions) === null || c === void 0 ? void 0 : c.size) !== null && l !== void 0 ? l : [],
731
- format: (h = (d = r.imageOptions) === null || d === void 0 ? void 0 : d.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 : []
732
746
  },
733
747
  textureOptions: {
734
- size: (v = (g = r.textureOptions) === null || g === void 0 ? void 0 : g.size) !== null && v !== void 0 ? v : [],
735
- format: (m = (p = r.textureOptions) === null || p === void 0 ? void 0 : p.format) !== null && m !== void 0 ? m : []
748
+ size: (m = (v = r.textureOptions) === null || v === void 0 ? void 0 : v.size) !== null && m !== void 0 ? m : [],
749
+ format: (w = (p = r.textureOptions) === null || p === void 0 ? void 0 : p.format) !== null && w !== void 0 ? w : []
736
750
  },
737
751
  log: r.log ? ue : (function() {
738
752
  return Promise.resolve();
@@ -740,13 +754,13 @@ function ge(n) {
740
754
  imageProcessingFilename: r.imageProcessingFilename
741
755
  }, t.log(JSON.stringify(t, null, " ")), [4, q(i, { recursive: !0 })];
742
756
  case 1:
743
- return w.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, " "))];
744
758
  case 2:
745
- return w.sent(), [4, oe(e, t)];
759
+ return h.sent(), [4, oe(e, t)];
746
760
  case 3:
747
- return w.sent(), [4, ae(e, t)];
761
+ return h.sent(), [4, ae(e, t)];
748
762
  case 4:
749
- return w.sent(), [
763
+ return h.sent(), [
750
764
  2
751
765
  /*return*/
752
766
  ];