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,13 +1,13 @@
1
- import type { UILayer } from "../../layers/UILayer/UILayer";
2
- import { UIColor } from "../../miscellaneous/color/UIColor";
3
- import type { UIColorConfig } from "../../miscellaneous/color/UIColor.Internal";
4
- import { UIInsets } from "../../miscellaneous/insets/UIInsets";
5
- import type { UIInsetsConfig } from "../../miscellaneous/insets/UIInsets.Internal";
6
- import { UITextureView } from "../../miscellaneous/texture/UITextureView";
7
- import type { UITextureConfig } from "../../miscellaneous/texture/UITextureView.Internal";
8
- import { UIElement } from "../UIElement/UIElement";
9
- import type { UINineSliceOptions } from "./UINineSlice.Internal";
10
- import { UINineSliceRegionMode } from "./UINineSlice.Internal";
1
+ import type { UILayer } from "../../layers/UILayer/UILayer.js";
2
+ import { UIColor } from "../../miscellaneous/color/UIColor.js";
3
+ import type { UIColorConfig } from "../../miscellaneous/color/UIColor.Internal.js";
4
+ import { UIInsets } from "../../miscellaneous/insets/UIInsets.js";
5
+ import type { UIInsetsConfig } from "../../miscellaneous/insets/UIInsets.Internal.js";
6
+ import { UITextureView } from "../../miscellaneous/texture/UITextureView.js";
7
+ import type { UITextureConfig } from "../../miscellaneous/texture/UITextureView.Internal.js";
8
+ import { UIElement } from "../UIElement/UIElement.js";
9
+ import type { UINineSliceOptions } from "./UINineSlice.Internal.js";
10
+ import { UINineSliceRegionMode } from "./UINineSlice.Internal.js";
11
11
  /** Scalable textured image preserving border regions */
12
12
  export declare class UINineSlice extends UIElement {
13
13
  /** Texture displayed by this element */
@@ -49,8 +49,8 @@ export declare class UINineSlice extends UIElement {
49
49
  set sliceBorders(value: UIInsetsConfig);
50
50
  /** Region size. Interpretation depends on regionMode. */
51
51
  set sliceRegions(value: UIInsetsConfig);
52
- /** Removes nine slice and frees resources */
53
- destroy(): void;
52
+ /** Frees resources of the nine slice */
53
+ protected destroyInternal(): void;
54
54
  protected setPlaneTransform(): void;
55
55
  private calculateSliceBordersForShader;
56
56
  private calculateSliceRegionsForShader;
@@ -1,14 +1,13 @@
1
- import { Vector4 } from 'three';
2
- import { UIColor } from '../../miscellaneous/color/UIColor.js';
3
- import { computeTrimmedTransformMatrix } from '../../miscellaneous/computeTransform.js';
4
- import { UIInsets } from '../../miscellaneous/insets/UIInsets.js';
5
- import { UITextureView } from '../../miscellaneous/texture/UITextureView.js';
6
- import source from '../../shaders/UINineSlice.glsl.js';
7
- import { UIElement } from '../UIElement/UIElement.js';
8
- import { NINE_SLICE_DEFAULT_BORDER, NINE_SLICE_DEFAULT_REGION_MODE, UINineSliceRegionMode } from './UINineSlice.Internal.js';
9
-
1
+ import { Vector4 } from "three";
2
+ import { UIColor } from "../../miscellaneous/color/UIColor.js";
3
+ import { computeTrimmedTransformMatrix } from "../../miscellaneous/computeTransform.js";
4
+ import { UIInsets } from "../../miscellaneous/insets/UIInsets.js";
5
+ import { UITextureView } from "../../miscellaneous/texture/UITextureView.js";
6
+ import source from "../../shaders/UINineSlice.js";
7
+ import { UIElement } from "../UIElement/UIElement.js";
8
+ import { NINE_SLICE_DEFAULT_BORDER, NINE_SLICE_DEFAULT_REGION_MODE, UINineSliceRegionMode, } from "./UINineSlice.Internal.js";
10
9
  /** Scalable textured image preserving border regions */
11
- class UINineSlice extends UIElement {
10
+ export class UINineSlice extends UIElement {
12
11
  /**
13
12
  * Creates a new UINineSlice instance.
14
13
  *
@@ -36,88 +35,89 @@ class UINineSlice extends UIElement {
36
35
  sliceBorders: sliceBordersVector,
37
36
  sliceRegions: sliceRegionsVector,
38
37
  }, options);
39
- this._private_regionModeDirty = true;
40
- this._private_sliceBordersVector = new Vector4();
41
- this._private_sliceRegionsVector = new Vector4();
42
- this._private_textureDimensionsDirty = true;
43
- this._private_onTextureDimensionsChanged = () => {
44
- this._private_textureDimensionsDirty = true;
38
+ this.regionModeDirty = true;
39
+ this.sliceBordersVector = new Vector4();
40
+ this.sliceRegionsVector = new Vector4();
41
+ this.textureDimensionsDirty = true;
42
+ this.onTextureDimensionsChanged = () => {
43
+ this.textureDimensionsDirty = true;
45
44
  };
46
45
  this.texture = textureView;
47
- this._private_textureTransform = textureTransform;
48
- this._private_colorInternal = color;
49
- this._private_sliceBordersInternal = sliceBorders;
50
- this._private_sliceRegionsInternal = sliceRegions;
51
- this._private_regionModeInternal = regionMode;
52
- this._private_sliceBordersVector = sliceBordersVector;
53
- this._private_sliceRegionsVector = sliceRegionsVector;
54
- this._private_lastElementWidth = this.width;
55
- this._private_lastElementHeight = this.height;
56
- this.texture.signalDimensionsChanged.on(this._private_onTextureDimensionsChanged);
46
+ this.textureTransform = textureTransform;
47
+ this.colorInternal = color;
48
+ this.sliceBordersInternal = sliceBorders;
49
+ this.sliceRegionsInternal = sliceRegions;
50
+ this.regionModeInternal = regionMode;
51
+ this.sliceBordersVector = sliceBordersVector;
52
+ this.sliceRegionsVector = sliceRegionsVector;
53
+ this.lastElementWidth = this.width;
54
+ this.lastElementHeight = this.height;
55
+ this.texture.signalDimensionsChanged.on(this.onTextureDimensionsChanged);
57
56
  }
58
57
  /** Multiplicative tint. Alpha channel controls opacity. */
59
58
  get color() {
60
- return this._private_colorInternal;
59
+ return this.colorInternal;
61
60
  }
62
61
  /** Controls how sliceRegions values are interpreted */
63
62
  get regionMode() {
64
- return this._private_regionModeInternal;
63
+ return this.regionModeInternal;
65
64
  }
66
65
  /** Border size in normalized texture coordinates (0 to 1) */
67
66
  get sliceBorders() {
68
- return this._private_sliceBordersInternal;
67
+ return this.sliceBordersInternal;
69
68
  }
70
69
  /** Region size. Interpretation depends on regionMode. */
71
70
  get sliceRegions() {
72
- return this._private_sliceRegionsInternal;
71
+ return this.sliceRegionsInternal;
73
72
  }
74
73
  /** Multiplicative tint. Alpha channel controls opacity. */
75
74
  set color(value) {
76
- this._private_colorInternal.set(value);
75
+ this.colorInternal.set(value);
77
76
  }
78
77
  /** Controls how sliceRegions values are interpreted */
79
78
  set regionMode(value) {
80
- if (this._private_regionModeInternal !== value) {
81
- this._private_regionModeInternal = value;
82
- this._private_regionModeDirty = true;
79
+ if (this.regionModeInternal !== value) {
80
+ this.regionModeInternal = value;
81
+ this.regionModeDirty = true;
83
82
  }
84
83
  }
85
84
  /** Border size in normalized texture coordinates (0 to 1) */
86
85
  set sliceBorders(value) {
87
- this._private_sliceBordersInternal.set(value);
86
+ this.sliceBordersInternal.set(value);
88
87
  }
89
88
  /** Region size. Interpretation depends on regionMode. */
90
89
  set sliceRegions(value) {
91
- this._private_sliceRegionsInternal.set(value);
90
+ this.sliceRegionsInternal.set(value);
92
91
  }
93
- /** Removes nine slice and frees resources */
94
- destroy() {
95
- this.texture.signalDimensionsChanged.off(this._private_onTextureDimensionsChanged);
96
- super.destroy();
92
+ /** Frees resources of the nine slice */
93
+ destroyInternal() {
94
+ this.texture.signalDimensionsChanged.off(this.onTextureDimensionsChanged);
95
+ super.destroyInternal();
97
96
  }
98
97
  setPlaneTransform() {
99
98
  let properties;
100
- const sliceBordersDirty = this._private_textureDimensionsDirty || this._private_sliceBordersInternal.dirty || this.texture.trimDirty;
99
+ const sliceBordersDirty = this.textureDimensionsDirty || this.sliceBordersInternal.dirty || this.texture.trimDirty;
101
100
  if (sliceBordersDirty) {
102
101
  properties ?? (properties = {});
103
- properties["sliceBorders"] = this._private_calculateSliceBordersForShader(this._private_sliceBordersVector);
104
- this._private_sliceBordersInternal.setDirtyFalse();
105
- this._private_textureDimensionsDirty = false;
102
+ properties["sliceBorders"] = this.calculateSliceBordersForShader(this.sliceBordersVector);
103
+ this.sliceBordersInternal.setDirtyFalse();
104
+ this.textureDimensionsDirty = false;
106
105
  }
107
- const sliceRegionsDirty = this._private_sliceRegionsInternal.dirty || this._private_regionModeDirty ||
108
- (this._private_regionModeInternal === UINineSliceRegionMode.WORLD &&
109
- this._private_checkElementDimensionsDirty());
106
+ const sliceRegionsDirty = this.sliceRegionsInternal.dirty ||
107
+ this.regionModeDirty ||
108
+ (this.regionModeInternal === UINineSliceRegionMode.WORLD &&
109
+ this.checkElementDimensionsDirty());
110
110
  if (sliceRegionsDirty) {
111
111
  properties ?? (properties = {});
112
- properties["sliceRegions"] = this._private_calculateSliceRegionsForShader(this._private_sliceRegionsVector);
113
- this._private_sliceRegionsInternal.setDirtyFalse();
114
- this._private_regionModeDirty = false;
115
- this._private_setElementDimensionsDirtyFalse();
112
+ properties["sliceRegions"] = this.calculateSliceRegionsForShader(this.sliceRegionsVector);
113
+ this.sliceRegionsInternal.setDirtyFalse();
114
+ this.regionModeDirty = false;
115
+ this.setElementDimensionsDirtyFalse();
116
116
  }
117
- if (this._private_colorInternal.dirty) {
117
+ if (this.colorInternal.dirty) {
118
118
  properties ?? (properties = {});
119
- properties["color"] = this._private_colorInternal;
120
- this._private_colorInternal.setDirtyFalse();
119
+ properties["color"] = this.colorInternal;
120
+ this.colorInternal.setDirtyFalse();
121
121
  }
122
122
  if (this.texture.textureDirty) {
123
123
  properties ?? (properties = {});
@@ -126,7 +126,7 @@ class UINineSlice extends UIElement {
126
126
  }
127
127
  if (this.texture.uvTransformDirty) {
128
128
  properties ?? (properties = {});
129
- properties["textureTransform"] = this.texture.calculateUVTransform(this._private_textureTransform);
129
+ properties["textureTransform"] = this.texture.calculateUVTransform(this.textureTransform);
130
130
  this.texture.setUVTransformDirtyFalse();
131
131
  }
132
132
  if (properties) {
@@ -139,12 +139,12 @@ class UINineSlice extends UIElement {
139
139
  if (isTransformDirty) {
140
140
  const micro = this.micro;
141
141
  const textureTrim = this.texture.trim;
142
- this.sceneWrapper.setTransform(this.planeHandler, computeTrimmedTransformMatrix(this.x, this.y, this.width, this.height, this.zIndex, micro.x, micro.y, micro.anchorX, micro.anchorY, micro.scaleX, micro.scaleY, micro.rotation, micro.anchorMode, textureTrim.left, textureTrim.right, textureTrim.top, textureTrim.bottom));
142
+ this.sceneWrapper.setTransform(this.planeHandler, computeTrimmedTransformMatrix(this.x, this.y, this.width, this.height, this.renderDepth, micro.x, micro.y, micro.anchorX, micro.anchorY, micro.scaleX, micro.scaleY, micro.rotation, micro.anchorMode, textureTrim.left, textureTrim.right, textureTrim.top, textureTrim.bottom));
143
143
  this.micro.setDirtyFalse();
144
144
  this.texture.setTrimDirtyFalse();
145
145
  }
146
146
  }
147
- _private_calculateSliceBordersForShader(result) {
147
+ calculateSliceBordersForShader(result) {
148
148
  const sourceWidth = this.texture.width;
149
149
  const sourceHeight = this.texture.height;
150
150
  const trim = this.texture.trim;
@@ -156,33 +156,31 @@ class UINineSlice extends UIElement {
156
156
  const trimNBottom = trim.bottom / sourceHeight;
157
157
  const trimmedWidthNorm = trimmedWidth / sourceWidth;
158
158
  const trimmedHeightNorm = trimmedHeight / sourceHeight;
159
- const srcLeft = this._private_sliceBordersInternal.left;
160
- const srcRight = this._private_sliceBordersInternal.right;
161
- const srcTop = this._private_sliceBordersInternal.top;
162
- const srcBottom = this._private_sliceBordersInternal.bottom;
159
+ const srcLeft = this.sliceBordersInternal.left;
160
+ const srcRight = this.sliceBordersInternal.right;
161
+ const srcTop = this.sliceBordersInternal.top;
162
+ const srcBottom = this.sliceBordersInternal.bottom;
163
163
  const left = Math.max(0, srcLeft - trimNLeft) / trimmedWidthNorm;
164
164
  const right = Math.max(0, srcRight - trimNRight) / trimmedWidthNorm;
165
165
  const top = Math.max(0, srcTop - trimNTop) / trimmedHeightNorm;
166
166
  const bottom = Math.max(0, srcBottom - trimNBottom) / trimmedHeightNorm;
167
167
  return result.set(Math.min(1, left), Math.min(1, right), Math.min(1, top), Math.min(1, bottom));
168
168
  }
169
- _private_calculateSliceRegionsForShader(result) {
170
- if (this._private_regionModeInternal === UINineSliceRegionMode.NORMALIZED) {
171
- return result.set(this._private_sliceRegionsInternal.left, this._private_sliceRegionsInternal.right, this._private_sliceRegionsInternal.top, this._private_sliceRegionsInternal.bottom);
169
+ calculateSliceRegionsForShader(result) {
170
+ if (this.regionModeInternal === UINineSliceRegionMode.NORMALIZED) {
171
+ return result.set(this.sliceRegionsInternal.left, this.sliceRegionsInternal.right, this.sliceRegionsInternal.top, this.sliceRegionsInternal.bottom);
172
172
  }
173
173
  const width = this.width;
174
174
  const height = this.height;
175
- return result.set(this._private_sliceRegionsInternal.left / width, this._private_sliceRegionsInternal.right / width, this._private_sliceRegionsInternal.top / height, this._private_sliceRegionsInternal.bottom / height);
175
+ return result.set(this.sliceRegionsInternal.left / width, this.sliceRegionsInternal.right / width, this.sliceRegionsInternal.top / height, this.sliceRegionsInternal.bottom / height);
176
176
  }
177
- _private_checkElementDimensionsDirty() {
177
+ checkElementDimensionsDirty() {
178
178
  return (this.solverWrapper.dirty &&
179
- (this._private_lastElementWidth !== Math.round(this.width) ||
180
- this._private_lastElementHeight !== Math.round(this.height)));
179
+ (this.lastElementWidth !== Math.round(this.width) ||
180
+ this.lastElementHeight !== Math.round(this.height)));
181
181
  }
182
- _private_setElementDimensionsDirtyFalse() {
183
- this._private_lastElementWidth = Math.round(this.width);
184
- this._private_lastElementHeight = Math.round(this.height);
182
+ setElementDimensionsDirtyFalse() {
183
+ this.lastElementWidth = Math.round(this.width);
184
+ this.lastElementHeight = Math.round(this.height);
185
185
  }
186
186
  }
187
-
188
- export { UINineSlice };
@@ -1,6 +1,6 @@
1
- import type { UIColorConfig } from "../../miscellaneous/color/UIColor.Internal";
2
- import type { UIProgressMaskFunction } from "../../miscellaneous/mask-function/UIProgressMaskFunction";
3
- import type { UIElementOptions } from "../UIElement/UIElement.Internal";
1
+ import type { UIColorConfig } from "../../miscellaneous/color/UIColor.Internal.js";
2
+ import type { UIProgressMaskFunction } from "../../miscellaneous/mask-function/UIProgressMaskFunction.js";
3
+ import type { UIElementOptions } from "../UIElement/UIElement.Internal.js";
4
4
  /** Configuration options for UIProgress */
5
5
  export interface UIProgressOptions extends UIElementOptions {
6
6
  /** Multiplicative tint */
@@ -11,4 +11,3 @@ export interface UIProgressOptions extends UIElementOptions {
11
11
  progress: number;
12
12
  }
13
13
  export declare const PROGRESS_DEFAULT_VALUE = 1;
14
- export declare function simplifyGLSLSource(source: string): string;
@@ -1,3 +1 @@
1
- const PROGRESS_DEFAULT_VALUE = 1;
2
-
3
- export { PROGRESS_DEFAULT_VALUE };
1
+ export const PROGRESS_DEFAULT_VALUE = 1;
@@ -1,11 +1,11 @@
1
- import type { UILayer } from "../../layers/UILayer/UILayer";
2
- import { UIColor } from "../../miscellaneous/color/UIColor";
3
- import type { UIColorConfig } from "../../miscellaneous/color/UIColor.Internal";
4
- import type { UIProgressMaskFunction } from "../../miscellaneous/mask-function/UIProgressMaskFunction";
5
- import { UITextureView } from "../../miscellaneous/texture/UITextureView";
6
- import type { UITextureConfig } from "../../miscellaneous/texture/UITextureView.Internal";
7
- import { UIElement } from "../UIElement/UIElement";
8
- import type { UIProgressOptions } from "./UIProgress.Internal";
1
+ import type { UILayer } from "../../layers/UILayer/UILayer.js";
2
+ import { UIColor } from "../../miscellaneous/color/UIColor.js";
3
+ import type { UIColorConfig } from "../../miscellaneous/color/UIColor.Internal.js";
4
+ import type { UIProgressMaskFunction } from "../../miscellaneous/mask-function/UIProgressMaskFunction.js";
5
+ import { UITextureView } from "../../miscellaneous/texture/UITextureView.js";
6
+ import type { UITextureConfig } from "../../miscellaneous/texture/UITextureView.Internal.js";
7
+ import { UIElement } from "../UIElement/UIElement.js";
8
+ import type { UIProgressOptions } from "./UIProgress.Internal.js";
9
9
  /** Progress bar with customizable fill direction */
10
10
  export declare class UIProgress extends UIElement {
11
11
  /** Texture displayed by this element */
@@ -39,8 +39,8 @@ export declare class UIProgress extends UIElement {
39
39
  set maskFunction(value: UIProgressMaskFunction);
40
40
  /** Progress from 0 (empty) to 1 (full). Clamped. */
41
41
  set progress(value: number);
42
- /** Removes element and frees resources */
43
- destroy(): void;
42
+ /** Frees resources of the progress bar */
43
+ protected destroyInternal(): void;
44
44
  protected setPlaneTransform(): void;
45
45
  private readonly onTextureDimensionsChanged;
46
46
  private rebuildPlane;
@@ -1,17 +1,16 @@
1
- import { MathUtils } from 'three';
2
- import { assertValidNumber } from '../../miscellaneous/asserts.js';
3
- import { UIColor } from '../../miscellaneous/color/UIColor.js';
4
- import { computeTrimmedTransformMatrix } from '../../miscellaneous/computeTransform.js';
5
- import { UIProgressMaskFunctionDirectional } from '../../miscellaneous/mask-function/UIProgressMaskFunctionDirectional.js';
6
- import { UITextureView } from '../../miscellaneous/texture/UITextureView.js';
7
- import { isUIModeVisible } from '../../miscellaneous/UIMode.js';
8
- import source from '../../shaders/UIProgress.glsl.js';
9
- import { UIElement } from '../UIElement/UIElement.js';
10
- import { blendModeToFactor, packHSL } from '../UIElement/UIElement.Internal.js';
11
- import { PROGRESS_DEFAULT_VALUE } from './UIProgress.Internal.js';
12
-
1
+ import { MathUtils } from "three";
2
+ import { assertValidNumber } from "../../miscellaneous/asserts.js";
3
+ import { UIColor } from "../../miscellaneous/color/UIColor.js";
4
+ import { computeTrimmedTransformMatrix } from "../../miscellaneous/computeTransform.js";
5
+ import { UIProgressMaskFunctionDirectional } from "../../miscellaneous/mask-function/UIProgressMaskFunctionDirectional.js";
6
+ import { UITextureView } from "../../miscellaneous/texture/UITextureView.js";
7
+ import { isUIModeVisible } from "../../miscellaneous/UIMode.js";
8
+ import source from "../../shaders/UIProgress.js";
9
+ import { UIElement } from "../UIElement/UIElement.js";
10
+ import { blendModeToFactor, packHSL } from "../UIElement/UIElement.Internal.js";
11
+ import { PROGRESS_DEFAULT_VALUE } from "./UIProgress.Internal.js";
13
12
  /** Progress bar with customizable fill direction */
14
- class UIProgress extends UIElement {
13
+ export class UIProgress extends UIElement {
15
14
  /**
16
15
  * Creates a new UIProgress instance.
17
16
  *
@@ -41,66 +40,66 @@ class UIProgress extends UIElement {
41
40
  progress,
42
41
  ...maskFunction.enumerateProperties(),
43
42
  }, options);
44
- this._private_progressDirty = false;
45
- this._private_textureResolutionDirty = false;
46
- this._private_onTextureDimensionsChanged = (width, height) => {
43
+ this.progressDirty = false;
44
+ this.textureResolutionDirty = false;
45
+ this.onTextureDimensionsChanged = (width, height) => {
47
46
  if (this.width !== width || this.height !== height) {
48
47
  this.width = width;
49
48
  this.height = height;
50
- this._private_textureResolutionDirty = true;
49
+ this.textureResolutionDirty = true;
51
50
  }
52
51
  };
53
52
  this.texture = textureView;
54
- this._private_textureTransform = textureTransform;
55
- this._private_textureResolution = textureResolution;
56
- this._private_colorInternal = color;
57
- this._private_progressInternal = progress;
58
- this._private_maskFunctionInternal = maskFunction;
59
- this.texture.signalDimensionsChanged.on(this._private_onTextureDimensionsChanged);
53
+ this.textureTransform = textureTransform;
54
+ this.textureResolution = textureResolution;
55
+ this.colorInternal = color;
56
+ this.progressInternal = progress;
57
+ this.maskFunctionInternal = maskFunction;
58
+ this.texture.signalDimensionsChanged.on(this.onTextureDimensionsChanged);
60
59
  }
61
60
  /** Multiplicative tint. Alpha channel controls opacity. */
62
61
  get color() {
63
- return this._private_colorInternal;
62
+ return this.colorInternal;
64
63
  }
65
64
  /** Function controlling fill direction and shape */
66
65
  get maskFunction() {
67
- return this._private_maskFunctionInternal;
66
+ return this.maskFunctionInternal;
68
67
  }
69
68
  /** Progress from 0 (empty) to 1 (full) */
70
69
  get progress() {
71
- return this._private_progressInternal;
70
+ return this.progressInternal;
72
71
  }
73
72
  /** Multiplicative tint. Alpha channel controls opacity. */
74
73
  set color(value) {
75
- this._private_colorInternal.set(value);
74
+ this.colorInternal.set(value);
76
75
  }
77
76
  /** Function controlling fill direction and shape */
78
77
  set maskFunction(value) {
79
- if (this._private_maskFunctionInternal !== value) {
80
- this._private_maskFunctionInternal = value;
81
- this._private_rebuildPlane();
78
+ if (this.maskFunctionInternal !== value) {
79
+ this.maskFunctionInternal = value;
80
+ this.rebuildPlane();
82
81
  }
83
82
  }
84
83
  /** Progress from 0 (empty) to 1 (full). Clamped. */
85
84
  set progress(value) {
86
85
  assertValidNumber(value, "UIProgress.progress");
87
86
  value = MathUtils.clamp(value, 0, 1);
88
- if (this._private_progressInternal !== value) {
89
- this._private_progressInternal = value;
90
- this._private_progressDirty = true;
87
+ if (this.progressInternal !== value) {
88
+ this.progressInternal = value;
89
+ this.progressDirty = true;
91
90
  }
92
91
  }
93
- /** Removes element and frees resources */
94
- destroy() {
95
- this.texture.signalDimensionsChanged.off(this._private_onTextureDimensionsChanged);
96
- super.destroy();
92
+ /** Frees resources of the progress bar */
93
+ destroyInternal() {
94
+ this.texture.signalDimensionsChanged.off(this.onTextureDimensionsChanged);
95
+ super.destroyInternal();
97
96
  }
98
97
  setPlaneTransform() {
99
98
  let properties;
100
- if (this._private_colorInternal.dirty) {
99
+ if (this.colorInternal.dirty) {
101
100
  properties ?? (properties = {});
102
- properties["color"] = this._private_colorInternal;
103
- this._private_colorInternal.setDirtyFalse();
101
+ properties["color"] = this.colorInternal;
102
+ this.colorInternal.setDirtyFalse();
104
103
  }
105
104
  if (this.texture.textureDirty) {
106
105
  properties ?? (properties = {});
@@ -109,18 +108,18 @@ class UIProgress extends UIElement {
109
108
  }
110
109
  if (this.texture.uvTransformDirty) {
111
110
  properties ?? (properties = {});
112
- properties["textureTransform"] = this.texture.calculateUVTransform(this._private_textureTransform);
111
+ properties["textureTransform"] = this.texture.calculateUVTransform(this.textureTransform);
113
112
  this.texture.setUVTransformDirtyFalse();
114
113
  }
115
- if (this._private_progressDirty) {
114
+ if (this.progressDirty) {
116
115
  properties ?? (properties = {});
117
- properties["progress"] = this._private_progressInternal;
118
- this._private_progressDirty = false;
116
+ properties["progress"] = this.progressInternal;
117
+ this.progressDirty = false;
119
118
  }
120
- if (this._private_textureResolutionDirty) {
119
+ if (this.textureResolutionDirty) {
121
120
  properties ?? (properties = {});
122
- properties["textureResolution"] = this.texture.getResolution(this._private_textureResolution);
123
- this._private_textureResolutionDirty = false;
121
+ properties["textureResolution"] = this.texture.getResolution(this.textureResolution);
122
+ this.textureResolutionDirty = false;
124
123
  }
125
124
  if (this.maskFunction.dirty) {
126
125
  properties ?? (properties = {});
@@ -140,32 +139,30 @@ class UIProgress extends UIElement {
140
139
  if (isTransformDirty) {
141
140
  const micro = this.micro;
142
141
  const textureTrim = this.texture.trim;
143
- this.sceneWrapper.setTransform(this.planeHandler, computeTrimmedTransformMatrix(this.x, this.y, this.width, this.height, this.zIndex, micro.x, micro.y, micro.anchorX, micro.anchorY, micro.scaleX, micro.scaleY, micro.rotation, micro.anchorMode, textureTrim.left, textureTrim.right, textureTrim.top, textureTrim.bottom));
142
+ this.sceneWrapper.setTransform(this.planeHandler, computeTrimmedTransformMatrix(this.x, this.y, this.width, this.height, this.renderDepth, micro.x, micro.y, micro.anchorX, micro.anchorY, micro.scaleX, micro.scaleY, micro.rotation, micro.anchorMode, textureTrim.left, textureTrim.right, textureTrim.top, textureTrim.bottom));
144
143
  this.micro.setDirtyFalse();
145
144
  this.texture.setTrimDirtyFalse();
146
145
  }
147
146
  }
148
- _private_rebuildPlane() {
147
+ rebuildPlane() {
149
148
  this.sceneWrapper.destroyPlane(this.planeHandler);
150
149
  const micro = this.micro;
151
150
  const textureTrim = this.texture.trim;
152
- this.planeHandler = this.sceneWrapper.createPlane(this._private_maskFunctionInternal.source + source, {
151
+ this.planeHandler = this.sceneWrapper.createPlane(this.maskFunctionInternal.source + source, {
153
152
  texture: this.texture.texture,
154
- textureTransform: this.texture.calculateUVTransform(this._private_textureTransform),
155
- textureResolution: this.texture.getResolution(this._private_textureResolution),
156
- color: this._private_colorInternal,
157
- progress: this._private_progressInternal,
158
- ...this._private_maskFunctionInternal.enumerateProperties(),
159
- }, computeTrimmedTransformMatrix(this.x, this.y, this.width, this.height, this.zIndex, micro.x, micro.y, micro.anchorX, micro.anchorY, micro.scaleX, micro.scaleY, micro.rotation, micro.anchorMode, textureTrim.left, textureTrim.right, textureTrim.top, textureTrim.bottom), isUIModeVisible(this.mode), this.transparencyMode, blendModeToFactor(this.blendMode), packHSL({ h: 0, s: 0, l: 0 }, this.hue, this.saturation, this.lightness));
160
- this._private_colorInternal.setDirtyFalse();
153
+ textureTransform: this.texture.calculateUVTransform(this.textureTransform),
154
+ textureResolution: this.texture.getResolution(this.textureResolution),
155
+ color: this.colorInternal,
156
+ progress: this.progressInternal,
157
+ ...this.maskFunctionInternal.enumerateProperties(),
158
+ }, computeTrimmedTransformMatrix(this.x, this.y, this.width, this.height, this.renderDepth, micro.x, micro.y, micro.anchorX, micro.anchorY, micro.scaleX, micro.scaleY, micro.rotation, micro.anchorMode, textureTrim.left, textureTrim.right, textureTrim.top, textureTrim.bottom), isUIModeVisible(this.mode), this.transparencyMode, blendModeToFactor(this.blendMode), packHSL({ h: 0, s: 0, l: 0 }, this.hue, this.saturation, this.lightness));
159
+ this.colorInternal.setDirtyFalse();
161
160
  this.texture.setTextureDirtyFalse();
162
161
  this.texture.setUVTransformDirtyFalse();
163
162
  this.texture.setTrimDirtyFalse();
164
- this._private_progressDirty = false;
165
- this._private_textureResolutionDirty = false;
166
- this._private_maskFunctionInternal.setDirtyFalse();
163
+ this.progressDirty = false;
164
+ this.textureResolutionDirty = false;
165
+ this.maskFunctionInternal.setDirtyFalse();
167
166
  this.micro.setDirtyFalse();
168
167
  }
169
168
  }
170
-
171
- export { UIProgress };
@@ -1,7 +1,7 @@
1
1
  import type { Camera, Scene } from "three";
2
- import { UIColor } from "../../miscellaneous/color/UIColor";
3
- import type { UIColorConfig } from "../../miscellaneous/color/UIColor.Internal";
4
- import type { UIElementOptions } from "../UIElement/UIElement.Internal";
2
+ import { UIColor } from "../../miscellaneous/color/UIColor.js";
3
+ import type { UIColorConfig } from "../../miscellaneous/color/UIColor.Internal.js";
4
+ import type { UIElementOptions } from "../UIElement/UIElement.Internal.js";
5
5
  /** Controls when scene re-renders */
6
6
  export declare enum UISceneUpdateMode {
7
7
  /** Re-render every frame */
@@ -1,7 +1,6 @@
1
- import { UIColor } from '../../miscellaneous/color/UIColor.js';
2
-
1
+ import { UIColor } from "../../miscellaneous/color/UIColor.js";
3
2
  /** Controls when scene re-renders */
4
- var UISceneUpdateMode;
3
+ export var UISceneUpdateMode;
5
4
  (function (UISceneUpdateMode) {
6
5
  /** Re-render every frame */
7
6
  UISceneUpdateMode[UISceneUpdateMode["EVERY_FRAME"] = 1] = "EVERY_FRAME";
@@ -14,14 +13,12 @@ var UISceneUpdateMode;
14
13
  /** Re-render only via requestUpdate() */
15
14
  UISceneUpdateMode[UISceneUpdateMode["MANUAL"] = 5] = "MANUAL";
16
15
  })(UISceneUpdateMode || (UISceneUpdateMode = {}));
17
- const SCENE_DEFAULT_RESOLUTION_FACTOR = 0.5;
18
- const SCENE_MIN_RESOLUTION_FACTOR = 0.1;
19
- const SCENE_MAX_RESOLUTION_FACTOR = 2;
20
- const SCENE_DEFAULT_CAMERA_FOV = 60;
21
- const SCENE_DEFAULT_CAMERA_NEAR = 0.1;
22
- const SCENE_DEFAULT_CAMERA_FAR = 100;
23
- const SCENE_DEFAULT_UPDATE_MODE = UISceneUpdateMode.ON_PROPERTIES_CHANGE;
24
- const SCENE_DEFAULT_CLEAR_COLOR = new UIColor(0, 0, 0, 1);
25
- const SCENE_DEFAULT_USE_DEPTH = true;
26
-
27
- export { SCENE_DEFAULT_CAMERA_FAR, SCENE_DEFAULT_CAMERA_FOV, SCENE_DEFAULT_CAMERA_NEAR, SCENE_DEFAULT_CLEAR_COLOR, SCENE_DEFAULT_RESOLUTION_FACTOR, SCENE_DEFAULT_UPDATE_MODE, SCENE_DEFAULT_USE_DEPTH, SCENE_MAX_RESOLUTION_FACTOR, SCENE_MIN_RESOLUTION_FACTOR, UISceneUpdateMode };
16
+ export const SCENE_DEFAULT_RESOLUTION_FACTOR = 0.5;
17
+ export const SCENE_MIN_RESOLUTION_FACTOR = 0.1;
18
+ export const SCENE_MAX_RESOLUTION_FACTOR = 2;
19
+ export const SCENE_DEFAULT_CAMERA_FOV = 60;
20
+ export const SCENE_DEFAULT_CAMERA_NEAR = 0.1;
21
+ export const SCENE_DEFAULT_CAMERA_FAR = 100;
22
+ export const SCENE_DEFAULT_UPDATE_MODE = UISceneUpdateMode.ON_PROPERTIES_CHANGE;
23
+ export const SCENE_DEFAULT_CLEAR_COLOR = new UIColor(0, 0, 0, 1);
24
+ export const SCENE_DEFAULT_USE_DEPTH = true;
@@ -1,11 +1,11 @@
1
1
  import type { Camera, WebGLRenderer } from "three";
2
2
  import { Scene } from "three";
3
- import type { UILayer } from "../../layers/UILayer/UILayer";
4
- import { UIColor } from "../../miscellaneous/color/UIColor";
5
- import type { UIColorConfig } from "../../miscellaneous/color/UIColor.Internal";
6
- import { UIElement } from "../UIElement/UIElement";
7
- import type { UISceneOptions } from "./UIScene.Internal";
8
- import { UISceneUpdateMode } from "./UIScene.Internal";
3
+ import type { UILayer } from "../../layers/UILayer/UILayer.js";
4
+ import { UIColor } from "../../miscellaneous/color/UIColor.js";
5
+ import type { UIColorConfig } from "../../miscellaneous/color/UIColor.Internal.js";
6
+ import { UIElement } from "../UIElement/UIElement.js";
7
+ import type { UISceneOptions } from "./UIScene.Internal.js";
8
+ import { UISceneUpdateMode } from "./UIScene.Internal.js";
9
9
  /** Renders Three.js scene to texture */
10
10
  export declare class UIScene extends UIElement {
11
11
  private readonly colorInternal;
@@ -51,9 +51,9 @@ export declare class UIScene extends UIElement {
51
51
  set scene(value: Scene);
52
52
  /** Controls when scene re-renders */
53
53
  set updateMode(value: UISceneUpdateMode);
54
- /** Removes element and frees resources */
55
- destroy(): void;
56
54
  /** Triggers re-render on next frame. Useful in MANUAL mode. */
57
55
  requestUpdate(): void;
56
+ /** Frees resources of the scene */
57
+ protected destroyInternal(): void;
58
58
  protected onWillRender(renderer: WebGLRenderer, deltaTime: number): void;
59
59
  }