@needle-tools/engine 4.11.5-next.d95d573 → 4.11.5-next.dedc70b

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 (434) hide show
  1. package/components.needle.json +1 -1
  2. package/custom-elements.json +436 -0
  3. package/dist/generateMeshBVH.worker-mO20N_b8.js +21 -0
  4. package/dist/{gltf-progressive-GwdQV1Qx.umd.cjs → gltf-progressive-DWcmTMCh.umd.cjs} +1 -1
  5. package/dist/{gltf-progressive-CftVUJy3.min.js → gltf-progressive-DZrY8VT6.min.js} +2 -2
  6. package/dist/{gltf-progressive-BvlZQAkt.js → gltf-progressive-DgYz5BYa.js} +19 -19
  7. package/dist/loader.worker-Dip-PthR.js +23 -0
  8. package/dist/{needle-engine.bundle-D68OTj0O.min.js → needle-engine.bundle-CJlEyOBM.min.js} +130 -135
  9. package/dist/{needle-engine.bundle-DYcVfok9.umd.cjs → needle-engine.bundle-DgiVW9bH.umd.cjs} +138 -143
  10. package/dist/{needle-engine.bundle-By_B1saf.js → needle-engine.bundle-F4gDjlNg.js} +4361 -4238
  11. package/dist/needle-engine.d.ts +18154 -1
  12. package/dist/needle-engine.js +336 -335
  13. package/dist/needle-engine.min.js +1 -1
  14. package/dist/needle-engine.umd.cjs +1 -1
  15. package/dist/{postprocessing-CJC0Npcd.js → postprocessing-BTW9pD_s.js} +1822 -1723
  16. package/dist/{postprocessing-DrM4PWU3.umd.cjs → postprocessing-CMgoN5t5.umd.cjs} +229 -158
  17. package/dist/{postprocessing-l7zsdO_Q.min.js → postprocessing-DYDtB188.min.js} +227 -156
  18. package/dist/rapier-B3oL1ap-.js +5217 -0
  19. package/dist/rapier-DJ-luMxr.min.js +1 -0
  20. package/dist/rapier-DQltNJbN.umd.cjs +1 -0
  21. package/dist/{three-BDW9I486.min.js → three-B7CT31Bt.min.js} +1 -5
  22. package/dist/{three-MHVqtJYj.js → three-DfMvBzXi.js} +0 -5
  23. package/dist/{three-examples-CgwGHSgz.umd.cjs → three-examples-CsW4_6LI.umd.cjs} +2 -7
  24. package/dist/{three-examples-fvEPSC8L.min.js → three-examples-D1P7eEhn.min.js} +2 -7
  25. package/dist/{three-examples-C5Ht-QFN.js → three-examples-D1SK93ek.js} +1 -7
  26. package/dist/{three-mesh-ui-BjWTTk1R.js → three-mesh-ui-C_uSB5dD.js} +1 -1
  27. package/dist/{three-mesh-ui-Bm32sS2a.umd.cjs → three-mesh-ui-DpATDXwU.umd.cjs} +1 -1
  28. package/dist/{three-mesh-ui-CLdkp21K.min.js → three-mesh-ui-LQ44s0AL.min.js} +1 -1
  29. package/dist/{three-iFaDq9U3.umd.cjs → three-qj71I7J3.umd.cjs} +2 -6
  30. package/dist/{vendor-CsyK1CFs.min.js → vendor-BKGa4GE0.min.js} +34 -39
  31. package/dist/{vendor-petGQl0N.js → vendor-D0zoswDa.js} +1626 -1605
  32. package/dist/{vendor-6kAXU6fm.umd.cjs → vendor-UCpFAwt1.umd.cjs} +30 -35
  33. package/lib/engine/api.d.ts +0 -1
  34. package/lib/engine/api.js +0 -1
  35. package/lib/engine/api.js.map +1 -1
  36. package/lib/engine/debug/debug_spector.d.ts +16 -0
  37. package/lib/engine/debug/debug_spector.js +28 -0
  38. package/lib/engine/debug/debug_spector.js.map +1 -0
  39. package/lib/engine/engine_application.d.ts +7 -0
  40. package/lib/engine/engine_application.js +8 -1
  41. package/lib/engine/engine_application.js.map +1 -1
  42. package/lib/engine/engine_context.js +4 -1
  43. package/lib/engine/engine_context.js.map +1 -1
  44. package/lib/engine/engine_physics.js +6 -2
  45. package/lib/engine/engine_physics.js.map +1 -1
  46. package/lib/engine/engine_physics_rapier.d.ts +11 -2
  47. package/lib/engine/engine_physics_rapier.js +9 -0
  48. package/lib/engine/engine_physics_rapier.js.map +1 -1
  49. package/lib/engine/engine_texture.d.ts +1 -1
  50. package/lib/engine/engine_tonemapping.d.ts +1 -1
  51. package/lib/engine/engine_types.d.ts +16 -0
  52. package/lib/engine/engine_typestore.d.ts +1 -0
  53. package/lib/engine/engine_typestore.js +5 -6
  54. package/lib/engine/engine_typestore.js.map +1 -1
  55. package/lib/engine/webcomponents/logo-element.d.ts +11 -0
  56. package/lib/engine/webcomponents/logo-element.js +6 -0
  57. package/lib/engine/webcomponents/logo-element.js.map +1 -1
  58. package/lib/engine/webcomponents/needle menu/needle-menu.d.ts +24 -3
  59. package/lib/engine/webcomponents/needle menu/needle-menu.js +18 -3
  60. package/lib/engine/webcomponents/needle menu/needle-menu.js.map +1 -1
  61. package/lib/engine/webcomponents/needle-button.d.ts +5 -0
  62. package/lib/engine/webcomponents/needle-button.js.map +1 -1
  63. package/lib/engine/webcomponents/needle-engine.d.ts +210 -8
  64. package/lib/engine/webcomponents/needle-engine.js +94 -13
  65. package/lib/engine/webcomponents/needle-engine.js.map +1 -1
  66. package/lib/engine-components/AlignmentConstraint.d.ts +9 -0
  67. package/lib/engine-components/AlignmentConstraint.js +9 -0
  68. package/lib/engine-components/AlignmentConstraint.js.map +1 -1
  69. package/lib/engine-components/Animator.d.ts +1 -0
  70. package/lib/engine-components/Animator.js.map +1 -1
  71. package/lib/engine-components/AudioListener.d.ts +2 -0
  72. package/lib/engine-components/AudioListener.js +2 -0
  73. package/lib/engine-components/AudioListener.js.map +1 -1
  74. package/lib/engine-components/AudioSource.d.ts +1 -0
  75. package/lib/engine-components/AudioSource.js +1 -0
  76. package/lib/engine-components/AudioSource.js.map +1 -1
  77. package/lib/engine-components/AxesHelper.d.ts +2 -0
  78. package/lib/engine-components/AxesHelper.js +2 -0
  79. package/lib/engine-components/AxesHelper.js.map +1 -1
  80. package/lib/engine-components/Camera.d.ts +1 -0
  81. package/lib/engine-components/Camera.js +1 -0
  82. package/lib/engine-components/Camera.js.map +1 -1
  83. package/lib/engine-components/CharacterController.d.ts +4 -1
  84. package/lib/engine-components/CharacterController.js +4 -1
  85. package/lib/engine-components/CharacterController.js.map +1 -1
  86. package/lib/engine-components/Component.d.ts +5 -0
  87. package/lib/engine-components/Component.js +7 -0
  88. package/lib/engine-components/Component.js.map +1 -1
  89. package/lib/engine-components/DeleteBox.d.ts +2 -0
  90. package/lib/engine-components/DeleteBox.js +2 -0
  91. package/lib/engine-components/DeleteBox.js.map +1 -1
  92. package/lib/engine-components/DeviceFlag.d.ts +4 -0
  93. package/lib/engine-components/DeviceFlag.js +4 -0
  94. package/lib/engine-components/DeviceFlag.js.map +1 -1
  95. package/lib/engine-components/DragControls.d.ts +1 -0
  96. package/lib/engine-components/DragControls.js +1 -0
  97. package/lib/engine-components/DragControls.js.map +1 -1
  98. package/lib/engine-components/DropListener.d.ts +1 -0
  99. package/lib/engine-components/DropListener.js +1 -0
  100. package/lib/engine-components/DropListener.js.map +1 -1
  101. package/lib/engine-components/Duplicatable.d.ts +1 -0
  102. package/lib/engine-components/Duplicatable.js +1 -0
  103. package/lib/engine-components/Duplicatable.js.map +1 -1
  104. package/lib/engine-components/EventTrigger.d.ts +2 -0
  105. package/lib/engine-components/EventTrigger.js +2 -0
  106. package/lib/engine-components/EventTrigger.js.map +1 -1
  107. package/lib/engine-components/GridHelper.d.ts +2 -0
  108. package/lib/engine-components/GridHelper.js +2 -0
  109. package/lib/engine-components/GridHelper.js.map +1 -1
  110. package/lib/engine-components/GroundProjection.d.ts +1 -0
  111. package/lib/engine-components/GroundProjection.js +1 -0
  112. package/lib/engine-components/GroundProjection.js.map +1 -1
  113. package/lib/engine-components/LODGroup.d.ts +2 -0
  114. package/lib/engine-components/LODGroup.js +2 -0
  115. package/lib/engine-components/LODGroup.js.map +1 -1
  116. package/lib/engine-components/Light.d.ts +1 -0
  117. package/lib/engine-components/Light.js +1 -0
  118. package/lib/engine-components/Light.js.map +1 -1
  119. package/lib/engine-components/LookAtConstraint.d.ts +1 -0
  120. package/lib/engine-components/LookAtConstraint.js +1 -0
  121. package/lib/engine-components/LookAtConstraint.js.map +1 -1
  122. package/lib/engine-components/NeedleMenu.d.ts +1 -0
  123. package/lib/engine-components/NeedleMenu.js +1 -0
  124. package/lib/engine-components/NeedleMenu.js.map +1 -1
  125. package/lib/engine-components/NestedGltf.d.ts +1 -0
  126. package/lib/engine-components/NestedGltf.js +1 -0
  127. package/lib/engine-components/NestedGltf.js.map +1 -1
  128. package/lib/engine-components/Networking.d.ts +1 -0
  129. package/lib/engine-components/Networking.js +1 -0
  130. package/lib/engine-components/Networking.js.map +1 -1
  131. package/lib/engine-components/OffsetConstraint.d.ts +7 -0
  132. package/lib/engine-components/OffsetConstraint.js +7 -0
  133. package/lib/engine-components/OffsetConstraint.js.map +1 -1
  134. package/lib/engine-components/OrbitControls.d.ts +1 -0
  135. package/lib/engine-components/OrbitControls.js +1 -0
  136. package/lib/engine-components/OrbitControls.js.map +1 -1
  137. package/lib/engine-components/PlayerColor.d.ts +2 -0
  138. package/lib/engine-components/PlayerColor.js +2 -0
  139. package/lib/engine-components/PlayerColor.js.map +1 -1
  140. package/lib/engine-components/ReflectionProbe.d.ts +1 -0
  141. package/lib/engine-components/ReflectionProbe.js +1 -0
  142. package/lib/engine-components/ReflectionProbe.js.map +1 -1
  143. package/lib/engine-components/RendererInstancing.d.ts +5 -3
  144. package/lib/engine-components/RendererInstancing.js +64 -31
  145. package/lib/engine-components/RendererInstancing.js.map +1 -1
  146. package/lib/engine-components/RigidBody.d.ts +1 -0
  147. package/lib/engine-components/RigidBody.js +1 -0
  148. package/lib/engine-components/RigidBody.js.map +1 -1
  149. package/lib/engine-components/SceneSwitcher.d.ts +1 -0
  150. package/lib/engine-components/SceneSwitcher.js +1 -0
  151. package/lib/engine-components/SceneSwitcher.js.map +1 -1
  152. package/lib/engine-components/ScreenCapture.d.ts +1 -0
  153. package/lib/engine-components/ScreenCapture.js +1 -0
  154. package/lib/engine-components/ScreenCapture.js.map +1 -1
  155. package/lib/engine-components/SeeThrough.d.ts +1 -0
  156. package/lib/engine-components/SeeThrough.js +1 -0
  157. package/lib/engine-components/SeeThrough.js.map +1 -1
  158. package/lib/engine-components/ShadowCatcher.d.ts +2 -0
  159. package/lib/engine-components/ShadowCatcher.js +2 -0
  160. package/lib/engine-components/ShadowCatcher.js.map +1 -1
  161. package/lib/engine-components/Skybox.d.ts +16 -5
  162. package/lib/engine-components/Skybox.js +38 -25
  163. package/lib/engine-components/Skybox.js.map +1 -1
  164. package/lib/engine-components/SmoothFollow.d.ts +1 -0
  165. package/lib/engine-components/SmoothFollow.js +1 -0
  166. package/lib/engine-components/SmoothFollow.js.map +1 -1
  167. package/lib/engine-components/SpatialTrigger.d.ts +1 -0
  168. package/lib/engine-components/SpatialTrigger.js +1 -0
  169. package/lib/engine-components/SpatialTrigger.js.map +1 -1
  170. package/lib/engine-components/SpectatorCamera.d.ts +1 -0
  171. package/lib/engine-components/SpectatorCamera.js +1 -0
  172. package/lib/engine-components/SpectatorCamera.js.map +1 -1
  173. package/lib/engine-components/SpriteRenderer.d.ts +1 -0
  174. package/lib/engine-components/SpriteRenderer.js +1 -0
  175. package/lib/engine-components/SpriteRenderer.js.map +1 -1
  176. package/lib/engine-components/SyncedCamera.d.ts +2 -0
  177. package/lib/engine-components/SyncedCamera.js +2 -0
  178. package/lib/engine-components/SyncedCamera.js.map +1 -1
  179. package/lib/engine-components/SyncedRoom.d.ts +1 -0
  180. package/lib/engine-components/SyncedRoom.js +1 -0
  181. package/lib/engine-components/SyncedRoom.js.map +1 -1
  182. package/lib/engine-components/SyncedTransform.d.ts +2 -0
  183. package/lib/engine-components/SyncedTransform.js +2 -0
  184. package/lib/engine-components/SyncedTransform.js.map +1 -1
  185. package/lib/engine-components/TransformGizmo.d.ts +2 -0
  186. package/lib/engine-components/TransformGizmo.js +2 -0
  187. package/lib/engine-components/TransformGizmo.js.map +1 -1
  188. package/lib/engine-components/VideoPlayer.d.ts +1 -0
  189. package/lib/engine-components/VideoPlayer.js +1 -0
  190. package/lib/engine-components/VideoPlayer.js.map +1 -1
  191. package/lib/engine-components/Voip.d.ts +1 -0
  192. package/lib/engine-components/Voip.js +1 -0
  193. package/lib/engine-components/Voip.js.map +1 -1
  194. package/lib/engine-components/export/usdz/USDZExporter.d.ts +24 -3
  195. package/lib/engine-components/export/usdz/USDZExporter.js +36 -2
  196. package/lib/engine-components/export/usdz/USDZExporter.js.map +1 -1
  197. package/lib/engine-components/export/usdz/extensions/behavior/BehaviourComponents.d.ts +18 -0
  198. package/lib/engine-components/export/usdz/extensions/behavior/BehaviourComponents.js +18 -0
  199. package/lib/engine-components/export/usdz/extensions/behavior/BehaviourComponents.js.map +1 -1
  200. package/lib/engine-components/particlesystem/ParticleSystem.d.ts +1 -0
  201. package/lib/engine-components/particlesystem/ParticleSystem.js +1 -0
  202. package/lib/engine-components/particlesystem/ParticleSystem.js.map +1 -1
  203. package/lib/engine-components/physics/Attractor.d.ts +3 -0
  204. package/lib/engine-components/physics/Attractor.js +3 -0
  205. package/lib/engine-components/physics/Attractor.js.map +1 -1
  206. package/lib/engine-components/postprocessing/Effects/BloomEffect.d.ts +1 -0
  207. package/lib/engine-components/postprocessing/Effects/BloomEffect.js +1 -0
  208. package/lib/engine-components/postprocessing/Effects/BloomEffect.js.map +1 -1
  209. package/lib/engine-components/postprocessing/Effects/ChromaticAberration.d.ts +4 -0
  210. package/lib/engine-components/postprocessing/Effects/ChromaticAberration.js +4 -0
  211. package/lib/engine-components/postprocessing/Effects/ChromaticAberration.js.map +1 -1
  212. package/lib/engine-components/postprocessing/Effects/ColorAdjustments.d.ts +3 -0
  213. package/lib/engine-components/postprocessing/Effects/ColorAdjustments.js +3 -0
  214. package/lib/engine-components/postprocessing/Effects/ColorAdjustments.js.map +1 -1
  215. package/lib/engine-components/postprocessing/Effects/DepthOfField.d.ts +4 -0
  216. package/lib/engine-components/postprocessing/Effects/DepthOfField.js +4 -0
  217. package/lib/engine-components/postprocessing/Effects/DepthOfField.js.map +1 -1
  218. package/lib/engine-components/postprocessing/Effects/EffectWrapper.d.ts +1 -0
  219. package/lib/engine-components/postprocessing/Effects/EffectWrapper.js +1 -0
  220. package/lib/engine-components/postprocessing/Effects/EffectWrapper.js.map +1 -1
  221. package/lib/engine-components/postprocessing/Effects/Pixelation.d.ts +3 -0
  222. package/lib/engine-components/postprocessing/Effects/Pixelation.js +3 -0
  223. package/lib/engine-components/postprocessing/Effects/Pixelation.js.map +1 -1
  224. package/lib/engine-components/postprocessing/Effects/ScreenspaceAmbientOcclusionN8.d.ts +4 -0
  225. package/lib/engine-components/postprocessing/Effects/ScreenspaceAmbientOcclusionN8.js +4 -0
  226. package/lib/engine-components/postprocessing/Effects/ScreenspaceAmbientOcclusionN8.js.map +1 -1
  227. package/lib/engine-components/postprocessing/Effects/Sharpening.d.ts +4 -0
  228. package/lib/engine-components/postprocessing/Effects/Sharpening.js +4 -0
  229. package/lib/engine-components/postprocessing/Effects/Sharpening.js.map +1 -1
  230. package/lib/engine-components/postprocessing/Effects/TiltShiftEffect.d.ts +4 -0
  231. package/lib/engine-components/postprocessing/Effects/TiltShiftEffect.js +4 -0
  232. package/lib/engine-components/postprocessing/Effects/TiltShiftEffect.js.map +1 -1
  233. package/lib/engine-components/postprocessing/Effects/Tonemapping.d.ts +4 -0
  234. package/lib/engine-components/postprocessing/Effects/Tonemapping.js +4 -0
  235. package/lib/engine-components/postprocessing/Effects/Tonemapping.js.map +1 -1
  236. package/lib/engine-components/postprocessing/Effects/Vignette.d.ts +4 -0
  237. package/lib/engine-components/postprocessing/Effects/Vignette.js +4 -0
  238. package/lib/engine-components/postprocessing/Effects/Vignette.js.map +1 -1
  239. package/lib/engine-components/postprocessing/Volume.d.ts +1 -0
  240. package/lib/engine-components/postprocessing/Volume.js +1 -0
  241. package/lib/engine-components/postprocessing/Volume.js.map +1 -1
  242. package/lib/engine-components/splines/Spline.d.ts +1 -0
  243. package/lib/engine-components/splines/Spline.js +1 -0
  244. package/lib/engine-components/splines/Spline.js.map +1 -1
  245. package/lib/engine-components/splines/SplineWalker.d.ts +1 -0
  246. package/lib/engine-components/splines/SplineWalker.js +1 -0
  247. package/lib/engine-components/splines/SplineWalker.js.map +1 -1
  248. package/lib/engine-components/timeline/PlayableDirector.d.ts +1 -0
  249. package/lib/engine-components/timeline/PlayableDirector.js +1 -0
  250. package/lib/engine-components/timeline/PlayableDirector.js.map +1 -1
  251. package/lib/engine-components/timeline/SignalAsset.d.ts +1 -0
  252. package/lib/engine-components/timeline/SignalAsset.js +1 -0
  253. package/lib/engine-components/timeline/SignalAsset.js.map +1 -1
  254. package/lib/engine-components/ui/Button.d.ts +4 -0
  255. package/lib/engine-components/ui/Button.js +4 -0
  256. package/lib/engine-components/ui/Button.js.map +1 -1
  257. package/lib/engine-components/ui/Canvas.d.ts +5 -0
  258. package/lib/engine-components/ui/Canvas.js +5 -0
  259. package/lib/engine-components/ui/Canvas.js.map +1 -1
  260. package/lib/engine-components/ui/CanvasGroup.d.ts +4 -0
  261. package/lib/engine-components/ui/CanvasGroup.js +4 -0
  262. package/lib/engine-components/ui/CanvasGroup.js.map +1 -1
  263. package/lib/engine-components/ui/EventSystem.d.ts +2 -0
  264. package/lib/engine-components/ui/EventSystem.js +2 -0
  265. package/lib/engine-components/ui/EventSystem.js.map +1 -1
  266. package/lib/engine-components/ui/Image.d.ts +4 -0
  267. package/lib/engine-components/ui/Image.js +4 -0
  268. package/lib/engine-components/ui/Image.js.map +1 -1
  269. package/lib/engine-components/ui/InputField.d.ts +4 -0
  270. package/lib/engine-components/ui/InputField.js +4 -0
  271. package/lib/engine-components/ui/InputField.js.map +1 -1
  272. package/lib/engine-components/ui/Outline.d.ts +7 -0
  273. package/lib/engine-components/ui/Outline.js +7 -0
  274. package/lib/engine-components/ui/Outline.js.map +1 -1
  275. package/lib/engine-components/ui/Text.d.ts +1 -0
  276. package/lib/engine-components/ui/Text.js +1 -0
  277. package/lib/engine-components/ui/Text.js.map +1 -1
  278. package/lib/engine-components/utils/LookAt.d.ts +1 -0
  279. package/lib/engine-components/utils/LookAt.js +1 -0
  280. package/lib/engine-components/utils/LookAt.js.map +1 -1
  281. package/lib/engine-components/web/Clickthrough.d.ts +1 -1
  282. package/lib/engine-components/web/Clickthrough.js +1 -1
  283. package/lib/engine-components/web/CursorFollow.d.ts +2 -0
  284. package/lib/engine-components/web/CursorFollow.js +3 -0
  285. package/lib/engine-components/web/CursorFollow.js.map +1 -1
  286. package/lib/engine-components/web/HoverAnimation.d.ts +1 -0
  287. package/lib/engine-components/web/HoverAnimation.js +1 -0
  288. package/lib/engine-components/web/HoverAnimation.js.map +1 -1
  289. package/lib/engine-components/web/ScrollFollow.d.ts +2 -0
  290. package/lib/engine-components/web/ScrollFollow.js +2 -0
  291. package/lib/engine-components/web/ScrollFollow.js.map +1 -1
  292. package/lib/engine-components/web/ViewBox.d.ts +1 -0
  293. package/lib/engine-components/web/ViewBox.js +1 -0
  294. package/lib/engine-components/web/ViewBox.js.map +1 -1
  295. package/lib/engine-components/webxr/Avatar.d.ts +5 -0
  296. package/lib/engine-components/webxr/Avatar.js +5 -0
  297. package/lib/engine-components/webxr/Avatar.js.map +1 -1
  298. package/lib/engine-components/webxr/WebARCameraBackground.d.ts +1 -0
  299. package/lib/engine-components/webxr/WebARCameraBackground.js +1 -0
  300. package/lib/engine-components/webxr/WebARCameraBackground.js.map +1 -1
  301. package/lib/engine-components/webxr/WebARSessionRoot.d.ts +1 -0
  302. package/lib/engine-components/webxr/WebARSessionRoot.js +1 -0
  303. package/lib/engine-components/webxr/WebARSessionRoot.js.map +1 -1
  304. package/lib/engine-components/webxr/WebXR.d.ts +1 -1
  305. package/lib/engine-components/webxr/WebXR.js +1 -1
  306. package/lib/engine-components/webxr/controllers/XRControllerFollow.d.ts +1 -0
  307. package/lib/engine-components/webxr/controllers/XRControllerFollow.js +1 -0
  308. package/lib/engine-components/webxr/controllers/XRControllerFollow.js.map +1 -1
  309. package/lib/engine-components/webxr/controllers/XRControllerModel.d.ts +4 -0
  310. package/lib/engine-components/webxr/controllers/XRControllerModel.js +4 -0
  311. package/lib/engine-components/webxr/controllers/XRControllerModel.js.map +1 -1
  312. package/lib/engine-components/webxr/controllers/XRControllerMovement.d.ts +1 -0
  313. package/lib/engine-components/webxr/controllers/XRControllerMovement.js +1 -0
  314. package/lib/engine-components/webxr/controllers/XRControllerMovement.js.map +1 -1
  315. package/lib/engine-components-experimental/networking/PlayerSync.d.ts +2 -0
  316. package/lib/engine-components-experimental/networking/PlayerSync.js +2 -0
  317. package/lib/engine-components-experimental/networking/PlayerSync.js.map +1 -1
  318. package/lib/needle-engine.js +2 -1
  319. package/lib/needle-engine.js.map +1 -1
  320. package/package.json +19 -12
  321. package/plugins/types/needleConfig.d.ts +1 -1
  322. package/plugins/types/next.d.ts +1 -1
  323. package/plugins/types/userconfig.d.ts +4 -1
  324. package/plugins/vite/custom-element-data.js +80 -0
  325. package/plugins/vite/index.js +4 -0
  326. package/src/engine/api.ts +0 -1
  327. package/src/engine/debug/debug_spector.ts +43 -0
  328. package/src/engine/engine_application.ts +16 -1
  329. package/src/engine/engine_context.ts +5 -1
  330. package/src/engine/engine_physics.ts +6 -2
  331. package/src/engine/engine_physics_rapier.ts +11 -2
  332. package/src/engine/engine_texture.ts +1 -1
  333. package/src/engine/engine_tonemapping.ts +1 -1
  334. package/src/engine/engine_types.ts +17 -0
  335. package/src/engine/engine_typestore.ts +5 -6
  336. package/src/engine/webcomponents/logo-element.ts +12 -0
  337. package/src/engine/webcomponents/needle menu/needle-menu.ts +24 -3
  338. package/src/engine/webcomponents/needle-button.ts +6 -0
  339. package/src/engine/webcomponents/needle-engine.ts +321 -22
  340. package/src/engine-components/AlignmentConstraint.ts +9 -0
  341. package/src/engine-components/Animator.ts +1 -0
  342. package/src/engine-components/AudioListener.ts +2 -0
  343. package/src/engine-components/AudioSource.ts +1 -0
  344. package/src/engine-components/AxesHelper.ts +2 -0
  345. package/src/engine-components/Camera.ts +1 -0
  346. package/src/engine-components/CharacterController.ts +4 -1
  347. package/src/engine-components/Component.ts +9 -1
  348. package/src/engine-components/DeleteBox.ts +2 -0
  349. package/src/engine-components/DeviceFlag.ts +4 -0
  350. package/src/engine-components/DragControls.ts +1 -0
  351. package/src/engine-components/DropListener.ts +1 -0
  352. package/src/engine-components/Duplicatable.ts +1 -0
  353. package/src/engine-components/EventTrigger.ts +2 -0
  354. package/src/engine-components/GridHelper.ts +2 -0
  355. package/src/engine-components/GroundProjection.ts +1 -0
  356. package/src/engine-components/LODGroup.ts +2 -0
  357. package/src/engine-components/Light.ts +1 -0
  358. package/src/engine-components/LookAtConstraint.ts +1 -0
  359. package/src/engine-components/NeedleMenu.ts +1 -0
  360. package/src/engine-components/NestedGltf.ts +1 -0
  361. package/src/engine-components/Networking.ts +1 -0
  362. package/src/engine-components/OffsetConstraint.ts +7 -0
  363. package/src/engine-components/OrbitControls.ts +1 -0
  364. package/src/engine-components/PlayerColor.ts +2 -0
  365. package/src/engine-components/ReflectionProbe.ts +1 -0
  366. package/src/engine-components/RendererInstancing.ts +69 -33
  367. package/src/engine-components/RigidBody.ts +1 -0
  368. package/src/engine-components/SceneSwitcher.ts +1 -0
  369. package/src/engine-components/ScreenCapture.ts +1 -0
  370. package/src/engine-components/SeeThrough.ts +1 -0
  371. package/src/engine-components/ShadowCatcher.ts +2 -0
  372. package/src/engine-components/Skybox.ts +48 -36
  373. package/src/engine-components/SmoothFollow.ts +1 -0
  374. package/src/engine-components/SpatialTrigger.ts +1 -0
  375. package/src/engine-components/SpectatorCamera.ts +1 -0
  376. package/src/engine-components/SpriteRenderer.ts +1 -0
  377. package/src/engine-components/SyncedCamera.ts +2 -0
  378. package/src/engine-components/SyncedRoom.ts +1 -0
  379. package/src/engine-components/SyncedTransform.ts +2 -0
  380. package/src/engine-components/TransformGizmo.ts +2 -0
  381. package/src/engine-components/VideoPlayer.ts +1 -0
  382. package/src/engine-components/Voip.ts +1 -0
  383. package/src/engine-components/export/usdz/USDZExporter.ts +52 -5
  384. package/src/engine-components/export/usdz/extensions/behavior/BehaviourComponents.ts +18 -0
  385. package/src/engine-components/particlesystem/ParticleSystem.ts +1 -0
  386. package/src/engine-components/physics/Attractor.ts +3 -0
  387. package/src/engine-components/postprocessing/Effects/BloomEffect.ts +1 -0
  388. package/src/engine-components/postprocessing/Effects/ChromaticAberration.ts +4 -0
  389. package/src/engine-components/postprocessing/Effects/ColorAdjustments.ts +3 -0
  390. package/src/engine-components/postprocessing/Effects/DepthOfField.ts +4 -0
  391. package/src/engine-components/postprocessing/Effects/EffectWrapper.ts +1 -0
  392. package/src/engine-components/postprocessing/Effects/Pixelation.ts +3 -0
  393. package/src/engine-components/postprocessing/Effects/ScreenspaceAmbientOcclusionN8.ts +4 -0
  394. package/src/engine-components/postprocessing/Effects/Sharpening.ts +4 -0
  395. package/src/engine-components/postprocessing/Effects/TiltShiftEffect.ts +4 -0
  396. package/src/engine-components/postprocessing/Effects/Tonemapping.ts +4 -0
  397. package/src/engine-components/postprocessing/Effects/Vignette.ts +4 -0
  398. package/src/engine-components/postprocessing/Volume.ts +1 -0
  399. package/src/engine-components/splines/Spline.ts +1 -0
  400. package/src/engine-components/splines/SplineWalker.ts +1 -0
  401. package/src/engine-components/timeline/PlayableDirector.ts +1 -0
  402. package/src/engine-components/timeline/SignalAsset.ts +1 -0
  403. package/src/engine-components/ui/Button.ts +4 -0
  404. package/src/engine-components/ui/Canvas.ts +5 -0
  405. package/src/engine-components/ui/CanvasGroup.ts +4 -0
  406. package/src/engine-components/ui/EventSystem.ts +2 -0
  407. package/src/engine-components/ui/Image.ts +4 -0
  408. package/src/engine-components/ui/InputField.ts +4 -0
  409. package/src/engine-components/ui/Outline.ts +7 -0
  410. package/src/engine-components/ui/Text.ts +1 -0
  411. package/src/engine-components/utils/LookAt.ts +1 -0
  412. package/src/engine-components/web/Clickthrough.ts +1 -1
  413. package/src/engine-components/web/CursorFollow.ts +4 -0
  414. package/src/engine-components/web/HoverAnimation.ts +1 -0
  415. package/src/engine-components/web/ScrollFollow.ts +2 -0
  416. package/src/engine-components/web/ViewBox.ts +1 -0
  417. package/src/engine-components/webxr/Avatar.ts +5 -0
  418. package/src/engine-components/webxr/WebARCameraBackground.ts +1 -0
  419. package/src/engine-components/webxr/WebARSessionRoot.ts +1 -0
  420. package/src/engine-components/webxr/WebXR.ts +1 -1
  421. package/src/engine-components/webxr/controllers/XRControllerFollow.ts +1 -0
  422. package/src/engine-components/webxr/controllers/XRControllerModel.ts +4 -0
  423. package/src/engine-components/webxr/controllers/XRControllerMovement.ts +1 -0
  424. package/src/engine-components-experimental/networking/PlayerSync.ts +2 -0
  425. package/src/needle-engine.ts +4 -2
  426. package/dist/generateMeshBVH.worker-B9bjdr6J.js +0 -25
  427. package/dist/loader.worker-CiTwpNPW.js +0 -27
  428. package/dist/rapier-BqdcSmKY.umd.cjs +0 -1
  429. package/dist/rapier-Cg3w3nFI.min.js +0 -1
  430. package/dist/rapier-sU12SWAs.js +0 -5217
  431. package/lib/engine/webcomponents/needle-engine.attributes.d.ts +0 -70
  432. package/lib/engine/webcomponents/needle-engine.attributes.js +0 -2
  433. package/lib/engine/webcomponents/needle-engine.attributes.js.map +0 -1
  434. package/src/engine/webcomponents/needle-engine.attributes.ts +0 -85
@@ -1,4 +1,4 @@
1
- import { Mesh as q, SphereGeometry as ui, Vector3 as P, MeshBasicMaterial as Qt, Node as fa, PerspectiveCamera as gs, NodeFrame as Ia, NodeBuilder as ma, GLSLNodeParser as Ea, ShaderLib as wt, UniformsUtils as gi, UniformsLib as Un, normalView as ba, defaultShaderStages as Yn, ShaderChunk as Ca, Material as en, TrianglesDrawMode as Ba, TriangleFanDrawMode as qs, TriangleStripDrawMode as Do, Matrix4 as ue, Loader as kt, LoaderUtils as tn, FileLoader as It, MeshPhysicalMaterial as Tt, Vector2 as Le, Color as Se, LinearSRGBColorSpace as Xe, SRGBColorSpace as ge, SpotLight as Ro, PointLight as zs, DirectionalLight as _o, InstancedMesh as wa, Quaternion as Te, InstancedBufferAttribute as ya, Object3D as xt, TextureLoader as di, ImageBitmapLoader as Qa, BufferAttribute as st, InterleavedBuffer as xa, LinearMipmapLinearFilter as jn, NearestMipmapLinearFilter as Mo, LinearMipmapNearestFilter as Fo, NearestMipmapNearestFilter as pi, LinearFilter as rt, NearestFilter as cs, RepeatWrapping as on, MirroredRepeatWrapping as ko, ClampToEdgeWrapping as ls, PointsMaterial as _n, LineBasicMaterial as Ft, MeshStandardMaterial as fi, DoubleSide as Ii, PropertyBinding as Lt, BufferGeometry as ut, SkinnedMesh as Lo, LineSegments as hs, Line as pt, LineLoop as Sa, Points as is, Group as nn, MathUtils as Qe, OrthographicCamera as No, Skeleton as Uo, AnimationClip as Go, Bone as Ys, InterpolateDiscrete as Po, InterpolateLinear as mi, InterleavedBufferAttribute as $t, Texture as Ks, VectorKeyframeTrack as Js, NumberKeyframeTrack as Vs, QuaternionKeyframeTrack as Ws, ColorManagement as Ve, FrontSide as Oo, Interpolant as Ta, Box3 as ds, Sphere as Ei, RGBA_S3TC_DXT1_Format as Xs, RGB_PVRTC_4BPPV1_Format as va, RGB_ETC2_Format as Ho, RGB_ETC1_Format as Da, RGBA_S3TC_DXT5_Format as Zs, RGBA_PVRTC_4BPPV1_Format as Ra, RGBA_ETC2_EAC_Format as jo, RGBA_BPTC_Format as $s, RGB_BPTC_UNSIGNED_Format as _a, RGBA_ASTC_4x4_Format as os, RGBAFormat as zt, FloatType as mt, HalfFloatType as We, UnsignedByteType as dt, CompressedCubeTexture as Ma, CompressedArrayTexture as Fa, CompressedTexture as Gn, NoColorSpace as us, RGBA_S3TC_DXT3_Format as Mi, RGB_S3TC_DXT1_Format as Fi, RGBA_ASTC_6x6_Format as ki, RGBFormat as ei, RedFormat as gn, RGFormat as Mn, UnsignedInt101111Type as qo, UnsignedInt5999Type as zo, DataTexture as ka, Data3DTexture as La, ExtrudeGeometry as Na, ShapePath as Ua, Raycaster as bi, CylinderGeometry as Ye, BoxGeometry as je, Float32BufferAttribute as Fe, OctahedronGeometry as Kn, TorusGeometry as bn, Euler as qt, Controls as Yo, PlaneGeometry as Ci, DataTextureLoader as Ko, DataUtils as dn, Vector4 as Nt, Curve as Ga, MeshPhongMaterial as Pn, MeshLambertMaterial as Pa, EquirectangularReflectionMapping as Oa, AmbientLight as Ha, Uint16BufferAttribute as ja, Matrix3 as Jo, ShapeUtils as qa, DefaultLoadingManager as za, Ray as Ya, Plane as Ka, MOUSE as fn, TOUCH as pn, Spherical as Li, ShaderMaterial as Vo, Uniform$1 as Ja, Scene as ti, WebGLRenderer as Va, CanvasTexture as Wo, REVISION as Wa, Source as Xa, InstancedBufferGeometry as Za, InstancedInterleavedBuffer as ni, WireframeGeometry as $a, Line3 as eA } from "./three-MHVqtJYj.js";
1
+ import { Mesh as q, SphereGeometry as ui, Vector3 as P, MeshBasicMaterial as Qt, Node as fa, PerspectiveCamera as gs, NodeFrame as Ia, NodeBuilder as ma, GLSLNodeParser as Ea, ShaderLib as wt, UniformsUtils as gi, UniformsLib as Un, normalView as ba, defaultShaderStages as Yn, ShaderChunk as Ca, Material as en, TrianglesDrawMode as Ba, TriangleFanDrawMode as qs, TriangleStripDrawMode as Do, Matrix4 as ue, Loader as kt, LoaderUtils as tn, FileLoader as It, MeshPhysicalMaterial as Tt, Vector2 as Le, Color as Se, LinearSRGBColorSpace as Xe, SRGBColorSpace as ge, SpotLight as Ro, PointLight as zs, DirectionalLight as _o, InstancedMesh as wa, Quaternion as Te, InstancedBufferAttribute as ya, Object3D as xt, TextureLoader as di, ImageBitmapLoader as Qa, BufferAttribute as st, InterleavedBuffer as xa, LinearMipmapLinearFilter as jn, NearestMipmapLinearFilter as Mo, LinearMipmapNearestFilter as Fo, NearestMipmapNearestFilter as pi, LinearFilter as rt, NearestFilter as cs, RepeatWrapping as on, MirroredRepeatWrapping as ko, ClampToEdgeWrapping as ls, PointsMaterial as _n, LineBasicMaterial as Ft, MeshStandardMaterial as fi, DoubleSide as Ii, PropertyBinding as Lt, BufferGeometry as ut, SkinnedMesh as Lo, LineSegments as hs, Line as pt, LineLoop as Sa, Points as is, Group as nn, MathUtils as Qe, OrthographicCamera as No, Skeleton as Uo, AnimationClip as Go, Bone as Ys, InterpolateDiscrete as Po, InterpolateLinear as mi, InterleavedBufferAttribute as $t, Texture as Ks, VectorKeyframeTrack as Js, NumberKeyframeTrack as Vs, QuaternionKeyframeTrack as Ws, ColorManagement as Ve, FrontSide as Oo, Interpolant as Ta, Box3 as ds, Sphere as Ei, RGBA_S3TC_DXT1_Format as Xs, RGB_PVRTC_4BPPV1_Format as va, RGB_ETC2_Format as Ho, RGB_ETC1_Format as Da, RGBA_S3TC_DXT5_Format as Zs, RGBA_PVRTC_4BPPV1_Format as Ra, RGBA_ETC2_EAC_Format as jo, RGBA_BPTC_Format as $s, RGB_BPTC_UNSIGNED_Format as _a, RGBA_ASTC_4x4_Format as os, RGBAFormat as zt, FloatType as mt, HalfFloatType as We, UnsignedByteType as dt, CompressedCubeTexture as Ma, CompressedArrayTexture as Fa, CompressedTexture as Gn, NoColorSpace as us, RGBA_S3TC_DXT3_Format as Mi, RGB_S3TC_DXT1_Format as Fi, RGBA_ASTC_6x6_Format as ki, RGBFormat as ei, RedFormat as gn, RGFormat as Mn, UnsignedInt101111Type as qo, UnsignedInt5999Type as zo, DataTexture as ka, Data3DTexture as La, ExtrudeGeometry as Na, ShapePath as Ua, Raycaster as bi, CylinderGeometry as Ye, BoxGeometry as je, Float32BufferAttribute as Fe, OctahedronGeometry as Kn, TorusGeometry as bn, Euler as qt, Controls as Yo, PlaneGeometry as Ci, DataTextureLoader as Ko, DataUtils as dn, Vector4 as Nt, Curve as Ga, MeshPhongMaterial as Pn, MeshLambertMaterial as Pa, EquirectangularReflectionMapping as Oa, AmbientLight as Ha, Uint16BufferAttribute as ja, Matrix3 as Jo, ShapeUtils as qa, DefaultLoadingManager as za, Ray as Ya, Plane as Ka, MOUSE as fn, TOUCH as pn, Spherical as Li, ShaderMaterial as Vo, Uniform$1 as Ja, Scene as ti, WebGLRenderer as Va, CanvasTexture as Wo, REVISION as Wa, Source as Xa, InstancedBufferGeometry as Za, InstancedInterleavedBuffer as ni, WireframeGeometry as $a, Line3 as eA } from "./three-DfMvBzXi.js";
2
2
  class ph extends q {
3
3
  constructor(e, t, s, n = 128) {
4
4
  if (t <= 0 || s <= 0 || n <= 0)
@@ -3649,12 +3649,6 @@ class bc extends q {
3649
3649
  bt.length() === 0 ? this.quaternion.copy(this.cameraQuaternion) : ($i.lookAt(He.set(0, 0, 0), bt, me), this.quaternion.setFromRotationMatrix($i)), super.updateMatrixWorld(e);
3650
3650
  }
3651
3651
  }
3652
- /*!
3653
- fflate - fast JavaScript compression/decompression
3654
- <https://101arrowz.github.io/fflate>
3655
- Licensed under MIT. https://github.com/101arrowz/fflate/blob/master/LICENSE
3656
- version 0.8.2
3657
- */
3658
3652
  var Re = Uint8Array, it = Uint16Array, wi = Int32Array, ps = new Re([
3659
3653
  0,
3660
3654
  0,
@@ -1,4 +1,4 @@
1
- import { Vector4 as Pt, Vector3 as It, Vector2 as Ct, TextureLoader as Rt, Texture as Bt, ShaderMaterial as Ut, PlaneGeometry as At, Plane as Tt, Object3D as Mt, MeshBasicMaterial as Ft, Mesh as Ot, LinearFilter as Lt, FrontSide as zt, FileLoader as Wt, EventDispatcher as Et, DoubleSide as Dt, Color as Ht, BufferGeometry as Gt, BufferAttribute as $t, BackSide as Nt } from "./three-MHVqtJYj.js";
1
+ import { Vector4 as Pt, Vector3 as It, Vector2 as Ct, TextureLoader as Rt, Texture as Bt, ShaderMaterial as Ut, PlaneGeometry as At, Plane as Tt, Object3D as Mt, MeshBasicMaterial as Ft, Mesh as Ot, LinearFilter as Lt, FrontSide as zt, FileLoader as Wt, EventDispatcher as Et, DoubleSide as Dt, Color as Ht, BufferGeometry as Gt, BufferAttribute as $t, BackSide as Nt } from "./three-DfMvBzXi.js";
2
2
  var V = {};
3
3
  V.d = (i, e) => {
4
4
  for (var t in e)
@@ -1,4 +1,4 @@
1
- "use strict";const m=require("./three-iFaDq9U3.umd.cjs");var k={};k.d=(i,e)=>{for(var t in e)k.o(e,t)&&!k.o(i,t)&&Object.defineProperty(i,t,{enumerable:!0,get:e[t]})};k.o=(i,e)=>Object.prototype.hasOwnProperty.call(i,e);k.r=i=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(i,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(i,"__esModule",{value:!0})};var v={};k.d(v,{ti:()=>p,nS:()=>bt,eB:()=>M,Yp:()=>oe,VB:()=>C,BC:()=>L,zN:()=>R,cV:()=>U,hW:()=>O,k2:()=>We,K6:()=>S,M7:()=>ae,ls:()=>z,Hi:()=>it,EY:()=>F,MR:()=>Ye,zf:()=>ze,Ay:()=>jr,yo:()=>xt});var oe={};k.r(oe);k.d(oe,{get:()=>Oe,set:()=>Tt});var ae={};k.r(ae);k.d(ae,{alphaTestTransformer:()=>K,asPreprocessorValueTransformer:()=>Ke,toPreprocessorTriggerTransformer:()=>ve,toUserDataTransformer:()=>$i,uniformOrUserDataTransformer:()=>w});const re={fontFamily:null,fontSize:.05,fontKerning:"auto",fontStyle:"normal",fontWeight:"normal",offset:.005,lineHeight:1.2,lineBreak:`- ,.:?!
1
+ "use strict";const m=require("./three-qj71I7J3.umd.cjs");var k={};k.d=(i,e)=>{for(var t in e)k.o(e,t)&&!k.o(i,t)&&Object.defineProperty(i,t,{enumerable:!0,get:e[t]})};k.o=(i,e)=>Object.prototype.hasOwnProperty.call(i,e);k.r=i=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(i,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(i,"__esModule",{value:!0})};var v={};k.d(v,{ti:()=>p,nS:()=>bt,eB:()=>M,Yp:()=>oe,VB:()=>C,BC:()=>L,zN:()=>R,cV:()=>U,hW:()=>O,k2:()=>We,K6:()=>S,M7:()=>ae,ls:()=>z,Hi:()=>it,EY:()=>F,MR:()=>Ye,zf:()=>ze,Ay:()=>jr,yo:()=>xt});var oe={};k.r(oe);k.d(oe,{get:()=>Oe,set:()=>Tt});var ae={};k.r(ae);k.d(ae,{alphaTestTransformer:()=>K,asPreprocessorValueTransformer:()=>Ke,toPreprocessorTriggerTransformer:()=>ve,toUserDataTransformer:()=>$i,uniformOrUserDataTransformer:()=>w});const re={fontFamily:null,fontSize:.05,fontKerning:"auto",fontStyle:"normal",fontWeight:"normal",offset:.005,lineHeight:1.2,lineBreak:`- ,.:?!
2
2
  `,whiteSpace:"pre-line",flexDirection:"column",justifyContent:"start",alignItems:"start",backgroundImage:null,textAlign:"left",boxSizing:"content-box",position:"static",color:16777215,fontColor:16777215,fontOpacity:1,opacity:1,fontPXRange:4,fontSupersampling:!0,fontSmooth:"antialiased",borderRadius:0,borderWidth:0,borderColor:"black",borderOpacity:1,backgroundSize:"cover",backgroundColor:0,backgroundOpacity:0,overflow:"visible",letterSpacing:0,invertAlpha:!1,segments:1},Tt=function(i){for(const e in i)re[e]=i[e]},Oe=function(i){return Object.prototype.hasOwnProperty.call(re,i)||console.warn(`ThreeMeshUI::DefaultValues is trying to retrieve non-existing property '${i}'`),re[i]};class p{constructor(e,t=null,s=!0){this._id=e,this._value=t,this._needsUpdate=!0,this._needsProcess=!1,this._needsRender=!1,this._isPrimitive=s}get id(){return this._id}get value(){return this._value}set value(e){this.isValid(e)&&this._value!==e&&(this._value=e,this._needsUpdate=!0)}update(e,t){this.output(t)}output(e){}_outputValue(e){e[this._id]=this._value}process(e){}render(e){}getInheritedInput(e){if(this._value!=="inherit")return this._value;const t=e._parent._value;return t&&t[`_${this._id}`]?t[`_${this._id}`].getInheritedInput(t):this.getDefaultValue()}getDefaultValue(){return Oe(this._id)}isValid(e){return!0}emptyStrategyLogic(){throw new Error(`ThreeMeshUI::${this.constructor.name} has empty strategy. Update has not been processed.`)}requestUpdate(){this._needsUpdate=!0}requestProcess(){this._needsProcess=!1}requestRender(){this._needsRender=!1}}class Mt extends p{constructor(){super("renderOrder","auto",!0),this.output=this._outputValue,this._actualValue=0}set value(e){this.isValid(e)&&(this._value=e,this._needsUpdate=!0)}update(e,t){if(this._value!=="auto")this._actualValue=this._value;else{const s=e._parent._value;if(s!==null){const r=s._renderOrder._actualValue,n=1+s._children._uis.indexOf(e);this._actualValue=r+n}}for(const s of e._children._uis)s._renderOrder._value==="auto"&&(s._renderOrder._needsUpdate=!0);this._outputValue(t)}_outputValue(e){e[this._id]=this._actualValue}get value(){return this._value}}class R extends p{constructor(e,t=null,s=!0){super(e,t,s),this.output=this._outputValue,this._notInheritedValue=null}update(e,t){this._notInheritedValue=this._value,this._notInheritedValue==="inherit"&&(this._notInheritedValue=this.getInheritedInput(e)),this.propagate(e),this._outputValue(t)}propagate(e){for(const t of e._children._uis){const s=t[`_${this._id}`];s!==void 0&&s._value==="inherit"&&(t[`_${this._id}`]._needsUpdate=!0)}}_outputValue(e){e[this._id]=this._notInheritedValue}set value(e){this.isValid(e)&&this._value!==e&&(this._value=e,this._needsUpdate=!0)}get value(){return this._value==="inherit"?this._notInheritedValue:this._value}}class Ft extends R{constructor(){super("offset","inherit",!1)}update(e,t){super.update(e,t),e._parent._value!==null&&(e.position.z=this._notInheritedValue)}}class Ot extends R{constructor(){super("fontSmooth","inherit",!0),this._needsUpdate=!1,this.isValid=zt,this.output=this._outputValue}}const Lt=["inherit","none","antialiased"];function zt(i){return Lt.indexOf(i)===-1?(console.warn(`.fontSmoothing value '${i}' is not valid. Aborted`),!1):!0}var Wt=i=>{var e={};return k.d(e,i),e};const u=Wt({BackSide:()=>m.BackSide,BufferAttribute:()=>m.BufferAttribute,BufferGeometry:()=>m.BufferGeometry,Color:()=>m.Color,DoubleSide:()=>m.DoubleSide,EventDispatcher:()=>m.EventDispatcher,FileLoader:()=>m.FileLoader,FrontSide:()=>m.FrontSide,LinearFilter:()=>m.LinearFilter,Mesh:()=>m.Mesh,MeshBasicMaterial:()=>m.MeshBasicMaterial,Object3D:()=>m.Object3D,Plane:()=>m.Plane,PlaneGeometry:()=>m.PlaneGeometry,ShaderMaterial:()=>m.ShaderMaterial,Texture:()=>m.Texture,TextureLoader:()=>m.TextureLoader,Vector2:()=>m.Vector2,Vector3:()=>m.Vector3,Vector4:()=>m.Vector4});class g extends p{constructor(e,t,s=!0){super(e,"unset",s),this._input="inherit",this._allowsInherit=!0,this._inheritedInput=void 0,this._inline=void 0}update(e,t){this._allowsInherit||(this._inheritedInput=this.getInheritedInput(e)),this.computeOutputValue(e);for(const s of e._children._uis){const r=s[`_${this._id}`];(r._input?r._input:r._value)==="inherit"&&(s[`_${this._id}`]._needsUpdate=!0)}this.output(t)}computeOutputValue(e){this._value=this._input}_computeFromInherited(e){this._value=this._inheritedInput}set value(e){console.warn(".(style) sub-property cannot be directly set. It must comes from inline or computed setter.")}set inline(e){this.isValidValue(e)&&e!==this._inline&&(this._input=this._inline=e,this._needsUpdate=!0)}get inline(){return this._inline}isValidValue(e){return!0}getInheritedInput(e){if(this._input!=="inherit")return this._input;const t=e._parent._value;return t?t[`_${this._id}`].getInheritedInput(t):this.getDefaultValue()}}class Y extends g{constructor(e,t){super(e,t,!1),this._input=new u.Vector4(0,0,0,0),this._inline=null,this._value=new u.Vector4(0,0,0,0)}get value(){return this._value}computeOutputValue(e){this._vector4ValueSetter(this._value,this._input)}set inline(e){this._vector4ValueSetter(this._input,e),!this._input.equals(this._value)&&(this._needsUpdate=!0)}set top(e){this._input.x!==e&&(this._input.x=e,this._needsUpdate=!0)}get top(){return this._input.x}set right(e){this._input.y!==e&&(this._input.y=e,this._needsUpdate=!0)}get right(){return this._input.y}set bottom(e){this._input.z!==e&&(this._input.z=e,this._needsUpdate=!0)}get bottom(){return this._input.z}set left(e){this._input.w!==e&&(this._input.w=e,this._needsUpdate=!0)}get left(){return this._input.w}dispose(){this._computed=null,this._inline=null,this._input=null,this._output=null}_vector4ValueSetter(e,t){if(t instanceof u.Vector4){e.copy(t);return}if((typeof t=="string"||t instanceof String)&&(t=t.split(" ")),Array.isArray(t))switch(t=t.map(s=>parseFloat(s)),t.length){case 1:e.setScalar(t[0]);return;case 2:e.x=e.z=t[0],e.y=e.w=t[1];return;case 3:e.x=t[0],e.y=t[1],e.z=t[2];return;case 4:e.x=t[0],e.y=t[1],e.z=t[2],e.w=t[3];return;default:console.error("StyleVector4Property::set() Four Dimension property had more than four values");return}isNaN(t)||e.setScalar(t)}}class Et extends Y{constructor(){super("padding",new u.Vector4(0,0,0,0))}computeOutputValue(e){super.computeOutputValue(e),e._bounds._needsUpdate=!0,e._bounds._needsRender=!0,e._layouter._needsProcess=!0,e._renderer._needsRender=!0,e._parent._value&&(e._parent._value._layouter._needsProcess=!0)}}class Dt extends Y{constructor(){super("margin",new u.Vector4(0,0,0,0))}computeOutputValue(e){super.computeOutputValue(e),e._renderer._needsRender=!0,e._parent._value&&(e._parent._value._flexDirection._needsProcess=!0)}}const Ce=function(i,e,t){i[e]=t},Ht=function(i,e,t){t!==null&&(i[e]=t)};class W{constructor(e){this._definition=e}set definition(e){this._definition=e}mediate(e,t,s,r=null){for(const n in this._definition){const o=this._definition[n];if(s[n]!==void 0){const a=o.t?o.t:Ce;a(t,o.m,s[n]),r&&a(r,o.m,s[n])}}}static mediate(e,t,s,r,n=null){if(t)for(const o in r){const a=r[o];if(s[o]!==void 0){const l=a.t?a.t:Ce;l(t,a.m,s[o]),n&&l(n,a.m,s[o])}}}}class Gt extends p{constructor(){super("parent",null,!1)}update(e,t){e.parent&&e.parent.isUI?this._value=e.parent:this._value=null}set value(e){console.warn("ParentProperty is readonly")}get value(){return this._value}find(e){return this._value?e(this._value)?this._value:this._value._parent.find(e):null}dispose(){this._value=null}}const ne=function(i,e,t=6){return i.toFixed(t)===e.toFixed(t)};class Re extends p{constructor(e,t){super(e,t,!0),this.output=this._outputValue}set value(e){this.isValid(e)&&(ne(this._value,e)||(this._value=e,this._needsUpdate=!0))}get value(){return this._value}}class Be extends R{constructor(e){super(e,"inherit",!0),this.isValid=Nt}}const $t=[u.FrontSide,u.BackSide,u.DoubleSide];function Nt(i){return $t.indexOf(i)===-1?(console.warn(`SideProperty value '${i}' is not valid. Abort`),!1):!0}class Le{constructor(){this._offsetX=0,this._offsetY=0,this._lineBreak=null,this._kerning=0,this._fontFactor=1,this._fontSize=0,this._cumulativeWidth=0,this._paddingLeft=0,this._paddingRight=0,this._marginLeft=0,this._marginRight=0}resetOffsets(){this._offsetX=this._offsetY=0,this._cumulativeWidth=0}get xadvance(){return 0}get xoffset(){return 0}get yoffset(){return 0}get width(){return 0}get height(){return 0}set lineBreak(e){this._lineBreak=e}get lineBreak(){return this._lineBreak}get anchor(){return 0}get kerning(){return this._kerning*this._fontFactor}set kerning(e){this._kerning=e}get fontSize(){return this._fontSize}set fontSize(e){this._fontSize=e}get lineHeight(){return 0}get offsetX(){return this._offsetX}set offsetX(e){this._offsetX=e}get offsetY(){return this._offsetY}set offsetY(e){this._offsetY=e}get cumulativeWidth(){return this._cumulativeWidth}set cumulativeWidth(e){this._cumulativeWidth=e}get marginLeft(){return this._marginLeft}set marginLeft(e){this._marginLeft=e}get marginRight(){return this._marginRight}set marginRight(e){this._marginRight=e}get paddingLeft(){return this._paddingLeft}set paddingLeft(e){this._paddingLeft=e}get paddingRight(){return this._paddingRight}set paddingRight(e){this._paddingRight=e}get lineBase(){return 0}set fontFactor(e){this._fontFactor=e}get fontFactor(){return this._fontFactor}}class ze{constructor(e){this._char="",this._width=1,this._heigth=1,this._xadvance=1,this._xoffset=0,this._yoffset=0,this._font=e}get font(){return this._font}get char(){return this._char}get width(){return this._width}get height(){return this._heigth}get xadvance(){return this._xadvance}get xoffset(){return this._xoffset}get yoffset(){return this._yoffset}set yoffset(e){this._yoffset=e}clone(e){throw new Error("Abstract... Need to be implemented")}asInlineGlyph(){throw new Error("Abstract... Need to be implemented")}}class We extends Le{constructor(e){super(),this._typographic=e}get typographic(){return this._typographic}get xadvance(){return this._typographic.xadvance*this._fontFactor}get xoffset(){return this._typographic.xoffset*this._fontFactor}get yoffset(){return this._typographic.yoffset*this._fontFactor}get width(){return this._typographic.width*this._fontFactor}get height(){return this._typographic.height*this._fontFactor}get char(){return this._typographic.char}get anchor(){return this.yoffset}get lineHeight(){return this._typographic.font.lineHeight*this._fontFactor}get lineBase(){return this._typographic.font.lineBase*this._fontFactor}}const Xt={light:"100",normal:"400",bold:"700",bolder:"900"};function ue(i){if(!isNaN(i))return i.toString();const e=Xt[i];return e||i}class jt extends u.EventDispatcher{constructor(e,t){super(),this._isReady=!1,this._weight=ue(e),this._style=t,this._size=42,this._lineHeight=42,this._lineBase=42,this._font=null}get typographic(){return this._font}get isReady(){return this._isReady}get weight(){return this._weight}get style(){return this._style}get texture(){return this._texture}set fontMaterial(e){throw Error(`FontVariant('${this.id}')::fontMaterial - is abstract.`)}get fontMaterial(){throw Error(`FontVariant('${this.id}')::fontMaterial - is abstract.`)}get id(){return`${this._name}(w:${this.weight},s:${this.style})`}getTypographicGlyph(e){let t=this._chars[e];if(t)return t;if(e.match(/\s/))return this._chars[" "];const s=this._getFallbackCharacter(e);if(s&&(t=this._chars[s],t))return t;throw Error(`FontVariant('${this.id}')::getTypographicGlyph() - character('${e}') and/or fallback character were not found in provided msdf charset.`)}_getFallbackCharacter(e){throw new Error(`FontVariant(${typeof this})::_getFallbackCharacter() is abstract and should therefore be overridden.`)}getGeometricGlyph(e,t){throw new Error(`FontVariant(${typeof this})::getGeometryCharacter() is abstract and should therefore be overridden.`)}getKerningAmount(e){return this._kernings[e]?this._kernings[e]:0}adjustTypographicGlyphs(e){for(const t in e){const s=this.getTypographicGlyph(t),r=e[t];for(const n in r)s["_"+n]=e[t][n]}}_checkReadiness(){this._readyCondition()&&Kt(this)}_alterElementProperties(e){throw new Error(`FontVariant(${typeof this})::_alterElementProperties() is abstract and should therefore be overridden.`)}_readyCondition(){throw new Error(`FontVariant(${typeof this})::_readyCondition() is abstract and should therefore be overridden.`)}}const Yt={type:"ready"};function Kt(i){i._isReady=!0,i.dispatchEvent(Yt)}const L=jt;class qt extends p{constructor(e=null){super("font",e,!1),this._needsUpdate=!1,this._fontVariant=null,this._handleFontReadyClosure=null,this.isValid=Jt}output(e){e[this._id]=this._fontVariant}update(e,t){if(this._fontVariant&&!this._fontVariant.isReady&&this._fontVariant.removeEventListener("ready",this._handleFontReadyClosure),this._value&&this._value instanceof L)this._fontVariant=this._value;else{const s=e._fontFamily._value;s&&(this._fontVariant=s.getVariant(e._fontWeight._value,e._fontStyle._value))}this._fontVariant&&(this._fontVariant._alterElementProperties(e),this._handleFontReadyClosure=Zt(e,this),this._fontVariant.isReady?this._handleFontReadyClosure():this._fontVariant.addEventListener("ready",this._handleFontReadyClosure),(!e._fontMaterial._defaultMaterial||!(e._fontMaterial._defaultMaterial instanceof this._fontVariant.fontMaterial))&&(e._fontMaterial._defaultMaterial=new this._fontVariant.fontMaterial,e._fontMaterial._needsUpdate=!0))}set value(e){this.isValid(e)&&this._value!==e&&(this._value=e,this._needsUpdate=!0)}get value(){return this._value}get fontVariant(){return this._fontVariant}dispose(){this._handleFontReadyClosure&&(this._fontVariant.removeEventListener("ready",this._handleFontReadyClosure),this._handleFontReadyClosure=null),this._value=null,this._fontVariant=null}}function Jt(i){return i instanceof L?!0:(console.warn(`.font value '${i}' is not valid. It requires a FontVariant instance. Aborted`),!1)}function Zt(i,e){return function(){e._needsUpdate=!0,i._glyphs._needsProcess=!0,e._fontVariant.removeEventListener("ready",e._handleFontReadyClosure),e._handleFontReadyClosure=null}}class Qt extends g{constructor(e){super("display",e),this._value="flex",this._allowsInherit=!1,this._needsUpdate=!1,this.isValidValue=ti}computeOutputValue(e){e._visible._value=this._output!=="none"}}const ei=["none","flex"];function ti(i){return ei.indexOf(i)===-1?(console.warn(`(.style) display value '${i}' is not valid. Aborted`),!1):!0}class ii extends g{constructor(e){super("boxSizing",e),this._allowsInherit=!1,this.isValidValue=ri}computeOutputValue(e){this._value=this._inheritedInput,e._bounds._needsUpdate=!0}}const si=["border-box","content-box"];function ri(i){return si.indexOf(i)===-1?(console.warn(`(.style) boxSizing value '${i}' is not valid. Aborted`),!1):!0}class A extends g{constructor(e,t){super(e,t,!1),this._value=new u.Color,this.output=this._outputValue}computeOutputValue(e){this._input!=="inherit"&&this._value.set(this._input)}set inline(e){this._input=this._inline=e,this._needsUpdate=!0}}class Q extends g{constructor(e,t){super(e,t,!0),this.isValidValue=ni,this._allowsInherit=!1,this._input=t,this._value=t,this.output=this._outputValue,this.computeOutputValue=this._computeFromInherited}_outputValue(e){e[this._id]=this._inheritedInput}}function ni(i){return i<0&&i>1?(console.warn(`(.style) styleFactorProperty('${this.id}') value '${i}' is not valid)`),!1):!0}class oi extends g{constructor(e){super("backgroundImage",e,!0),this._input=null,this._allowsInherit=!1,this._textureSize=new u.Vector2(1,1),this.isValidValue=ai}get value(){return this._value}output(e){e[this._id]=this._value,e.tSize=this._textureSize}computeOutputValue(e){if(this._value=this._inheritedInput,this._value instanceof u.Texture&&!this._value.image){console.warn("ThreeMeshUI - .backgroundImage :: Please provide preloaded texture in order to have accurate sizing.");return}this._needsProcess=!0}process(e){this._value?this._textureSize.set(this._value.image.width,this._value.image.height):this._textureSize.set(1,1)}}function ai(i){return!0}class ui extends g{constructor(e){super("backgroundSize",e,!0),this.isValidValue=li,this.output=this._outputValue}}const hi=["cover","contain","stretch"];function li(i){return hi.indexOf(i)===-1?(console.warn(`(.style) backgroundSize value '${i}' is not valid. Aborted`),!1):!0}class ci extends g{constructor(e){super("overflow",e,!0),this.isValidValue=_i,this._clippingPlanes=null,this._renderStrategy=this._emptyRender}update(e,t){this._inline!==void 0&&this._inline!=="unset"?this._input=this._inline:this._computed!==void 0&&(this._input=this._computed),this._allowsInherit||(this._inheritedInput=this.getInheritedInput(e)),this.computeOutputValue(e);for(const s of e._children._uis)s._overflow._needsUpdate=!0;this.output(t)}output(e){e.clippingPlanes=this._clippingPlanes}computeOutputValue(e){super.computeOutputValue(e),this._value==="hidden"?this._renderStrategy=this._propagateRender:(this._renderStrategy=this._emptyRender,this._clippingPlanes=null);const t=e._parent._value;if(t!==null){const s=t._overflow;if((s._value==="hidden"||s._clippingPlanes!==null)&&!this._clippingPlanes){this._clippingPlanes=[new u.Plane(new u.Vector3(0,-1,0),1),new u.Plane(new u.Vector3(-1,0,0),1),new u.Plane(new u.Vector3(0,1,0),1),new u.Plane(new u.Vector3(1,0,0),1)];for(let r=0;r<this._clippingPlanes.length;r++)this._clippingPlanes[r].parent=t;s._clippingPlanes!==null&&this._clippingPlanes.push(...s._clippingPlanes),this._renderStrategy=this._hiddenRender,this._needsRender=!0}else(s._value==="visible"||s._clippingPlanes===null)&&this._clippingPlanes!==null&&(this._clippingPlanes=null,this._renderStrategy=this._emptyRender,this._needsRender=!0)}}render(e){this._renderStrategy(e)}_emptyRender(e){}_hiddenRender(e){const t=e._parent._value,s=t._bounds._offsetHeight,r=t._bounds._offsetWidth,n=t._padding._value,o=t._borderWidth._value;for(let a=0;a<4&&a<this._clippingPlanes.length;a++){const l=this._clippingPlanes[a];switch(a%4){case 0:l.constant=s/2-(n.x+o.x);break;case 1:l.constant=r/2-(n.y+o.y);break;case 2:l.constant=s/2-(n.z+o.z);break;case 3:l.constant=r/2-(n.w+o.w);break}l.applyMatrix4(t.matrixWorld)}for(let a=0;a<e._children._uis.length;a++){const l=e._children._uis[a];l._overflow._needsRender=!0}}_propagateRender(e){for(let t=0;t<e._children._uis.length;t++){const s=e._children._uis[t];s._overflow._needsRender=!0}}}const di=["visible","hidden"];function _i(i){return di.indexOf(i)===-1?(console.warn(`(.style) overflow value '${i}' is not valid. Aborted`),!1):!0}const B="rem",Ee="em",$="%",fi=[B,Ee,$],De=function(i){return fi.indexOf(i)===-1?B:i};class pi extends Y{constructor(e){super("borderRadius",e),this._valueUV=this._value.clone(),this._input=new u.Vector4(0,0,0,0),this._mediation=!0,this._cornerTL=new u.Vector2(0,1),this._cornerTR=new u.Vector2(1,1),this._cornerBR=new u.Vector2(1,0),this._cornerBL=new u.Vector2(0,0);const t=new E(this._valueUV,["x","y"]),s=new E(this._valueUV,["z","w"]),r=new E(this._valueUV,["x","w"]),n=new E(this._valueUV,["y","z"]);t.complementaryMediation=s,s.complementaryMediation=t,r.complementaryMediation=n,n.complementaryMediation=r,this._sideMediators=[t,s,r,n],this._units=B}set units(e){this._units=De(e),this._needsProcess=!0}get units(){return this._units}set mediation(e){e!==this._mediation&&(this._mediation=e,this._needsUpdate=!0)}get mediation(){return this._mediation}output(e){e.cornerTL=this._cornerTL,e.cornerTR=this._cornerTR,e.cornerBR=this._cornerBR,e.cornerBL=this._cornerBL}computeOutputValue(e){this._vector4ValueSetter(this._value,this._input),this._needsProcess=!0}process(e){this._needsRender=!0}render(e){this._valueUV.copy(this._value);const t=e._bounds._offsetWidth,s=e._bounds._offsetHeight;if(this._units===$&&this._valueUV.divideScalar(100),this._units===B&&this._valueUV.divideScalar(Math.min(t,s)),this._mediation)do this._sideMediators.forEach(o=>o.computeValue()),this._sideMediators.sort((o,a)=>o.value<a.value?1:-1),this._sideMediators[0].value>1&&this._sideMediators[0].mediate();while(this._sideMediators[0].value>1);let r=t>s?s/t:1,n=t<s?t/s:1;this._units===$&&(r=n=1),this._cornerTL.x=this._valueUV.x*r,this._cornerTL.y=1-this._valueUV.x*n,this._cornerTR.x=1-this._valueUV.y*r,this._cornerTR.y=1-this._valueUV.y*n,this._cornerBR.x=1-this._valueUV.z*r,this._cornerBR.y=this._valueUV.z*n,this._cornerBL.x=this._valueUV.w*r,this._cornerBL.y=this._valueUV.w*n}dispose(){for(const e of this._sideMediators)e.dispose();this._sideMediators=null,this._cornerTL=null,this._cornerTR=null,this._cornerBR=null,this._cornerBL=null,super.dispose()}set topLeft(e){this._input.x!==e&&(this._input.x=e,this._needsUpdate=!0)}get topLeft(){return this._input.x}set topRight(e){this._input.y!==e&&(this._input.y=e,this._needsUpdate=!0)}get topRight(){return this._input.y}set bottomRight(e){this._input.z!==e&&(this._input.z=e,this._needsUpdate=!0)}get bottomRight(){return this._input.z}set bottomLeft(e){this._input.w!==e&&(this._input.w=e,this._needsUpdate=!0)}get bottomLeft(){return this._input.w}set top(e){this._input.x===e&&this._input.y===e||(this._input.x=this._input.y=e,this._needsUpdate=!0)}get top(){return(this._input.x+this._input.y)/2}set right(e){this._input.y===e&&this._input.z===e||(this._input.y=this._input.z=e,this._needsUpdate=!0)}get right(){return(this._input.y+this._input.z)/2}set bottom(e){this._input.z===e&&this._input.w===e||(this._input.z=this._input.w=e,this._needsUpdate=!0)}get bottom(){return(this._input.z+this._input.w)/2}set left(e){this._input.w===e&&this._input.x===e||(this._input.w=this._input.x=e,this._needsUpdate=!0)}get left(){return(this._input.w+this._input.x)/2}}class E{constructor(e,t){this._borderRadiuses=e,this._sideProperties=t,this._complementaryMediation=null,this._value=0}get value(){return this._value}set complementaryMediation(e){this._complementaryMediation=e}computeValue(){let e=0;for(const t of this._sideProperties)e+=this._borderRadiuses[t];this._value=e}mediate(e=!0){if(!(this._value<1)){for(const t of this._sideProperties)this._borderRadiuses[t]/=this._value;e&&this._complementaryMediation.mediate(!1)}}dispose(){this._complementaryMediation=null,this._borderRadiuses=null}}class gi extends Y{constructor(e){super("borderWidth",e,!1),this._valueUV=this._value.clone(),this.output=this._outputValue,this._units=B}set units(e){this._units=De(e),this._needsUpdate=!0}get units(){return this._units}computeOutputValue(e){this._vector4ValueSetter(this._value,this._input),this._needsProcess=!0,e._bounds._needsUpdate=!0,e._layouter._needsUpdate=!0}_outputValue(e){e[this._id]=this._valueUV}process(e){this._needsRender=!0,e._borderRadius._needsRender=!0}render(e){this._valueUV.copy(this._value);const t=e._bounds._offsetWidth,s=e._bounds._offsetHeight;if(this._units===$&&(console.log("Percent"),console.log(this._valueUV)),this._units===B)t!==0&&(this._valueUV.w/=t,this._valueUV.y/=t),s!==0&&(this._valueUV.x/=s,this._valueUV.z/=s);else if(this._units===Ee){if(t!==0){const r=t>s?s/t:1;this._valueUV.y*=r,this._valueUV.w*=r}if(s!==0){const r=t<s?t/s:1;this._valueUV.x*=r,this._valueUV.z*=r}}}}class mi extends p{constructor(e,t=!0){super("visible",t,!0),this._needsUpdate=!1}update(e,t){e.visible=this._value,e._parent._value&&(e._parent._value._children._needsUpdate=!0)}set value(e){this.isValid(e)&&this._value!==e&&(this._value=e,this._needsUpdate=!0)}get value(){return this._value}}class He extends A{constructor(e){super("backgroundColor",e,!1),this._input="transparent",this._allowsInherit=!1}computeOutputValue(e){e._backgroundMesh.visible=!(this._input==="none"||this._input==="transparent"),this._input==="inherit"?this._value.set(this.getInheritedInput(e)):this._input==="transparent"||this._input==="none"||this._value.set(this._input)}}class I extends p{constructor(e="untitled"){super(e,void 0,!1)}update(e,t){}output(e){}}class vi extends p{constructor(){super("inlineJustificator",null,!1),this._value=null}update(e,t){}process(e){const t=e._bounds._innerHeight,s=e._layouter._value,r=Math.abs(s.height);let n=(()=>{switch(e._alignItems._value){case"inherit":case"start":return t/2;case"end":return r-t/2;case"stretch":case"center":return r/2}})();const o=e._padding._value,a=e._borderWidth._value;n+=(-o.x+o.z)/2+(-a.x+a.z)/2,s.forEach(l=>{l.y+=n,l.forEach(d=>{d.offsetY+=n})})}}const yi=["start","center","end","stretch"],bi=function(i){return yi.indexOf(i)===-1?(console.warn(`(.style) alignItems value '${i}' is not valid. Aborted`),!1):!0};class he extends g{constructor(){super("alignItems","inherit",!0),this.isValidValue=bi}}class le extends g{constructor(){super("textAlign","inherit",!0),this.isValidValue=wi}}const xi=["left","right","center","justify","justify-left","justify-right","justify-center"],wi=function(i){return xi.indexOf(i)===-1?(console.warn(`(.style) textAlign value '${i}' is not valid. Aborted`),!1):!0};class ce extends g{constructor(){super("flexDirection","inherit",!0),this.isValid=Vi}}const Si=["row","row-reverse","column","column-reverse"];function Vi(i){return Si.indexOf(i)===-1?(console.warn(`(.style) flexDirection value '${i}' is not valid. Aborted`),!1):!0}class de extends g{constructor(){super("justifyContent","inherit",!0),this.isValidValue=Pi}}const ki=["start","center","end","space-between","space-around","space-evenly"];function Pi(i){return ki.indexOf(i)===-1?(console.warn(`(.style) justifyContent value '${i}' is not valid. Aborted`),!1):!0}class Ii extends g{constructor(){super("order",0,!0),this._value=0,this._input=0,this._allowsInherit=!1}computeOutputValue(e){this._value=this._inheritedInput,e._parent._value&&(e._parent._value._children._needsProcess=!0)}}class Ge extends g{constructor(){super("position","static",!0),this._allowsInherit=!1,this._value="static",this._needsUpdate=!1,this.computeOutputValue=this._computeFromInherited,this.isValidValue=Ri}_computeFromInherited(e){super._computeFromInherited(e),e._parent._value&&(e._parent._value._children._needsProcess=!0)}}const Ci=["static","absolute"];function Ri(i){return Ci.indexOf(i)===-1?(console.warn(`(.style) position value '${i}' is not valid. Aborted`),!1):!0}class $e extends g{constructor(e,t=null){super(e,t,!0),this._input="auto",this._auto=!0,this._relative=!1,this._updateRequired=!0}set inline(e){this.isValidValue(e)&&e!==this._inline&&(this._inline=e,this._input!==this._inline&&this._parseInput())}get inline(){return this._inline}_parseInput(){let e=!0;if(this._inline!==void 0&&this._inline!=="unset"?this._input=this._inline:this._computed!==void 0?(this._computed===this._input&&(e=!1),this._input=this._computed):e=this._input==="inherit",e){if(this._auto=!this._input||this._input==="auto",this._auto)this._relative=!1;else if((typeof this._input=="string"||this._input instanceof String)&&this._input.endsWith("%")){this._relative=!0,this._value=0;const t=parseFloat(this._input.replace("%","").trim());isNaN(t)||(this._value=t/100)}else this._relative=!1,this._value=this._input;this._needsUpdate=this._updateRequired=e}}update(e,t){if(this._updateRequired){this._updateRequired=!1,this._allowsInherit||(this._inheritedInput=this.getInheritedInput(e)),this.computeOutputValue(e);for(const s of e._children._uis)s[`_${this._id}`]._needsUpdate=!0;this.output(t),e._parent._value&&(e._parent._value._layouter._needsProcess=!0)}}computeOutputValue(e){e._bounds._needsUpdate=!0,e._renderer._needsRender=!0}getInheritedInput(e){if(this._input!=="inherit"&&!this._auto)return this._input;const t=e._parent._value;return t?t[`_${this._id}`].getInheritedInput(t):this.getDefaultValue()}getDefaultValue(){return 0}get value(){return this._value}}class Bi extends $e{constructor(){super("width")}}class Ui extends $e{constructor(){super("height")}computeOutputValue(e){super.computeOutputValue(e)}}class Ne extends I{constructor(){super("textContent"),this._needsUpdate=!1}set value(e){}process(e){let t="";for(let s=0;s<e.children.length;s++){const r=e.children[s];r.isUI&&(t+=r.textContent)}this._value=t}}class Xe extends g{constructor(e){super("fontStyle",e,!0),this.isValidValue=Ti}}const Ai=["normal","italic"];function Ti(i){return Ai.indexOf(i)===-1?(console.warn(`(.style) fontStyle value '${i}' is not valid. Aborted`),!1):!0}class je extends g{constructor(){super("fontWeight","inherit",!0),this.isValid=Fi}}const Mi=["100","200","300","400","500","600","700","800","900","light","normal","bold","bolder"];function Fi(i){return Mi.indexOf(i.toString())===-1?(console.warn(`(.style) fontWeight value '${i}' is not valid. Aborted`),!1):!0}class Ye{constructor(){this._size=42,this._lineHeight=42,this._lineBase=38,this._name="-",this._charset=""}get size(){return this._size}get lineHeight(){return this._lineHeight}get lineBase(){return this._lineBase}get name(){return this._name}get charset(){return this._charset}}class Oi extends Ye{constructor(e){super(),this._size=e.info.size,this._lineHeight=e.common.lineHeight,this._lineBase=e.common.base,this._name=e.info.face,this._textureWidth=e.common.scaleW,this._textureHeight=e.common.scaleH,this._charset=e.chars.map(t=>t.char).join("")}get textureWidth(){return this._textureWidth}get textureHeight(){return this._textureHeight}}class Li extends We{constructor(e){super(e)}get uv(){return this.typographic.uv}}class N extends ze{constructor(e,t){super(e),this._char=t.char,this._width=t.width,this._heigth=t.height,this._xadvance=t.xadvance?t.xadvance:this._width,this._xoffset=t.xoffset?t.xoffset:0,this._yoffset=t.yoffset?t.yoffset:0,this._uv=t.uv?t.uv:null,isNaN(t.x)||(this._uv={left:t.x/e.textureWidth,right:(t.x+t.width)/e.textureWidth,top:1-(t.y+t.height)/e.textureHeight,bottom:1-t.y/e.textureHeight})}get uv(){return this._uv}clone(e){return new N(this._font,{char:e,width:this._width,height:this._heigth,xadvance:this._xadvance,xoffset:this._xoffset,yoffset:this._yoffset,uv:null})}asInlineGlyph(){return new Li(this)}}class zi extends u.PlaneGeometry{constructor(e,t){let s=1,r=1;const n=e.typographic.font.size,o=t._segments.value;s=Math.ceil(e.typographic.width/n*o),r=Math.ceil(e.typographic.height/n*o),super(e.width,e.height,s,r),e.uv?(this._mapUVs(e),this._transformGeometry(e)):(this._nullifyUVs(),this.scale(0,0,1),this.translate(0,e.fontSize/2,0)),this.name="GlyphGeometry"}_mapUVs(e){const t=e.uv.right-e.uv.left,s=e.uv.bottom-e.uv.top,r=this.getAttribute("uv").array.slice(),n=[];for(let o=0;o<r.length;o+=2){const a=r[o],l=r[o+1];n.push(e.uv.left+t*a),n.push(e.uv.top+s*l)}this.setAttribute("uvG",new u.BufferAttribute(new Float32Array(n),2))}_nullifyUVs(){const e=[],t=this.getAttribute("uv").array.length;for(let s=0;s<t;s++)e.push(0);this.setAttribute("uvG",new u.BufferAttribute(new Float32Array(e),2))}_transformGeometry(e){this.translate(e.width/2,-e.height/2,0)}}const Wi=`
3
3
  attribute vec2 uvG;
4
4
  varying vec2 vUvG;
@@ -1,4 +1,4 @@
1
- import{Vector4 as It,Vector3 as Tt,Vector2 as Ft,TextureLoader as Ot,Texture as zt,ShaderMaterial as At,PlaneGeometry as Wt,Plane as Dt,Object3D as Et,MeshBasicMaterial as Lt,Mesh as Ht,LinearFilter as Gt,FrontSide as $t,FileLoader as jt,EventDispatcher as Xt,DoubleSide as Nt,Color as Yt,BufferGeometry as Kt,BufferAttribute as qt,BackSide as Jt}from"./three-BDW9I486.min.js";var k={};k.d=(s,e)=>{for(var t in e)k.o(e,t)&&!k.o(s,t)&&Object.defineProperty(s,t,{enumerable:!0,get:e[t]})},k.o=(s,e)=>Object.prototype.hasOwnProperty.call(s,e),k.r=s=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(s,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(s,"__esModule",{value:!0})};var m={};k.d(m,{ti:()=>p,nS:()=>bt,eB:()=>O,Yp:()=>Q,VB:()=>C,BC:()=>P,zN:()=>R,cV:()=>B,hW:()=>A,k2:()=>Te,K6:()=>w,M7:()=>Z,ls:()=>T,Hi:()=>Je,EY:()=>z,MR:()=>He,zf:()=>Ie,Ay:()=>_n,yo:()=>yt});var Q={};k.r(Q),k.d(Q,{get:()=>Re,set:()=>Qt});var Z={};k.r(Z),k.d(Z,{alphaTestTransformer:()=>H,asPreprocessorValueTransformer:()=>Ge,toPreprocessorTriggerTransformer:()=>_e,toUserDataTransformer:()=>hi,uniformOrUserDataTransformer:()=>x});const ee={fontFamily:null,fontSize:.05,fontKerning:"auto",fontStyle:"normal",fontWeight:"normal",offset:.005,lineHeight:1.2,lineBreak:`- ,.:?!
1
+ import{Vector4 as It,Vector3 as Tt,Vector2 as Ft,TextureLoader as Ot,Texture as zt,ShaderMaterial as At,PlaneGeometry as Wt,Plane as Dt,Object3D as Et,MeshBasicMaterial as Lt,Mesh as Ht,LinearFilter as Gt,FrontSide as $t,FileLoader as jt,EventDispatcher as Xt,DoubleSide as Nt,Color as Yt,BufferGeometry as Kt,BufferAttribute as qt,BackSide as Jt}from"./three-B7CT31Bt.min.js";var k={};k.d=(s,e)=>{for(var t in e)k.o(e,t)&&!k.o(s,t)&&Object.defineProperty(s,t,{enumerable:!0,get:e[t]})},k.o=(s,e)=>Object.prototype.hasOwnProperty.call(s,e),k.r=s=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(s,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(s,"__esModule",{value:!0})};var m={};k.d(m,{ti:()=>p,nS:()=>bt,eB:()=>O,Yp:()=>Q,VB:()=>C,BC:()=>P,zN:()=>R,cV:()=>B,hW:()=>A,k2:()=>Te,K6:()=>w,M7:()=>Z,ls:()=>T,Hi:()=>Je,EY:()=>z,MR:()=>He,zf:()=>Ie,Ay:()=>_n,yo:()=>yt});var Q={};k.r(Q),k.d(Q,{get:()=>Re,set:()=>Qt});var Z={};k.r(Z),k.d(Z,{alphaTestTransformer:()=>H,asPreprocessorValueTransformer:()=>Ge,toPreprocessorTriggerTransformer:()=>_e,toUserDataTransformer:()=>hi,uniformOrUserDataTransformer:()=>x});const ee={fontFamily:null,fontSize:.05,fontKerning:"auto",fontStyle:"normal",fontWeight:"normal",offset:.005,lineHeight:1.2,lineBreak:`- ,.:?!
2
2
  `,whiteSpace:"pre-line",flexDirection:"column",justifyContent:"start",alignItems:"start",backgroundImage:null,textAlign:"left",boxSizing:"content-box",position:"static",color:16777215,fontColor:16777215,fontOpacity:1,opacity:1,fontPXRange:4,fontSupersampling:!0,fontSmooth:"antialiased",borderRadius:0,borderWidth:0,borderColor:"black",borderOpacity:1,backgroundSize:"cover",backgroundColor:0,backgroundOpacity:0,overflow:"visible",letterSpacing:0,invertAlpha:!1,segments:1},Qt=function(s){for(const e in s)ee[e]=s[e]},Re=function(s){return Object.prototype.hasOwnProperty.call(ee,s)||console.warn(`ThreeMeshUI::DefaultValues is trying to retrieve non-existing property '${s}'`),ee[s]};class p{constructor(e,t=null,i=!0){this._id=e,this._value=t,this._needsUpdate=!0,this._needsProcess=!1,this._needsRender=!1,this._isPrimitive=i}get id(){return this._id}get value(){return this._value}set value(e){this.isValid(e)&&this._value!==e&&(this._value=e,this._needsUpdate=!0)}update(e,t){this.output(t)}output(e){}_outputValue(e){e[this._id]=this._value}process(e){}render(e){}getInheritedInput(e){if(this._value!=="inherit")return this._value;const t=e._parent._value;return t&&t[`_${this._id}`]?t[`_${this._id}`].getInheritedInput(t):this.getDefaultValue()}getDefaultValue(){return Re(this._id)}isValid(e){return!0}emptyStrategyLogic(){throw new Error(`ThreeMeshUI::${this.constructor.name} has empty strategy. Update has not been processed.`)}requestUpdate(){this._needsUpdate=!0}requestProcess(){this._needsProcess=!1}requestRender(){this._needsRender=!1}}class Zt extends p{constructor(){super("renderOrder","auto",!0),this.output=this._outputValue,this._actualValue=0}set value(e){this.isValid(e)&&(this._value=e,this._needsUpdate=!0)}update(e,t){if(this._value!=="auto")this._actualValue=this._value;else{const i=e._parent._value;if(i!==null){const r=i._renderOrder._actualValue,n=1+i._children._uis.indexOf(e);this._actualValue=r+n}}for(const i of e._children._uis)i._renderOrder._value==="auto"&&(i._renderOrder._needsUpdate=!0);this._outputValue(t)}_outputValue(e){e[this._id]=this._actualValue}get value(){return this._value}}class R extends p{constructor(e,t=null,i=!0){super(e,t,i),this.output=this._outputValue,this._notInheritedValue=null}update(e,t){this._notInheritedValue=this._value,this._notInheritedValue==="inherit"&&(this._notInheritedValue=this.getInheritedInput(e)),this.propagate(e),this._outputValue(t)}propagate(e){for(const t of e._children._uis){const i=t[`_${this._id}`];i!==void 0&&i._value==="inherit"&&(t[`_${this._id}`]._needsUpdate=!0)}}_outputValue(e){e[this._id]=this._notInheritedValue}set value(e){this.isValid(e)&&this._value!==e&&(this._value=e,this._needsUpdate=!0)}get value(){return this._value==="inherit"?this._notInheritedValue:this._value}}class es extends R{constructor(){super("offset","inherit",!1)}update(e,t){super.update(e,t),e._parent._value!==null&&(e.position.z=this._notInheritedValue)}}class ts extends R{constructor(){super("fontSmooth","inherit",!0),this._needsUpdate=!1,this.isValid=is,this.output=this._outputValue}}const ss=["inherit","none","antialiased"];function is(s){return ss.indexOf(s)===-1?(console.warn(`.fontSmoothing value '${s}' is not valid. Aborted`),!1):!0}var rs=s=>{var e={};return k.d(e,s),e};const a=rs({BackSide:()=>Jt,BufferAttribute:()=>qt,BufferGeometry:()=>Kt,Color:()=>Yt,DoubleSide:()=>Nt,EventDispatcher:()=>Xt,FileLoader:()=>jt,FrontSide:()=>$t,LinearFilter:()=>Gt,Mesh:()=>Ht,MeshBasicMaterial:()=>Lt,Object3D:()=>Et,Plane:()=>Dt,PlaneGeometry:()=>Wt,ShaderMaterial:()=>At,Texture:()=>zt,TextureLoader:()=>Ot,Vector2:()=>Ft,Vector3:()=>Tt,Vector4:()=>It});class g extends p{constructor(e,t,i=!0){super(e,"unset",i),this._input="inherit",this._allowsInherit=!0,this._inheritedInput=void 0,this._inline=void 0}update(e,t){this._allowsInherit||(this._inheritedInput=this.getInheritedInput(e)),this.computeOutputValue(e);for(const i of e._children._uis){const r=i[`_${this._id}`];(r._input?r._input:r._value)==="inherit"&&(i[`_${this._id}`]._needsUpdate=!0)}this.output(t)}computeOutputValue(e){this._value=this._input}_computeFromInherited(e){this._value=this._inheritedInput}set value(e){console.warn(".(style) sub-property cannot be directly set. It must comes from inline or computed setter.")}set inline(e){this.isValidValue(e)&&e!==this._inline&&(this._input=this._inline=e,this._needsUpdate=!0)}get inline(){return this._inline}isValidValue(e){return!0}getInheritedInput(e){if(this._input!=="inherit")return this._input;const t=e._parent._value;return t?t[`_${this._id}`].getInheritedInput(t):this.getDefaultValue()}}class W extends g{constructor(e,t){super(e,t,!1),this._input=new a.Vector4(0,0,0,0),this._inline=null,this._value=new a.Vector4(0,0,0,0)}get value(){return this._value}computeOutputValue(e){this._vector4ValueSetter(this._value,this._input)}set inline(e){this._vector4ValueSetter(this._input,e),!this._input.equals(this._value)&&(this._needsUpdate=!0)}set top(e){this._input.x!==e&&(this._input.x=e,this._needsUpdate=!0)}get top(){return this._input.x}set right(e){this._input.y!==e&&(this._input.y=e,this._needsUpdate=!0)}get right(){return this._input.y}set bottom(e){this._input.z!==e&&(this._input.z=e,this._needsUpdate=!0)}get bottom(){return this._input.z}set left(e){this._input.w!==e&&(this._input.w=e,this._needsUpdate=!0)}get left(){return this._input.w}dispose(){this._computed=null,this._inline=null,this._input=null,this._output=null}_vector4ValueSetter(e,t){if(t instanceof a.Vector4){e.copy(t);return}if((typeof t=="string"||t instanceof String)&&(t=t.split(" ")),Array.isArray(t))switch(t=t.map(i=>parseFloat(i)),t.length){case 1:e.setScalar(t[0]);return;case 2:e.x=e.z=t[0],e.y=e.w=t[1];return;case 3:e.x=t[0],e.y=t[1],e.z=t[2];return;case 4:e.x=t[0],e.y=t[1],e.z=t[2],e.w=t[3];return;default:console.error("StyleVector4Property::set() Four Dimension property had more than four values");return}isNaN(t)||e.setScalar(t)}}class ns extends W{constructor(){super("padding",new a.Vector4(0,0,0,0))}computeOutputValue(e){super.computeOutputValue(e),e._bounds._needsUpdate=!0,e._bounds._needsRender=!0,e._layouter._needsProcess=!0,e._renderer._needsRender=!0,e._parent._value&&(e._parent._value._layouter._needsProcess=!0)}}class os extends W{constructor(){super("margin",new a.Vector4(0,0,0,0))}computeOutputValue(e){super.computeOutputValue(e),e._renderer._needsRender=!0,e._parent._value&&(e._parent._value._flexDirection._needsProcess=!0)}}const Ce=function(s,e,t){s[e]=t},as=function(s,e,t){t!==null&&(s[e]=t)};class D{constructor(e){this._definition=e}set definition(e){this._definition=e}mediate(e,t,i,r=null){for(const n in this._definition){const o=this._definition[n];if(i[n]!==void 0){const h=o.t?o.t:Ce;h(t,o.m,i[n]),r&&h(r,o.m,i[n])}}}static mediate(e,t,i,r,n=null){if(t)for(const o in r){const h=r[o];if(i[o]!==void 0){const c=h.t?h.t:Ce;c(t,h.m,i[o]),n&&c(n,h.m,i[o])}}}}class ls extends p{constructor(){super("parent",null,!1)}update(e,t){e.parent&&e.parent.isUI?this._value=e.parent:this._value=null}set value(e){console.warn("ParentProperty is readonly")}get value(){return this._value}find(e){return this._value?e(this._value)?this._value:this._value._parent.find(e):null}dispose(){this._value=null}}const te=function(s,e,t=6){return s.toFixed(t)===e.toFixed(t)};class Me extends p{constructor(e,t){super(e,t,!0),this.output=this._outputValue}set value(e){this.isValid(e)&&(te(this._value,e)||(this._value=e,this._needsUpdate=!0))}get value(){return this._value}}class Be extends R{constructor(e){super(e,"inherit",!0),this.isValid=us}}const hs=[a.FrontSide,a.BackSide,a.DoubleSide];function us(s){return hs.indexOf(s)===-1?(console.warn(`SideProperty value '${s}' is not valid. Abort`),!1):!0}class Pe{constructor(){this._offsetX=0,this._offsetY=0,this._lineBreak=null,this._kerning=0,this._fontFactor=1,this._fontSize=0,this._cumulativeWidth=0,this._paddingLeft=0,this._paddingRight=0,this._marginLeft=0,this._marginRight=0}resetOffsets(){this._offsetX=this._offsetY=0,this._cumulativeWidth=0}get xadvance(){return 0}get xoffset(){return 0}get yoffset(){return 0}get width(){return 0}get height(){return 0}set lineBreak(e){this._lineBreak=e}get lineBreak(){return this._lineBreak}get anchor(){return 0}get kerning(){return this._kerning*this._fontFactor}set kerning(e){this._kerning=e}get fontSize(){return this._fontSize}set fontSize(e){this._fontSize=e}get lineHeight(){return 0}get offsetX(){return this._offsetX}set offsetX(e){this._offsetX=e}get offsetY(){return this._offsetY}set offsetY(e){this._offsetY=e}get cumulativeWidth(){return this._cumulativeWidth}set cumulativeWidth(e){this._cumulativeWidth=e}get marginLeft(){return this._marginLeft}set marginLeft(e){this._marginLeft=e}get marginRight(){return this._marginRight}set marginRight(e){this._marginRight=e}get paddingLeft(){return this._paddingLeft}set paddingLeft(e){this._paddingLeft=e}get paddingRight(){return this._paddingRight}set paddingRight(e){this._paddingRight=e}get lineBase(){return 0}set fontFactor(e){this._fontFactor=e}get fontFactor(){return this._fontFactor}}class Ie{constructor(e){this._char="",this._width=1,this._heigth=1,this._xadvance=1,this._xoffset=0,this._yoffset=0,this._font=e}get font(){return this._font}get char(){return this._char}get width(){return this._width}get height(){return this._heigth}get xadvance(){return this._xadvance}get xoffset(){return this._xoffset}get yoffset(){return this._yoffset}set yoffset(e){this._yoffset=e}clone(e){throw new Error("Abstract... Need to be implemented")}asInlineGlyph(){throw new Error("Abstract... Need to be implemented")}}class Te extends Pe{constructor(e){super(),this._typographic=e}get typographic(){return this._typographic}get xadvance(){return this._typographic.xadvance*this._fontFactor}get xoffset(){return this._typographic.xoffset*this._fontFactor}get yoffset(){return this._typographic.yoffset*this._fontFactor}get width(){return this._typographic.width*this._fontFactor}get height(){return this._typographic.height*this._fontFactor}get char(){return this._typographic.char}get anchor(){return this.yoffset}get lineHeight(){return this._typographic.font.lineHeight*this._fontFactor}get lineBase(){return this._typographic.font.lineBase*this._fontFactor}}const cs={light:"100",normal:"400",bold:"700",bolder:"900"};function se(s){return isNaN(s)?cs[s]||s:s.toString()}class ds extends a.EventDispatcher{constructor(e,t){super(),this._isReady=!1,this._weight=se(e),this._style=t,this._size=42,this._lineHeight=42,this._lineBase=42,this._font=null}get typographic(){return this._font}get isReady(){return this._isReady}get weight(){return this._weight}get style(){return this._style}get texture(){return this._texture}set fontMaterial(e){throw Error(`FontVariant('${this.id}')::fontMaterial - is abstract.`)}get fontMaterial(){throw Error(`FontVariant('${this.id}')::fontMaterial - is abstract.`)}get id(){return`${this._name}(w:${this.weight},s:${this.style})`}getTypographicGlyph(e){let t=this._chars[e];if(t)return t;if(e.match(/\s/))return this._chars[" "];const i=this._getFallbackCharacter(e);if(i&&(t=this._chars[i],t))return t;throw Error(`FontVariant('${this.id}')::getTypographicGlyph() - character('${e}') and/or fallback character were not found in provided msdf charset.`)}_getFallbackCharacter(e){throw new Error(`FontVariant(${typeof this})::_getFallbackCharacter() is abstract and should therefore be overridden.`)}getGeometricGlyph(e,t){throw new Error(`FontVariant(${typeof this})::getGeometryCharacter() is abstract and should therefore be overridden.`)}getKerningAmount(e){return this._kernings[e]?this._kernings[e]:0}adjustTypographicGlyphs(e){for(const t in e){const i=this.getTypographicGlyph(t),r=e[t];for(const n in r)i["_"+n]=e[t][n]}}_checkReadiness(){this._readyCondition()&&ps(this)}_alterElementProperties(e){throw new Error(`FontVariant(${typeof this})::_alterElementProperties() is abstract and should therefore be overridden.`)}_readyCondition(){throw new Error(`FontVariant(${typeof this})::_readyCondition() is abstract and should therefore be overridden.`)}}const _s={type:"ready"};function ps(s){s._isReady=!0,s.dispatchEvent(_s)}const P=ds;class fs extends p{constructor(e=null){super("font",e,!1),this._needsUpdate=!1,this._fontVariant=null,this._handleFontReadyClosure=null,this.isValid=gs}output(e){e[this._id]=this._fontVariant}update(e,t){if(this._fontVariant&&!this._fontVariant.isReady&&this._fontVariant.removeEventListener("ready",this._handleFontReadyClosure),this._value&&this._value instanceof P)this._fontVariant=this._value;else{const i=e._fontFamily._value;i&&(this._fontVariant=i.getVariant(e._fontWeight._value,e._fontStyle._value))}this._fontVariant&&(this._fontVariant._alterElementProperties(e),this._handleFontReadyClosure=ms(e,this),this._fontVariant.isReady?this._handleFontReadyClosure():this._fontVariant.addEventListener("ready",this._handleFontReadyClosure),(!e._fontMaterial._defaultMaterial||!(e._fontMaterial._defaultMaterial instanceof this._fontVariant.fontMaterial))&&(e._fontMaterial._defaultMaterial=new this._fontVariant.fontMaterial,e._fontMaterial._needsUpdate=!0))}set value(e){this.isValid(e)&&this._value!==e&&(this._value=e,this._needsUpdate=!0)}get value(){return this._value}get fontVariant(){return this._fontVariant}dispose(){this._handleFontReadyClosure&&(this._fontVariant.removeEventListener("ready",this._handleFontReadyClosure),this._handleFontReadyClosure=null),this._value=null,this._fontVariant=null}}function gs(s){return s instanceof P?!0:(console.warn(`.font value '${s}' is not valid. It requires a FontVariant instance. Aborted`),!1)}function ms(s,e){return function(){e._needsUpdate=!0,s._glyphs._needsProcess=!0,e._fontVariant.removeEventListener("ready",e._handleFontReadyClosure),e._handleFontReadyClosure=null}}class vs extends g{constructor(e){super("display",e),this._value="flex",this._allowsInherit=!1,this._needsUpdate=!1,this.isValidValue=ys}computeOutputValue(e){e._visible._value=this._output!=="none"}}const bs=["none","flex"];function ys(s){return bs.indexOf(s)===-1?(console.warn(`(.style) display value '${s}' is not valid. Aborted`),!1):!0}class xs extends g{constructor(e){super("boxSizing",e),this._allowsInherit=!1,this.isValidValue=Ss}computeOutputValue(e){this._value=this._inheritedInput,e._bounds._needsUpdate=!0}}const ws=["border-box","content-box"];function Ss(s){return ws.indexOf(s)===-1?(console.warn(`(.style) boxSizing value '${s}' is not valid. Aborted`),!1):!0}class I extends g{constructor(e,t){super(e,t,!1),this._value=new a.Color,this.output=this._outputValue}computeOutputValue(e){this._input!=="inherit"&&this._value.set(this._input)}set inline(e){this._input=this._inline=e,this._needsUpdate=!0}}class ie extends g{constructor(e,t){super(e,t,!0),this.isValidValue=ks,this._allowsInherit=!1,this._input=t,this._value=t,this.output=this._outputValue,this.computeOutputValue=this._computeFromInherited}_outputValue(e){e[this._id]=this._inheritedInput}}function ks(s){return s<0&&s>1?(console.warn(`(.style) styleFactorProperty('${this.id}') value '${s}' is not valid)`),!1):!0}class Vs extends g{constructor(e){super("backgroundImage",e,!0),this._input=null,this._allowsInherit=!1,this._textureSize=new a.Vector2(1,1),this.isValidValue=Us}get value(){return this._value}output(e){e[this._id]=this._value,e.tSize=this._textureSize}computeOutputValue(e){if(this._value=this._inheritedInput,this._value instanceof a.Texture&&!this._value.image){console.warn("ThreeMeshUI - .backgroundImage :: Please provide preloaded texture in order to have accurate sizing.");return}this._needsProcess=!0}process(e){this._value?this._textureSize.set(this._value.image.width,this._value.image.height):this._textureSize.set(1,1)}}function Us(s){return!0}class Rs extends g{constructor(e){super("backgroundSize",e,!0),this.isValidValue=Ms,this.output=this._outputValue}}const Cs=["cover","contain","stretch"];function Ms(s){return Cs.indexOf(s)===-1?(console.warn(`(.style) backgroundSize value '${s}' is not valid. Aborted`),!1):!0}class Bs extends g{constructor(e){super("overflow",e,!0),this.isValidValue=Is,this._clippingPlanes=null,this._renderStrategy=this._emptyRender}update(e,t){this._inline!==void 0&&this._inline!=="unset"?this._input=this._inline:this._computed!==void 0&&(this._input=this._computed),this._allowsInherit||(this._inheritedInput=this.getInheritedInput(e)),this.computeOutputValue(e);for(const i of e._children._uis)i._overflow._needsUpdate=!0;this.output(t)}output(e){e.clippingPlanes=this._clippingPlanes}computeOutputValue(e){super.computeOutputValue(e),this._value==="hidden"?this._renderStrategy=this._propagateRender:(this._renderStrategy=this._emptyRender,this._clippingPlanes=null);const t=e._parent._value;if(t!==null){const i=t._overflow;if((i._value==="hidden"||i._clippingPlanes!==null)&&!this._clippingPlanes){this._clippingPlanes=[new a.Plane(new a.Vector3(0,-1,0),1),new a.Plane(new a.Vector3(-1,0,0),1),new a.Plane(new a.Vector3(0,1,0),1),new a.Plane(new a.Vector3(1,0,0),1)];for(let r=0;r<this._clippingPlanes.length;r++)this._clippingPlanes[r].parent=t;i._clippingPlanes!==null&&this._clippingPlanes.push(...i._clippingPlanes),this._renderStrategy=this._hiddenRender,this._needsRender=!0}else(i._value==="visible"||i._clippingPlanes===null)&&this._clippingPlanes!==null&&(this._clippingPlanes=null,this._renderStrategy=this._emptyRender,this._needsRender=!0)}}render(e){this._renderStrategy(e)}_emptyRender(e){}_hiddenRender(e){const t=e._parent._value,i=t._bounds._offsetHeight,r=t._bounds._offsetWidth,n=t._padding._value,o=t._borderWidth._value;for(let h=0;h<4&&h<this._clippingPlanes.length;h++){const c=this._clippingPlanes[h];switch(h%4){case 0:c.constant=i/2-(n.x+o.x);break;case 1:c.constant=r/2-(n.y+o.y);break;case 2:c.constant=i/2-(n.z+o.z);break;case 3:c.constant=r/2-(n.w+o.w);break}c.applyMatrix4(t.matrixWorld)}for(let h=0;h<e._children._uis.length;h++){const c=e._children._uis[h];c._overflow._needsRender=!0}}_propagateRender(e){for(let t=0;t<e._children._uis.length;t++){const i=e._children._uis[t];i._overflow._needsRender=!0}}}const Ps=["visible","hidden"];function Is(s){return Ps.indexOf(s)===-1?(console.warn(`(.style) overflow value '${s}' is not valid. Aborted`),!1):!0}const M="rem",Fe="em",E="%",Ts=[M,Fe,E],Oe=function(s){return Ts.indexOf(s)===-1?M:s};class Fs extends W{constructor(e){super("borderRadius",e),this._valueUV=this._value.clone(),this._input=new a.Vector4(0,0,0,0),this._mediation=!0,this._cornerTL=new a.Vector2(0,1),this._cornerTR=new a.Vector2(1,1),this._cornerBR=new a.Vector2(1,0),this._cornerBL=new a.Vector2(0,0);const t=new L(this._valueUV,["x","y"]),i=new L(this._valueUV,["z","w"]),r=new L(this._valueUV,["x","w"]),n=new L(this._valueUV,["y","z"]);t.complementaryMediation=i,i.complementaryMediation=t,r.complementaryMediation=n,n.complementaryMediation=r,this._sideMediators=[t,i,r,n],this._units=M}set units(e){this._units=Oe(e),this._needsProcess=!0}get units(){return this._units}set mediation(e){e!==this._mediation&&(this._mediation=e,this._needsUpdate=!0)}get mediation(){return this._mediation}output(e){e.cornerTL=this._cornerTL,e.cornerTR=this._cornerTR,e.cornerBR=this._cornerBR,e.cornerBL=this._cornerBL}computeOutputValue(e){this._vector4ValueSetter(this._value,this._input),this._needsProcess=!0}process(e){this._needsRender=!0}render(e){this._valueUV.copy(this._value);const t=e._bounds._offsetWidth,i=e._bounds._offsetHeight;if(this._units===E&&this._valueUV.divideScalar(100),this._units===M&&this._valueUV.divideScalar(Math.min(t,i)),this._mediation)do this._sideMediators.forEach(o=>o.computeValue()),this._sideMediators.sort((o,h)=>o.value<h.value?1:-1),this._sideMediators[0].value>1&&this._sideMediators[0].mediate();while(this._sideMediators[0].value>1);let r=t>i?i/t:1,n=t<i?t/i:1;this._units===E&&(r=n=1),this._cornerTL.x=this._valueUV.x*r,this._cornerTL.y=1-this._valueUV.x*n,this._cornerTR.x=1-this._valueUV.y*r,this._cornerTR.y=1-this._valueUV.y*n,this._cornerBR.x=1-this._valueUV.z*r,this._cornerBR.y=this._valueUV.z*n,this._cornerBL.x=this._valueUV.w*r,this._cornerBL.y=this._valueUV.w*n}dispose(){for(const e of this._sideMediators)e.dispose();this._sideMediators=null,this._cornerTL=null,this._cornerTR=null,this._cornerBR=null,this._cornerBL=null,super.dispose()}set topLeft(e){this._input.x!==e&&(this._input.x=e,this._needsUpdate=!0)}get topLeft(){return this._input.x}set topRight(e){this._input.y!==e&&(this._input.y=e,this._needsUpdate=!0)}get topRight(){return this._input.y}set bottomRight(e){this._input.z!==e&&(this._input.z=e,this._needsUpdate=!0)}get bottomRight(){return this._input.z}set bottomLeft(e){this._input.w!==e&&(this._input.w=e,this._needsUpdate=!0)}get bottomLeft(){return this._input.w}set top(e){this._input.x===e&&this._input.y===e||(this._input.x=this._input.y=e,this._needsUpdate=!0)}get top(){return(this._input.x+this._input.y)/2}set right(e){this._input.y===e&&this._input.z===e||(this._input.y=this._input.z=e,this._needsUpdate=!0)}get right(){return(this._input.y+this._input.z)/2}set bottom(e){this._input.z===e&&this._input.w===e||(this._input.z=this._input.w=e,this._needsUpdate=!0)}get bottom(){return(this._input.z+this._input.w)/2}set left(e){this._input.w===e&&this._input.x===e||(this._input.w=this._input.x=e,this._needsUpdate=!0)}get left(){return(this._input.w+this._input.x)/2}}class L{constructor(e,t){this._borderRadiuses=e,this._sideProperties=t,this._complementaryMediation=null,this._value=0}get value(){return this._value}set complementaryMediation(e){this._complementaryMediation=e}computeValue(){let e=0;for(const t of this._sideProperties)e+=this._borderRadiuses[t];this._value=e}mediate(e=!0){if(!(this._value<1)){for(const t of this._sideProperties)this._borderRadiuses[t]/=this._value;e&&this._complementaryMediation.mediate(!1)}}dispose(){this._complementaryMediation=null,this._borderRadiuses=null}}class Os extends W{constructor(e){super("borderWidth",e,!1),this._valueUV=this._value.clone(),this.output=this._outputValue,this._units=M}set units(e){this._units=Oe(e),this._needsUpdate=!0}get units(){return this._units}computeOutputValue(e){this._vector4ValueSetter(this._value,this._input),this._needsProcess=!0,e._bounds._needsUpdate=!0,e._layouter._needsUpdate=!0}_outputValue(e){e[this._id]=this._valueUV}process(e){this._needsRender=!0,e._borderRadius._needsRender=!0}render(e){this._valueUV.copy(this._value);const t=e._bounds._offsetWidth,i=e._bounds._offsetHeight;if(this._units===E&&(console.log("Percent"),console.log(this._valueUV)),this._units===M)t!==0&&(this._valueUV.w/=t,this._valueUV.y/=t),i!==0&&(this._valueUV.x/=i,this._valueUV.z/=i);else if(this._units===Fe){if(t!==0){const r=t>i?i/t:1;this._valueUV.y*=r,this._valueUV.w*=r}if(i!==0){const r=t<i?t/i:1;this._valueUV.x*=r,this._valueUV.z*=r}}}}class zs extends p{constructor(e,t=!0){super("visible",t,!0),this._needsUpdate=!1}update(e,t){e.visible=this._value,e._parent._value&&(e._parent._value._children._needsUpdate=!0)}set value(e){this.isValid(e)&&this._value!==e&&(this._value=e,this._needsUpdate=!0)}get value(){return this._value}}class ze extends I{constructor(e){super("backgroundColor",e,!1),this._input="transparent",this._allowsInherit=!1}computeOutputValue(e){e._backgroundMesh.visible=!(this._input==="none"||this._input==="transparent"),this._input==="inherit"?this._value.set(this.getInheritedInput(e)):this._input==="transparent"||this._input==="none"||this._value.set(this._input)}}class V extends p{constructor(e="untitled"){super(e,void 0,!1)}update(e,t){}output(e){}}class As extends p{constructor(){super("inlineJustificator",null,!1),this._value=null}update(e,t){}process(e){const t=e._bounds._innerHeight,i=e._layouter._value,r=Math.abs(i.height);let n=(()=>{switch(e._alignItems._value){case"inherit":case"start":return t/2;case"end":return r-t/2;case"stretch":case"center":return r/2}})();const o=e._padding._value,h=e._borderWidth._value;n+=(-o.x+o.z)/2+(-h.x+h.z)/2,i.forEach(c=>{c.y+=n,c.forEach(d=>{d.offsetY+=n})})}}const Ws=["start","center","end","stretch"],Ds=function(s){return Ws.indexOf(s)===-1?(console.warn(`(.style) alignItems value '${s}' is not valid. Aborted`),!1):!0};class re extends g{constructor(){super("alignItems","inherit",!0),this.isValidValue=Ds}}class ne extends g{constructor(){super("textAlign","inherit",!0),this.isValidValue=Ls}}const Es=["left","right","center","justify","justify-left","justify-right","justify-center"],Ls=function(s){return Es.indexOf(s)===-1?(console.warn(`(.style) textAlign value '${s}' is not valid. Aborted`),!1):!0};class oe extends g{constructor(){super("flexDirection","inherit",!0),this.isValid=Gs}}const Hs=["row","row-reverse","column","column-reverse"];function Gs(s){return Hs.indexOf(s)===-1?(console.warn(`(.style) flexDirection value '${s}' is not valid. Aborted`),!1):!0}class ae extends g{constructor(){super("justifyContent","inherit",!0),this.isValidValue=js}}const $s=["start","center","end","space-between","space-around","space-evenly"];function js(s){return $s.indexOf(s)===-1?(console.warn(`(.style) justifyContent value '${s}' is not valid. Aborted`),!1):!0}class Xs extends g{constructor(){super("order",0,!0),this._value=0,this._input=0,this._allowsInherit=!1}computeOutputValue(e){this._value=this._inheritedInput,e._parent._value&&(e._parent._value._children._needsProcess=!0)}}class Ae extends g{constructor(){super("position","static",!0),this._allowsInherit=!1,this._value="static",this._needsUpdate=!1,this.computeOutputValue=this._computeFromInherited,this.isValidValue=Ys}_computeFromInherited(e){super._computeFromInherited(e),e._parent._value&&(e._parent._value._children._needsProcess=!0)}}const Ns=["static","absolute"];function Ys(s){return Ns.indexOf(s)===-1?(console.warn(`(.style) position value '${s}' is not valid. Aborted`),!1):!0}class We extends g{constructor(e,t=null){super(e,t,!0),this._input="auto",this._auto=!0,this._relative=!1,this._updateRequired=!0}set inline(e){this.isValidValue(e)&&e!==this._inline&&(this._inline=e,this._input!==this._inline&&this._parseInput())}get inline(){return this._inline}_parseInput(){let e=!0;if(this._inline!==void 0&&this._inline!=="unset"?this._input=this._inline:this._computed!==void 0?(this._computed===this._input&&(e=!1),this._input=this._computed):e=this._input==="inherit",e){if(this._auto=!this._input||this._input==="auto",this._auto)this._relative=!1;else if((typeof this._input=="string"||this._input instanceof String)&&this._input.endsWith("%")){this._relative=!0,this._value=0;const t=parseFloat(this._input.replace("%","").trim());isNaN(t)||(this._value=t/100)}else this._relative=!1,this._value=this._input;this._needsUpdate=this._updateRequired=e}}update(e,t){if(this._updateRequired){this._updateRequired=!1,this._allowsInherit||(this._inheritedInput=this.getInheritedInput(e)),this.computeOutputValue(e);for(const i of e._children._uis)i[`_${this._id}`]._needsUpdate=!0;this.output(t),e._parent._value&&(e._parent._value._layouter._needsProcess=!0)}}computeOutputValue(e){e._bounds._needsUpdate=!0,e._renderer._needsRender=!0}getInheritedInput(e){if(this._input!=="inherit"&&!this._auto)return this._input;const t=e._parent._value;return t?t[`_${this._id}`].getInheritedInput(t):this.getDefaultValue()}getDefaultValue(){return 0}get value(){return this._value}}class Ks extends We{constructor(){super("width")}}class qs extends We{constructor(){super("height")}computeOutputValue(e){super.computeOutputValue(e)}}class De extends V{constructor(){super("textContent"),this._needsUpdate=!1}set value(e){}process(e){let t="";for(let i=0;i<e.children.length;i++){const r=e.children[i];r.isUI&&(t+=r.textContent)}this._value=t}}class Ee extends g{constructor(e){super("fontStyle",e,!0),this.isValidValue=Qs}}const Js=["normal","italic"];function Qs(s){return Js.indexOf(s)===-1?(console.warn(`(.style) fontStyle value '${s}' is not valid. Aborted`),!1):!0}class Le extends g{constructor(){super("fontWeight","inherit",!0),this.isValid=ei}}const Zs=["100","200","300","400","500","600","700","800","900","light","normal","bold","bolder"];function ei(s){return Zs.indexOf(s.toString())===-1?(console.warn(`(.style) fontWeight value '${s}' is not valid. Aborted`),!1):!0}class He{constructor(){this._size=42,this._lineHeight=42,this._lineBase=38,this._name="-",this._charset=""}get size(){return this._size}get lineHeight(){return this._lineHeight}get lineBase(){return this._lineBase}get name(){return this._name}get charset(){return this._charset}}class ti extends He{constructor(e){super(),this._size=e.info.size,this._lineHeight=e.common.lineHeight,this._lineBase=e.common.base,this._name=e.info.face,this._textureWidth=e.common.scaleW,this._textureHeight=e.common.scaleH,this._charset=e.chars.map(t=>t.char).join("")}get textureWidth(){return this._textureWidth}get textureHeight(){return this._textureHeight}}class si extends Te{constructor(e){super(e)}get uv(){return this.typographic.uv}}class K extends Ie{constructor(e,t){super(e),this._char=t.char,this._width=t.width,this._heigth=t.height,this._xadvance=t.xadvance?t.xadvance:this._width,this._xoffset=t.xoffset?t.xoffset:0,this._yoffset=t.yoffset?t.yoffset:0,this._uv=t.uv?t.uv:null,isNaN(t.x)||(this._uv={left:t.x/e.textureWidth,right:(t.x+t.width)/e.textureWidth,top:1-(t.y+t.height)/e.textureHeight,bottom:1-t.y/e.textureHeight})}get uv(){return this._uv}clone(e){return new K(this._font,{char:e,width:this._width,height:this._heigth,xadvance:this._xadvance,xoffset:this._xoffset,yoffset:this._yoffset,uv:null})}asInlineGlyph(){return new si(this)}}class ii extends a.PlaneGeometry{constructor(e,t){let i=1,r=1;const n=e.typographic.font.size,o=t._segments.value;i=Math.ceil(e.typographic.width/n*o),r=Math.ceil(e.typographic.height/n*o),super(e.width,e.height,i,r),e.uv?(this._mapUVs(e),this._transformGeometry(e)):(this._nullifyUVs(),this.scale(0,0,1),this.translate(0,e.fontSize/2,0)),this.name="GlyphGeometry"}_mapUVs(e){const t=e.uv.right-e.uv.left,i=e.uv.bottom-e.uv.top,r=this.getAttribute("uv").array.slice(),n=[];for(let o=0;o<r.length;o+=2){const h=r[o],c=r[o+1];n.push(e.uv.left+t*h),n.push(e.uv.top+i*c)}this.setAttribute("uvG",new a.BufferAttribute(new Float32Array(n),2))}_nullifyUVs(){const e=[],t=this.getAttribute("uv").array.length;for(let i=0;i<t;i++)e.push(0);this.setAttribute("uvG",new a.BufferAttribute(new Float32Array(e),2))}_transformGeometry(e){this.translate(e.width/2,-e.height/2,0)}}const ri=`
3
3
  attribute vec2 uvG;
4
4
  varying vec2 vUvG;