laymur 0.23.0 → 0.25.1

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 (316) hide show
  1. package/README.md +1 -1
  2. package/dist/core/constraints/UIAspectConstraint/UIAspectConstraint.Internal.d.ts +1 -1
  3. package/dist/core/constraints/UIAspectConstraint/UIAspectConstraint.Internal.js +1 -0
  4. package/dist/core/constraints/UIAspectConstraint/UIAspectConstraint.d.ts +3 -3
  5. package/dist/core/constraints/UIAspectConstraint/UIAspectConstraint.js +14 -16
  6. package/dist/core/constraints/UIConstraint.d.ts +22 -2
  7. package/dist/core/constraints/UIConstraint.js +26 -3
  8. package/dist/core/constraints/UICustomConstraint.d.ts +4 -4
  9. package/dist/core/constraints/UICustomConstraint.js +15 -15
  10. package/dist/core/constraints/UIHeightConstraint/UIHeightConstraint.Internal.d.ts +1 -1
  11. package/dist/core/constraints/UIHeightConstraint/UIHeightConstraint.Internal.js +1 -0
  12. package/dist/core/constraints/UIHeightConstraint/UIHeightConstraint.d.ts +3 -3
  13. package/dist/core/constraints/UIHeightConstraint/UIHeightConstraint.js +11 -13
  14. package/dist/core/constraints/UIHorizontalDistanceConstraint/UIHorizontalDistanceConstraint.Internal.d.ts +1 -1
  15. package/dist/core/constraints/UIHorizontalDistanceConstraint/UIHorizontalDistanceConstraint.Internal.js +1 -3
  16. package/dist/core/constraints/UIHorizontalDistanceConstraint/UIHorizontalDistanceConstraint.d.ts +3 -3
  17. package/dist/core/constraints/UIHorizontalDistanceConstraint/UIHorizontalDistanceConstraint.js +30 -30
  18. package/dist/core/constraints/UIHorizontalInterpolationConstraint/UIHorizontalInterpolationConstraint.Internal.d.ts +1 -1
  19. package/dist/core/constraints/UIHorizontalInterpolationConstraint/UIHorizontalInterpolationConstraint.Internal.js +2 -4
  20. package/dist/core/constraints/UIHorizontalInterpolationConstraint/UIHorizontalInterpolationConstraint.d.ts +3 -3
  21. package/dist/core/constraints/UIHorizontalInterpolationConstraint/UIHorizontalInterpolationConstraint.js +40 -39
  22. package/dist/core/constraints/UIHorizontalProportionConstraint/UIHorizontalProportionConstraint.Internal.d.ts +1 -1
  23. package/dist/core/constraints/UIHorizontalProportionConstraint/UIHorizontalProportionConstraint.Internal.js +1 -0
  24. package/dist/core/constraints/UIHorizontalProportionConstraint/UIHorizontalProportionConstraint.d.ts +3 -3
  25. package/dist/core/constraints/UIHorizontalProportionConstraint/UIHorizontalProportionConstraint.js +13 -15
  26. package/dist/core/constraints/UISingleParameterConstraint/UISingleParameterConstraint.Internal.d.ts +3 -3
  27. package/dist/core/constraints/UISingleParameterConstraint/UISingleParameterConstraint.Internal.js +1 -0
  28. package/dist/core/constraints/UISingleParameterConstraint/UISingleParameterConstraint.d.ts +13 -7
  29. package/dist/core/constraints/UISingleParameterConstraint/UISingleParameterConstraint.js +37 -30
  30. package/dist/core/constraints/UIVerticalDistanceConstraint/UIVerticalDistanceConstraint.Internal.d.ts +1 -1
  31. package/dist/core/constraints/UIVerticalDistanceConstraint/UIVerticalDistanceConstraint.Internal.js +1 -3
  32. package/dist/core/constraints/UIVerticalDistanceConstraint/UIVerticalDistanceConstraint.d.ts +3 -3
  33. package/dist/core/constraints/UIVerticalDistanceConstraint/UIVerticalDistanceConstraint.js +30 -30
  34. package/dist/core/constraints/UIVerticalInterpolationConstraint/UIVerticalInterpolationConstraint.Internal.d.ts +1 -1
  35. package/dist/core/constraints/UIVerticalInterpolationConstraint/UIVerticalInterpolationConstraint.Internal.js +2 -4
  36. package/dist/core/constraints/UIVerticalInterpolationConstraint/UIVerticalInterpolationConstraint.d.ts +3 -3
  37. package/dist/core/constraints/UIVerticalInterpolationConstraint/UIVerticalInterpolationConstraint.js +40 -39
  38. package/dist/core/constraints/UIVerticalProportionConstraint/UIVerticalProportionConstraint.Internal.d.ts +1 -1
  39. package/dist/core/constraints/UIVerticalProportionConstraint/UIVerticalProportionConstraint.Internal.js +1 -0
  40. package/dist/core/constraints/UIVerticalProportionConstraint/UIVerticalProportionConstraint.d.ts +3 -3
  41. package/dist/core/constraints/UIVerticalProportionConstraint/UIVerticalProportionConstraint.js +13 -15
  42. package/dist/core/constraints/UIWidthConstraint/UIWidthConstraint.Internal.d.ts +1 -1
  43. package/dist/core/constraints/UIWidthConstraint/UIWidthConstraint.Internal.js +1 -0
  44. package/dist/core/constraints/UIWidthConstraint/UIWidthConstraint.d.ts +3 -3
  45. package/dist/core/constraints/UIWidthConstraint/UIWidthConstraint.js +11 -13
  46. package/dist/core/constraints/builders/UIConstraint2DBuilder.Internal.d.ts +3 -3
  47. package/dist/core/constraints/builders/UIConstraint2DBuilder.Internal.js +1 -3
  48. package/dist/core/constraints/builders/UIConstraint2DBuilder.d.ts +11 -11
  49. package/dist/core/constraints/builders/UIConstraint2DBuilder.js +10 -13
  50. package/dist/core/constraints/builders/UICoverConstraintBuilder.Internal.d.ts +1 -1
  51. package/dist/core/constraints/builders/UICoverConstraintBuilder.Internal.js +1 -3
  52. package/dist/core/constraints/builders/UICoverConstraintBuilder.d.ts +7 -7
  53. package/dist/core/constraints/builders/UICoverConstraintBuilder.js +10 -13
  54. package/dist/core/constraints/builders/UIFitConstraintBuilder.Internal.d.ts +1 -1
  55. package/dist/core/constraints/builders/UIFitConstraintBuilder.Internal.js +1 -3
  56. package/dist/core/constraints/builders/UIFitConstraintBuilder.d.ts +7 -7
  57. package/dist/core/constraints/builders/UIFitConstraintBuilder.js +10 -13
  58. package/dist/core/elements/UIAnchor/UIAnchor.Internal.js +3 -5
  59. package/dist/core/elements/UIAnchor/UIAnchor.d.ts +23 -5
  60. package/dist/core/elements/UIAnchor/UIAnchor.js +42 -8
  61. package/dist/core/elements/UIAnimatedImage/UIAnimatedImage.Internal.d.ts +2 -2
  62. package/dist/core/elements/UIAnimatedImage/UIAnimatedImage.Internal.js +4 -6
  63. package/dist/core/elements/UIAnimatedImage/UIAnimatedImage.d.ts +10 -10
  64. package/dist/core/elements/UIAnimatedImage/UIAnimatedImage.js +108 -111
  65. package/dist/core/elements/UIDummy/UIDummy.Internal.d.ts +4 -4
  66. package/dist/core/elements/UIDummy/UIDummy.Internal.js +5 -8
  67. package/dist/core/elements/UIDummy/UIDummy.d.ts +19 -11
  68. package/dist/core/elements/UIDummy/UIDummy.js +59 -42
  69. package/dist/core/elements/UIElement/UIElement.Internal.d.ts +5 -5
  70. package/dist/core/elements/UIElement/UIElement.Internal.js +9 -12
  71. package/dist/core/elements/UIElement/UIElement.d.ts +11 -11
  72. package/dist/core/elements/UIElement/UIElement.js +57 -60
  73. package/dist/core/elements/UIGraphics/UIGraphics.Internal.d.ts +3 -3
  74. package/dist/core/elements/UIGraphics/UIGraphics.Internal.js +4 -7
  75. package/dist/core/elements/UIGraphics/UIGraphics.d.ts +7 -7
  76. package/dist/core/elements/UIGraphics/UIGraphics.js +44 -47
  77. package/dist/core/elements/UIImage/UIImage.Internal.d.ts +2 -2
  78. package/dist/core/elements/UIImage/UIImage.Internal.js +1 -0
  79. package/dist/core/elements/UIImage/UIImage.d.ts +9 -9
  80. package/dist/core/elements/UIImage/UIImage.js +21 -24
  81. package/dist/core/elements/UINineSlice/UINineSlice.Internal.d.ts +3 -3
  82. package/dist/core/elements/UINineSlice/UINineSlice.Internal.js +3 -5
  83. package/dist/core/elements/UINineSlice/UINineSlice.d.ts +12 -12
  84. package/dist/core/elements/UINineSlice/UINineSlice.js +71 -73
  85. package/dist/core/elements/UIProgress/UIProgress.Internal.d.ts +3 -4
  86. package/dist/core/elements/UIProgress/UIProgress.Internal.js +1 -3
  87. package/dist/core/elements/UIProgress/UIProgress.d.ts +10 -10
  88. package/dist/core/elements/UIProgress/UIProgress.js +59 -62
  89. package/dist/core/elements/UIScene/UIScene.Internal.d.ts +3 -3
  90. package/dist/core/elements/UIScene/UIScene.Internal.js +11 -14
  91. package/dist/core/elements/UIScene/UIScene.d.ts +8 -8
  92. package/dist/core/elements/UIScene/UIScene.js +68 -69
  93. package/dist/core/elements/UIText/UIText.Bidi.d.ts +2 -2
  94. package/dist/core/elements/UIText/UIText.Bidi.js +3 -5
  95. package/dist/core/elements/UIText/UIText.Interfaces.d.ts +6 -2
  96. package/dist/core/elements/UIText/UIText.Interfaces.js +1 -0
  97. package/dist/core/elements/UIText/UIText.Internal.d.ts +4 -4
  98. package/dist/core/elements/UIText/UIText.Internal.js +5 -7
  99. package/dist/core/elements/UIText/UIText.Measuring.d.ts +14 -7
  100. package/dist/core/elements/UIText/UIText.Measuring.js +115 -55
  101. package/dist/core/elements/UIText/UIText.Rendering.d.ts +3 -3
  102. package/dist/core/elements/UIText/UIText.Rendering.js +6 -9
  103. package/dist/core/elements/UIText/UIText.d.ts +28 -14
  104. package/dist/core/elements/UIText/UIText.js +181 -141
  105. package/dist/core/index.d.ts +55 -54
  106. package/dist/core/index.js +53 -0
  107. package/dist/core/layers/UIFullscreenLayer/UIFullscreenLayer.Internal.d.ts +4 -4
  108. package/dist/core/layers/UIFullscreenLayer/UIFullscreenLayer.Internal.js +2 -5
  109. package/dist/core/layers/UIFullscreenLayer/UIFullscreenLayer.d.ts +4 -4
  110. package/dist/core/layers/UIFullscreenLayer/UIFullscreenLayer.js +43 -42
  111. package/dist/core/layers/UILayer/UILayer.Internal.d.ts +2 -2
  112. package/dist/core/layers/UILayer/UILayer.Internal.js +4 -7
  113. package/dist/core/layers/UILayer/UILayer.d.ts +19 -4
  114. package/dist/core/layers/UILayer/UILayer.js +125 -62
  115. package/dist/core/miscellaneous/UIBlendMode.js +1 -3
  116. package/dist/core/miscellaneous/UIExpression.js +16 -19
  117. package/dist/core/miscellaneous/UIMode.js +3 -5
  118. package/dist/core/miscellaneous/UIOrientation.js +2 -4
  119. package/dist/core/miscellaneous/UIPriority.js +5 -8
  120. package/dist/core/miscellaneous/UIRelation.js +5 -8
  121. package/dist/core/miscellaneous/UITransparencyMode.js +1 -3
  122. package/dist/core/miscellaneous/area/UIArea.js +1 -3
  123. package/dist/core/miscellaneous/area/UIAreaCircle.d.ts +1 -1
  124. package/dist/core/miscellaneous/area/UIAreaCircle.js +3 -6
  125. package/dist/core/miscellaneous/area/UIAreaPolygon.d.ts +2 -2
  126. package/dist/core/miscellaneous/area/UIAreaPolygon.js +3 -6
  127. package/dist/core/miscellaneous/area/UIAreaRectangle.d.ts +1 -1
  128. package/dist/core/miscellaneous/area/UIAreaRectangle.js +3 -6
  129. package/dist/core/miscellaneous/area/UIAreaRoundedRectangle.d.ts +1 -1
  130. package/dist/core/miscellaneous/area/UIAreaRoundedRectangle.js +3 -6
  131. package/dist/core/miscellaneous/asserts.d.ts +30 -1
  132. package/dist/core/miscellaneous/asserts.js +87 -19
  133. package/dist/core/miscellaneous/canvas.js +13 -7
  134. package/dist/core/miscellaneous/color/UIColor.Internal.d.ts +1 -1
  135. package/dist/core/miscellaneous/color/UIColor.Internal.js +1 -3
  136. package/dist/core/miscellaneous/color/UIColor.d.ts +1 -1
  137. package/dist/core/miscellaneous/color/UIColor.js +202 -205
  138. package/dist/core/miscellaneous/computeTransform.d.ts +1 -1
  139. package/dist/core/miscellaneous/computeTransform.js +4 -7
  140. package/dist/core/miscellaneous/generic-plane/UIGenericInstancedPlane/UIGenericInstancedPlane.Internal.d.ts +10 -5
  141. package/dist/core/miscellaneous/generic-plane/UIGenericInstancedPlane/UIGenericInstancedPlane.Internal.js +63 -58
  142. package/dist/core/miscellaneous/generic-plane/UIGenericInstancedPlane/UIGenericInstancedPlane.Layout.d.ts +52 -0
  143. package/dist/core/miscellaneous/generic-plane/UIGenericInstancedPlane/UIGenericInstancedPlane.Layout.js +110 -0
  144. package/dist/core/miscellaneous/generic-plane/UIGenericInstancedPlane/UIGenericInstancedPlane.js +181 -261
  145. package/dist/core/miscellaneous/generic-plane/UIGenericPlaneRegistry/UIGenericPlaneRegistry.Internal.d.ts +3 -3
  146. package/dist/core/miscellaneous/generic-plane/UIGenericPlaneRegistry/UIGenericPlaneRegistry.Internal.js +1 -0
  147. package/dist/core/miscellaneous/generic-plane/UIGenericPlaneRegistry/UIGenericPlaneRegistry.js +209 -115
  148. package/dist/core/miscellaneous/generic-plane/shared.d.ts +12 -12
  149. package/dist/core/miscellaneous/generic-plane/shared.js +28 -23
  150. package/dist/core/miscellaneous/insets/UIInsets.Internal.js +1 -3
  151. package/dist/core/miscellaneous/insets/UIInsets.d.ts +1 -1
  152. package/dist/core/miscellaneous/insets/UIInsets.js +96 -99
  153. package/dist/core/miscellaneous/mask-function/UIProgressMaskFunction.js +1 -3
  154. package/dist/core/miscellaneous/mask-function/UIProgressMaskFunctionCircular.d.ts +1 -1
  155. package/dist/core/miscellaneous/mask-function/UIProgressMaskFunctionCircular.js +14 -17
  156. package/dist/core/miscellaneous/mask-function/UIProgressMaskFunctionDirectional.d.ts +2 -2
  157. package/dist/core/miscellaneous/mask-function/UIProgressMaskFunctionDirectional.js +13 -16
  158. package/dist/core/miscellaneous/math.js +3 -5
  159. package/dist/core/miscellaneous/micro/UIMicro.Internal.js +6 -8
  160. package/dist/core/miscellaneous/micro/UIMicro.d.ts +1 -1
  161. package/dist/core/miscellaneous/micro/UIMicro.js +91 -94
  162. package/dist/core/miscellaneous/resize-policy/UIResizePolicy.js +1 -3
  163. package/dist/core/miscellaneous/resize-policy/UIResizePolicyCover.d.ts +1 -1
  164. package/dist/core/miscellaneous/resize-policy/UIResizePolicyCover.js +12 -15
  165. package/dist/core/miscellaneous/resize-policy/UIResizePolicyCross.d.ts +1 -1
  166. package/dist/core/miscellaneous/resize-policy/UIResizePolicyCross.js +13 -16
  167. package/dist/core/miscellaneous/resize-policy/UIResizePolicyCrossInverted.d.ts +1 -1
  168. package/dist/core/miscellaneous/resize-policy/UIResizePolicyCrossInverted.js +13 -16
  169. package/dist/core/miscellaneous/resize-policy/UIResizePolicyFit.d.ts +1 -1
  170. package/dist/core/miscellaneous/resize-policy/UIResizePolicyFit.js +12 -15
  171. package/dist/core/miscellaneous/resize-policy/UIResizePolicyFixedHeight.d.ts +1 -1
  172. package/dist/core/miscellaneous/resize-policy/UIResizePolicyFixedHeight.js +13 -16
  173. package/dist/core/miscellaneous/resize-policy/UIResizePolicyFixedWidth.d.ts +1 -1
  174. package/dist/core/miscellaneous/resize-policy/UIResizePolicyFixedWidth.js +13 -16
  175. package/dist/core/miscellaneous/resize-policy/UIResizePolicyNone.d.ts +1 -1
  176. package/dist/core/miscellaneous/resize-policy/UIResizePolicyNone.js +3 -6
  177. package/dist/core/miscellaneous/shared.d.ts +1 -1
  178. package/dist/core/miscellaneous/shared.js +4 -7
  179. package/dist/core/miscellaneous/text-span/UITextSpan.Internal.d.ts +1 -1
  180. package/dist/core/miscellaneous/text-span/UITextSpan.Internal.js +1 -0
  181. package/dist/core/miscellaneous/text-span/UITextSpan.d.ts +2 -2
  182. package/dist/core/miscellaneous/text-span/UITextSpan.js +10 -13
  183. package/dist/core/miscellaneous/text-style/UITextStyle.Internal.js +15 -17
  184. package/dist/core/miscellaneous/text-style/UITextStyle.d.ts +13 -2
  185. package/dist/core/miscellaneous/text-style/UITextStyle.js +222 -207
  186. package/dist/core/miscellaneous/texture/UITextureView.Internal.d.ts +7 -0
  187. package/dist/core/miscellaneous/texture/UITextureView.Internal.js +16 -6
  188. package/dist/core/miscellaneous/texture/UITextureView.d.ts +1 -1
  189. package/dist/core/miscellaneous/texture/UITextureView.js +113 -117
  190. package/dist/core/miscellaneous/webglCapabilities.js +3 -4
  191. package/dist/core/shaders/UIImage.d.ts +9 -0
  192. package/dist/core/shaders/UIImage.js +14 -0
  193. package/dist/core/shaders/UINineSlice.d.ts +11 -0
  194. package/dist/core/shaders/UINineSlice.js +57 -0
  195. package/dist/core/shaders/UIProgress.d.ts +14 -0
  196. package/dist/core/shaders/UIProgress.js +21 -0
  197. package/dist/core/shaders/UIProgressMaskFunctionCircular.d.ts +2 -0
  198. package/dist/core/shaders/UIProgressMaskFunctionCircular.js +16 -0
  199. package/dist/core/shaders/UIProgressMaskFunctionDirectional.d.ts +2 -0
  200. package/dist/core/shaders/UIProgressMaskFunctionDirectional.js +15 -0
  201. package/dist/core/wrappers/UIInputWrapper/UIInputWrapper.Internal.d.ts +4 -0
  202. package/dist/core/wrappers/UIInputWrapper/UIInputWrapper.Internal.js +1 -0
  203. package/dist/core/wrappers/UIInputWrapper/UIInputWrapper.d.ts +7 -1
  204. package/dist/core/wrappers/UIInputWrapper/UIInputWrapper.js +50 -47
  205. package/dist/core/wrappers/UISceneWrapper/UISceneWrapper.Internal.d.ts +5 -2
  206. package/dist/core/wrappers/UISceneWrapper/UISceneWrapper.Internal.js +1 -0
  207. package/dist/core/wrappers/UISceneWrapper/UISceneWrapper.d.ts +11 -3
  208. package/dist/core/wrappers/UISceneWrapper/UISceneWrapper.js +42 -26
  209. package/dist/core/wrappers/UISolverWrapper/UISolverWrapper.Internal.d.ts +5 -3
  210. package/dist/core/wrappers/UISolverWrapper/UISolverWrapper.Internal.js +1 -0
  211. package/dist/core/wrappers/UISolverWrapper/UISolverWrapper.d.ts +20 -4
  212. package/dist/core/wrappers/UISolverWrapper/UISolverWrapper.js +138 -117
  213. package/dist/debug/UIAspectDebug.d.ts +3 -3
  214. package/dist/debug/UIAspectDebug.js +64 -68
  215. package/dist/debug/UIConstraintDebug.d.ts +1 -1
  216. package/dist/debug/UIConstraintDebug.js +1 -0
  217. package/dist/debug/UIHeightDebug.d.ts +3 -3
  218. package/dist/debug/UIHeightDebug.js +63 -67
  219. package/dist/debug/UIHorizontalDistanceDebug.d.ts +3 -3
  220. package/dist/debug/UIHorizontalDistanceDebug.js +76 -81
  221. package/dist/debug/UIHorizontalInterpolationDebug.d.ts +3 -3
  222. package/dist/debug/UIHorizontalInterpolationDebug.js +74 -78
  223. package/dist/debug/UILayerDebug.d.ts +1 -1
  224. package/dist/debug/UILayerDebug.js +55 -64
  225. package/dist/debug/UIVerticalDistanceDebug.d.ts +3 -3
  226. package/dist/debug/UIVerticalDistanceDebug.js +76 -81
  227. package/dist/debug/UIVerticalInterpolationDebug.d.ts +3 -3
  228. package/dist/debug/UIVerticalInterpolationDebug.js +74 -78
  229. package/dist/debug/UIWidthDebug.d.ts +3 -3
  230. package/dist/debug/UIWidthDebug.js +63 -67
  231. package/dist/debug/index.d.ts +8 -8
  232. package/dist/debug/index.js +8 -8
  233. package/dist/debug/miscellaneous.js +8 -11
  234. package/dist/particles/behaviorModules/UIBehaviorDirectionalGravity.d.ts +3 -3
  235. package/dist/particles/behaviorModules/UIBehaviorDirectionalGravity.js +13 -16
  236. package/dist/particles/behaviorModules/UIBehaviorModule.d.ts +1 -1
  237. package/dist/particles/behaviorModules/UIBehaviorModule.js +1 -3
  238. package/dist/particles/behaviorModules/UIBehaviorPointGravity.d.ts +3 -3
  239. package/dist/particles/behaviorModules/UIBehaviorPointGravity.js +37 -40
  240. package/dist/particles/behaviorModules/UIBehaviorScaleOscillation.d.ts +41 -0
  241. package/dist/particles/behaviorModules/UIBehaviorScaleOscillation.js +87 -0
  242. package/dist/particles/behaviorModules/UIBehaviorScaleOverLife.d.ts +2 -2
  243. package/dist/particles/behaviorModules/UIBehaviorScaleOverLife.js +17 -20
  244. package/dist/particles/behaviorModules/UIBehaviorTorqueDamping.d.ts +2 -2
  245. package/dist/particles/behaviorModules/UIBehaviorTorqueDamping.js +13 -16
  246. package/dist/particles/behaviorModules/UIBehaviorTorqueNoise.d.ts +2 -2
  247. package/dist/particles/behaviorModules/UIBehaviorTorqueNoise.js +21 -24
  248. package/dist/particles/behaviorModules/UIBehaviorVelocityDamping.d.ts +2 -2
  249. package/dist/particles/behaviorModules/UIBehaviorVelocityDamping.js +13 -16
  250. package/dist/particles/behaviorModules/UIBehaviorVelocityNoise.d.ts +2 -2
  251. package/dist/particles/behaviorModules/UIBehaviorVelocityNoise.js +21 -24
  252. package/dist/particles/elements/UIEmitter.Internal.d.ts +2 -2
  253. package/dist/particles/elements/UIEmitter.Internal.js +6 -9
  254. package/dist/particles/elements/UIEmitter.d.ts +17 -11
  255. package/dist/particles/elements/UIEmitter.js +100 -88
  256. package/dist/particles/index.d.ts +20 -18
  257. package/dist/particles/index.js +19 -18
  258. package/dist/particles/instancedParticle/UIInstancedParticle.Internal.d.ts +1 -1
  259. package/dist/particles/instancedParticle/UIInstancedParticle.Internal.js +14 -15
  260. package/dist/particles/instancedParticle/UIInstancedParticle.d.ts +4 -1
  261. package/dist/particles/instancedParticle/UIInstancedParticle.js +40 -32
  262. package/dist/particles/miscellaneous/miscellaneous.d.ts +3 -3
  263. package/dist/particles/miscellaneous/miscellaneous.js +26 -27
  264. package/dist/particles/renderingModules/UIRenderingColorOverLife.d.ts +2 -2
  265. package/dist/particles/renderingModules/UIRenderingColorOverLife.js +5 -8
  266. package/dist/particles/renderingModules/UIRenderingColorOverVelocity.d.ts +2 -2
  267. package/dist/particles/renderingModules/UIRenderingColorOverVelocity.js +6 -9
  268. package/dist/particles/renderingModules/UIRenderingModule.js +1 -3
  269. package/dist/particles/renderingModules/UIRenderingTexture.d.ts +2 -2
  270. package/dist/particles/renderingModules/UIRenderingTexture.js +4 -7
  271. package/dist/particles/shaders/UIRenderingColorOverLife.d.ts +2 -0
  272. package/dist/particles/shaders/UIRenderingColorOverLife.js +7 -0
  273. package/dist/particles/shaders/UIRenderingColorOverVelocity.d.ts +9 -0
  274. package/dist/particles/shaders/UIRenderingColorOverVelocity.js +16 -0
  275. package/dist/particles/shaders/UIRenderingTexture.d.ts +2 -0
  276. package/dist/particles/shaders/UIRenderingTexture.js +7 -0
  277. package/dist/particles/spawnModules/UISpawnModule.d.ts +1 -1
  278. package/dist/particles/spawnModules/UISpawnModule.js +1 -3
  279. package/dist/particles/spawnModules/UISpawnOffset.d.ts +3 -3
  280. package/dist/particles/spawnModules/UISpawnOffset.js +12 -15
  281. package/dist/particles/spawnModules/UISpawnRandomLifetime.d.ts +2 -2
  282. package/dist/particles/spawnModules/UISpawnRandomLifetime.js +13 -16
  283. package/dist/particles/spawnModules/UISpawnRandomRotation.d.ts +2 -2
  284. package/dist/particles/spawnModules/UISpawnRandomRotation.js +13 -16
  285. package/dist/particles/spawnModules/UISpawnRandomScale.d.ts +2 -2
  286. package/dist/particles/spawnModules/UISpawnRandomScale.js +19 -22
  287. package/dist/particles/spawnModules/UISpawnRandomTorque.d.ts +2 -2
  288. package/dist/particles/spawnModules/UISpawnRandomTorque.js +13 -16
  289. package/dist/particles/spawnModules/UISpawnRandomVelocity.d.ts +2 -2
  290. package/dist/particles/spawnModules/UISpawnRandomVelocity.js +21 -24
  291. package/dist/particles/spawnModules/UISpawnRectangle.d.ts +3 -3
  292. package/dist/particles/spawnModules/UISpawnRectangle.js +21 -24
  293. package/package.json +13 -17
  294. package/dist/_virtual/2d.js +0 -3
  295. package/dist/_virtual/3d.js +0 -3
  296. package/dist/_virtual/4d.js +0 -3
  297. package/dist/_virtual/mod.js +0 -5
  298. package/dist/_virtual/mod2.js +0 -3
  299. package/dist/core/shaders/UIImage.glsl.js +0 -3
  300. package/dist/core/shaders/UINineSlice.glsl.js +0 -3
  301. package/dist/core/shaders/UIProgress.glsl.js +0 -3
  302. package/dist/core/shaders/UIProgressMaskFunctionCircular.glsl.js +0 -3
  303. package/dist/core/shaders/UIProgressMaskFunctionDirectional.glsl.js +0 -3
  304. package/dist/index.js +0 -52
  305. package/dist/node_modules/fast-simplex-noise/lib/2d.js +0 -93
  306. package/dist/node_modules/fast-simplex-noise/lib/3d.js +0 -142
  307. package/dist/node_modules/fast-simplex-noise/lib/4d.js +0 -196
  308. package/dist/node_modules/fast-simplex-noise/lib/mod.js +0 -24
  309. package/dist/node_modules/three/examples/jsm/lines/Line2.js +0 -56
  310. package/dist/node_modules/three/examples/jsm/lines/LineGeometry.js +0 -157
  311. package/dist/node_modules/three/examples/jsm/lines/LineMaterial.js +0 -691
  312. package/dist/node_modules/three/examples/jsm/lines/LineSegments2.js +0 -415
  313. package/dist/node_modules/three/examples/jsm/lines/LineSegmentsGeometry.js +0 -289
  314. package/dist/particles/shaders/UIRenderingColorOverLife.glsl.js +0 -3
  315. package/dist/particles/shaders/UIRenderingColorOverVelocity.glsl.js +0 -3
  316. package/dist/particles/shaders/UIRenderingTexture.glsl.js +0 -3
@@ -1,6 +1,6 @@
1
- import type { UIVerticalInterpolationConstraint } from "../core";
2
- import { UIColor } from "../core";
3
- import type { UIConstraintDebug } from "./UIConstraintDebug";
1
+ import type { UIVerticalInterpolationConstraint } from "../core/index.js";
2
+ import { UIColor } from "../core/index.js";
3
+ import type { UIConstraintDebug } from "./UIConstraintDebug.js";
4
4
  export declare class UIVerticalInterpolationDebug implements UIConstraintDebug {
5
5
  readonly constraint: UIVerticalInterpolationConstraint;
6
6
  readonly tint: UIColor;
@@ -1,51 +1,49 @@
1
- import { Object3D, Vector3, CanvasTexture, SpriteMaterial, Sprite } from 'three';
2
- import { Line2 } from '../node_modules/three/examples/jsm/lines/Line2.js';
3
- import { LineGeometry } from '../node_modules/three/examples/jsm/lines/LineGeometry.js';
4
- import { LineMaterial } from '../node_modules/three/examples/jsm/lines/LineMaterial.js';
5
- import { isUIPlaneElement } from '../core/miscellaneous/shared.js';
6
- import { DEBUG_LINE_WIDTH, debugResolutionVector, DEBUG_RENDER_ORDER, DEBUG_BADGE_SIZE, DEBUG_BADGE_BACKGROUND_COLOR, DEBUG_BADGE_FONT_SIZE, DEBUG_BADGE_FONT_FAMILY } from './miscellaneous.js';
7
- import { UIColor } from '../core/miscellaneous/color/UIColor.js';
8
- import { UIOrientation } from '../core/miscellaneous/UIOrientation.js';
9
-
10
- class UIVerticalInterpolationDebug {
1
+ import { CanvasTexture, Object3D, Sprite, SpriteMaterial, Vector3 } from "three";
2
+ import { Line2 } from "three/addons/lines/Line2.js";
3
+ import { LineGeometry } from "three/addons/lines/LineGeometry.js";
4
+ import { LineMaterial } from "three/addons/lines/LineMaterial.js";
5
+ import { UIColor, UIOrientation } from "../core/index.js";
6
+ import { isUIPlaneElement } from "../core/miscellaneous/shared.js";
7
+ import { DEBUG_BADGE_BACKGROUND_COLOR, DEBUG_BADGE_FONT_FAMILY, DEBUG_BADGE_FONT_SIZE, DEBUG_BADGE_SIZE, DEBUG_LINE_WIDTH, DEBUG_RENDER_ORDER, debugResolutionVector, } from "./miscellaneous.js";
8
+ export class UIVerticalInterpolationDebug {
11
9
  constructor(constraint) {
12
10
  this.constraint = constraint;
13
11
  this.tint = new UIColor("cyan");
14
- this._private_container = new Object3D();
15
- this._private_baseLineMaterial = new LineMaterial({
12
+ this.container = new Object3D();
13
+ this.baseLineMaterial = new LineMaterial({
16
14
  linewidth: DEBUG_LINE_WIDTH,
17
15
  transparent: true,
18
16
  depthTest: false,
19
17
  depthWrite: false,
20
18
  });
21
- this._private_baseLineGeometry = new LineGeometry();
22
- this._private_baseLine = new Line2(this._private_baseLineGeometry, this._private_baseLineMaterial);
23
- this._private_markerMaterial = new LineMaterial({
19
+ this.baseLineGeometry = new LineGeometry();
20
+ this.baseLine = new Line2(this.baseLineGeometry, this.baseLineMaterial);
21
+ this.markerMaterial = new LineMaterial({
24
22
  linewidth: DEBUG_LINE_WIDTH,
25
23
  transparent: true,
26
24
  depthTest: false,
27
25
  depthWrite: false,
28
26
  });
29
- this._private_markerGeometry = new LineGeometry();
30
- this._private_markerLine = new Line2(this._private_markerGeometry, this._private_markerMaterial);
31
- this._private_visibleInternal = true;
32
- this._private_lastRenderedText = "";
33
- this._private_onOrientationChanged = () => {
34
- this._private_updateContainerVisibility();
27
+ this.markerGeometry = new LineGeometry();
28
+ this.markerLine = new Line2(this.markerGeometry, this.markerMaterial);
29
+ this.visibleInternal = true;
30
+ this.lastRenderedText = "";
31
+ this.onOrientationChanged = () => {
32
+ this.updateContainerVisibility();
35
33
  };
36
- this._private_onRendering = (renderer) => {
34
+ this.onRendering = (renderer) => {
37
35
  const tintDirty = this.tint.dirty;
38
36
  if (tintDirty) {
39
- this.tint.toThreeColor(this._private_baseLineMaterial.color);
40
- this._private_baseLineMaterial.opacity = this.tint.a;
41
- this.tint.toThreeColor(this._private_markerMaterial.color);
42
- this._private_markerMaterial.opacity = this.tint.a;
43
- this._private_spriteMaterial.opacity = this.tint.a;
37
+ this.tint.toThreeColor(this.baseLineMaterial.color);
38
+ this.baseLineMaterial.opacity = this.tint.a;
39
+ this.tint.toThreeColor(this.markerMaterial.color);
40
+ this.markerMaterial.opacity = this.tint.a;
41
+ this.spriteMaterial.opacity = this.tint.a;
44
42
  this.tint.setDirtyFalse();
45
43
  }
46
44
  renderer.getDrawingBufferSize(debugResolutionVector);
47
- this._private_baseLineMaterial.resolution.copy(debugResolutionVector);
48
- this._private_markerMaterial.resolution.copy(debugResolutionVector);
45
+ this.baseLineMaterial.resolution.copy(debugResolutionVector);
46
+ this.markerMaterial.resolution.copy(debugResolutionVector);
49
47
  const elementA = this.constraint.a;
50
48
  const elementB = this.constraint.b;
51
49
  const elementC = this.constraint.c;
@@ -61,85 +59,83 @@ class UIVerticalInterpolationDebug {
61
59
  ? elementC.y + elementC.height * this.constraint.anchorC
62
60
  : elementC.y;
63
61
  const midX = (anchorAX + anchorBX) / 2;
64
- this._private_baseLineGeometry.setFromPoints([
62
+ this.baseLineGeometry.setFromPoints([
65
63
  new Vector3(midX, anchorAY, 0),
66
64
  new Vector3(midX, anchorBY, 0),
67
65
  ]);
68
66
  const markerSize = 12;
69
- this._private_markerGeometry.setFromPoints([
67
+ this.markerGeometry.setFromPoints([
70
68
  new Vector3(midX - markerSize, anchorCY, 0),
71
69
  new Vector3(midX + markerSize, anchorCY, 0),
72
70
  ]);
73
71
  const nextText = "vi: " + this.constraint.t.toFixed(2);
74
- if (nextText !== this._private_lastRenderedText || tintDirty) {
75
- this._private_drawText(nextText);
76
- this._private_textTexture.needsUpdate = true;
77
- this._private_lastRenderedText = nextText;
72
+ if (nextText !== this.lastRenderedText || tintDirty) {
73
+ this.drawText(nextText);
74
+ this.textTexture.needsUpdate = true;
75
+ this.lastRenderedText = nextText;
78
76
  }
79
- this._private_textSprite.position.set(midX + 20, anchorCY, 0);
77
+ this.textSprite.position.set(midX + 20, anchorCY, 0);
80
78
  };
81
- this._private_baseLine.renderOrder = DEBUG_RENDER_ORDER;
82
- this._private_markerLine.renderOrder = DEBUG_RENDER_ORDER;
83
- this._private_container.add(this._private_baseLine);
84
- this._private_container.add(this._private_markerLine);
79
+ this.baseLine.renderOrder = DEBUG_RENDER_ORDER;
80
+ this.markerLine.renderOrder = DEBUG_RENDER_ORDER;
81
+ this.container.add(this.baseLine);
82
+ this.container.add(this.markerLine);
85
83
  const canvas = document.createElement("canvas");
86
84
  canvas.width = 256;
87
85
  canvas.height = 64;
88
86
  const context = canvas.getContext("2d");
89
87
  if (context === null) {
90
- throw new Error("Failed to get 2D context for debug text");
88
+ throw new Error("UIVerticalInterpolationDebug.constructor: failed to get 2D context for debug text");
91
89
  }
92
- this._private_canvas = canvas;
93
- this._private_context = context;
94
- this._private_drawText("");
95
- this._private_textTexture = new CanvasTexture(canvas);
96
- this._private_spriteMaterial = new SpriteMaterial({
97
- map: this._private_textTexture,
90
+ this.canvas = canvas;
91
+ this.context = context;
92
+ this.drawText("");
93
+ this.textTexture = new CanvasTexture(canvas);
94
+ this.spriteMaterial = new SpriteMaterial({
95
+ map: this.textTexture,
98
96
  transparent: true,
99
97
  depthTest: false,
100
98
  depthWrite: false,
101
99
  });
102
- this._private_textSprite = new Sprite(this._private_spriteMaterial);
103
- this._private_textSprite.renderOrder = DEBUG_RENDER_ORDER;
104
- this._private_textSprite.scale.set(DEBUG_BADGE_SIZE, DEBUG_BADGE_SIZE * 0.25, 1);
105
- this._private_container.add(this._private_textSprite);
106
- this.constraint.layer.signalRendering.on(this._private_onRendering);
107
- this.constraint.layer.signalOrientationChanged.on(this._private_onOrientationChanged);
108
- this.constraint.layer.sceneWrapper.insertCustomObject(this._private_container);
109
- this._private_updateContainerVisibility();
100
+ this.textSprite = new Sprite(this.spriteMaterial);
101
+ this.textSprite.renderOrder = DEBUG_RENDER_ORDER;
102
+ this.textSprite.scale.set(DEBUG_BADGE_SIZE, DEBUG_BADGE_SIZE * 0.25, 1);
103
+ this.container.add(this.textSprite);
104
+ this.constraint.layer.signalRendering.on(this.onRendering);
105
+ this.constraint.layer.signalOrientationChanged.on(this.onOrientationChanged);
106
+ this.constraint.layer.sceneWrapper.insertCustomObject(this.container);
107
+ this.updateContainerVisibility();
110
108
  }
111
109
  get visible() {
112
- return this._private_visibleInternal;
110
+ return this.visibleInternal;
113
111
  }
114
112
  set visible(value) {
115
- if (value !== this._private_visibleInternal) {
116
- this._private_visibleInternal = value;
117
- this._private_updateContainerVisibility();
113
+ if (value !== this.visibleInternal) {
114
+ this.visibleInternal = value;
115
+ this.updateContainerVisibility();
118
116
  }
119
117
  }
120
118
  destroy() {
121
- this.constraint.layer.signalRendering.off(this._private_onRendering);
122
- this.constraint.layer.signalOrientationChanged.off(this._private_onOrientationChanged);
123
- this.constraint.layer.sceneWrapper.removeCustomObject(this._private_container);
124
- this._private_baseLineGeometry.dispose();
125
- this._private_markerGeometry.dispose();
126
- this._private_textTexture.dispose();
119
+ this.constraint.layer.signalRendering.off(this.onRendering);
120
+ this.constraint.layer.signalOrientationChanged.off(this.onOrientationChanged);
121
+ this.constraint.layer.sceneWrapper.removeCustomObject(this.container);
122
+ this.baseLineGeometry.dispose();
123
+ this.markerGeometry.dispose();
124
+ this.textTexture.dispose();
127
125
  }
128
- _private_updateContainerVisibility() {
126
+ updateContainerVisibility() {
129
127
  const orientationActive = this.constraint.orientation === UIOrientation.ALWAYS ||
130
128
  this.constraint.orientation === this.constraint.layer.orientation;
131
- this._private_container.visible = this._private_visibleInternal && orientationActive;
129
+ this.container.visible = this.visibleInternal && orientationActive;
132
130
  }
133
- _private_drawText(text) {
134
- this._private_context.clearRect(0, 0, this._private_canvas.width, this._private_canvas.height);
135
- this._private_context.fillStyle = DEBUG_BADGE_BACKGROUND_COLOR;
136
- this._private_context.fillRect(0, 0, this._private_canvas.width, this._private_canvas.height);
137
- this._private_context.fillStyle = this.tint.getHexStringRGB();
138
- this._private_context.font = `${DEBUG_BADGE_FONT_SIZE}px ${DEBUG_BADGE_FONT_FAMILY}`;
139
- this._private_context.textAlign = "center";
140
- this._private_context.textBaseline = "middle";
141
- this._private_context.fillText(text, this._private_canvas.width / 2, this._private_canvas.height / 2);
131
+ drawText(text) {
132
+ this.context.clearRect(0, 0, this.canvas.width, this.canvas.height);
133
+ this.context.fillStyle = DEBUG_BADGE_BACKGROUND_COLOR;
134
+ this.context.fillRect(0, 0, this.canvas.width, this.canvas.height);
135
+ this.context.fillStyle = this.tint.getHexStringRGB();
136
+ this.context.font = `${DEBUG_BADGE_FONT_SIZE}px ${DEBUG_BADGE_FONT_FAMILY}`;
137
+ this.context.textAlign = "center";
138
+ this.context.textBaseline = "middle";
139
+ this.context.fillText(text, this.canvas.width / 2, this.canvas.height / 2);
142
140
  }
143
141
  }
144
-
145
- export { UIVerticalInterpolationDebug };
@@ -1,6 +1,6 @@
1
- import type { UIWidthConstraint } from "../core";
2
- import { UIColor } from "../core";
3
- import type { UIConstraintDebug } from "./UIConstraintDebug";
1
+ import type { UIWidthConstraint } from "../core/index.js";
2
+ import { UIColor } from "../core/index.js";
3
+ import type { UIConstraintDebug } from "./UIConstraintDebug.js";
4
4
  export declare class UIWidthDebug implements UIConstraintDebug {
5
5
  readonly constraint: UIWidthConstraint;
6
6
  readonly tint: UIColor;
@@ -1,111 +1,107 @@
1
- import { Object3D, Vector3, CanvasTexture, SpriteMaterial, Sprite } from 'three';
2
- import { Line2 } from '../node_modules/three/examples/jsm/lines/Line2.js';
3
- import { LineGeometry } from '../node_modules/three/examples/jsm/lines/LineGeometry.js';
4
- import { LineMaterial } from '../node_modules/three/examples/jsm/lines/LineMaterial.js';
5
- import { DEBUG_LINE_WIDTH, debugResolutionVector, DEBUG_RENDER_ORDER, DEBUG_BADGE_SIZE, DEBUG_BADGE_BACKGROUND_COLOR, DEBUG_BADGE_FONT_SIZE, DEBUG_BADGE_FONT_FAMILY } from './miscellaneous.js';
6
- import { UIColor } from '../core/miscellaneous/color/UIColor.js';
7
- import { UIOrientation } from '../core/miscellaneous/UIOrientation.js';
8
-
9
- class UIWidthDebug {
1
+ import { CanvasTexture, Object3D, Sprite, SpriteMaterial, Vector3 } from "three";
2
+ import { Line2 } from "three/addons/lines/Line2.js";
3
+ import { LineGeometry } from "three/addons/lines/LineGeometry.js";
4
+ import { LineMaterial } from "three/addons/lines/LineMaterial.js";
5
+ import { UIColor, UIOrientation } from "../core/index.js";
6
+ import { DEBUG_BADGE_BACKGROUND_COLOR, DEBUG_BADGE_FONT_FAMILY, DEBUG_BADGE_FONT_SIZE, DEBUG_BADGE_SIZE, DEBUG_LINE_WIDTH, DEBUG_RENDER_ORDER, debugResolutionVector, } from "./miscellaneous.js";
7
+ export class UIWidthDebug {
10
8
  constructor(constraint) {
11
9
  this.constraint = constraint;
12
10
  this.tint = new UIColor("cyan");
13
- this._private_container = new Object3D();
14
- this._private_lineMaterial = new LineMaterial({
11
+ this.container = new Object3D();
12
+ this.lineMaterial = new LineMaterial({
15
13
  linewidth: DEBUG_LINE_WIDTH,
16
14
  transparent: true,
17
15
  depthTest: false,
18
16
  depthWrite: false,
19
17
  });
20
- this._private_lineGeometry = new LineGeometry();
21
- this._private_line = new Line2(this._private_lineGeometry, this._private_lineMaterial);
22
- this._private_visibleInternal = true;
23
- this._private_lastRenderedText = "";
24
- this._private_onOrientationChanged = () => {
25
- this._private_updateContainerVisibility();
18
+ this.lineGeometry = new LineGeometry();
19
+ this.line = new Line2(this.lineGeometry, this.lineMaterial);
20
+ this.visibleInternal = true;
21
+ this.lastRenderedText = "";
22
+ this.onOrientationChanged = () => {
23
+ this.updateContainerVisibility();
26
24
  };
27
- this._private_onRendering = (renderer) => {
25
+ this.onRendering = (renderer) => {
28
26
  const tintDirty = this.tint.dirty;
29
27
  if (tintDirty) {
30
- this.tint.toThreeColor(this._private_lineMaterial.color);
31
- this._private_lineMaterial.opacity = this.tint.a;
32
- this._private_spriteMaterial.opacity = this.tint.a;
28
+ this.tint.toThreeColor(this.lineMaterial.color);
29
+ this.lineMaterial.opacity = this.tint.a;
30
+ this.spriteMaterial.opacity = this.tint.a;
33
31
  this.tint.setDirtyFalse();
34
32
  }
35
33
  renderer.getDrawingBufferSize(debugResolutionVector);
36
- this._private_lineMaterial.resolution.copy(debugResolutionVector);
34
+ this.lineMaterial.resolution.copy(debugResolutionVector);
37
35
  const { x, y, oppositeX, width, centerX, centerY } = this.constraint.element;
38
36
  if (width <= 0) {
39
37
  return;
40
38
  }
41
- this._private_lineGeometry.setFromPoints([new Vector3(x, y, 0), new Vector3(oppositeX, y, 0)]);
39
+ this.lineGeometry.setFromPoints([new Vector3(x, y, 0), new Vector3(oppositeX, y, 0)]);
42
40
  const nextText = "W: " + width.toFixed(0);
43
- if (nextText !== this._private_lastRenderedText || tintDirty) {
44
- this._private_drawText(nextText);
45
- this._private_textTexture.needsUpdate = true;
46
- this._private_lastRenderedText = nextText;
41
+ if (nextText !== this.lastRenderedText || tintDirty) {
42
+ this.drawText(nextText);
43
+ this.textTexture.needsUpdate = true;
44
+ this.lastRenderedText = nextText;
47
45
  }
48
- this._private_textSprite.position.set(centerX, centerY - 20, 0);
46
+ this.textSprite.position.set(centerX, centerY - 20, 0);
49
47
  };
50
- this._private_line.renderOrder = DEBUG_RENDER_ORDER;
51
- this._private_container.add(this._private_line);
48
+ this.line.renderOrder = DEBUG_RENDER_ORDER;
49
+ this.container.add(this.line);
52
50
  const canvas = document.createElement("canvas");
53
51
  canvas.width = 256;
54
52
  canvas.height = 64;
55
53
  const context = canvas.getContext("2d");
56
54
  if (context === null) {
57
- throw new Error("Failed to get 2D context for debug text");
55
+ throw new Error("UIWidthDebug.constructor: failed to get 2D context for debug text");
58
56
  }
59
- this._private_canvas = canvas;
60
- this._private_context = context;
61
- this._private_drawText("");
62
- this._private_textTexture = new CanvasTexture(canvas);
63
- this._private_spriteMaterial = new SpriteMaterial({
64
- map: this._private_textTexture,
57
+ this.canvas = canvas;
58
+ this.context = context;
59
+ this.drawText("");
60
+ this.textTexture = new CanvasTexture(canvas);
61
+ this.spriteMaterial = new SpriteMaterial({
62
+ map: this.textTexture,
65
63
  transparent: true,
66
64
  depthTest: false,
67
65
  depthWrite: false,
68
66
  });
69
- this._private_textSprite = new Sprite(this._private_spriteMaterial);
70
- this._private_textSprite.renderOrder = DEBUG_RENDER_ORDER;
71
- this._private_textSprite.scale.set(DEBUG_BADGE_SIZE, DEBUG_BADGE_SIZE * 0.25, 1);
72
- this._private_container.add(this._private_textSprite);
73
- this.constraint.layer.signalRendering.on(this._private_onRendering);
74
- this.constraint.layer.signalOrientationChanged.on(this._private_onOrientationChanged);
75
- this.constraint.layer.sceneWrapper.insertCustomObject(this._private_container);
76
- this._private_updateContainerVisibility();
67
+ this.textSprite = new Sprite(this.spriteMaterial);
68
+ this.textSprite.renderOrder = DEBUG_RENDER_ORDER;
69
+ this.textSprite.scale.set(DEBUG_BADGE_SIZE, DEBUG_BADGE_SIZE * 0.25, 1);
70
+ this.container.add(this.textSprite);
71
+ this.constraint.layer.signalRendering.on(this.onRendering);
72
+ this.constraint.layer.signalOrientationChanged.on(this.onOrientationChanged);
73
+ this.constraint.layer.sceneWrapper.insertCustomObject(this.container);
74
+ this.updateContainerVisibility();
77
75
  }
78
76
  get visible() {
79
- return this._private_visibleInternal;
77
+ return this.visibleInternal;
80
78
  }
81
79
  set visible(value) {
82
- if (value !== this._private_visibleInternal) {
83
- this._private_visibleInternal = value;
84
- this._private_updateContainerVisibility();
80
+ if (value !== this.visibleInternal) {
81
+ this.visibleInternal = value;
82
+ this.updateContainerVisibility();
85
83
  }
86
84
  }
87
85
  destroy() {
88
- this.constraint.layer.signalRendering.off(this._private_onRendering);
89
- this.constraint.layer.signalOrientationChanged.off(this._private_onOrientationChanged);
90
- this.constraint.layer.sceneWrapper.removeCustomObject(this._private_container);
91
- this._private_lineGeometry.dispose();
92
- this._private_textTexture.dispose();
86
+ this.constraint.layer.signalRendering.off(this.onRendering);
87
+ this.constraint.layer.signalOrientationChanged.off(this.onOrientationChanged);
88
+ this.constraint.layer.sceneWrapper.removeCustomObject(this.container);
89
+ this.lineGeometry.dispose();
90
+ this.textTexture.dispose();
93
91
  }
94
- _private_updateContainerVisibility() {
92
+ updateContainerVisibility() {
95
93
  const orientationActive = this.constraint.orientation === UIOrientation.ALWAYS ||
96
94
  this.constraint.orientation === this.constraint.layer.orientation;
97
- this._private_container.visible = this._private_visibleInternal && orientationActive;
95
+ this.container.visible = this.visibleInternal && orientationActive;
98
96
  }
99
- _private_drawText(text) {
100
- this._private_context.clearRect(0, 0, this._private_canvas.width, this._private_canvas.height);
101
- this._private_context.fillStyle = DEBUG_BADGE_BACKGROUND_COLOR;
102
- this._private_context.fillRect(0, 0, this._private_canvas.width, this._private_canvas.height);
103
- this._private_context.fillStyle = this.tint.getHexStringRGB();
104
- this._private_context.font = `${DEBUG_BADGE_FONT_SIZE}px ${DEBUG_BADGE_FONT_FAMILY}`;
105
- this._private_context.textAlign = "center";
106
- this._private_context.textBaseline = "middle";
107
- this._private_context.fillText(text, this._private_canvas.width / 2, this._private_canvas.height / 2);
97
+ drawText(text) {
98
+ this.context.clearRect(0, 0, this.canvas.width, this.canvas.height);
99
+ this.context.fillStyle = DEBUG_BADGE_BACKGROUND_COLOR;
100
+ this.context.fillRect(0, 0, this.canvas.width, this.canvas.height);
101
+ this.context.fillStyle = this.tint.getHexStringRGB();
102
+ this.context.font = `${DEBUG_BADGE_FONT_SIZE}px ${DEBUG_BADGE_FONT_FAMILY}`;
103
+ this.context.textAlign = "center";
104
+ this.context.textBaseline = "middle";
105
+ this.context.fillText(text, this.canvas.width / 2, this.canvas.height / 2);
108
106
  }
109
107
  }
110
-
111
- export { UIWidthDebug };
@@ -1,8 +1,8 @@
1
- export { UIAspectDebug } from "./UIAspectDebug";
2
- export { UIHeightDebug } from "./UIHeightDebug";
3
- export { UIHorizontalDistanceDebug } from "./UIHorizontalDistanceDebug";
4
- export { UIHorizontalInterpolationDebug } from "./UIHorizontalInterpolationDebug";
5
- export { UILayerDebug } from "./UILayerDebug";
6
- export { UIVerticalDistanceDebug } from "./UIVerticalDistanceDebug";
7
- export { UIVerticalInterpolationDebug } from "./UIVerticalInterpolationDebug";
8
- export { UIWidthDebug } from "./UIWidthDebug";
1
+ export { UIAspectDebug } from "./UIAspectDebug.js";
2
+ export { UIHeightDebug } from "./UIHeightDebug.js";
3
+ export { UIHorizontalDistanceDebug } from "./UIHorizontalDistanceDebug.js";
4
+ export { UIHorizontalInterpolationDebug } from "./UIHorizontalInterpolationDebug.js";
5
+ export { UILayerDebug } from "./UILayerDebug.js";
6
+ export { UIVerticalDistanceDebug } from "./UIVerticalDistanceDebug.js";
7
+ export { UIVerticalInterpolationDebug } from "./UIVerticalInterpolationDebug.js";
8
+ export { UIWidthDebug } from "./UIWidthDebug.js";
@@ -1,8 +1,8 @@
1
- export { UIAspectDebug } from './UIAspectDebug.js';
2
- export { UIHeightDebug } from './UIHeightDebug.js';
3
- export { UIHorizontalDistanceDebug } from './UIHorizontalDistanceDebug.js';
4
- export { UIHorizontalInterpolationDebug } from './UIHorizontalInterpolationDebug.js';
5
- export { UILayerDebug } from './UILayerDebug.js';
6
- export { UIVerticalDistanceDebug } from './UIVerticalDistanceDebug.js';
7
- export { UIVerticalInterpolationDebug } from './UIVerticalInterpolationDebug.js';
8
- export { UIWidthDebug } from './UIWidthDebug.js';
1
+ export { UIAspectDebug } from "./UIAspectDebug.js";
2
+ export { UIHeightDebug } from "./UIHeightDebug.js";
3
+ export { UIHorizontalDistanceDebug } from "./UIHorizontalDistanceDebug.js";
4
+ export { UIHorizontalInterpolationDebug } from "./UIHorizontalInterpolationDebug.js";
5
+ export { UILayerDebug } from "./UILayerDebug.js";
6
+ export { UIVerticalDistanceDebug } from "./UIVerticalDistanceDebug.js";
7
+ export { UIVerticalInterpolationDebug } from "./UIVerticalInterpolationDebug.js";
8
+ export { UIWidthDebug } from "./UIWidthDebug.js";
@@ -1,11 +1,8 @@
1
- import { Vector2 } from 'three';
2
-
3
- const DEBUG_RENDER_ORDER = 8192;
4
- const DEBUG_LINE_WIDTH = 2;
5
- const DEBUG_BADGE_SIZE = 150;
6
- const DEBUG_BADGE_FONT_SIZE = 30;
7
- const DEBUG_BADGE_FONT_FAMILY = "monospace";
8
- const DEBUG_BADGE_BACKGROUND_COLOR = "rgba(0, 0, 0, 0.8)";
9
- const debugResolutionVector = new Vector2();
10
-
11
- export { DEBUG_BADGE_BACKGROUND_COLOR, DEBUG_BADGE_FONT_FAMILY, DEBUG_BADGE_FONT_SIZE, DEBUG_BADGE_SIZE, DEBUG_LINE_WIDTH, DEBUG_RENDER_ORDER, debugResolutionVector };
1
+ import { Vector2 } from "three";
2
+ export const DEBUG_RENDER_ORDER = 8192;
3
+ export const DEBUG_LINE_WIDTH = 2;
4
+ export const DEBUG_BADGE_SIZE = 150;
5
+ export const DEBUG_BADGE_FONT_SIZE = 30;
6
+ export const DEBUG_BADGE_FONT_FAMILY = "monospace";
7
+ export const DEBUG_BADGE_BACKGROUND_COLOR = "rgba(0, 0, 0, 0.8)";
8
+ export const debugResolutionVector = new Vector2();
@@ -1,6 +1,6 @@
1
- import type { Vector2Like } from "../../core/miscellaneous/math";
2
- import type { UIVector2Config } from "../miscellaneous/miscellaneous";
3
- import { UIBehaviorModule } from "./UIBehaviorModule";
1
+ import type { Vector2Like } from "../../core/miscellaneous/math.js";
2
+ import type { UIVector2Config } from "../miscellaneous/miscellaneous.js";
3
+ import { UIBehaviorModule } from "./UIBehaviorModule.js";
4
4
  /**
5
5
  * Applies constant acceleration to all particles.
6
6
  *
@@ -1,13 +1,12 @@
1
- import { assertValidNumber } from '../../core/miscellaneous/asserts.js';
2
- import { resolveUIVector2Config, BUILTIN_OFFSET_VELOCITY_X, BUILTIN_OFFSET_VELOCITY_Y } from '../miscellaneous/miscellaneous.js';
3
- import { UIBehaviorModule } from './UIBehaviorModule.js';
4
-
1
+ import { assertValidNumber } from "../../core/miscellaneous/asserts.js";
2
+ import { BUILTIN_OFFSET_VELOCITY_X, BUILTIN_OFFSET_VELOCITY_Y, resolveUIVector2Config, } from "../miscellaneous/miscellaneous.js";
3
+ import { UIBehaviorModule } from "./UIBehaviorModule.js";
5
4
  /**
6
5
  * Applies constant acceleration to all particles.
7
6
  *
8
7
  * Adds the direction vector to particle velocity each frame.
9
8
  */
10
- class UIBehaviorDirectionalGravity extends UIBehaviorModule {
9
+ export class UIBehaviorDirectionalGravity extends UIBehaviorModule {
11
10
  /**
12
11
  * @param direction - Acceleration vector in units/second^2
13
12
  */
@@ -15,26 +14,26 @@ class UIBehaviorDirectionalGravity extends UIBehaviorModule {
15
14
  super();
16
15
  /** @internal */
17
16
  this.requiredProperties = { builtin: "Matrix4" };
18
- this._private_directionInternal = resolveUIVector2Config(direction);
19
- assertValidNumber(this._private_directionInternal.x, "UIBehaviorDirectionalGravity.constructor.direction.x");
20
- assertValidNumber(this._private_directionInternal.y, "UIBehaviorDirectionalGravity.constructor.direction.y");
17
+ this.directionInternal = resolveUIVector2Config(direction);
18
+ assertValidNumber(this.directionInternal.x, "UIBehaviorDirectionalGravity.constructor.direction.x");
19
+ assertValidNumber(this.directionInternal.y, "UIBehaviorDirectionalGravity.constructor.direction.y");
21
20
  }
22
21
  /** Acceleration vector in units/second^2 */
23
22
  get direction() {
24
- return this._private_directionInternal;
23
+ return this.directionInternal;
25
24
  }
26
25
  /** Acceleration vector in units/second^2 */
27
26
  set direction(value) {
28
- this._private_directionInternal = resolveUIVector2Config(value);
29
- assertValidNumber(this._private_directionInternal.x, "UIBehaviorDirectionalGravity.direction.x");
30
- assertValidNumber(this._private_directionInternal.y, "UIBehaviorDirectionalGravity.direction.y");
27
+ this.directionInternal = resolveUIVector2Config(value);
28
+ assertValidNumber(this.directionInternal.x, "UIBehaviorDirectionalGravity.direction.x");
29
+ assertValidNumber(this.directionInternal.y, "UIBehaviorDirectionalGravity.direction.y");
31
30
  }
32
31
  /** @internal */
33
32
  update(properties, instanceCount, deltaTime) {
34
33
  const { builtin } = properties;
35
34
  const { array, itemSize } = builtin;
36
- const offsetX = this._private_directionInternal.x * deltaTime;
37
- const offsetY = this._private_directionInternal.y * deltaTime;
35
+ const offsetX = this.directionInternal.x * deltaTime;
36
+ const offsetY = this.directionInternal.y * deltaTime;
38
37
  for (let i = 0; i < instanceCount; i++) {
39
38
  const itemOffset = i * itemSize;
40
39
  array[itemOffset + BUILTIN_OFFSET_VELOCITY_X] += offsetX;
@@ -43,5 +42,3 @@ class UIBehaviorDirectionalGravity extends UIBehaviorModule {
43
42
  builtin.needsUpdate = true;
44
43
  }
45
44
  }
46
-
47
- export { UIBehaviorDirectionalGravity };
@@ -1,5 +1,5 @@
1
1
  import type { InstancedBufferAttribute } from "three";
2
- import type { UIPropertyName } from "../../core/miscellaneous/generic-plane/shared";
2
+ import type { UIPropertyName } from "../../core/miscellaneous/generic-plane/shared.js";
3
3
  /**
4
4
  * Base class for particle behavior modules.
5
5
  *
@@ -3,7 +3,5 @@
3
3
  *
4
4
  * Behavior modules update particle properties each frame.
5
5
  */
6
- class UIBehaviorModule {
6
+ export class UIBehaviorModule {
7
7
  }
8
-
9
- export { UIBehaviorModule };
@@ -1,6 +1,6 @@
1
- import type { Vector2Like } from "../../core/miscellaneous/math";
2
- import { type UIRange, type UIRangeConfig, type UIVector2Config } from "../miscellaneous/miscellaneous";
3
- import { UIBehaviorModule } from "./UIBehaviorModule";
1
+ import type { Vector2Like } from "../../core/miscellaneous/math.js";
2
+ import { type UIRange, type UIRangeConfig, type UIVector2Config } from "../miscellaneous/miscellaneous.js";
3
+ import { UIBehaviorModule } from "./UIBehaviorModule.js";
4
4
  /**
5
5
  * Applies gravity attraction toward a point.
6
6
  *