@realsee/five 6.0.0-alpha.63 → 6.0.0-alpha.65

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 (305) hide show
  1. package/docs/assets/highlight.css +20 -20
  2. package/docs/assets/main.js +59 -52
  3. package/docs/assets/navigation.js +1 -0
  4. package/docs/assets/search.js +1 -1
  5. package/docs/assets/style.css +805 -825
  6. package/docs/classes/five.AnimationFrameLoop.html +16 -15
  7. package/docs/classes/five.BoxBoundingVolume.html +18 -1
  8. package/docs/classes/five.Camera.html +37 -11
  9. package/docs/classes/five.CullingVolume.html +10 -1
  10. package/docs/classes/five.Fetcher.html +5 -1
  11. package/docs/classes/five.Five.html +237 -288
  12. package/docs/classes/five.InternalWebGLRenderer.html +2 -1
  13. package/docs/classes/five.IntersectMesh.html +4 -1
  14. package/docs/classes/five.Model.html +62 -65
  15. package/docs/classes/five.NetworkAbortError.html +2 -1
  16. package/docs/classes/five.NetworkFirbiddenError.html +2 -1
  17. package/docs/classes/five.NetworkResponseError.html +3 -1
  18. package/docs/classes/five.NetworkSubscribe.html +42 -56
  19. package/docs/classes/five.NetworkTimeoutError.html +2 -1
  20. package/docs/classes/five.PBMContainer.html +12 -11
  21. package/docs/classes/five.PBMGroup.html +3 -3
  22. package/docs/classes/five.PBMMesh.html +4 -3
  23. package/docs/classes/five.PBMMeshMaterial.html +50 -47
  24. package/docs/classes/five.PanoCircleMesh.html +30 -7
  25. package/docs/classes/five.PanoCircleMeshCustom.html +30 -7
  26. package/docs/classes/five.PanoCircleMeshSolid.html +30 -7
  27. package/docs/classes/five.RegionBoundingVolume.html +21 -1
  28. package/docs/classes/five.RequestScheduler.html +13 -12
  29. package/docs/classes/five.Scene.html +5 -3
  30. package/docs/classes/five.SphereBoundingVolume.html +17 -1
  31. package/docs/classes/five.Subscribe.html +43 -62
  32. package/docs/classes/five.TextureLoader.html +5 -1
  33. package/docs/classes/five.Tile.html +30 -1
  34. package/docs/classes/five.Tile3DModel.html +28 -1
  35. package/docs/classes/five.TileCubeTextureTarget.html +9 -1
  36. package/docs/classes/five.TileNode.html +4 -1
  37. package/docs/classes/five.Tileset.html +31 -5
  38. package/docs/classes/five.TilesetCache.html +8 -1
  39. package/docs/classes/five.TilesetTraverser.html +19 -1
  40. package/docs/classes/five.Work.html +28 -28
  41. package/docs/classes/five.XRButton.html +3 -1
  42. package/docs/classes/gltf_loader.DDSLoader.html +3 -1
  43. package/docs/classes/gltf_loader.DRACOLoader.html +8 -1
  44. package/docs/classes/gltf_loader.GLTFLoader.html +18 -17
  45. package/docs/classes/gltf_loader.GLTFObject.html +8 -6
  46. package/docs/classes/gltf_loader.GLTFParser.html +6 -1
  47. package/docs/classes/gltf_loader.THREEGLTFLoader.html +8 -1
  48. package/docs/classes/line.Line.html +10 -1
  49. package/docs/classes/line.LineGeometry.html +14 -1
  50. package/docs/classes/line.LineMaterial.html +8 -1
  51. package/docs/classes/line.LineSegmentsGeometry.html +12 -1
  52. package/docs/classes/line.THREE_Line2.html +4 -1
  53. package/docs/classes/line.THREE_LineSegments2.html +4 -1
  54. package/docs/classes/react.Store.html +23 -29
  55. package/docs/classes/sticker.Sticker.html +25 -32
  56. package/docs/classes/vfx.Airflow.html +8 -1
  57. package/docs/classes/vfx.Flame.html +10 -1
  58. package/docs/classes/vfx.Particle.html +79 -82
  59. package/docs/classes/vfx.SpotLight.html +7 -1
  60. package/docs/enums/five.VolumePlaneIntersect.html +4 -1
  61. package/docs/functions/five.defaultImageURLTransform.html +5 -0
  62. package/docs/functions/five.getViewportScale.html +1 -0
  63. package/docs/functions/five.imageSupport.html +1 -0
  64. package/docs/functions/five.isPanoId.html +1 -0
  65. package/docs/functions/five.loadAt3d.html +1 -0
  66. package/docs/functions/five.loadB3dm.html +1 -0
  67. package/docs/functions/five.loadDome.html +1 -0
  68. package/docs/functions/five.loadDomez.html +1 -0
  69. package/docs/functions/five.loadPbm.html +1 -0
  70. package/docs/functions/five.loadPnts.html +1 -0
  71. package/docs/functions/five.panoEqual.html +1 -0
  72. package/docs/functions/five.panoParse.html +1 -0
  73. package/docs/functions/five.panoStringify.html +1 -0
  74. package/docs/functions/five.parseWork.html +7 -0
  75. package/docs/functions/react.FiveCanvas-1.html +6 -0
  76. package/docs/functions/react.createFiveFeature.html +1 -0
  77. package/docs/functions/react.createFiveProvider.html +9 -0
  78. package/docs/functions/react.createStore.html +15 -0
  79. package/docs/functions/react.unsafe__useFiveInstance.html +5 -0
  80. package/docs/functions/react.useFiveAction.html +19 -0
  81. package/docs/functions/react.useFiveCameraDirection.html +3 -0
  82. package/docs/functions/react.useFiveCameraRaycaster.html +3 -0
  83. package/docs/functions/react.useFiveCurrentObserver.html +5 -0
  84. package/docs/functions/react.useFiveCurrentState.html +5 -0
  85. package/docs/functions/react.useFiveEventCallback.html +5 -0
  86. package/docs/functions/react.useFiveFloor.html +5 -0
  87. package/docs/functions/react.useFiveHelper.html +5 -0
  88. package/docs/functions/react.useFiveModelIntersectRaycaster.html +7 -0
  89. package/docs/functions/react.useFiveModelReadyState.html +4 -0
  90. package/docs/functions/react.useFiveProject2d.html +7 -0
  91. package/docs/functions/react.useFiveScene.html +2 -0
  92. package/docs/functions/react.useFiveSceneEffect.html +5 -0
  93. package/docs/functions/react.useFiveState.html +1 -0
  94. package/docs/functions/react.useFiveWork.html +8 -0
  95. package/docs/functions/react.withFive.html +1 -0
  96. package/docs/functions/vue.unsafe__useFiveInject.html +5 -0
  97. package/docs/functions/vue.useFiveAction.html +25 -0
  98. package/docs/functions/vue.useFiveCameraDirection.html +3 -0
  99. package/docs/functions/vue.useFiveCameraRaycaster.html +3 -0
  100. package/docs/functions/vue.useFiveCurrentObserver.html +5 -0
  101. package/docs/functions/vue.useFiveCurrentState.html +5 -0
  102. package/docs/functions/vue.useFiveEventCallback.html +5 -0
  103. package/docs/functions/vue.useFiveFloor.html +5 -0
  104. package/docs/functions/vue.useFiveHelper.html +5 -0
  105. package/docs/functions/vue.useFiveModel.html +2 -0
  106. package/docs/functions/vue.useFiveModelBounding.html +2 -0
  107. package/docs/functions/vue.useFiveModelIntersectRaycaster.html +7 -0
  108. package/docs/functions/vue.useFiveModelReadyState.html +4 -0
  109. package/docs/functions/vue.useFiveProject2d.html +7 -0
  110. package/docs/functions/vue.useFiveScene.html +2 -0
  111. package/docs/functions/vue.useFiveState.html +5 -0
  112. package/docs/functions/vue.useFiveWorks.html +8 -0
  113. package/docs/index.html +35 -79
  114. package/docs/interfaces/five.AddableObject.html +9 -9
  115. package/docs/interfaces/five.AjaxOptions.html +11 -11
  116. package/docs/interfaces/five.AnimationFrame.html +5 -1
  117. package/docs/interfaces/five.BaseEvent.html +5 -1
  118. package/docs/interfaces/five.BoundingVolume.html +14 -1
  119. package/docs/interfaces/five.CameraPose.html +6 -1
  120. package/docs/interfaces/five.ClipperParameter.html +3 -1
  121. package/docs/interfaces/five.DepthPanoramaControllerCustomInitArgs.html +25 -25
  122. package/docs/interfaces/five.EventCallback.html +355 -466
  123. package/docs/interfaces/five.FiveInitArgs.html +84 -86
  124. package/docs/interfaces/five.FloorplanControllerCustomInitArgs.html +17 -17
  125. package/docs/interfaces/five.GestureEvent.html +19 -1
  126. package/docs/interfaces/five.ImageOptions.html +16 -18
  127. package/docs/interfaces/five.ImageURLMappings.html +1 -1
  128. package/docs/interfaces/five.ImageURLOptions.html +15 -15
  129. package/docs/interfaces/five.IntersectEvent.html +8 -1
  130. package/docs/interfaces/five.IntersectMeshInterface.html +3 -3
  131. package/docs/interfaces/five.Intersection.html +3 -3
  132. package/docs/interfaces/five.MapviewControllerCustomInitArgs.html +13 -13
  133. package/docs/interfaces/five.ModeChangeEvent.html +9 -1
  134. package/docs/interfaces/five.ModelControllerCustomInitArgs.html +18 -18
  135. package/docs/interfaces/five.ModelEvent.html +8 -1
  136. package/docs/interfaces/five.ModelLodOptions.html +2 -1
  137. package/docs/interfaces/five.ModelsEvent.html +6 -1
  138. package/docs/interfaces/five.MotionKeyframe.html +4 -1
  139. package/docs/interfaces/five.MovePanoOptions.html +29 -30
  140. package/docs/interfaces/five.NetworkOptions.html +9 -9
  141. package/docs/interfaces/five.NetworkResourceEvent.html +9 -1
  142. package/docs/interfaces/five.ObjectEvent.html +6 -1
  143. package/docs/interfaces/five.PBMPanoPicture.html +7 -7
  144. package/docs/interfaces/five.PBMParameters.html +42 -43
  145. package/docs/interfaces/five.PanoCircleMeshCustomOptions.html +9 -1
  146. package/docs/interfaces/five.PanoCircleMeshInterface.html +21 -10
  147. package/docs/interfaces/five.PanoCircleMeshOptions.html +3 -1
  148. package/docs/interfaces/five.PanoCircleMeshSolidOptions.html +3 -1
  149. package/docs/interfaces/five.PanoEvent.html +11 -1
  150. package/docs/interfaces/five.PanoTextureEvent.html +9 -1
  151. package/docs/interfaces/five.PanoramaControllerCustomInitArgs.html +32 -32
  152. package/docs/interfaces/five.PanoramaLikeControllerCustomInitArgs.html +18 -18
  153. package/docs/interfaces/five.Pose.html +15 -32
  154. package/docs/interfaces/five.RenderEvent.html +7 -1
  155. package/docs/interfaces/five.Scissor.html +11 -12
  156. package/docs/interfaces/five.State.html +20 -21
  157. package/docs/interfaces/five.StateEvent.html +7 -1
  158. package/docs/interfaces/five.SubscribeMixinType.emit.html +1 -1
  159. package/docs/interfaces/five.SubscribeMixinType.hasListener.html +1 -1
  160. package/docs/interfaces/five.SubscribeMixinType.off.html +1 -1
  161. package/docs/interfaces/five.SubscribeMixinType.on.html +1 -1
  162. package/docs/interfaces/five.SubscribeMixinType.once.html +1 -1
  163. package/docs/interfaces/five.SubscribeMixinType.waitUnitl.html +1 -1
  164. package/docs/interfaces/five.TextureOptions.html +18 -20
  165. package/docs/interfaces/five.Tile3DModelLoaderOptions.html +6 -3
  166. package/docs/interfaces/five.TileCubeNode.html +7 -1
  167. package/docs/interfaces/five.TileCubeTree.html +2 -1
  168. package/docs/interfaces/five.TileHeader.html +9 -1
  169. package/docs/interfaces/five.TilesetHeader.html +5 -1
  170. package/docs/interfaces/five.TilesetOptions.html +5 -1
  171. package/docs/interfaces/five.TopviewControllerCustomInitArgs.html +9 -9
  172. package/docs/interfaces/five.VRPanoramaControllerCustomInitArgs.html +28 -28
  173. package/docs/interfaces/five.WebXRAxesParams.html +4 -1
  174. package/docs/interfaces/five.WebXRControllerParams.html +2 -1
  175. package/docs/interfaces/five.WorkCubeImage.html +13 -13
  176. package/docs/interfaces/five.WorkImage.html +20 -21
  177. package/docs/interfaces/five.WorkInitial.html +17 -17
  178. package/docs/interfaces/five.WorkModel.html +12 -13
  179. package/docs/interfaces/five.WorkObserver.html +40 -41
  180. package/docs/interfaces/five.WorkOptions.html +17 -17
  181. package/docs/interfaces/five.WorkResolvedObserver.html +41 -39
  182. package/docs/interfaces/five.WorkTile.html +9 -1
  183. package/docs/interfaces/five.WorkVideo.html +8 -9
  184. package/docs/interfaces/five.WorksEvent.html +9 -1
  185. package/docs/interfaces/five.XRControllerEvent.html +8 -1
  186. package/docs/interfaces/five.XRGestureEvent.html +11 -1
  187. package/docs/interfaces/five.XRPanoramaControllerCustomInitArgs.html +29 -28
  188. package/docs/interfaces/five.XRSessionEvent.html +7 -1
  189. package/docs/interfaces/gltf_loader.DDS.html +7 -1
  190. package/docs/interfaces/gltf_loader.GLTF.html +10 -4
  191. package/docs/interfaces/gltf_loader.GLTFReference.html +3 -1
  192. package/docs/interfaces/gltf_loader.THREEGLTF.html +8 -1
  193. package/docs/interfaces/react.FiveActionReactCallbacks.html +27 -37
  194. package/docs/interfaces/react.FiveInjectionTypes.html +113 -138
  195. package/docs/interfaces/react.PropTypeOfFiveFeatures.html +2 -1
  196. package/docs/interfaces/sticker.IntersectionLike.html +7 -8
  197. package/docs/interfaces/vfx.ParticleArgs.html +67 -68
  198. package/docs/interfaces/vfx.ParticleTweenKeyframe.html +3 -1
  199. package/docs/interfaces/vue.FiveActionVueCallbacks.html +31 -42
  200. package/docs/modules/five.SubscribeMixinType.html +7 -1
  201. package/docs/modules/five.html +171 -647
  202. package/docs/modules/gltf_loader.html +11 -1
  203. package/docs/modules/line.html +8 -1
  204. package/docs/modules/react.FiveCanvas.html +8 -0
  205. package/docs/modules/react.html +37 -130
  206. package/docs/modules/sticker.html +3 -1
  207. package/docs/modules/vfx.html +8 -1
  208. package/docs/modules/vue.html +24 -115
  209. package/docs/types/five.AjaxResponseType.html +1 -0
  210. package/docs/types/five.AjaxResponseTypeMapping.html +1 -0
  211. package/docs/types/five.BoundingVolumeJson.html +1 -0
  212. package/docs/types/five.BoxBoundingVolumeJson.html +1 -0
  213. package/docs/types/five.ControllerCustomInitTypes.html +1 -0
  214. package/docs/types/five.ControllerEventTypes.html +32 -0
  215. package/docs/types/five.CoordinatesSystemTransformer.html +1 -0
  216. package/docs/types/five.EventTypes.html +26 -0
  217. package/docs/types/five.FivePlugin.html +71 -0
  218. package/docs/types/five.FivePluginInit.html +3 -0
  219. package/docs/types/five.FivePluginInstance.html +3 -0
  220. package/docs/types/five.GestureTypes.html +1 -0
  221. package/docs/types/five.LegacyEventType.html +203 -0
  222. package/docs/types/five.LooseWork.html +1 -0
  223. package/docs/types/five.LooseWorkInitial.html +1 -0
  224. package/docs/types/five.LooseWorkModel.html +1 -0
  225. package/docs/types/five.LooseWorkObserver.html +1 -0
  226. package/docs/types/five.LooseWorkPanorama.html +1 -0
  227. package/docs/types/five.LooseWorkVideo.html +1 -0
  228. package/docs/types/five.LooseWorkWithExtrinsics.html +8 -0
  229. package/docs/types/five.Mirror.html +1 -0
  230. package/docs/types/five.Mode.html +11 -0
  231. package/docs/types/five.ModelMaterialValues.html +1 -0
  232. package/docs/types/five.Models.html +12 -0
  233. package/docs/types/five.MotionValue.html +1 -0
  234. package/docs/types/five.NetWorkMeta.html +1 -0
  235. package/docs/types/five.NetworkError.html +1 -0
  236. package/docs/types/five.NetworkErrorCallback.html +1 -0
  237. package/docs/types/five.NetworkProgressCallback.html +1 -0
  238. package/docs/types/five.NetworkResponse.html +1 -0
  239. package/docs/types/five.NetworkState.html +1 -0
  240. package/docs/types/five.NetworkSuccessCallback.html +1 -0
  241. package/docs/types/five.NetworkType.html +1 -0
  242. package/docs/types/five.Pano.html +1 -0
  243. package/docs/types/five.PanoId.html +1 -0
  244. package/docs/types/five.ParseWorkOptions.html +13 -0
  245. package/docs/types/five.ParsedResultType.html +1 -0
  246. package/docs/types/five.PostProcessingType.html +1 -0
  247. package/docs/types/five.RegionBoundingVolumeJson.html +1 -0
  248. package/docs/types/five.RequestResult.html +1 -0
  249. package/docs/types/five.SphereBoundingVolumeJson.html +1 -0
  250. package/docs/types/five.SubscribeEventMap.html +1 -0
  251. package/docs/types/five.TileContentData.html +1 -0
  252. package/docs/types/five.TilesetFrameState.html +1 -0
  253. package/docs/types/five.WebXRControllerKey.html +1 -0
  254. package/docs/types/five.WebXRControllerType.html +1 -0
  255. package/docs/types/five.Works.html +1 -0
  256. package/docs/types/line.LineMaterialParameters.html +1 -0
  257. package/docs/types/react.FiveInjectionActionFeature.html +1 -0
  258. package/docs/types/react.FiveInjectionDataFeature.html +1 -0
  259. package/docs/types/react.FiveInjectionFeature.html +1 -0
  260. package/docs/types/react.FiveProviderPropTypes.html +1 -0
  261. package/docs/types/react.FiveProviderType.html +1 -0
  262. package/docs/types/react.StoreActionMapHanlder.html +1 -0
  263. package/docs/types/react.StoreActionMapType.html +1 -0
  264. package/docs/types/react.StoreProviderType.html +1 -0
  265. package/docs/types/react.StoreValueMapType.html +1 -0
  266. package/docs/types/vfx.ParticleType.html +1 -0
  267. package/docs/types/vue.FiveModelIntersectRaycaster.html +1 -0
  268. package/docs/types/vue.FiveProviderComponent.html +1 -0
  269. package/docs/types/vue.Project2d.html +1 -0
  270. package/docs/variables/five.PROXY_CONTROLLER_EVENT_NAMES.html +1 -0
  271. package/docs/variables/five.defaultPbmParameters.html +1 -0
  272. package/docs/variables/react.INJECTION_PROPNAME.html +1 -0
  273. package/docs/variables/vue.FiveCanvas.html +8 -0
  274. package/docs/variables/vue.FiveProvider.html +8 -0
  275. package/five/index.d.ts +15 -1
  276. package/five/index.js +85 -85
  277. package/five/index.mjs +3515 -3525
  278. package/gltf-loader/index.js +5 -5
  279. package/gltf-loader/index.mjs +70 -70
  280. package/line/index.js +3 -3
  281. package/line/index.mjs +66 -65
  282. package/package.json +3 -3
  283. package/react/index.js +3 -3
  284. package/react/index.mjs +2 -2
  285. package/sticker/index.js +3 -3
  286. package/sticker/index.mjs +49 -49
  287. package/umd/five-gltf-loader.js +4 -4
  288. package/umd/five-line.js +4 -4
  289. package/umd/five-react.js +3 -3
  290. package/umd/five-sticker.js +3 -3
  291. package/umd/five-vfx.js +8 -8
  292. package/umd/five-vue.js +3 -3
  293. package/umd/five.js +40 -40
  294. package/vfx/index.js +2 -2
  295. package/vfx/index.mjs +2 -2
  296. package/vue/index.d.ts +1 -1
  297. package/vue/index.js +3 -3
  298. package/vue/index.mjs +93 -92
  299. package/docs/assets/icons.css +0 -1043
  300. package/docs/assets/icons.png +0 -0
  301. package/docs/assets/icons@2x.png +0 -0
  302. package/docs/assets/widgets.png +0 -0
  303. package/docs/assets/widgets@2x.png +0 -0
  304. package/docs/modules.html +0 -1
  305. package/umd/five.js.LICENSE.txt +0 -100
package/line/index.mjs CHANGED
@@ -1,8 +1,8 @@
1
1
  /**
2
2
  * @license
3
3
  * @realsee/five
4
- * Generated: 12/12/2023
5
- * Version: 6.0.0-alpha.63
4
+ * Generated: 12/14/2023
5
+ * Version: 6.0.0-alpha.65
6
6
  * Terms:
7
7
  * Realsee SDK License Agreement
8
8
  * Update: July 28, 2021
@@ -252,33 +252,33 @@
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 * as r from "three";
256
- var B = function(a, o) {
257
- return B = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(t, n) {
255
+ */import * as i from "three";
256
+ var E = function(a, o) {
257
+ return E = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(t, n) {
258
258
  t.__proto__ = n;
259
259
  } || function(t, n) {
260
260
  for (var e in n)
261
261
  Object.prototype.hasOwnProperty.call(n, e) && (t[e] = n[e]);
262
- }, B(a, o);
262
+ }, E(a, o);
263
263
  };
264
264
  function A(a, o) {
265
265
  if (typeof o != "function" && o !== null)
266
266
  throw new TypeError("Class extends value " + String(o) + " is not a constructor or null");
267
- B(a, o);
267
+ E(a, o);
268
268
  function t() {
269
269
  this.constructor = a;
270
270
  }
271
271
  a.prototype = o === null ? Object.create(o) : (t.prototype = o.prototype, new t());
272
272
  }
273
- var E = (
273
+ var B = (
274
274
  /** @class */
275
275
  function(a) {
276
276
  A(o, a);
277
277
  function o() {
278
278
  var t = a.call(this) || this;
279
279
  t.type = "LineSegmentsGeometry";
280
- var n = [-1, 2, 0, 1, 2, 0, -1, 1, 0, 1, 1, 0, -1, 0, 0, 1, 0, 0, -1, -1, 0, 1, -1, 0], e = [-1, 2, 1, 2, -1, 1, 1, 1, -1, -1, 1, -1, -1, -2, 1, -2], i = [0, 2, 1, 2, 3, 1, 2, 4, 3, 4, 5, 3, 4, 6, 5, 6, 7, 5];
281
- return t.setIndex(i), t.setAttribute("position", new r.Float32BufferAttribute(n, 3)), t.setAttribute("uv", new r.Float32BufferAttribute(e, 2)), t;
280
+ var n = [-1, 2, 0, 1, 2, 0, -1, 1, 0, 1, 1, 0, -1, 0, 0, 1, 0, 0, -1, -1, 0, 1, -1, 0], e = [-1, 2, 1, 2, -1, 1, 1, 1, -1, -1, 1, -1, -1, -2, 1, -2], r = [0, 2, 1, 2, 3, 1, 2, 4, 3, 4, 5, 3, 4, 6, 5, 6, 7, 5];
281
+ return t.setIndex(r), t.setAttribute("position", new i.Float32BufferAttribute(n, 3)), t.setAttribute("uv", new i.Float32BufferAttribute(e, 2)), t;
282
282
  }
283
283
  return o.prototype.applyMatrix4 = function(t) {
284
284
  var n = this.attributes.instanceStart, e = this.attributes.instanceEnd;
@@ -286,59 +286,60 @@ var E = (
286
286
  }, o.prototype.setPositions = function(t) {
287
287
  var n;
288
288
  t instanceof Float32Array ? n = t : Array.isArray(t) ? n = new Float32Array(t) : n = new Float32Array();
289
- var e = new r.InstancedInterleavedBuffer(n, 6, 1);
290
- return this.setAttribute("instanceStart", new r.InterleavedBufferAttribute(e, 3, 0)), this.setAttribute("instanceEnd", new r.InterleavedBufferAttribute(e, 3, 3)), this.computeBoundingBox(), this.computeBoundingSphere(), this;
289
+ var e = new i.InstancedInterleavedBuffer(n, 6, 1);
290
+ return this.setAttribute("instanceStart", new i.InterleavedBufferAttribute(e, 3, 0)), this.setAttribute("instanceEnd", new i.InterleavedBufferAttribute(e, 3, 3)), this.computeBoundingBox(), this.computeBoundingSphere(), this;
291
291
  }, o.prototype.setColors = function(t) {
292
292
  var n;
293
293
  t instanceof Float32Array ? n = t : Array.isArray(t) ? n = new Float32Array(t) : n = new Float32Array();
294
- var e = new r.InstancedInterleavedBuffer(n, 6, 1);
295
- return this.setAttribute("instanceColorStart", new r.InterleavedBufferAttribute(e, 3, 0)), this.setAttribute("instanceColorEnd", new r.InterleavedBufferAttribute(e, 3, 3)), this;
294
+ var e = new i.InstancedInterleavedBuffer(n, 6, 1);
295
+ return this.setAttribute("instanceColorStart", new i.InterleavedBufferAttribute(e, 3, 0)), this.setAttribute("instanceColorEnd", new i.InterleavedBufferAttribute(e, 3, 3)), this;
296
296
  }, o.prototype.fromWireframeGeometry = function(t) {
297
297
  return this.setPositions(t.attributes.position.array), this;
298
298
  }, o.prototype.fromEdgesGeometry = function(t) {
299
299
  return this.setPositions(t.attributes.position.array), this;
300
300
  }, o.prototype.fromMesh = function(t) {
301
- return this.fromWireframeGeometry(new r.WireframeGeometry(t.geometry)), this;
301
+ return this.fromWireframeGeometry(new i.WireframeGeometry(t.geometry)), this;
302
302
  }, o.prototype.fromLineSegments = function(t) {
303
303
  var n = t.geometry;
304
- if (n instanceof r.Geometry) {
305
- var e = new r.BufferGeometry().fromGeometry(n);
304
+ if (n instanceof i.Geometry) {
305
+ var e = new i.BufferGeometry().fromGeometry(n);
306
306
  this.setPositions(e.attributes.position.array);
307
307
  } else
308
- n instanceof r.BufferGeometry && this.setPositions(n.attributes.position.array);
308
+ n instanceof i.BufferGeometry && this.setPositions(n.attributes.position.array);
309
309
  return this;
310
310
  }, o.prototype.computeBoundingBox = function() {
311
- this.boundingBox === null && (this.boundingBox = new r.Box3());
311
+ this.boundingBox === null && (this.boundingBox = new i.Box3());
312
312
  var t = this.attributes.instanceStart, n = this.attributes.instanceEnd;
313
313
  if (t !== void 0 && n !== void 0) {
314
- var e = new r.Box3();
314
+ var e = new i.Box3();
315
315
  this.boundingBox.setFromBufferAttribute(t), e.setFromBufferAttribute(n), this.boundingBox.union(e);
316
316
  }
317
317
  }, o.prototype.computeBoundingSphere = function() {
318
- this.boundingSphere === null && (this.boundingSphere = new r.Sphere()), this.boundingBox === null && this.computeBoundingBox();
318
+ this.boundingSphere === null && (this.boundingSphere = new i.Sphere()), this.boundingBox === null && this.computeBoundingBox();
319
319
  var t = this.attributes.instanceStart, n = this.attributes.instanceEnd;
320
320
  if (t !== void 0 && n !== void 0) {
321
321
  var e = this.boundingSphere.center;
322
322
  this.boundingBox.getCenter(e);
323
- for (var i = 0, s = new r.Vector3(), c = 0, p = t.count; c < p; c++)
324
- s.fromBufferAttribute(t, c), i = Math.max(i, e.distanceToSquared(s)), s.fromBufferAttribute(n, c), i = Math.max(i, e.distanceToSquared(s));
325
- this.boundingSphere.radius = Math.sqrt(i), isNaN(this.boundingSphere.radius) && console.error("THREE.LineSegmentsGeometry.computeBoundingSphere(): Computed radius is NaN. The instanced position data is likely to have NaN values.", this);
323
+ for (var r = 0, s = new i.Vector3(), c = 0, p = t.count; c < p; c++)
324
+ s.fromBufferAttribute(t, c), r = Math.max(r, e.distanceToSquared(s)), s.fromBufferAttribute(n, c), r = Math.max(r, e.distanceToSquared(s));
325
+ this.boundingSphere.radius = Math.sqrt(r), isNaN(this.boundingSphere.radius) && console.error("THREE.LineSegmentsGeometry.computeBoundingSphere(): Computed radius is NaN. The instanced position data is likely to have NaN values.", this);
326
326
  }
327
327
  }, o.prototype.toJSON = function() {
328
328
  }, o;
329
- }(r.InstancedBufferGeometry)
329
+ }(i.InstancedBufferGeometry)
330
330
  );
331
- Object.assign(E.prototype, { isLineSegmentsGeometry: !0 });
331
+ Object.assign(B.prototype, { isLineSegmentsGeometry: !0 });
332
332
  var x = {
333
- uniforms: r.UniformsUtils.merge([
334
- r.UniformsLib.common,
335
- r.UniformsLib.fog,
333
+ uniforms: i.UniformsUtils.merge([
334
+ i.UniformsLib.common,
335
+ i.UniformsLib.fog,
336
336
  {
337
337
  linewidth: { value: 1 },
338
- resolution: { value: new r.Vector2(1, 1) },
338
+ resolution: { value: new i.Vector2(1, 1) },
339
339
  dashScale: { value: 1 },
340
340
  dashSize: { value: 1 },
341
341
  gapSize: { value: 1 },
342
+ // todo FIX - maybe change to totalSize
342
343
  opacity: { value: 1 }
343
344
  }
344
345
  ]),
@@ -549,7 +550,7 @@ var x = {
549
550
  A(o, a);
550
551
  function o(t) {
551
552
  var n = a.call(this, {
552
- uniforms: r.UniformsUtils.clone(x.uniforms),
553
+ uniforms: i.UniformsUtils.clone(x.uniforms),
553
554
  vertexShader: x.vertexShader,
554
555
  fragmentShader: x.fragmentShader,
555
556
  clipping: !0
@@ -622,7 +623,7 @@ var x = {
622
623
  }), n.setValues(t), n;
623
624
  }
624
625
  return o;
625
- }(r.ShaderMaterial)
626
+ }(i.ShaderMaterial)
626
627
  );
627
628
  Object.assign(L.prototype, { isLineMaterial: !0 });
628
629
  var F = (
@@ -631,19 +632,19 @@ var F = (
631
632
  A(o, a);
632
633
  function o(t, n) {
633
634
  var e = a.call(this) || this;
634
- return e.type = "LineSegments2", e.geometry = t !== void 0 ? t : new E(), e.material = n !== void 0 ? n : new L({ color: Math.random() * 16777215 }), e;
635
+ return e.type = "LineSegments2", e.geometry = t !== void 0 ? t : new B(), e.material = n !== void 0 ? n : new L({ color: Math.random() * 16777215 }), e;
635
636
  }
636
637
  return o.prototype.computeLineDistances = function() {
637
- for (var t = this.geometry, n = t.attributes.instanceStart, e = t.attributes.instanceEnd, i = new Float32Array(2 * n.count), s = new r.Vector3(), c = new r.Vector3(), p = 0, u = 0, y = n.count; p < y; p++, u += 2)
638
- s.fromBufferAttribute(n, p), c.fromBufferAttribute(e, p), i[u] = u === 0 ? 0 : i[u - 1], i[u + 1] = i[u] + s.distanceTo(c);
639
- var m = new r.InstancedInterleavedBuffer(i, 2, 1);
640
- return t.setAttribute("instanceDistanceStart", new r.InterleavedBufferAttribute(m, 1, 0)), t.setAttribute("instanceDistanceEnd", new r.InterleavedBufferAttribute(m, 1, 1)), this;
638
+ for (var t = this.geometry, n = t.attributes.instanceStart, e = t.attributes.instanceEnd, r = new Float32Array(2 * n.count), s = new i.Vector3(), c = new i.Vector3(), p = 0, u = 0, y = n.count; p < y; p++, u += 2)
639
+ s.fromBufferAttribute(n, p), c.fromBufferAttribute(e, p), r[u] = u === 0 ? 0 : r[u - 1], r[u + 1] = r[u] + s.distanceTo(c);
640
+ var m = new i.InstancedInterleavedBuffer(r, 2, 1);
641
+ return t.setAttribute("instanceDistanceStart", new i.InterleavedBufferAttribute(m, 1, 0)), t.setAttribute("instanceDistanceEnd", new i.InterleavedBufferAttribute(m, 1, 1)), this;
641
642
  }, o.prototype.raycast = function(t, n) {
642
643
  t.camera === null && console.error('LineSegments2: "Raycaster.camera" needs to be set in order to raycast against LineSegments2.');
643
- var e = t.ray, i = t.camera, s = i.projectionMatrix, c = this.geometry, p = this.material, u = p.resolution, y = p.linewidth, m = c.attributes.instanceStart, M = c.attributes.instanceEnd, l = new r.Vector4(), f = new r.Vector4(), v = new r.Vector4(), g = new r.Vector3(), S = new r.Matrix4(), d = new r.Line3(), C = new r.Vector3();
644
- e.at(1, v), v.w = 1, v.applyMatrix4(i.matrixWorldInverse), v.applyMatrix4(s), v.multiplyScalar(1 / v.w), v.x *= u.x / 2, v.y *= u.y / 2, v.z = 0, g.copy(v);
644
+ var e = t.ray, r = t.camera, s = r.projectionMatrix, c = this.geometry, p = this.material, u = p.resolution, y = p.linewidth, m = c.attributes.instanceStart, M = c.attributes.instanceEnd, l = new i.Vector4(), f = new i.Vector4(), v = new i.Vector4(), g = new i.Vector3(), S = new i.Matrix4(), d = new i.Line3(), C = new i.Vector3();
645
+ e.at(1, v), v.w = 1, v.applyMatrix4(r.matrixWorldInverse), v.applyMatrix4(s), v.multiplyScalar(1 / v.w), v.x *= u.x / 2, v.y *= u.y / 2, v.z = 0, g.copy(v);
645
646
  var w = this.matrixWorld;
646
- S.multiplyMatrices(i.matrixWorldInverse, w);
647
+ S.multiplyMatrices(r.matrixWorldInverse, w);
647
648
  for (var h = 0, N = m.count; h < N; h++) {
648
649
  l.fromBufferAttribute(m, h), f.fromBufferAttribute(M, h), l.w = 1, f.w = 1, l.applyMatrix4(S), f.applyMatrix4(S), l.applyMatrix4(s), f.applyMatrix4(s), l.multiplyScalar(1 / l.w), f.multiplyScalar(1 / f.w);
649
650
  var _ = l.z < -1 && f.z < -1, G = l.z > 1 && f.z > 1;
@@ -651,10 +652,10 @@ var F = (
651
652
  l.x *= u.x / 2, l.y *= u.y / 2, f.x *= u.x / 2, f.y *= u.y / 2, d.start.copy(l), d.start.z = 0, d.end.copy(f), d.end.z = 0;
652
653
  var U = d.closestPointToPointParameter(g, !0);
653
654
  d.at(U, C);
654
- var z = r.MathUtils.lerp(l.z, f.z, U), W = z >= -1 && z <= 1, j = g.distanceTo(C) < y * 0.5;
655
+ var z = i.MathUtils.lerp(l.z, f.z, U), W = z >= -1 && z <= 1, j = g.distanceTo(C) < y * 0.5;
655
656
  if (W && j) {
656
657
  d.start.fromBufferAttribute(m, h), d.end.fromBufferAttribute(M, h), d.start.applyMatrix4(w), d.end.applyMatrix4(w);
657
- var P = new r.Vector3(), b = new r.Vector3();
658
+ var P = new i.Vector3(), b = new i.Vector3();
658
659
  e.distanceSqToSegment(d.start, d.end, b, P), n.push({
659
660
  point: b,
660
661
  pointOnLine: P,
@@ -666,7 +667,7 @@ var F = (
666
667
  }
667
668
  }
668
669
  }, o;
669
- }(r.Mesh)
670
+ }(i.Mesh)
670
671
  );
671
672
  Object.assign(F.prototype, { isLineSegments2: !0 });
672
673
  var I = (
@@ -690,25 +691,25 @@ var O = (
690
691
  return t.type = "LineGeometry", t;
691
692
  }
692
693
  return o.prototype.setPositions = function(t) {
693
- for (var n = t.length - 3, e = new Float32Array(2 * n), i = 0; i < n; i += 3)
694
- e[2 * i] = t[i], e[2 * i + 1] = t[i + 1], e[2 * i + 2] = t[i + 2], e[2 * i + 3] = t[i + 3], e[2 * i + 4] = t[i + 4], e[2 * i + 5] = t[i + 5];
694
+ for (var n = t.length - 3, e = new Float32Array(2 * n), r = 0; r < n; r += 3)
695
+ e[2 * r] = t[r], e[2 * r + 1] = t[r + 1], e[2 * r + 2] = t[r + 2], e[2 * r + 3] = t[r + 3], e[2 * r + 4] = t[r + 4], e[2 * r + 5] = t[r + 5];
695
696
  return a.prototype.setPositions.call(this, e), this;
696
697
  }, o.prototype.setColors = function(t) {
697
- for (var n = t.length - 3, e = new Float32Array(2 * n), i = 0; i < n; i += 3)
698
- e[2 * i] = t[i], e[2 * i + 1] = t[i + 1], e[2 * i + 2] = t[i + 2], e[2 * i + 3] = t[i + 3], e[2 * i + 4] = t[i + 4], e[2 * i + 5] = t[i + 5];
698
+ for (var n = t.length - 3, e = new Float32Array(2 * n), r = 0; r < n; r += 3)
699
+ e[2 * r] = t[r], e[2 * r + 1] = t[r + 1], e[2 * r + 2] = t[r + 2], e[2 * r + 3] = t[r + 3], e[2 * r + 4] = t[r + 4], e[2 * r + 5] = t[r + 5];
699
700
  return a.prototype.setColors.call(this, e), this;
700
701
  }, o.prototype.fromLine = function(t) {
701
702
  var n = t.geometry;
702
- if (n instanceof r.Geometry) {
703
- var e = new r.BufferGeometry().fromGeometry(n);
703
+ if (n instanceof i.Geometry) {
704
+ var e = new i.BufferGeometry().fromGeometry(n);
704
705
  this.setPositions(e.attributes.position.array);
705
706
  } else
706
- n instanceof r.BufferGeometry && this.setPositions(n.attributes.position.array);
707
+ n instanceof i.BufferGeometry && this.setPositions(n.attributes.position.array);
707
708
  return this;
708
709
  }, o.prototype.copy = function() {
709
710
  return this;
710
711
  }, o;
711
- }(E)
712
+ }(B)
712
713
  );
713
714
  Object.assign(O.prototype, { isLineGeometry: !0 });
714
715
  var T = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAAZiS0dEAAAAAAAA+UO7fwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9sHDgwCEMBJZu0AAAAdaVRYdENvbW1lbnQAAAAAAENyZWF0ZWQgd2l0aCBHSU1QZC5lBwAABM5JREFUWMO1V0tPG2cUPZ4Hxh6DazIOrjFNqJs0FIMqWFgWQkatsmvVbtggKlSVRVf5AWz4AWz4AUSKEChll19QJYSXkECuhFxsHjEhxCYm+DWGMZ5HF72DJq4bAzFXurI0M/I5997v3u9cC65vTJVn2lX/xHINQOYSBLTLEuIuCWw4Z3IGAEvf6ASmVHjNzHCXBG4A0AjACsAOwEbO0nsFQBnAGYASAIl+ZRMR7SolMEdsByD09fV5R0ZGgg8ePPjW5/N1iqLYpuu6RZblciKR2I9Go69evnwZnZ+fjwI4IS8AKBIRzeQfJWCANwKwh0KhtrGxsYehUOin1tbW+zzP23ietzY2NnIAoGmaLsuyUiqVyvl8XtrY2NiamZn589mzZxsAUgCOAeQAnFI2tI+VxIjaAeDzoaGh7xYWFuZOTk6OZVk+12uYqqq6JEnn0Wg0OT4+/geAXwGEAdwDIFJQXC1wO4DWR48e/RCPxxclSSroVzRFUbSDg4P848ePFwH8DuAhkWih83TRQWxFOXgAwvDwcOfo6OhvXV1d39tsNtuVBwTDWBwOh1UUxVsMw1hXVlbSdCgNV43uYSvrHg6H24aHh38eHBz85TrgF9FYLHA4HLzH43FvbW2d7u/vG+dANp8FpqIlbd3d3V8Fg8EfBUFw4BONZVmL3+9vHhkZCQL4AoAHgJPK8G+yzC0XDofdoVAo5PP5vkadTBAEtr+/39ff3x8gAp/RPOEqx2qjx+NpvXv3bk9DQ0NDvQgwDIOWlhZrMBj8kgi0UJdxRgYMArzL5XJ7vd57qLPZ7Xamp6fnNgBXtQxcjFuHw+Hyer3t9SYgCAITCAScAJoBNNEY/08GOFVVrfVMv7kMNDntFD1vjIAPrlRN0xjckOm6biFQ3jwNPwDMZrOnqVTqfb3Bi8Wivru7W/VCYkwPlKOjo0IikXh7EwQikYgE4Nw0CfXKDCipVCoTj8df3QABbW1tLUc6oUgkFPMkVACUNjc337148eKvw8PDbJ2jP1taWkoCyNDVXDSECmNSK4qiKNLq6urW8+fPI/UicHx8rD59+jSVy+WOAKSJhKENwFItLtoxk8mwsixzHR0dHe3t7c5PAU+n09rs7OzJkydPYqVSaQfANoDXALIk31S2smU1TWMPDg7K5XKZ7+3t9TudTut1U7+wsFCcmJiIpdPpbQBxADsAknQWymYCOukBHYCuKApisdhpMpnURFEU79y503TVyKenpzOTk5M7e3t7MQKPV0Zv1gNm+awB0MvlshqLxfLb29uyJElWURSbXC4XXyvqxcXFs6mpqeTc3Nzu3t7e3wQcA7BPZ8Cov1pNlJplmQtAG8MwHV6v95tAINA5MDBwPxAIuLu6upr8fr/VAN3c3JQjkcjZ+vp6fnl5+d2bN29SuVzuNYAEpf01CdRChUL+X1VskHACuA3Ay3Fcu9vt7nA6nZ7m5uYWQRCaNE3jVVW15PP580KhIGUymWw2m00DOAJwSP4WwPtq4LX2Ao6USxNlQyS/RcQcdLGwlNIz6vEMAaZpNzCk2Pll94LK/cDYimxERiBwG10sxjgvEZBE0UpE6vxj+0Ct5bTaXthgEhRmja8QWNkkPGsuIpfdjpkK+cZUWTC0KredVmtD/gdlSl6EG4AMvQAAAABJRU5ErkJggg==", V = 14467195, H = 8, R = 2, k = 20, D = null, Q = (
@@ -716,60 +717,60 @@ var T = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAA
716
717
  function(a) {
717
718
  A(o, a);
718
719
  function o(t, n) {
719
- t === void 0 && (t = new r.Vector3()), n === void 0 && (n = new r.Vector3());
720
+ t === void 0 && (t = new i.Vector3()), n === void 0 && (n = new i.Vector3());
720
721
  var e = a.call(this) || this;
721
722
  e.type = "FiveLine", e.needsRender = !0;
722
- var i = new O(), s = new L({
723
+ var r = new O(), s = new L({
723
724
  color: V,
724
725
  linewidth: R,
725
726
  dashScale: k,
726
727
  dashed: !1
727
728
  });
728
- e.line = new I(i, s);
729
- var c = new r.BufferGeometry(), p = new r.PointsMaterial({
729
+ e.line = new I(r, s);
730
+ var c = new i.BufferGeometry(), p = new i.PointsMaterial({
730
731
  color: V,
731
732
  size: H,
732
- map: D || (D = new r.TextureLoader().load(T)),
733
+ map: D || (D = new i.TextureLoader().load(T)),
733
734
  sizeAttenuation: !1,
734
735
  transparent: !0
735
736
  });
736
- return e.points = new r.Points(c, p), e.points.renderOrder = 11, e.points.frustumCulled = !1, e.setPoints(t, n), e.add(e.line, e.points), e;
737
+ return e.points = new i.Points(c, p), e.points.renderOrder = 11, e.points.frustumCulled = !1, e.setPoints(t, n), e.add(e.line, e.points), e;
737
738
  }
738
739
  return Object.defineProperty(o, "version", {
739
740
  get: function() {
740
- return "6.0.0-alpha.63";
741
+ return "6.0.0-alpha.65";
741
742
  },
742
743
  enumerable: !1,
743
744
  configurable: !0
744
745
  }), o.prototype.setPoints = function(t, n) {
745
746
  var e = [].concat(t.toArray(), n.toArray());
746
- this.points.geometry.setAttribute("position", new r.BufferAttribute(new Float32Array(e), 3)), this.line.geometry.setPositions(e), this.line.computeLineDistances(), this.needsRender = !0;
747
+ this.points.geometry.setAttribute("position", new i.BufferAttribute(new Float32Array(e), 3)), this.line.geometry.setPositions(e), this.line.computeLineDistances(), this.needsRender = !0;
747
748
  }, o.prototype.getPoints = function() {
748
749
  var t = this.points.geometry.attributes.position.array;
749
750
  return [
750
- new r.Vector3(t[0], t[1], t[2]),
751
- new r.Vector3(t[3], t[4], t[5])
751
+ new i.Vector3(t[0], t[1], t[2]),
752
+ new i.Vector3(t[3], t[4], t[5])
752
753
  ];
753
754
  }, o.prototype.setMaterial = function(t) {
754
755
  var n = this.line.material;
755
756
  for (var e in t)
756
757
  if (t.hasOwnProperty(e)) {
757
- var i = t[e];
758
- e === "dashed" ? (n.dashed = i, i ? n.defines.USE_DASH = "" : delete n.defines.USE_DASH, n.needsUpdate = !0) : n[e] = t[e];
758
+ var r = t[e];
759
+ e === "dashed" ? (n.dashed = r, r ? n.defines.USE_DASH = "" : delete n.defines.USE_DASH, n.needsUpdate = !0) : n[e] = t[e];
759
760
  }
760
761
  this.needsRender = !0;
761
762
  }, o.prototype.setResolution = function(t, n) {
762
763
  var e = this.line.material.resolution;
763
764
  (e.x !== t || e.y !== n) && (e.set(t, n), this.needsRender = !0);
764
765
  }, o;
765
- }(r.Object3D)
766
+ }(i.Object3D)
766
767
  );
767
768
  Object.assign(Q.prototype, { isFiveLine: !0 });
768
769
  export {
769
770
  Q as Line,
770
771
  O as LineGeometry,
771
772
  L as LineMaterial,
772
- E as LineSegmentsGeometry,
773
+ B as LineSegmentsGeometry,
773
774
  I as THREE_Line2,
774
775
  F as THREE_LineSegments2
775
776
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@realsee/five",
3
- "version": "6.0.0-alpha.63",
3
+ "version": "6.0.0-alpha.65",
4
4
  "description": "Realsee Renderer SDK",
5
5
  "bin": {
6
6
  "five-plugin-init": "./scripts/five-plugin-init.js",
@@ -27,8 +27,8 @@
27
27
  }
28
28
  },
29
29
  "dependencies": {
30
- "archiver": "^5.3.0",
31
- "commander": "^9.0.0",
30
+ "archiver": "^6.0.1",
31
+ "commander": "^11.1.0",
32
32
  "copyfiles": "^2.4.1",
33
33
  "ejs": "^3.1.6",
34
34
  "fast-glob": "^3.3.2",
package/react/index.js CHANGED
@@ -1,8 +1,8 @@
1
1
  /**
2
2
  * @license
3
3
  * @realsee/five
4
- * Generated: 12/12/2023
5
- * Version: 6.0.0-alpha.63
4
+ * Generated: 12/14/2023
5
+ * Version: 6.0.0-alpha.65
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 ce=require("react"),le=require("three"),_=require("@realsee/five");function A(e){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const t=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,t.get?t:{enumerable:!0,get:()=>e[r]})}}return n.default=e,Object.freeze(n)}const o=A(ce),g=A(le);var k=function(e,n){return k=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,t){r.__proto__=t}||function(r,t){for(var a in t)Object.prototype.hasOwnProperty.call(t,a)&&(r[a]=t[a])},k(e,n)};function I(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");k(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}var m=function(){return m=Object.assign||function(n){for(var r,t=1,a=arguments.length;t<a;t++){r=arguments[t];for(var u in r)Object.prototype.hasOwnProperty.call(r,u)&&(n[u]=r[u])}return n},m.apply(this,arguments)};function b(e,n,r){if(r||arguments.length===2)for(var t=0,a=n.length,u;t<a;t++)(u||!(t in n))&&(u||(u=Array.prototype.slice.call(n,0,t)),u[t]=n[t]);return e.concat(u||Array.prototype.slice.call(n))}var E=[],R=[];function fe(e){var n=e===void 0?{}:e,r=n.backgroundColor,t=r===void 0?1579548:r,a=n.backgroundAlpha,u=a===void 0?1:a,i=n.pixelRatio,s=i===void 0?1:i,c=n.webgl2,f=c===void 0?!1:c;if(!(typeof window>"u")){var l=null;if(f?l=E.shift():l=R.shift(),!l){if(f){var h=document.createElement("canvas"),p=h.getContext("webgl2");if(p===null)throw new Error("error occurred when getting webgl2 canvas context");l=new g.WebGLRenderer({antialias:!1,alpha:!0,canvas:h,context:p})}else l=new g.WebGLRenderer({antialias:!1,alpha:!0});l.outputEncoding=g.sRGBEncoding}return l.setPixelRatio(s),l.setClearColor(t,u),l.autoClear=!0,l}}function ve(e){if(e){var n=e.capabilities.isWebGL2;n?R.indexOf(e)===-1&&R.push(e):E.indexOf(e)===-1&&E.push(e)}}var L=o.createContext(null);function d(){var e=o.useContext(L);if(!e)throw new Error("FiveProvider never found.");return e.five}function q(){var e=o.useContext(L);if(!e)throw new Error("FiveProvider never found.");return e.loadWork}function de(e,n){var r=Array.isArray(e)?e:[e],t=Array.isArray(n)?n:[n];if(r.length!==t.length)return!1;for(var a=0;a<r.length;a++)if(r[a].workCode!==t[a].workCode)return!1;return!0}function pe(e){return e===void 0&&(e={}),function(n){I(r,n);function r(){var t=n!==null&&n.apply(this,arguments)||this;return t.unmout=!1,t}return r.prototype.loadWork=function(t,a,u,i){if(i===void 0&&(i=!0),this.props.work)throw new Error("props 'works' is set in fiveProvider, if you need modify work internal, use 'initialWork' instead.");return this.five.load(t,a,u,i)},r.prototype.shouldComponentUpdate=function(t){return this.five&&t.work&&!de(t.work,this.five.works)&&this.five.load(t.work,t.initialState),!0},r.prototype.componentWillUnmount=function(){this.unmout=!0,this.five&&(this.five.dispose(),ve(this.five.renderer),delete this.five)},r.prototype.render=function(){var t=this,a;if(this.unmout)return null;if(!this.five){var u=_.getViewportScale(),i=u===1?window.devicePixelRatio:1,s=fe({pixelRatio:i,backgroundAlpha:e.backgroundAlpha,backgroundColor:e.backgroundColor,webgl2:e==null?void 0:e.webgl2});this.five=new _.Five(m({renderer:s},e));var c=this.props.work||this.props.initialWork;c&&this.five.load(c,this.props.initialState,void 0,(a=this.props.initialUserAction)!==null&&a!==void 0?a:!0),this.five.on("load",function(){t.props.onWorksChange&&t.props.onWorksChange(t.five.works)}),this.five.on("stateChange",function(f,l){t.props.onStateChange&&t.props.onStateChange(f,l)}),this.five.on("currentStateChange",function(f,l){t.props.onCurrentStateChange&&t.props.onCurrentStateChange(f,l)}),this.five.on("error",function(f){t.props.onError?t.props.onError(f):console.warn(f.message)})}return o.createElement(L.Provider,{value:{five:this.five,loadWork:function(){for(var f=[],l=0;l<arguments.length;l++)f[l]=arguments[l];return t.loadWork.apply(t,f)}}},this.props.children)},r}(o.Component)}var he={display:"inline-block",overflow:"hidden"},ge=function(e){var n=e.width,r=e.height,t=d(),a=o.createRef(),u=m({width:n,height:r},he);return o.useLayoutEffect(function(){if(a.current&&t.renderer){if(t.renderer.domElement.parentNode!==null&&t.renderer.domElement.parentNode!==a.current)throw new Error("There are more than 2 fiveCanvas in this context.");t.renderer.domElement.parentNode!==a.current&&a.current.appendChild(t.renderer.domElement),t.camera.aspect=n/r,t.camera.updateProjectionMatrix(),t.renderer.setSize(n,r),t.needsRender=!0}},[n,r,a.current]),o.createElement("div",{ref:a,style:u})};function me(){return d()}function G(e,n){var r=d(),t=[r];n!==void 0&&(t=t.concat(n)),o.useLayoutEffect(function(){return e(r.scene)},t)}var ye=G;function Se(){var e=d(),n=q(),r=o.useState(function(){return e.works}),t=r[0],a=r[1];return o.useLayoutEffect(function(){return e.on("load",function(){return a(e.works)})},[e]),[t,n]}function D(e){return m({},e.state)}function be(){var e=d(),n=o.useState(function(){return D(e)}),r=n[0],t=n[1],a=o.useCallback(function(u,i,s){i===void 0&&(i=!1),s===void 0&&(s=!0);var c=typeof u=="function"?u(e.getCurrentState()):u;e.setState(c,i,s)},[e]);return o.useLayoutEffect(function(){return e.on("stateChange",function(){return t(D(e))})},[e]),[r,a]}function we(){var e=d(),n=o.useState(function(){return e.getCurrentState()}),r=n[0],t=n[1],a=o.useCallback(function(u,i,s){i===void 0&&(i=!1),s===void 0&&(s=!0);var c=typeof u=="function"?u(e.getCurrentState()):u;e.setState(c,i,s)},[e]);return o.useLayoutEffect(function(){return e.on("currentStateChange",function(){return t(e.getCurrentState())})},[e]),[r,a]}function Ce(){var e=d(),n=o.useState(function(){return e.getCurrentState()}),r=n[0],t=n[1];return o.useLayoutEffect(function(){return e.on("currentStateChange",function(){return t(e.getCurrentState())})},[e]),e.works.getResolvedObserver(r)}function Fe(e,n,r){var t=d(),a=[t,e];r!==void 0&&(a=a.concat(r)),o.useLayoutEffect(function(){return t.on(e,n)},a)}function ke(){var e=d(),n=o.useCallback(function(i,s){return e.updateCamera(i,s)},[e]),r=o.useCallback(function(i,s,c,f,l){return e.getPixels(i,s,c,f,l)},[e]),t=o.useCallback(function(i){return e.render(i)},[e]),a=o.useCallback(function(){return e.needsRender=!0},[e]),u=o.useCallback(function(i,s){return e.preloadPano(i,s)},[e]);return{updateCamera:n,getPixels:r,render:t,needsRender:a,preloadPano:u}}function Ee(){var e=d(),n=o.useState(function(){return Symbol()});n[0];var r=n[1];o.useLayoutEffect(function(){return e.on("cameraUpdate",function(){return r(Symbol())})},[e]);var t=o.useCallback(function(a,u){return e.project2d(a,u)},[e]);return t}function N(e){var n=e.camera.getWorldDirection(new g.Vector3),r=new g.Raycaster(e.camera.position,n);return r}function Re(){var e=d(),n=o.useState(function(){return N(e)}),r=n[0],t=n[1];return o.useLayoutEffect(function(){return e.on("cameraUpdate",function(){return t(N(e))})},[e]),r}function $(e){return e.camera.getWorldDirection(new g.Vector3)}function Le(){var e=d(),n=o.useState(function(){return $(e)}),r=n[0],t=n[1];return o.useLayoutEffect(function(){return e.on("cameraUpdate",function(){return t($(e))})},[e]),r}function Pe(){var e=d(),n=o.useCallback(function(r){return e.model.intersectRaycaster(r)},[e]);return n}function H(e){return e.model.empty?"Empty":"Loaded"}function Ve(){var e=d(),n=o.useState(function(){return H(e)}),r=n[0],t=n[1];return o.useLayoutEffect(function(){return e.on("modelLoaded",function(){return t(H(e))})},[e]),r}function Oe(){var e=d(),n=o.useState(e.model.shownFloor),r=n[0],t=n[1],a=o.useState(e.model.floorLength),u=a[0],i=a[1],s=o.useCallback(function(c){typeof c=="number"?e.model.show(c):e.model.show()},[e]);return o.useLayoutEffect(function(){var c=[];return c.push(e.on("modelShownFloorChange",function(){return t(e.model.shownFloor)})),c.push(e.on("modelLoaded",function(){return i(e.model.floorLength)})),function(){for(var f;f=c.shift();)f()}},[e]),[r,u,s]}function xe(){var e=d(),n=o.useState(e.helperVisible),r=n[0],t=n[1],a=o.useCallback(function(u){e.helperVisible=u},[e]);return o.useLayoutEffect(function(){return e.on("helpersVisibleChange",function(u){return t(u)})},[e]),[r,a]}var Me="$five";function v(e,n){return n.indexOf(e)>=0}function T(e,n){for(var r=0,t=Object.keys(n);r<t.length;r++){var a=t[r];n[a]!==void 0&&(e[a]=n[a])}}function We(e,n){var r=v("state",n),t=o.useState(Symbol()),a=t[0],u=t[1],i=o.useMemo(function(){if(r)return m({},e.state)},[e,a]);return o.useLayoutEffect(function(){if(r)return e.on("stateChange",function(){return u(Symbol())})},[e]),[i,a]}function je(e,n){var r=v("currentState",n),t=o.useState(Symbol()),a=t[0],u=t[1],i=o.useMemo(function(){if(r)return e.getCurrentState()},[e,a]);return o.useLayoutEffect(function(){if(r)return e.on("currentStateChange",function(){return u(Symbol())})},[e]),[i,a]}function Ue(e,n){var r=v("currentObserver",n),t=o.useState(Symbol()),a=t[0],u=t[1],i=o.useMemo(function(){if(r)return e.getCurrentState()},[e,a]);o.useLayoutEffect(function(){if(r)return e.on("currentStateChange",function(){return u(Symbol())})},[e]);var s=void 0;return i&&(s=e.works.getResolvedObserver(i)),[s,a]}function _e(e,n){var r=v("unsafe__fiveInstance",n);return[r?e:void 0]}function De(e,n){var r=v("works",n),t=o.useState(Symbol()),a=t[0],u=t[1],i=o.useMemo(function(){if(r)return e.works},[e,a]);return o.useLayoutEffect(function(){if(r)return e.on("load",function(){return u(Symbol())})},[e]),[i,a]}function Ne(e,n){var r=v("model",n),t=o.useState(Symbol()),a=t[0],u=t[1],i=o.useMemo(function(){if(r)return e.model},[e,a]);return o.useLayoutEffect(function(){if(r)return e.on("modelLoaded",function(){return u(Symbol())})},[e]),[i,a]}function $e(e,n){var r=v("scene",n);return[r?e.scene:void 0]}function He(e,n){var r=v("cameraDirection",n),t=o.useState(Symbol()),a=t[0],u=t[1],i=o.useMemo(function(){if(r)return e.camera.getWorldDirection(new g.Vector3)},[e,a]);return o.useLayoutEffect(function(){if(r)return e.on("cameraUpdate",function(){return u(Symbol())})},[e]),[i,a]}function Te(e,n){var r=v("cameraRaycaster",n),t=o.useState(Symbol()),a=t[0],u=t[1],i=o.useMemo(function(){if(r){var s=e.camera.getWorldDirection(new g.Vector3),c=new g.Raycaster(e.camera.position,s);return c}},[e,a]);return o.useLayoutEffect(function(){if(r)return e.on("cameraUpdate",function(){return u(Symbol())})},[e]),[i,a]}function Ae(e,n){var r=v("modelReadyState",n),t=o.useState(Symbol()),a=t[0],u=t[1],i=o.useMemo(function(){if(r)return e.model.empty?"Empty":"Loaded"},[e,a]);return o.useLayoutEffect(function(){if(r)return e.on("modelLoaded",function(){return u(Symbol())})},[e]),[i,a]}function Ie(e,n){var r=v("shownFloor",n),t=o.useState(Symbol()),a=t[0],u=t[1],i=o.useMemo(function(){if(r)return e.model.shownFloor},[e,a]);return o.useLayoutEffect(function(){if(r)return e.on("modelShownFloorChange",function(){return u(Symbol())})},[e]),[i,a]}function qe(e,n){var r=v("helperVisible",n),t=o.useState(Symbol()),a=t[0],u=t[1],i=o.useMemo(function(){if(r)return e.helperVisible},[e,a]);return o.useLayoutEffect(function(){if(r)return e.on("helpersVisibleChange",function(){return u(Symbol())})},[e]),[i,a]}function Ge(e,n){if(v("loadWork",n))return e}function ze(e,n){if(v("setState",n))return function(){for(var r=[],t=0;t<arguments.length;t++)r[t]=arguments[t];return e.setState.apply(e,r)}}function Be(e,n){if(v("on",n))return function(){for(var r=[],t=0;t<arguments.length;t++)r[t]=arguments[t];return e.on.apply(e,r)}}function Je(e,n){if(v("on",n))return function(){for(var r=[],t=0;t<arguments.length;t++)r[t]=arguments[t];return e.once.apply(e,r)}}function Ke(e,n){if(v("off",n))return function(){for(var r=[],t=0;t<arguments.length;t++)r[t]=arguments[t];return e.off.apply(e,r)}}function Qe(e,n){if(v("intersectRaycaster",n))return function(){for(var r,t=[],a=0;a<arguments.length;a++)t[a]=arguments[a];return(r=e.model).intersectRaycaster.apply(r,t)}}function Xe(e,n){if(v("project2d",n))return function(){for(var r=[],t=0;t<arguments.length;t++)r[t]=arguments[t];return e.project2d.apply(e,r)}}function Ye(e,n){if(v("updateCamera",n))return function(){for(var r=[],t=0;t<arguments.length;t++)r[t]=arguments[t];return e.updateCamera.apply(e,r)}}function Ze(e,n){if(v("getPixels",n))return function(){for(var r=[],t=0;t<arguments.length;t++)r[t]=arguments[t];return e.getPixels.apply(e,r)}}function et(e,n){if(v("render",n))return function(){for(var r=[],t=0;t<arguments.length;t++)r[t]=arguments[t];return e.render.apply(e,r)}}function tt(e,n){if(v("needsRender",n))return function(){e.needsRender=!0}}function rt(e,n){if(v("preloadPano",n))return function(){for(var r=[],t=0;t<arguments.length;t++)r[t]=arguments[t];return e.preloadPano.apply(e,r)}}function nt(e,n){if(v("showFloor",n))return function(r){typeof r=="number"?e.model.show(r):e.model.show()}}function at(e,n){if(v("toggleHelperVisible",n))return function(r){e.helperVisible=r}}function ot(e){return function(n){return o.forwardRef(function(r,t){var a=d(),u=q(),i=_e(a,e)[0],s=We(a,e),c=s[0],f=s[1],l=je(a,e),h=l[0],p=l[1],S=Ue(a,e),w=S[0],C=S[1],P=De(a,e),B=P[0],J=P[1],V=Ne(a,e),K=V[0],Q=V[1],X=$e(a,e)[0],O=He(a,e),Y=O[0],Z=O[1],x=Te(a,e),ee=x[0],te=x[1],M=Ae(a,e),re=M[0],ne=M[1],W=Ie(a,e),ae=W[0],oe=W[1],j=qe(a,e),ue=j[0],ie=j[1],U=o.useMemo(function(){var y={};return T(y,{setState:ze(a,e),loadWork:Ge(u,e),on:Be(a,e),once:Je(a,e),off:Ke(a,e),intersectRaycaster:Qe(a,e),project2d:Xe(a,e),updateCamera:Ye(a,e),getPixels:Ze(a,e),render:et(a,e),needsRender:tt(a,e),preloadPano:rt(a,e),showFloor:nt(a,e),toggleHelperVisible:at(a,e)}),y},[a,u]),se=o.useMemo(function(){var y=m({},U);return T(y,{unsafe__fiveInstance:i,state:c,currentState:h,currentObserver:w,work:B,model:K,scene:X,cameraDirection:Y,cameraRaycaster:ee,modelReadyState:re,shownFloor:ae,helperVisible:ue}),y},[a,U,f,p,C,J,Q,Z,te,ne,oe,ie]);return o.createElement(n,m({ref:t,$five:se},r))})}}function ut(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return e}function F(e,n){for(var r={},t=n.length,a=-1;++a<t;){var u=n[a];u in e&&(r[u]=e[u])}return r}function it(e,n){return typeof e=="number"&&typeof n=="number"&&isNaN(e)&&isNaN(n)?!0:e===n}function st(e,n){for(var r=0;r<e.length;r++)for(var t=0;t<n.length;t++)if(e[r]===n[t])return!0;return!1}var z=function(){function e(n,r){this.values=n,this.listeners=[],this.onValuesChange=r}return e.prototype.on=function(n,r){var t=this,a=[n,r];return this.listeners.push(a),function(){var u=t.listeners.indexOf(a);u>=0&&t.listeners.splice(u,1)}},e.prototype.getValues=function(n){return F(this.values,n)},e.prototype.setValues=function(n,r){var t=[];for(var a in r)n.indexOf(a)>=0&&!it(r[a],this.values[a])&&t.push(a);if(t.length!==0){for(var u=m({},this.values),i=0,s=t;i<s.length;i++){var c=s[i];this.values[c]=r[c]}this.onValuesChange&&this.onValuesChange(this.values,u);for(var f=0,l=this.listeners;f<l.length;f++){var h=l[f],p=h[0],S=h[1];if(st(p,t)){var w=F(u,p),C=F(this.values,p);S(C,w)}}}},e}();function ct(e){var n=o.createContext(null);return{useStore:function(r){var t=o.useContext(n);if(t===null)throw new Error("StoreProvider never found.");var a=o.useRef(!0),u=o.useState(t.getValues(r)),i=u[0],s=u[1],c=b([t],r,!0);o.useLayoutEffect(function(){return a.current?a.current=!1:s(t.getValues(r)),t.on(r,function(l){return s(l)})},c);var f=o.useCallback(function(l){return t.setValues(r,l)},c);return[i,f]},useStoreSetter:function(r){var t=o.useContext(n);if(t===null)throw new Error("StoreProvider never found.");var a=o.useCallback(function(u){return t.setValues(r,u)},b([t],r,!0));return a},watchStore:function(r,t,a){var u=o.useContext(n);if(u===null)throw new Error("StoreProvider never found.");var i=b([u],r,!0);a!==void 0&&(i=i.concat(a)),o.useLayoutEffect(function(){return u.on(r,t)},i)},useStoreAction:function(r){var t=o.useContext(n);if(t===null)throw new Error("StoreProvider never found.");var a=o.useCallback(function(){for(var u=[],i=0;i<arguments.length;i++)u[i]=arguments[i];var s=e[r],c=s[0],f=s.slice(1),l=function(){return t.getValues(f)},h=function(p){return t.setValues(f,p)};return c.apply(void 0,b([l,h],u,!1))},[]);return a},StoreProvider:function(r){I(t,r);function t(a){var u=r.call(this,a)||this;return u.store=new z(a.initialValue,function(){for(var i,s=[],c=0;c<arguments.length;c++)s[c]=arguments[c];u.props.onValuesChange&&(i=u.props).onValuesChange.apply(i,s)}),u}return t.prototype.shouldComponentUpdate=function(a){return a.children!==this.props.children},t.prototype.render=function(){return o.createElement(n.Provider,{value:this.store},this.props.children)},t}(o.Component)}}exports.FiveCanvas=ge;exports.INJECTION_PROPNAME=Me;exports.Store=z;exports.createFiveFeature=ut;exports.createFiveProvider=pe;exports.createStore=ct;exports.unsafe__useFiveInstance=me;exports.useFiveAction=ke;exports.useFiveCameraDirection=Le;exports.useFiveCameraRaycaster=Re;exports.useFiveCurrentObserver=Ce;exports.useFiveCurrentState=we;exports.useFiveEventCallback=Fe;exports.useFiveFloor=Oe;exports.useFiveHelper=xe;exports.useFiveModelIntersectRaycaster=Pe;exports.useFiveModelReadyState=Ve;exports.useFiveProject2d=Ee;exports.useFiveScene=ye;exports.useFiveSceneEffect=G;exports.useFiveState=be;exports.useFiveWork=Se;exports.withFive=ot;
255
+ */"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const ce=require("react"),le=require("three"),_=require("@realsee/five");function A(e){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,r.get?r:{enumerable:!0,get:()=>e[t]})}}return n.default=e,Object.freeze(n)}const o=A(ce),g=A(le);var E=function(e,n){return E=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,r){t.__proto__=r}||function(t,r){for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(t[a]=r[a])},E(e,n)};function I(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");E(e,n);function t(){this.constructor=e}e.prototype=n===null?Object.create(n):(t.prototype=n.prototype,new t)}var m=function(){return m=Object.assign||function(n){for(var t,r=1,a=arguments.length;r<a;r++){t=arguments[r];for(var u in t)Object.prototype.hasOwnProperty.call(t,u)&&(n[u]=t[u])}return n},m.apply(this,arguments)};function b(e,n,t){if(t||arguments.length===2)for(var r=0,a=n.length,u;r<a;r++)(u||!(r in n))&&(u||(u=Array.prototype.slice.call(n,0,r)),u[r]=n[r]);return e.concat(u||Array.prototype.slice.call(n))}var k=[],R=[];function fe(e){var n=e===void 0?{}:e,t=n.backgroundColor,r=t===void 0?1579548:t,a=n.backgroundAlpha,u=a===void 0?1:a,i=n.pixelRatio,s=i===void 0?1:i,c=n.webgl2,f=c===void 0?!1:c;if(!(typeof window>"u")){var l=null;if(f?l=k.shift():l=R.shift(),!l){if(f){var h=document.createElement("canvas"),p=h.getContext("webgl2");if(p===null)throw new Error("error occurred when getting webgl2 canvas context");l=new g.WebGLRenderer({antialias:!1,alpha:!0,canvas:h,context:p})}else l=new g.WebGLRenderer({antialias:!1,alpha:!0});l.outputEncoding=g.sRGBEncoding}return l.setPixelRatio(s),l.setClearColor(r,u),l.autoClear=!0,l}}function ve(e){if(e){var n=e.capabilities.isWebGL2;n?R.indexOf(e)===-1&&R.push(e):k.indexOf(e)===-1&&k.push(e)}}var L=o.createContext(null);function d(){var e=o.useContext(L);if(!e)throw new Error("FiveProvider never found.");return e.five}function q(){var e=o.useContext(L);if(!e)throw new Error("FiveProvider never found.");return e.loadWork}function de(e,n){var t=Array.isArray(e)?e:[e],r=Array.isArray(n)?n:[n];if(t.length!==r.length)return!1;for(var a=0;a<t.length;a++)if(t[a].workCode!==r[a].workCode)return!1;return!0}function pe(e){return e===void 0&&(e={}),function(n){I(t,n);function t(){var r=n!==null&&n.apply(this,arguments)||this;return r.unmout=!1,r}return t.prototype.loadWork=function(r,a,u,i){if(i===void 0&&(i=!0),this.props.work)throw new Error("props 'works' is set in fiveProvider, if you need modify work internal, use 'initialWork' instead.");return this.five.load(r,a,u,i)},t.prototype.shouldComponentUpdate=function(r){return this.five&&r.work&&!de(r.work,this.five.works)&&this.five.load(r.work,r.initialState),!0},t.prototype.componentWillUnmount=function(){this.unmout=!0,this.five&&(this.five.dispose(),ve(this.five.renderer),delete this.five)},t.prototype.render=function(){var r=this,a;if(this.unmout)return null;if(!this.five){var u=_.getViewportScale(),i=u===1?window.devicePixelRatio:1,s=fe({pixelRatio:i,backgroundAlpha:e.backgroundAlpha,backgroundColor:e.backgroundColor,webgl2:e==null?void 0:e.webgl2});this.five=new _.Five(m({renderer:s},e));var c=this.props.work||this.props.initialWork;c&&this.five.load(c,this.props.initialState,void 0,(a=this.props.initialUserAction)!==null&&a!==void 0?a:!0),this.five.on("load",function(){r.props.onWorksChange&&r.props.onWorksChange(r.five.works)}),this.five.on("stateChange",function(f,l){r.props.onStateChange&&r.props.onStateChange(f,l)}),this.five.on("currentStateChange",function(f,l){r.props.onCurrentStateChange&&r.props.onCurrentStateChange(f,l)}),this.five.on("error",function(f){r.props.onError?r.props.onError(f):console.warn(f.message)})}return o.createElement(L.Provider,{value:{five:this.five,loadWork:function(){for(var f=[],l=0;l<arguments.length;l++)f[l]=arguments[l];return r.loadWork.apply(r,f)}}},this.props.children)},t}(o.Component)}var he={display:"inline-block",overflow:"hidden"},ge=function(e){var n=e.width,t=e.height,r=d(),a=o.createRef(),u=m({width:n,height:t},he);return o.useLayoutEffect(function(){if(a.current&&r.renderer){if(r.renderer.domElement.parentNode!==null&&r.renderer.domElement.parentNode!==a.current)throw new Error("There are more than 2 fiveCanvas in this context.");r.renderer.domElement.parentNode!==a.current&&a.current.appendChild(r.renderer.domElement),r.camera.aspect=n/t,r.camera.updateProjectionMatrix(),r.renderer.setSize(n,t),r.needsRender=!0}},[n,t,a.current]),o.createElement("div",{ref:a,style:u})};function me(){return d()}function G(e,n){var t=d(),r=[t];n!==void 0&&(r=r.concat(n)),o.useLayoutEffect(function(){return e(t.scene)},r)}var ye=G;function Se(){var e=d(),n=q(),t=o.useState(function(){return e.works}),r=t[0],a=t[1];return o.useLayoutEffect(function(){return e.on("load",function(){return a(e.works)})},[e]),[r,n]}function D(e){return m({},e.state)}function be(){var e=d(),n=o.useState(function(){return D(e)}),t=n[0],r=n[1],a=o.useCallback(function(u,i,s){i===void 0&&(i=!1),s===void 0&&(s=!0);var c=typeof u=="function"?u(e.getCurrentState()):u;e.setState(c,i,s)},[e]);return o.useLayoutEffect(function(){return e.on("stateChange",function(){return r(D(e))})},[e]),[t,a]}function we(){var e=d(),n=o.useState(function(){return e.getCurrentState()}),t=n[0],r=n[1],a=o.useCallback(function(u,i,s){i===void 0&&(i=!1),s===void 0&&(s=!0);var c=typeof u=="function"?u(e.getCurrentState()):u;e.setState(c,i,s)},[e]);return o.useLayoutEffect(function(){return e.on("currentStateChange",function(){return r(e.getCurrentState())})},[e]),[t,a]}function Ce(){var e=d(),n=o.useState(function(){return e.getCurrentState()}),t=n[0],r=n[1];return o.useLayoutEffect(function(){return e.on("currentStateChange",function(){return r(e.getCurrentState())})},[e]),e.works.getResolvedObserver(t)}function Fe(e,n,t){var r=d(),a=[r,e];t!==void 0&&(a=a.concat(t)),o.useLayoutEffect(function(){return r.on(e,n)},a)}function Ee(){var e=d(),n=o.useCallback(function(i,s){return e.updateCamera(i,s)},[e]),t=o.useCallback(function(i,s,c,f,l){return e.getPixels(i,s,c,f,l)},[e]),r=o.useCallback(function(i){return e.render(i)},[e]),a=o.useCallback(function(){return e.needsRender=!0},[e]),u=o.useCallback(function(i,s){return e.preloadPano(i,s)},[e]);return{updateCamera:n,getPixels:t,render:r,needsRender:a,preloadPano:u}}function ke(){var e=d(),n=o.useState(function(){return Symbol()});n[0];var t=n[1];o.useLayoutEffect(function(){return e.on("cameraUpdate",function(){return t(Symbol())})},[e]);var r=o.useCallback(function(a,u){return e.project2d(a,u)},[e]);return r}function N(e){var n=e.camera.getWorldDirection(new g.Vector3),t=new g.Raycaster(e.camera.position,n);return t}function Re(){var e=d(),n=o.useState(function(){return N(e)}),t=n[0],r=n[1];return o.useLayoutEffect(function(){return e.on("cameraUpdate",function(){return r(N(e))})},[e]),t}function $(e){return e.camera.getWorldDirection(new g.Vector3)}function Le(){var e=d(),n=o.useState(function(){return $(e)}),t=n[0],r=n[1];return o.useLayoutEffect(function(){return e.on("cameraUpdate",function(){return r($(e))})},[e]),t}function Pe(){var e=d(),n=o.useCallback(function(t){return e.model.intersectRaycaster(t)},[e]);return n}function H(e){return e.model.empty?"Empty":"Loaded"}function Ve(){var e=d(),n=o.useState(function(){return H(e)}),t=n[0],r=n[1];return o.useLayoutEffect(function(){return e.on("modelLoaded",function(){return r(H(e))})},[e]),t}function Oe(){var e=d(),n=o.useState(e.model.shownFloor),t=n[0],r=n[1],a=o.useState(e.model.floorLength),u=a[0],i=a[1],s=o.useCallback(function(c){typeof c=="number"?e.model.show(c):e.model.show()},[e]);return o.useLayoutEffect(function(){var c=[];return c.push(e.on("modelShownFloorChange",function(){return r(e.model.shownFloor)})),c.push(e.on("modelLoaded",function(){return i(e.model.floorLength)})),function(){for(var f;f=c.shift();)f()}},[e]),[t,u,s]}function xe(){var e=d(),n=o.useState(e.helperVisible),t=n[0],r=n[1],a=o.useCallback(function(u){e.helperVisible=u},[e]);return o.useLayoutEffect(function(){return e.on("helpersVisibleChange",function(u){return r(u)})},[e]),[t,a]}var Me="$five";function v(e,n){return n.indexOf(e)>=0}function T(e,n){for(var t=0,r=Object.keys(n);t<r.length;t++){var a=r[t];n[a]!==void 0&&(e[a]=n[a])}}function We(e,n){var t=v("state",n),r=o.useState(Symbol()),a=r[0],u=r[1],i=o.useMemo(function(){if(t)return m({},e.state)},[e,a]);return o.useLayoutEffect(function(){if(t)return e.on("stateChange",function(){return u(Symbol())})},[e]),[i,a]}function je(e,n){var t=v("currentState",n),r=o.useState(Symbol()),a=r[0],u=r[1],i=o.useMemo(function(){if(t)return e.getCurrentState()},[e,a]);return o.useLayoutEffect(function(){if(t)return e.on("currentStateChange",function(){return u(Symbol())})},[e]),[i,a]}function Ue(e,n){var t=v("currentObserver",n),r=o.useState(Symbol()),a=r[0],u=r[1],i=o.useMemo(function(){if(t)return e.getCurrentState()},[e,a]);o.useLayoutEffect(function(){if(t)return e.on("currentStateChange",function(){return u(Symbol())})},[e]);var s=void 0;return i&&(s=e.works.getResolvedObserver(i)),[s,a]}function _e(e,n){var t=v("unsafe__fiveInstance",n);return[t?e:void 0]}function De(e,n){var t=v("works",n),r=o.useState(Symbol()),a=r[0],u=r[1],i=o.useMemo(function(){if(t)return e.works},[e,a]);return o.useLayoutEffect(function(){if(t)return e.on("load",function(){return u(Symbol())})},[e]),[i,a]}function Ne(e,n){var t=v("model",n),r=o.useState(Symbol()),a=r[0],u=r[1],i=o.useMemo(function(){if(t)return e.model},[e,a]);return o.useLayoutEffect(function(){if(t)return e.on("modelLoaded",function(){return u(Symbol())})},[e]),[i,a]}function $e(e,n){var t=v("scene",n);return[t?e.scene:void 0]}function He(e,n){var t=v("cameraDirection",n),r=o.useState(Symbol()),a=r[0],u=r[1],i=o.useMemo(function(){if(t)return e.camera.getWorldDirection(new g.Vector3)},[e,a]);return o.useLayoutEffect(function(){if(t)return e.on("cameraUpdate",function(){return u(Symbol())})},[e]),[i,a]}function Te(e,n){var t=v("cameraRaycaster",n),r=o.useState(Symbol()),a=r[0],u=r[1],i=o.useMemo(function(){if(t){var s=e.camera.getWorldDirection(new g.Vector3),c=new g.Raycaster(e.camera.position,s);return c}},[e,a]);return o.useLayoutEffect(function(){if(t)return e.on("cameraUpdate",function(){return u(Symbol())})},[e]),[i,a]}function Ae(e,n){var t=v("modelReadyState",n),r=o.useState(Symbol()),a=r[0],u=r[1],i=o.useMemo(function(){if(t)return e.model.empty?"Empty":"Loaded"},[e,a]);return o.useLayoutEffect(function(){if(t)return e.on("modelLoaded",function(){return u(Symbol())})},[e]),[i,a]}function Ie(e,n){var t=v("shownFloor",n),r=o.useState(Symbol()),a=r[0],u=r[1],i=o.useMemo(function(){if(t)return e.model.shownFloor},[e,a]);return o.useLayoutEffect(function(){if(t)return e.on("modelShownFloorChange",function(){return u(Symbol())})},[e]),[i,a]}function qe(e,n){var t=v("helperVisible",n),r=o.useState(Symbol()),a=r[0],u=r[1],i=o.useMemo(function(){if(t)return e.helperVisible},[e,a]);return o.useLayoutEffect(function(){if(t)return e.on("helpersVisibleChange",function(){return u(Symbol())})},[e]),[i,a]}function Ge(e,n){if(v("loadWork",n))return e}function ze(e,n){if(v("setState",n))return function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return e.setState.apply(e,t)}}function Be(e,n){if(v("on",n))return function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return e.on.apply(e,t)}}function Je(e,n){if(v("on",n))return function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return e.once.apply(e,t)}}function Ke(e,n){if(v("off",n))return function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return e.off.apply(e,t)}}function Qe(e,n){if(v("intersectRaycaster",n))return function(){for(var t,r=[],a=0;a<arguments.length;a++)r[a]=arguments[a];return(t=e.model).intersectRaycaster.apply(t,r)}}function Xe(e,n){if(v("project2d",n))return function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return e.project2d.apply(e,t)}}function Ye(e,n){if(v("updateCamera",n))return function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return e.updateCamera.apply(e,t)}}function Ze(e,n){if(v("getPixels",n))return function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return e.getPixels.apply(e,t)}}function er(e,n){if(v("render",n))return function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return e.render.apply(e,t)}}function rr(e,n){if(v("needsRender",n))return function(){e.needsRender=!0}}function tr(e,n){if(v("preloadPano",n))return function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return e.preloadPano.apply(e,t)}}function nr(e,n){if(v("showFloor",n))return function(t){typeof t=="number"?e.model.show(t):e.model.show()}}function ar(e,n){if(v("toggleHelperVisible",n))return function(t){e.helperVisible=t}}function or(e){return function(n){return o.forwardRef(function(t,r){var a=d(),u=q(),i=_e(a,e)[0],s=We(a,e),c=s[0],f=s[1],l=je(a,e),h=l[0],p=l[1],S=Ue(a,e),w=S[0],C=S[1],P=De(a,e),B=P[0],J=P[1],V=Ne(a,e),K=V[0],Q=V[1],X=$e(a,e)[0],O=He(a,e),Y=O[0],Z=O[1],x=Te(a,e),ee=x[0],re=x[1],M=Ae(a,e),te=M[0],ne=M[1],W=Ie(a,e),ae=W[0],oe=W[1],j=qe(a,e),ue=j[0],ie=j[1],U=o.useMemo(function(){var y={};return T(y,{setState:ze(a,e),loadWork:Ge(u,e),on:Be(a,e),once:Je(a,e),off:Ke(a,e),intersectRaycaster:Qe(a,e),project2d:Xe(a,e),updateCamera:Ye(a,e),getPixels:Ze(a,e),render:er(a,e),needsRender:rr(a,e),preloadPano:tr(a,e),showFloor:nr(a,e),toggleHelperVisible:ar(a,e)}),y},[a,u]),se=o.useMemo(function(){var y=m({},U);return T(y,{unsafe__fiveInstance:i,state:c,currentState:h,currentObserver:w,work:B,model:K,scene:X,cameraDirection:Y,cameraRaycaster:ee,modelReadyState:te,shownFloor:ae,helperVisible:ue}),y},[a,U,f,p,C,J,Q,Z,re,ne,oe,ie]);return o.createElement(n,m({ref:r,$five:se},t))})}}function ur(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return e}function F(e,n){for(var t={},r=n.length,a=-1;++a<r;){var u=n[a];u in e&&(t[u]=e[u])}return t}function ir(e,n){return typeof e=="number"&&typeof n=="number"&&isNaN(e)&&isNaN(n)?!0:e===n}function sr(e,n){for(var t=0;t<e.length;t++)for(var r=0;r<n.length;r++)if(e[t]===n[r])return!0;return!1}var z=function(){function e(n,t){this.values=n,this.listeners=[],this.onValuesChange=t}return e.prototype.on=function(n,t){var r=this,a=[n,t];return this.listeners.push(a),function(){var u=r.listeners.indexOf(a);u>=0&&r.listeners.splice(u,1)}},e.prototype.getValues=function(n){return F(this.values,n)},e.prototype.setValues=function(n,t){var r=[];for(var a in t)n.indexOf(a)>=0&&!ir(t[a],this.values[a])&&r.push(a);if(r.length!==0){for(var u=m({},this.values),i=0,s=r;i<s.length;i++){var c=s[i];this.values[c]=t[c]}this.onValuesChange&&this.onValuesChange(this.values,u);for(var f=0,l=this.listeners;f<l.length;f++){var h=l[f],p=h[0],S=h[1];if(sr(p,r)){var w=F(u,p),C=F(this.values,p);S(C,w)}}}},e}();function cr(e){var n=o.createContext(null);return{useStore:function(t){var r=o.useContext(n);if(r===null)throw new Error("StoreProvider never found.");var a=o.useRef(!0),u=o.useState(r.getValues(t)),i=u[0],s=u[1],c=b([r],t,!0);o.useLayoutEffect(function(){return a.current?a.current=!1:s(r.getValues(t)),r.on(t,function(l){return s(l)})},c);var f=o.useCallback(function(l){return r.setValues(t,l)},c);return[i,f]},useStoreSetter:function(t){var r=o.useContext(n);if(r===null)throw new Error("StoreProvider never found.");var a=o.useCallback(function(u){return r.setValues(t,u)},b([r],t,!0));return a},watchStore:function(t,r,a){var u=o.useContext(n);if(u===null)throw new Error("StoreProvider never found.");var i=b([u],t,!0);a!==void 0&&(i=i.concat(a)),o.useLayoutEffect(function(){return u.on(t,r)},i)},useStoreAction:function(t){var r=o.useContext(n);if(r===null)throw new Error("StoreProvider never found.");var a=o.useCallback(function(){for(var u=[],i=0;i<arguments.length;i++)u[i]=arguments[i];var s=e[t],c=s[0],f=s.slice(1),l=function(){return r.getValues(f)},h=function(p){return r.setValues(f,p)};return c.apply(void 0,b([l,h],u,!1))},[]);return a},StoreProvider:function(t){I(r,t);function r(a){var u=t.call(this,a)||this;return u.store=new z(a.initialValue,function(){for(var i,s=[],c=0;c<arguments.length;c++)s[c]=arguments[c];u.props.onValuesChange&&(i=u.props).onValuesChange.apply(i,s)}),u}return r.prototype.shouldComponentUpdate=function(a){return a.children!==this.props.children},r.prototype.render=function(){return o.createElement(n.Provider,{value:this.store},this.props.children)},r}(o.Component)}}exports.FiveCanvas=ge;exports.INJECTION_PROPNAME=Me;exports.Store=z;exports.createFiveFeature=ur;exports.createFiveProvider=pe;exports.createStore=cr;exports.unsafe__useFiveInstance=me;exports.useFiveAction=Ee;exports.useFiveCameraDirection=Le;exports.useFiveCameraRaycaster=Re;exports.useFiveCurrentObserver=Ce;exports.useFiveCurrentState=we;exports.useFiveEventCallback=Fe;exports.useFiveFloor=Oe;exports.useFiveHelper=xe;exports.useFiveModelIntersectRaycaster=Pe;exports.useFiveModelReadyState=Ve;exports.useFiveProject2d=ke;exports.useFiveScene=ye;exports.useFiveSceneEffect=G;exports.useFiveState=be;exports.useFiveWork=Se;exports.withFive=or;
package/react/index.mjs CHANGED
@@ -1,8 +1,8 @@
1
1
  /**
2
2
  * @license
3
3
  * @realsee/five
4
- * Generated: 12/12/2023
5
- * Version: 6.0.0-alpha.63
4
+ * Generated: 12/14/2023
5
+ * Version: 6.0.0-alpha.65
6
6
  * Terms:
7
7
  * Realsee SDK License Agreement
8
8
  * Update: July 28, 2021
package/sticker/index.js CHANGED
@@ -1,8 +1,8 @@
1
1
  /**
2
2
  * @license
3
3
  * @realsee/five
4
- * Generated: 12/12/2023
5
- * Version: 6.0.0-alpha.63
4
+ * Generated: 12/14/2023
5
+ * Version: 6.0.0-alpha.65
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 y=require("three");function w(n){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(n){for(const e in n)if(e!=="default"){const r=Object.getOwnPropertyDescriptor(n,e);Object.defineProperty(t,e,r.get?r:{enumerable:!0,get:()=>n[e]})}}return t.default=n,Object.freeze(t)}const a=w(y);var m=function(n,t){return m=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,r){e.__proto__=r}||function(e,r){for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(e[i]=r[i])},m(n,t)};function h(n,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");m(n,t);function e(){this.constructor=n}n.prototype=t===null?Object.create(t):(e.prototype=t.prototype,new e)}var T=new Float32Array([-.5,-.5,0,.5,-.5,0,-.5,.5,0,.5,.5,0]),_=new Float32Array([0,0,1,0,0,1,1,1]),E=new Uint8Array([0,1,2,1,3,2]),d=new a.BufferGeometry;d.setAttribute("position",new a.BufferAttribute(T,3));d.setAttribute("uv",new a.BufferAttribute(_,2));d.setIndex(new a.BufferAttribute(E,1));var u=window,g=u.requestAnimationFrame||u.mozRequestAnimationFrame||u.webkitRequestAnimationFrame||u.msRequestAnimationFrame||function(n){return setTimeout(n,16)},R=typeof performance<"u"&&typeof performance.timing<"u"?performance.timing.navigationStart:Date.now(),l=typeof performance<"u"?function(){return R+performance.now()}:function(){return Date.now()};function A(n,t){n.naturalWidth>0&&g(function(){return t()});var e=function(){return t()};return n.addEventListener("load",e,!1),function(){return n.removeEventListener("load",e,!1)}}function b(n,t){var e=l(),r=!1,i=function(){r=!0,t();var s=l();s-e<3e3?g(i):r=!1},o=function(){e=l(),r===!1&&i()};return n.addEventListener("timeupdate",o,!1),function(){n.removeEventListener("timeupdate",o,!1),r=!1}}function v(n,t){var e=n.dispose;n.dispose=function(){t(),e.call(n)}}var O=function(n){h(t,n);function t(e,r,i){var o=this,s=new a.MeshBasicMaterial;if(o=n.call(this,d,s)||this,o._needsRender=!1,o.scale.set(e,r,1),typeof i=="string"){s.transparent=/\.png$/.test(i);var c=new Image;c.src=i,c.crossOrigin="",i=c}if(i instanceof HTMLImageElement){var f=s.map=new a.Texture;f.wrapS=a.ClampToEdgeWrapping,f.wrapT=a.ClampToEdgeWrapping,f.minFilter=a.LinearFilter,f.encoding=a.sRGBEncoding,v(f,A(i,function(){f.image=i,f.needsUpdate=!0,o._needsRender=!0}))}else if(i instanceof HTMLCanvasElement)s.map=new a.CanvasTexture(i);else if(i instanceof HTMLVideoElement){var p=s.map=new a.VideoTexture(i);p.wrapS=a.ClampToEdgeWrapping,p.wrapT=a.ClampToEdgeWrapping,p.minFilter=a.LinearFilter,p.encoding=a.sRGBEncoding,v(p,b(i,function(){o._needsRender=!0}))}return o}return Object.defineProperty(t,"version",{get:function(){return"6.0.0-alpha.63"},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"needsRender",{get:function(){return this._needsRender},set:function(e){this._needsRender=e,e===!0&&this.material.map&&(this.material.map.needsUpdate=!0)},enumerable:!1,configurable:!0}),t.prototype.setSize=function(e,r){this.scale.set(e,r,1),this._needsRender=!0},t.prototype.setTransparent=function(e){this.material.transparent=e,this._needsRender=!0},t.prototype.locationWithIntersection=function(e,r){r===void 0&&(r=.005);var i=e.point,o=e.face;this.position.copy(i),o&&(this.position.add(o.normal.clone().setLength(r)),this.lookAt(i.clone().add(o.normal))),this._needsRender=!0},t.prototype.dispose=function(){var e;(e=this.material.map)===null||e===void 0||e.dispose(),this.material.dispose()},t}(a.Mesh);exports.Sticker=O;
255
+ */"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const g=require("three");function w(t){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const e in t)if(e!=="default"){const i=Object.getOwnPropertyDescriptor(t,e);Object.defineProperty(n,e,i.get?i:{enumerable:!0,get:()=>t[e]})}}return n.default=t,Object.freeze(n)}const a=w(g);var m=function(t,n){return m=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,i){e.__proto__=i}||function(e,i){for(var r in i)Object.prototype.hasOwnProperty.call(i,r)&&(e[r]=i[r])},m(t,n)};function h(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");m(t,n);function e(){this.constructor=t}t.prototype=n===null?Object.create(n):(e.prototype=n.prototype,new e)}var E=new Float32Array([-.5,-.5,0,.5,-.5,0,-.5,.5,0,.5,.5,0]),T=new Float32Array([0,0,1,0,0,1,1,1]),_=new Uint8Array([0,1,2,1,3,2]),d=new a.BufferGeometry;d.setAttribute("position",new a.BufferAttribute(E,3));d.setAttribute("uv",new a.BufferAttribute(T,2));d.setIndex(new a.BufferAttribute(_,1));var u=window,y=u.requestAnimationFrame||u.mozRequestAnimationFrame||u.webkitRequestAnimationFrame||u.msRequestAnimationFrame||function(t){return setTimeout(t,16)},R=typeof performance<"u"&&typeof performance.timing<"u"?performance.timing.navigationStart:Date.now(),l=typeof performance<"u"?function(){return R+performance.now()}:function(){return Date.now()};function S(t,n){t.naturalWidth>0&&y(function(){return n()});var e=function(){return n()};return t.addEventListener("load",e,!1),function(){return t.removeEventListener("load",e,!1)}}function A(t,n){var e=l(),i=!1,r=function(){i=!0,n();var s=l();s-e<3e3?y(r):i=!1},o=function(){e=l(),i===!1&&r()};return t.addEventListener("timeupdate",o,!1),function(){t.removeEventListener("timeupdate",o,!1),i=!1}}function v(t,n){var e=t.dispose;t.dispose=function(){n(),e.call(t)}}var b=function(t){h(n,t);function n(e,i,r){var o=this,s=new a.MeshBasicMaterial;if(o=t.call(this,d,s)||this,o._needsRender=!1,o.scale.set(e,i,1),typeof r=="string"){s.transparent=/\.png$/.test(r);var c=new Image;c.src=r,c.crossOrigin="",r=c}if(r instanceof HTMLImageElement){var p=s.map=new a.Texture;p.wrapS=a.ClampToEdgeWrapping,p.wrapT=a.ClampToEdgeWrapping,p.minFilter=a.LinearFilter,p.encoding=a.sRGBEncoding,v(p,S(r,function(){p.image=r,p.needsUpdate=!0,o._needsRender=!0}))}else if(r instanceof HTMLCanvasElement)s.map=new a.CanvasTexture(r);else if(r instanceof HTMLVideoElement){var f=s.map=new a.VideoTexture(r);f.wrapS=a.ClampToEdgeWrapping,f.wrapT=a.ClampToEdgeWrapping,f.minFilter=a.LinearFilter,f.encoding=a.sRGBEncoding,v(f,A(r,function(){o._needsRender=!0}))}return o}return Object.defineProperty(n,"version",{get:function(){return"6.0.0-alpha.65"},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"needsRender",{get:function(){return this._needsRender},set:function(e){this._needsRender=e,e===!0&&this.material.map&&(this.material.map.needsUpdate=!0)},enumerable:!1,configurable:!0}),n.prototype.setSize=function(e,i){this.scale.set(e,i,1),this._needsRender=!0},n.prototype.setTransparent=function(e){this.material.transparent=e,this._needsRender=!0},n.prototype.locationWithIntersection=function(e,i){i===void 0&&(i=.005);var r=e.point,o=e.face;this.position.copy(r),o&&(this.position.add(o.normal.clone().setLength(i)),this.lookAt(r.clone().add(o.normal))),this._needsRender=!0},n.prototype.dispose=function(){var e;(e=this.material.map)===null||e===void 0||e.dispose(),this.material.dispose()},n}(a.Mesh);exports.Sticker=b;