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,43 +1,49 @@
1
- import { Texture, Vector2, Vector3, Vector4, Matrix3, Matrix4 } from 'three';
2
- import { UIColor } from '../color/UIColor.js';
3
- import { checkSRGBSupport } from '../webglCapabilities.js';
4
-
1
+ import { Matrix3, Matrix4, Texture, Vector2, Vector3, Vector4 } from "three";
2
+ import { UIColor } from "../color/UIColor.js";
3
+ import { checkSRGBSupport } from "../webglCapabilities.js";
5
4
  const GLSL_TYPE_INFO_FLOAT = Object.freeze({
6
5
  glslTypeName: "float",
7
6
  bufferSize: 1,
7
+ columnCount: 1,
8
8
  instantiable: true,
9
9
  });
10
10
  const GLSL_TYPE_INFO_SAMPLER2D = Object.freeze({
11
11
  glslTypeName: "sampler2D",
12
12
  bufferSize: -1,
13
+ columnCount: 0,
13
14
  instantiable: false,
14
15
  });
15
16
  const GLSL_TYPE_INFO_VEC2 = Object.freeze({
16
17
  glslTypeName: "vec2",
17
18
  bufferSize: 2,
19
+ columnCount: 1,
18
20
  instantiable: true,
19
21
  });
20
22
  const GLSL_TYPE_INFO_VEC3 = Object.freeze({
21
23
  glslTypeName: "vec3",
22
24
  bufferSize: 3,
25
+ columnCount: 1,
23
26
  instantiable: true,
24
27
  });
25
28
  const GLSL_TYPE_INFO_VEC4 = Object.freeze({
26
29
  glslTypeName: "vec4",
27
30
  bufferSize: 4,
31
+ columnCount: 1,
28
32
  instantiable: true,
29
33
  });
30
34
  const GLSL_TYPE_INFO_MAT3 = Object.freeze({
31
35
  glslTypeName: "mat3",
32
36
  bufferSize: 9,
37
+ columnCount: 3,
33
38
  instantiable: true,
34
39
  });
35
40
  const GLSL_TYPE_INFO_MAT4 = Object.freeze({
36
41
  glslTypeName: "mat4",
37
42
  bufferSize: 16,
43
+ columnCount: 4,
38
44
  instantiable: true,
39
45
  });
40
- function resolveGLSLTypeInfo(value) {
46
+ export function resolveGLSLTypeInfo(value) {
41
47
  if (typeof value === "string") {
42
48
  switch (value) {
43
49
  case "number":
@@ -57,7 +63,7 @@ function resolveGLSLTypeInfo(value) {
57
63
  case "Matrix4":
58
64
  return GLSL_TYPE_INFO_MAT4;
59
65
  default:
60
- throw new Error(`resolveGLSLTypeInfo.value: unsupported property type name`);
66
+ throw new Error(`resolveGLSLTypeInfo.value: unsupported property type name "${value}"`);
61
67
  }
62
68
  }
63
69
  if (typeof value === "function") {
@@ -85,7 +91,7 @@ function resolveGLSLTypeInfo(value) {
85
91
  if (value === Matrix4) {
86
92
  return GLSL_TYPE_INFO_MAT4;
87
93
  }
88
- throw new Error(`resolveGLSLTypeInfo.value: unsupported property type constructor`);
94
+ throw new Error(`resolveGLSLTypeInfo.value: unsupported property type constructor ${value.name}`);
89
95
  }
90
96
  if (typeof value === "number") {
91
97
  return GLSL_TYPE_INFO_FLOAT;
@@ -113,14 +119,14 @@ function resolveGLSLTypeInfo(value) {
113
119
  }
114
120
  throw new Error(`resolveGLSLTypeInfo.value: unsupported property type`);
115
121
  }
116
- function resolvePropertyUniform(name, material) {
122
+ export function resolvePropertyUniform(name, material) {
117
123
  const uniform = material.uniforms[`p_${name}`];
118
124
  if (uniform === undefined) {
119
- throw new Error(`resolvePropertyUniform.name: unknown uniform`);
125
+ throw new Error(`resolvePropertyUniform.name: unknown uniform "p_${name}"`);
120
126
  }
121
127
  return uniform;
122
128
  }
123
- function arePropertiesPartiallyCompatible(full, partial) {
129
+ export function arePropertiesPartiallyCompatible(full, partial) {
124
130
  for (const key in partial) {
125
131
  if (!(key in full)) {
126
132
  return false;
@@ -136,7 +142,7 @@ function arePropertiesPartiallyCompatible(full, partial) {
136
142
  }
137
143
  return true;
138
144
  }
139
- function convertUIPropertiesToGLProperties(uiProperties) {
145
+ export function convertUIPropertiesToGLProperties(uiProperties) {
140
146
  const glProperties = {};
141
147
  for (const name in uiProperties) {
142
148
  const value = uiProperties[name];
@@ -144,20 +150,20 @@ function convertUIPropertiesToGLProperties(uiProperties) {
144
150
  }
145
151
  return glProperties;
146
152
  }
147
- function cloneProperty(property) {
153
+ export function cloneProperty(property) {
148
154
  if (typeof property === "number" || property instanceof Texture) {
149
155
  return property;
150
156
  }
151
157
  return property.clone();
152
158
  }
153
- function cloneProperties(properties) {
159
+ export function cloneProperties(properties) {
154
160
  const result = {};
155
161
  for (const name in properties) {
156
162
  result[name] = cloneProperty(properties[name]);
157
163
  }
158
164
  return result;
159
165
  }
160
- function cloneGLProperties(properties) {
166
+ export function cloneGLProperties(properties) {
161
167
  const result = {};
162
168
  for (const name in properties) {
163
169
  const prop = properties[name];
@@ -168,15 +174,16 @@ function cloneGLProperties(properties) {
168
174
  }
169
175
  return result;
170
176
  }
177
+ /**
178
+ * Index of the zIndex in Matrix4.elements: the zIndex is carried in translation z rather than as a
179
+ * separate field.
180
+ */
181
+ export const TRANSFORM_ZINDEX_OFFSET = 14;
171
182
  /** Extracts zIndex from transform matrix (translation.z component) */
172
- function extractZIndex(transform) {
173
- return transform.elements[14];
174
- }
175
- /** Extracts zIndex from transform buffer at given instance index */
176
- function extractZIndexFromBuffer(buffer, instanceIndex) {
177
- return buffer[instanceIndex * 16 + 14];
183
+ export function extractZIndex(transform) {
184
+ return transform.elements[TRANSFORM_ZINDEX_OFFSET];
178
185
  }
179
- function buildGenericPlaneFragmentShader(uniformDeclarations, varyingDeclarations, source, alphaTestValue, usePremultipliedAlpha) {
186
+ export function buildGenericPlaneFragmentShader(uniformDeclarations, varyingDeclarations, source, alphaTestValue, usePremultipliedAlpha) {
180
187
  return `
181
188
  // Defines
182
189
  #define PI 3.14159265359
@@ -287,5 +294,3 @@ function buildGenericPlaneFragmentShader(uniformDeclarations, varyingDeclaration
287
294
  }
288
295
  `;
289
296
  }
290
-
291
- export { arePropertiesPartiallyCompatible, buildGenericPlaneFragmentShader, cloneGLProperties, cloneProperties, cloneProperty, convertUIPropertiesToGLProperties, extractZIndex, extractZIndexFromBuffer, resolveGLSLTypeInfo, resolvePropertyUniform };
@@ -1,3 +1 @@
1
- const INSETS_DEFAULT_VALUE = 0;
2
-
3
- export { INSETS_DEFAULT_VALUE };
1
+ export const INSETS_DEFAULT_VALUE = 0;
@@ -1,5 +1,5 @@
1
1
  import { Vector4 } from "three";
2
- import type { UIInsetsConfig } from "./UIInsets.Internal";
2
+ import type { UIInsetsConfig } from "./UIInsets.Internal.js";
3
3
  /** Insets values for four sides */
4
4
  export declare class UIInsets {
5
5
  private lInternal;
@@ -1,124 +1,123 @@
1
- import { Vector4 } from 'three';
2
- import { assertValidNonNegativeNumber } from '../asserts.js';
3
- import { INSETS_DEFAULT_VALUE } from './UIInsets.Internal.js';
4
-
1
+ import { Vector4 } from "three";
2
+ import { assertValidNonNegativeNumber } from "../asserts.js";
3
+ import { INSETS_DEFAULT_VALUE } from "./UIInsets.Internal.js";
5
4
  /** Insets values for four sides */
6
- class UIInsets {
5
+ export class UIInsets {
7
6
  /**
8
7
  * Creates UIInsets instance.
9
8
  *
10
9
  * @param config - Insets configuration
11
10
  */
12
11
  constructor(config) {
13
- this._private_lInternal = INSETS_DEFAULT_VALUE;
14
- this._private_rInternal = INSETS_DEFAULT_VALUE;
15
- this._private_tInternal = INSETS_DEFAULT_VALUE;
16
- this._private_bInternal = INSETS_DEFAULT_VALUE;
17
- this._private_dirtyInternal = false;
12
+ this.lInternal = INSETS_DEFAULT_VALUE;
13
+ this.rInternal = INSETS_DEFAULT_VALUE;
14
+ this.tInternal = INSETS_DEFAULT_VALUE;
15
+ this.bInternal = INSETS_DEFAULT_VALUE;
16
+ this.dirtyInternal = false;
18
17
  this.set(config);
19
18
  }
20
19
  /** Left inset */
21
20
  get left() {
22
- return this._private_lInternal;
21
+ return this.lInternal;
23
22
  }
24
23
  /** Right inset */
25
24
  get right() {
26
- return this._private_rInternal;
25
+ return this.rInternal;
27
26
  }
28
27
  /** Top inset */
29
28
  get top() {
30
- return this._private_tInternal;
29
+ return this.tInternal;
31
30
  }
32
31
  /** Bottom inset */
33
32
  get bottom() {
34
- return this._private_bInternal;
33
+ return this.bInternal;
35
34
  }
36
35
  /** @internal */
37
36
  get dirty() {
38
- return this._private_dirtyInternal;
37
+ return this.dirtyInternal;
39
38
  }
40
39
  /** Left inset */
41
40
  set left(value) {
42
41
  assertValidNonNegativeNumber(value, "UIInsets.left");
43
- if (this._private_lInternal !== value) {
44
- this._private_lInternal = value;
45
- this._private_dirtyInternal = true;
42
+ if (this.lInternal !== value) {
43
+ this.lInternal = value;
44
+ this.dirtyInternal = true;
46
45
  }
47
46
  }
48
47
  /** Right inset */
49
48
  set right(value) {
50
49
  assertValidNonNegativeNumber(value, "UIInsets.right");
51
- if (this._private_rInternal !== value) {
52
- this._private_rInternal = value;
53
- this._private_dirtyInternal = true;
50
+ if (this.rInternal !== value) {
51
+ this.rInternal = value;
52
+ this.dirtyInternal = true;
54
53
  }
55
54
  }
56
55
  /** Top inset */
57
56
  set top(value) {
58
57
  assertValidNonNegativeNumber(value, "UIInsets.top");
59
- if (this._private_tInternal !== value) {
60
- this._private_tInternal = value;
61
- this._private_dirtyInternal = true;
58
+ if (this.tInternal !== value) {
59
+ this.tInternal = value;
60
+ this.dirtyInternal = true;
62
61
  }
63
62
  }
64
63
  /** Bottom inset */
65
64
  set bottom(value) {
66
65
  assertValidNonNegativeNumber(value, "UIInsets.bottom");
67
- if (this._private_bInternal !== value) {
68
- this._private_bInternal = value;
69
- this._private_dirtyInternal = true;
66
+ if (this.bInternal !== value) {
67
+ this.bInternal = value;
68
+ this.dirtyInternal = true;
70
69
  }
71
70
  }
72
71
  /** Sets left and right to same value */
73
72
  setHorizontal(value) {
74
73
  assertValidNonNegativeNumber(value, "UIInsets.setHorizontal.value");
75
- if (this._private_lInternal !== value || this._private_rInternal !== value) {
76
- this._private_lInternal = value;
77
- this._private_rInternal = value;
78
- this._private_dirtyInternal = true;
74
+ if (this.lInternal !== value || this.rInternal !== value) {
75
+ this.lInternal = value;
76
+ this.rInternal = value;
77
+ this.dirtyInternal = true;
79
78
  }
80
79
  }
81
80
  /** Sets top and bottom to same value */
82
81
  setVertical(value) {
83
82
  assertValidNonNegativeNumber(value, "UIInsets.setVertical.value");
84
- if (this._private_tInternal !== value || this._private_bInternal !== value) {
85
- this._private_tInternal = value;
86
- this._private_bInternal = value;
87
- this._private_dirtyInternal = true;
83
+ if (this.tInternal !== value || this.bInternal !== value) {
84
+ this.tInternal = value;
85
+ this.bInternal = value;
86
+ this.dirtyInternal = true;
88
87
  }
89
88
  }
90
89
  /** Sets all sides to same value */
91
90
  setUnified(value) {
92
91
  assertValidNonNegativeNumber(value, "UIInsets.setUnified.value");
93
- if (this._private_lInternal !== value ||
94
- this._private_rInternal !== value ||
95
- this._private_tInternal !== value ||
96
- this._private_bInternal !== value) {
97
- this._private_lInternal = value;
98
- this._private_rInternal = value;
99
- this._private_tInternal = value;
100
- this._private_bInternal = value;
101
- this._private_dirtyInternal = true;
92
+ if (this.lInternal !== value ||
93
+ this.rInternal !== value ||
94
+ this.tInternal !== value ||
95
+ this.bInternal !== value) {
96
+ this.lInternal = value;
97
+ this.rInternal = value;
98
+ this.tInternal = value;
99
+ this.bInternal = value;
100
+ this.dirtyInternal = true;
102
101
  }
103
102
  }
104
103
  /** Sets insets */
105
104
  set(config) {
106
- const lOld = this._private_lInternal;
107
- const rOld = this._private_rInternal;
108
- const tOld = this._private_tInternal;
109
- const bOld = this._private_bInternal;
105
+ const lOld = this.lInternal;
106
+ const rOld = this.rInternal;
107
+ const tOld = this.tInternal;
108
+ const bOld = this.bInternal;
110
109
  if (config === undefined) {
111
- this._private_lInternal = INSETS_DEFAULT_VALUE;
112
- this._private_rInternal = INSETS_DEFAULT_VALUE;
113
- this._private_tInternal = INSETS_DEFAULT_VALUE;
114
- this._private_bInternal = INSETS_DEFAULT_VALUE;
110
+ this.lInternal = INSETS_DEFAULT_VALUE;
111
+ this.rInternal = INSETS_DEFAULT_VALUE;
112
+ this.tInternal = INSETS_DEFAULT_VALUE;
113
+ this.bInternal = INSETS_DEFAULT_VALUE;
115
114
  }
116
115
  else if (typeof config === "number") {
117
116
  assertValidNonNegativeNumber(config, "UIInsets.set.config");
118
- this._private_lInternal = config;
119
- this._private_rInternal = config;
120
- this._private_tInternal = config;
121
- this._private_bInternal = config;
117
+ this.lInternal = config;
118
+ this.rInternal = config;
119
+ this.tInternal = config;
120
+ this.bInternal = config;
122
121
  }
123
122
  else if (Array.isArray(config)) {
124
123
  if (config.length === 2) {
@@ -126,10 +125,10 @@ class UIInsets {
126
125
  const vertical = config[1];
127
126
  assertValidNonNegativeNumber(horizontal, "UIInsets.set.config[0]");
128
127
  assertValidNonNegativeNumber(vertical, "UIInsets.set.config[1]");
129
- this._private_lInternal = horizontal;
130
- this._private_rInternal = horizontal;
131
- this._private_tInternal = vertical;
132
- this._private_bInternal = vertical;
128
+ this.lInternal = horizontal;
129
+ this.rInternal = horizontal;
130
+ this.tInternal = vertical;
131
+ this.bInternal = vertical;
133
132
  }
134
133
  else {
135
134
  const left = config[0];
@@ -140,10 +139,10 @@ class UIInsets {
140
139
  assertValidNonNegativeNumber(right, "UIInsets.set.config[1]");
141
140
  assertValidNonNegativeNumber(top, "UIInsets.set.config[2]");
142
141
  assertValidNonNegativeNumber(bottom, "UIInsets.set.config[3]");
143
- this._private_lInternal = left;
144
- this._private_rInternal = right;
145
- this._private_tInternal = top;
146
- this._private_bInternal = bottom;
142
+ this.lInternal = left;
143
+ this.rInternal = right;
144
+ this.tInternal = top;
145
+ this.bInternal = bottom;
147
146
  }
148
147
  }
149
148
  else if ("left" in config) {
@@ -155,26 +154,26 @@ class UIInsets {
155
154
  assertValidNonNegativeNumber(right, "UIInsets.set.config.right");
156
155
  assertValidNonNegativeNumber(top, "UIInsets.set.config.top");
157
156
  assertValidNonNegativeNumber(bottom, "UIInsets.set.config.bottom");
158
- this._private_lInternal = left;
159
- this._private_rInternal = right;
160
- this._private_tInternal = top;
161
- this._private_bInternal = bottom;
157
+ this.lInternal = left;
158
+ this.rInternal = right;
159
+ this.tInternal = top;
160
+ this.bInternal = bottom;
162
161
  }
163
162
  else {
164
163
  const horizontal = config.horizontal;
165
164
  const vertical = config.vertical;
166
165
  assertValidNonNegativeNumber(horizontal, "UIInsets.set.config.horizontal");
167
166
  assertValidNonNegativeNumber(vertical, "UIInsets.set.config.vertical");
168
- this._private_lInternal = horizontal;
169
- this._private_rInternal = horizontal;
170
- this._private_tInternal = vertical;
171
- this._private_bInternal = vertical;
167
+ this.lInternal = horizontal;
168
+ this.rInternal = horizontal;
169
+ this.tInternal = vertical;
170
+ this.bInternal = vertical;
172
171
  }
173
- if (this._private_lInternal !== lOld ||
174
- this._private_rInternal !== rOld ||
175
- this._private_tInternal !== tOld ||
176
- this._private_bInternal !== bOld) {
177
- this._private_dirtyInternal = true;
172
+ if (this.lInternal !== lOld ||
173
+ this.rInternal !== rOld ||
174
+ this.tInternal !== tOld ||
175
+ this.bInternal !== bOld) {
176
+ this.dirtyInternal = true;
178
177
  }
179
178
  }
180
179
  /** Sets from Vector4 (x=left, y=right, z=top, w=bottom) */
@@ -183,20 +182,20 @@ class UIInsets {
183
182
  assertValidNonNegativeNumber(vector.y, "UIInsets.setVector4.vector.y");
184
183
  assertValidNonNegativeNumber(vector.z, "UIInsets.setVector4.vector.z");
185
184
  assertValidNonNegativeNumber(vector.w, "UIInsets.setVector4.vector.w");
186
- if (this._private_lInternal !== vector.x ||
187
- this._private_rInternal !== vector.y ||
188
- this._private_tInternal !== vector.z ||
189
- this._private_bInternal !== vector.w) {
190
- this._private_lInternal = vector.x;
191
- this._private_rInternal = vector.y;
192
- this._private_tInternal = vector.z;
193
- this._private_bInternal = vector.w;
194
- this._private_dirtyInternal = true;
185
+ if (this.lInternal !== vector.x ||
186
+ this.rInternal !== vector.y ||
187
+ this.tInternal !== vector.z ||
188
+ this.bInternal !== vector.w) {
189
+ this.lInternal = vector.x;
190
+ this.rInternal = vector.y;
191
+ this.tInternal = vector.z;
192
+ this.bInternal = vector.w;
193
+ this.dirtyInternal = true;
195
194
  }
196
195
  }
197
196
  /** Converts to Vector4 (left, right, top, bottom) */
198
197
  toVector4(result = new Vector4()) {
199
- return result.set(this._private_lInternal, this._private_rInternal, this._private_tInternal, this._private_bInternal);
198
+ return result.set(this.lInternal, this.rInternal, this.tInternal, this.bInternal);
200
199
  }
201
200
  /** Resets all sides to 0 */
202
201
  reset() {
@@ -204,21 +203,19 @@ class UIInsets {
204
203
  }
205
204
  /** Copies from another instance */
206
205
  copy(other) {
207
- if (this._private_lInternal !== other._private_lInternal ||
208
- this._private_rInternal !== other._private_rInternal ||
209
- this._private_tInternal !== other._private_tInternal ||
210
- this._private_bInternal !== other._private_bInternal) {
211
- this._private_lInternal = other._private_lInternal;
212
- this._private_rInternal = other._private_rInternal;
213
- this._private_tInternal = other._private_tInternal;
214
- this._private_bInternal = other._private_bInternal;
215
- this._private_dirtyInternal = true;
206
+ if (this.lInternal !== other.lInternal ||
207
+ this.rInternal !== other.rInternal ||
208
+ this.tInternal !== other.tInternal ||
209
+ this.bInternal !== other.bInternal) {
210
+ this.lInternal = other.lInternal;
211
+ this.rInternal = other.rInternal;
212
+ this.tInternal = other.tInternal;
213
+ this.bInternal = other.bInternal;
214
+ this.dirtyInternal = true;
216
215
  }
217
216
  }
218
217
  /** @internal */
219
218
  setDirtyFalse() {
220
- this._private_dirtyInternal = false;
219
+ this.dirtyInternal = false;
221
220
  }
222
221
  }
223
-
224
- export { UIInsets };
@@ -1,5 +1,5 @@
1
1
  /** Base class for progress bar fill functions */
2
- class UIProgressMaskFunction {
2
+ export class UIProgressMaskFunction {
3
3
  constructor(
4
4
  /** GLSL shader source code defining fill behavior */
5
5
  source) {
@@ -15,5 +15,3 @@ class UIProgressMaskFunction {
15
15
  this.dirtyInternal = false;
16
16
  }
17
17
  }
18
-
19
- export { UIProgressMaskFunction };
@@ -1,4 +1,4 @@
1
- import { UIProgressMaskFunction } from "./UIProgressMaskFunction";
1
+ import { UIProgressMaskFunction } from "./UIProgressMaskFunction.js";
2
2
  /** Circular radial progress fill */
3
3
  export declare class UIProgressMaskFunctionCircular extends UIProgressMaskFunction {
4
4
  private startAngleInternal;
@@ -1,9 +1,8 @@
1
- import source from '../../shaders/UIProgressMaskFunctionCircular.glsl.js';
2
- import { assertValidNumber } from '../asserts.js';
3
- import { UIProgressMaskFunction } from './UIProgressMaskFunction.js';
4
-
1
+ import source from "../../shaders/UIProgressMaskFunctionCircular.js";
2
+ import { assertValidNumber } from "../asserts.js";
3
+ import { UIProgressMaskFunction } from "./UIProgressMaskFunction.js";
5
4
  /** Circular radial progress fill */
6
- class UIProgressMaskFunctionCircular extends UIProgressMaskFunction {
5
+ export class UIProgressMaskFunctionCircular extends UIProgressMaskFunction {
7
6
  /**
8
7
  * Creates circular mask function.
9
8
  *
@@ -13,39 +12,37 @@ class UIProgressMaskFunctionCircular extends UIProgressMaskFunction {
13
12
  constructor(startAngle = 0, inverseDirection = false) {
14
13
  assertValidNumber(startAngle, "UIProgressMaskFunctionCircular.constructor.startAngle");
15
14
  super(source);
16
- this._private_startAngleInternal = startAngle;
17
- this._private_inverseDirectionInternal = inverseDirection;
15
+ this.startAngleInternal = startAngle;
16
+ this.inverseDirectionInternal = inverseDirection;
18
17
  }
19
18
  /** Starting angle in radians */
20
19
  get startAngle() {
21
- return this._private_startAngleInternal;
20
+ return this.startAngleInternal;
22
21
  }
23
22
  /** Whether fill is counter-clockwise */
24
23
  get inverseDirection() {
25
- return this._private_inverseDirectionInternal;
24
+ return this.inverseDirectionInternal;
26
25
  }
27
26
  /** Starting angle in radians */
28
27
  set startAngle(value) {
29
28
  assertValidNumber(value, "UIProgressMaskFunctionCircular.startAngle");
30
- if (this._private_startAngleInternal !== value) {
31
- this._private_startAngleInternal = value;
29
+ if (this.startAngleInternal !== value) {
30
+ this.startAngleInternal = value;
32
31
  this.dirtyInternal = true;
33
32
  }
34
33
  }
35
34
  /** Whether fill is counter-clockwise */
36
35
  set inverseDirection(value) {
37
- if (this._private_inverseDirectionInternal !== value) {
38
- this._private_inverseDirectionInternal = value;
36
+ if (this.inverseDirectionInternal !== value) {
37
+ this.inverseDirectionInternal = value;
39
38
  this.dirtyInternal = true;
40
39
  }
41
40
  }
42
41
  /** @internal */
43
42
  enumerateProperties() {
44
43
  return {
45
- direction: this._private_inverseDirectionInternal ? -1 : 1,
46
- startAngle: this._private_startAngleInternal,
44
+ direction: this.inverseDirectionInternal ? -1 : 1,
45
+ startAngle: this.startAngleInternal,
47
46
  };
48
47
  }
49
48
  }
50
-
51
- export { UIProgressMaskFunctionCircular };
@@ -1,6 +1,6 @@
1
1
  import { Vector2 } from "three";
2
- import type { Vector2Like } from "../math";
3
- import { UIProgressMaskFunction } from "./UIProgressMaskFunction";
2
+ import type { Vector2Like } from "../math.js";
3
+ import { UIProgressMaskFunction } from "./UIProgressMaskFunction.js";
4
4
  /** Linear directional progress fill */
5
5
  export declare class UIProgressMaskFunctionDirectional extends UIProgressMaskFunction {
6
6
  /** Fill direction as normalized vector */
@@ -1,10 +1,9 @@
1
- import { Vector2 } from 'three';
2
- import source from '../../shaders/UIProgressMaskFunctionDirectional.glsl.js';
3
- import { EPSILON } from '../math.js';
4
- import { UIProgressMaskFunction } from './UIProgressMaskFunction.js';
5
-
1
+ import { Vector2 } from "three";
2
+ import source from "../../shaders/UIProgressMaskFunctionDirectional.js";
3
+ import { EPSILON } from "../math.js";
4
+ import { UIProgressMaskFunction } from "./UIProgressMaskFunction.js";
6
5
  /** Linear directional progress fill */
7
- class UIProgressMaskFunctionDirectional extends UIProgressMaskFunction {
6
+ export class UIProgressMaskFunctionDirectional extends UIProgressMaskFunction {
8
7
  /**
9
8
  * Creates directional mask function.
10
9
  *
@@ -14,27 +13,27 @@ class UIProgressMaskFunctionDirectional extends UIProgressMaskFunction {
14
13
  super(source);
15
14
  /** Fill direction as normalized vector */
16
15
  this.direction = new Vector2();
17
- this._private_cachedDirection = new Vector2();
16
+ this.cachedDirection = new Vector2();
18
17
  this.direction.set(direction.x, direction.y).normalize();
19
- this._private_cachedDirection.copy(this.direction);
18
+ this.cachedDirection.copy(this.direction);
20
19
  }
21
20
  /** @internal */
22
21
  get dirty() {
23
- this._private_ensureDirectionNormalized();
24
- return this.dirtyInternal || !this._private_cachedDirection.equals(this.direction);
22
+ this.ensureDirectionNormalized();
23
+ return this.dirtyInternal || !this.cachedDirection.equals(this.direction);
25
24
  }
26
25
  /** @internal */
27
26
  setDirtyFalse() {
28
- this._private_ensureDirectionNormalized();
29
- this._private_cachedDirection.copy(this.direction);
27
+ this.ensureDirectionNormalized();
28
+ this.cachedDirection.copy(this.direction);
30
29
  super.setDirtyFalse();
31
30
  }
32
31
  /** @internal */
33
32
  enumerateProperties() {
34
- this._private_ensureDirectionNormalized();
33
+ this.ensureDirectionNormalized();
35
34
  return { direction: this.direction };
36
35
  }
37
- _private_ensureDirectionNormalized() {
36
+ ensureDirectionNormalized() {
38
37
  const squaredLength = this.direction.lengthSq();
39
38
  if (Math.abs(squaredLength) <= EPSILON) {
40
39
  this.direction.set(1, 0);
@@ -44,5 +43,3 @@ class UIProgressMaskFunctionDirectional extends UIProgressMaskFunction {
44
43
  }
45
44
  }
46
45
  }
47
-
48
- export { UIProgressMaskFunctionDirectional };
@@ -1,11 +1,9 @@
1
- const EPSILON = 1e-6;
2
- function srgbToLinear(color) {
1
+ export const EPSILON = 1e-6;
2
+ export function srgbToLinear(color) {
3
3
  return color < 0.04045
4
4
  ? color * 0.0773993808
5
5
  : Math.pow(color * 0.9478672986 + 0.0521327014, 2.4);
6
6
  }
7
- function linearToSRGB(color) {
7
+ export function linearToSRGB(color) {
8
8
  return color < 0.0031308 ? color * 12.92 : 1.055 * Math.pow(color, 0.41666) - 0.055;
9
9
  }
10
-
11
- export { EPSILON, linearToSRGB, srgbToLinear };