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,691 +0,0 @@
1
- import { ShaderMaterial, ShaderLib, UniformsUtils, Vector2, UniformsLib } from 'three';
2
-
3
- UniformsLib.line = {
4
-
5
- worldUnits: { value: 1 },
6
- linewidth: { value: 1 },
7
- resolution: { value: new Vector2( 1, 1 ) },
8
- dashOffset: { value: 0 },
9
- dashScale: { value: 1 },
10
- dashSize: { value: 1 },
11
- gapSize: { value: 1 } // todo FIX - maybe change to totalSize
12
-
13
- };
14
-
15
- ShaderLib[ 'line' ] = {
16
-
17
- uniforms: UniformsUtils.merge( [
18
- UniformsLib.common,
19
- UniformsLib.fog,
20
- UniformsLib.line
21
- ] ),
22
-
23
- vertexShader:
24
- /* glsl */`
25
- #include <common>
26
- #include <color_pars_vertex>
27
- #include <fog_pars_vertex>
28
- #include <logdepthbuf_pars_vertex>
29
- #include <clipping_planes_pars_vertex>
30
-
31
- uniform float linewidth;
32
- uniform vec2 resolution;
33
-
34
- attribute vec3 instanceStart;
35
- attribute vec3 instanceEnd;
36
-
37
- attribute vec3 instanceColorStart;
38
- attribute vec3 instanceColorEnd;
39
-
40
- #ifdef WORLD_UNITS
41
-
42
- varying vec4 worldPos;
43
- varying vec3 worldStart;
44
- varying vec3 worldEnd;
45
-
46
- #ifdef USE_DASH
47
-
48
- varying vec2 vUv;
49
-
50
- #endif
51
-
52
- #else
53
-
54
- varying vec2 vUv;
55
-
56
- #endif
57
-
58
- #ifdef USE_DASH
59
-
60
- uniform float dashScale;
61
- attribute float instanceDistanceStart;
62
- attribute float instanceDistanceEnd;
63
- varying float vLineDistance;
64
-
65
- #endif
66
-
67
- void trimSegment( const in vec4 start, inout vec4 end ) {
68
-
69
- // trim end segment so it terminates between the camera plane and the near plane
70
-
71
- // conservative estimate of the near plane
72
- float a = projectionMatrix[ 2 ][ 2 ]; // 3nd entry in 3th column
73
- float b = projectionMatrix[ 3 ][ 2 ]; // 3nd entry in 4th column
74
- float nearEstimate = - 0.5 * b / a;
75
-
76
- float alpha = ( nearEstimate - start.z ) / ( end.z - start.z );
77
-
78
- end.xyz = mix( start.xyz, end.xyz, alpha );
79
-
80
- }
81
-
82
- void main() {
83
-
84
- #ifdef USE_COLOR
85
-
86
- vColor.xyz = ( position.y < 0.5 ) ? instanceColorStart : instanceColorEnd;
87
-
88
- #endif
89
-
90
- #ifdef USE_DASH
91
-
92
- vLineDistance = ( position.y < 0.5 ) ? dashScale * instanceDistanceStart : dashScale * instanceDistanceEnd;
93
- vUv = uv;
94
-
95
- #endif
96
-
97
- float aspect = resolution.x / resolution.y;
98
-
99
- // camera space
100
- vec4 start = modelViewMatrix * vec4( instanceStart, 1.0 );
101
- vec4 end = modelViewMatrix * vec4( instanceEnd, 1.0 );
102
-
103
- #ifdef WORLD_UNITS
104
-
105
- worldStart = start.xyz;
106
- worldEnd = end.xyz;
107
-
108
- #else
109
-
110
- vUv = uv;
111
-
112
- #endif
113
-
114
- // special case for perspective projection, and segments that terminate either in, or behind, the camera plane
115
- // clearly the gpu firmware has a way of addressing this issue when projecting into ndc space
116
- // but we need to perform ndc-space calculations in the shader, so we must address this issue directly
117
- // perhaps there is a more elegant solution -- WestLangley
118
-
119
- bool perspective = ( projectionMatrix[ 2 ][ 3 ] == - 1.0 ); // 4th entry in the 3rd column
120
-
121
- if ( perspective ) {
122
-
123
- if ( start.z < 0.0 && end.z >= 0.0 ) {
124
-
125
- trimSegment( start, end );
126
-
127
- } else if ( end.z < 0.0 && start.z >= 0.0 ) {
128
-
129
- trimSegment( end, start );
130
-
131
- }
132
-
133
- }
134
-
135
- // clip space
136
- vec4 clipStart = projectionMatrix * start;
137
- vec4 clipEnd = projectionMatrix * end;
138
-
139
- // ndc space
140
- vec3 ndcStart = clipStart.xyz / clipStart.w;
141
- vec3 ndcEnd = clipEnd.xyz / clipEnd.w;
142
-
143
- // direction
144
- vec2 dir = ndcEnd.xy - ndcStart.xy;
145
-
146
- // account for clip-space aspect ratio
147
- dir.x *= aspect;
148
- dir = normalize( dir );
149
-
150
- #ifdef WORLD_UNITS
151
-
152
- vec3 worldDir = normalize( end.xyz - start.xyz );
153
- vec3 tmpFwd = normalize( mix( start.xyz, end.xyz, 0.5 ) );
154
- vec3 worldUp = normalize( cross( worldDir, tmpFwd ) );
155
- vec3 worldFwd = cross( worldDir, worldUp );
156
- worldPos = position.y < 0.5 ? start: end;
157
-
158
- // height offset
159
- float hw = linewidth * 0.5;
160
- worldPos.xyz += position.x < 0.0 ? hw * worldUp : - hw * worldUp;
161
-
162
- // don't extend the line if we're rendering dashes because we
163
- // won't be rendering the endcaps
164
- #ifndef USE_DASH
165
-
166
- // cap extension
167
- worldPos.xyz += position.y < 0.5 ? - hw * worldDir : hw * worldDir;
168
-
169
- // add width to the box
170
- worldPos.xyz += worldFwd * hw;
171
-
172
- // endcaps
173
- if ( position.y > 1.0 || position.y < 0.0 ) {
174
-
175
- worldPos.xyz -= worldFwd * 2.0 * hw;
176
-
177
- }
178
-
179
- #endif
180
-
181
- // project the worldpos
182
- vec4 clip = projectionMatrix * worldPos;
183
-
184
- // shift the depth of the projected points so the line
185
- // segments overlap neatly
186
- vec3 clipPose = ( position.y < 0.5 ) ? ndcStart : ndcEnd;
187
- clip.z = clipPose.z * clip.w;
188
-
189
- #else
190
-
191
- vec2 offset = vec2( dir.y, - dir.x );
192
- // undo aspect ratio adjustment
193
- dir.x /= aspect;
194
- offset.x /= aspect;
195
-
196
- // sign flip
197
- if ( position.x < 0.0 ) offset *= - 1.0;
198
-
199
- // endcaps
200
- if ( position.y < 0.0 ) {
201
-
202
- offset += - dir;
203
-
204
- } else if ( position.y > 1.0 ) {
205
-
206
- offset += dir;
207
-
208
- }
209
-
210
- // adjust for linewidth
211
- offset *= linewidth;
212
-
213
- // adjust for clip-space to screen-space conversion // maybe resolution should be based on viewport ...
214
- offset /= resolution.y;
215
-
216
- // select end
217
- vec4 clip = ( position.y < 0.5 ) ? clipStart : clipEnd;
218
-
219
- // back to clip space
220
- offset *= clip.w;
221
-
222
- clip.xy += offset;
223
-
224
- #endif
225
-
226
- gl_Position = clip;
227
-
228
- vec4 mvPosition = ( position.y < 0.5 ) ? start : end; // this is an approximation
229
-
230
- #include <logdepthbuf_vertex>
231
- #include <clipping_planes_vertex>
232
- #include <fog_vertex>
233
-
234
- }
235
- `,
236
-
237
- fragmentShader:
238
- /* glsl */`
239
- uniform vec3 diffuse;
240
- uniform float opacity;
241
- uniform float linewidth;
242
-
243
- #ifdef USE_DASH
244
-
245
- uniform float dashOffset;
246
- uniform float dashSize;
247
- uniform float gapSize;
248
-
249
- #endif
250
-
251
- varying float vLineDistance;
252
-
253
- #ifdef WORLD_UNITS
254
-
255
- varying vec4 worldPos;
256
- varying vec3 worldStart;
257
- varying vec3 worldEnd;
258
-
259
- #ifdef USE_DASH
260
-
261
- varying vec2 vUv;
262
-
263
- #endif
264
-
265
- #else
266
-
267
- varying vec2 vUv;
268
-
269
- #endif
270
-
271
- #include <common>
272
- #include <color_pars_fragment>
273
- #include <fog_pars_fragment>
274
- #include <logdepthbuf_pars_fragment>
275
- #include <clipping_planes_pars_fragment>
276
-
277
- vec2 closestLineToLine(vec3 p1, vec3 p2, vec3 p3, vec3 p4) {
278
-
279
- float mua;
280
- float mub;
281
-
282
- vec3 p13 = p1 - p3;
283
- vec3 p43 = p4 - p3;
284
-
285
- vec3 p21 = p2 - p1;
286
-
287
- float d1343 = dot( p13, p43 );
288
- float d4321 = dot( p43, p21 );
289
- float d1321 = dot( p13, p21 );
290
- float d4343 = dot( p43, p43 );
291
- float d2121 = dot( p21, p21 );
292
-
293
- float denom = d2121 * d4343 - d4321 * d4321;
294
-
295
- float numer = d1343 * d4321 - d1321 * d4343;
296
-
297
- mua = numer / denom;
298
- mua = clamp( mua, 0.0, 1.0 );
299
- mub = ( d1343 + d4321 * ( mua ) ) / d4343;
300
- mub = clamp( mub, 0.0, 1.0 );
301
-
302
- return vec2( mua, mub );
303
-
304
- }
305
-
306
- void main() {
307
-
308
- float alpha = opacity;
309
- vec4 diffuseColor = vec4( diffuse, alpha );
310
-
311
- #include <clipping_planes_fragment>
312
-
313
- #ifdef USE_DASH
314
-
315
- if ( vUv.y < - 1.0 || vUv.y > 1.0 ) discard; // discard endcaps
316
-
317
- if ( mod( vLineDistance + dashOffset, dashSize + gapSize ) > dashSize ) discard; // todo - FIX
318
-
319
- #endif
320
-
321
- #ifdef WORLD_UNITS
322
-
323
- // Find the closest points on the view ray and the line segment
324
- vec3 rayEnd = normalize( worldPos.xyz ) * 1e5;
325
- vec3 lineDir = worldEnd - worldStart;
326
- vec2 params = closestLineToLine( worldStart, worldEnd, vec3( 0.0, 0.0, 0.0 ), rayEnd );
327
-
328
- vec3 p1 = worldStart + lineDir * params.x;
329
- vec3 p2 = rayEnd * params.y;
330
- vec3 delta = p1 - p2;
331
- float len = length( delta );
332
- float norm = len / linewidth;
333
-
334
- #ifndef USE_DASH
335
-
336
- #ifdef USE_ALPHA_TO_COVERAGE
337
-
338
- float dnorm = fwidth( norm );
339
- alpha = 1.0 - smoothstep( 0.5 - dnorm, 0.5 + dnorm, norm );
340
-
341
- #else
342
-
343
- if ( norm > 0.5 ) {
344
-
345
- discard;
346
-
347
- }
348
-
349
- #endif
350
-
351
- #endif
352
-
353
- #else
354
-
355
- #ifdef USE_ALPHA_TO_COVERAGE
356
-
357
- // artifacts appear on some hardware if a derivative is taken within a conditional
358
- float a = vUv.x;
359
- float b = ( vUv.y > 0.0 ) ? vUv.y - 1.0 : vUv.y + 1.0;
360
- float len2 = a * a + b * b;
361
- float dlen = fwidth( len2 );
362
-
363
- if ( abs( vUv.y ) > 1.0 ) {
364
-
365
- alpha = 1.0 - smoothstep( 1.0 - dlen, 1.0 + dlen, len2 );
366
-
367
- }
368
-
369
- #else
370
-
371
- if ( abs( vUv.y ) > 1.0 ) {
372
-
373
- float a = vUv.x;
374
- float b = ( vUv.y > 0.0 ) ? vUv.y - 1.0 : vUv.y + 1.0;
375
- float len2 = a * a + b * b;
376
-
377
- if ( len2 > 1.0 ) discard;
378
-
379
- }
380
-
381
- #endif
382
-
383
- #endif
384
-
385
- #include <logdepthbuf_fragment>
386
- #include <color_fragment>
387
-
388
- gl_FragColor = vec4( diffuseColor.rgb, alpha );
389
-
390
- #include <tonemapping_fragment>
391
- #include <colorspace_fragment>
392
- #include <fog_fragment>
393
- #include <premultiplied_alpha_fragment>
394
-
395
- }
396
- `
397
- };
398
-
399
- /**
400
- * A material for drawing wireframe-style geometries.
401
- *
402
- * Unlike {@link LineBasicMaterial}, it supports arbitrary line widths and allows using world units
403
- * instead of screen space units. This material is used with {@link LineSegments2} and {@link Line2}.
404
- *
405
- * This module can only be used with {@link WebGLRenderer}. When using {@link WebGPURenderer},
406
- * use {@link Line2NodeMaterial}.
407
- *
408
- * @augments ShaderMaterial
409
- * @three_import import { LineMaterial } from 'three/addons/lines/LineMaterial.js';
410
- */
411
- class LineMaterial extends ShaderMaterial {
412
-
413
- /**
414
- * Constructs a new line segments geometry.
415
- *
416
- * @param {Object} [parameters] - An object with one or more properties
417
- * defining the material's appearance. Any property of the material
418
- * (including any property from inherited materials) can be passed
419
- * in here. Color values can be passed any type of value accepted
420
- * by {@link Color#set}.
421
- */
422
- constructor( parameters ) {
423
-
424
- super( {
425
-
426
- type: 'LineMaterial',
427
- uniforms: UniformsUtils.clone( ShaderLib[ 'line' ].uniforms ),
428
-
429
- vertexShader: ShaderLib[ 'line' ].vertexShader,
430
- fragmentShader: ShaderLib[ 'line' ].fragmentShader,
431
-
432
- clipping: true // required for clipping support
433
-
434
- } );
435
-
436
- /**
437
- * This flag can be used for type testing.
438
- *
439
- * @type {boolean}
440
- * @readonly
441
- * @default true
442
- */
443
- this.isLineMaterial = true;
444
-
445
- this.setValues( parameters );
446
-
447
- }
448
-
449
- /**
450
- * The material's color.
451
- *
452
- * @type {Color}
453
- * @default (1,1,1)
454
- */
455
- get color() {
456
-
457
- return this.uniforms.diffuse.value;
458
-
459
- }
460
-
461
- set color( value ) {
462
-
463
- this.uniforms.diffuse.value = value;
464
-
465
- }
466
-
467
- /**
468
- * Whether the material's sizes (width, dash gaps) are in world units.
469
- *
470
- * @type {boolean}
471
- * @default false
472
- */
473
- get worldUnits() {
474
-
475
- return 'WORLD_UNITS' in this.defines;
476
-
477
- }
478
-
479
- set worldUnits( value ) {
480
-
481
- if ( value === true ) {
482
-
483
- this.defines.WORLD_UNITS = '';
484
-
485
- } else {
486
-
487
- delete this.defines.WORLD_UNITS;
488
-
489
- }
490
-
491
- }
492
-
493
- /**
494
- * Controls line thickness in CSS pixel units when `worldUnits` is `false` (default),
495
- * or in world units when `worldUnits` is `true`.
496
- *
497
- * @type {number}
498
- * @default 1
499
- */
500
- get linewidth() {
501
-
502
- return this.uniforms.linewidth.value;
503
-
504
- }
505
-
506
- set linewidth( value ) {
507
-
508
- if ( ! this.uniforms.linewidth ) return;
509
- this.uniforms.linewidth.value = value;
510
-
511
- }
512
-
513
- /**
514
- * Whether the line is dashed, or solid.
515
- *
516
- * @type {boolean}
517
- * @default false
518
- */
519
- get dashed() {
520
-
521
- return 'USE_DASH' in this.defines;
522
-
523
- }
524
-
525
- set dashed( value ) {
526
-
527
- if ( ( value === true ) !== this.dashed ) {
528
-
529
- this.needsUpdate = true;
530
-
531
- }
532
-
533
- if ( value === true ) {
534
-
535
- this.defines.USE_DASH = '';
536
-
537
- } else {
538
-
539
- delete this.defines.USE_DASH;
540
-
541
- }
542
-
543
- }
544
-
545
- /**
546
- * The scale of the dashes and gaps.
547
- *
548
- * @type {number}
549
- * @default 1
550
- */
551
- get dashScale() {
552
-
553
- return this.uniforms.dashScale.value;
554
-
555
- }
556
-
557
- set dashScale( value ) {
558
-
559
- this.uniforms.dashScale.value = value;
560
-
561
- }
562
-
563
- /**
564
- * The size of the dash.
565
- *
566
- * @type {number}
567
- * @default 1
568
- */
569
- get dashSize() {
570
-
571
- return this.uniforms.dashSize.value;
572
-
573
- }
574
-
575
- set dashSize( value ) {
576
-
577
- this.uniforms.dashSize.value = value;
578
-
579
- }
580
-
581
- /**
582
- * Where in the dash cycle the dash starts.
583
- *
584
- * @type {number}
585
- * @default 0
586
- */
587
- get dashOffset() {
588
-
589
- return this.uniforms.dashOffset.value;
590
-
591
- }
592
-
593
- set dashOffset( value ) {
594
-
595
- this.uniforms.dashOffset.value = value;
596
-
597
- }
598
-
599
- /**
600
- * The size of the gap.
601
- *
602
- * @type {number}
603
- * @default 0
604
- */
605
- get gapSize() {
606
-
607
- return this.uniforms.gapSize.value;
608
-
609
- }
610
-
611
- set gapSize( value ) {
612
-
613
- this.uniforms.gapSize.value = value;
614
-
615
- }
616
-
617
- /**
618
- * The opacity.
619
- *
620
- * @type {number}
621
- * @default 1
622
- */
623
- get opacity() {
624
-
625
- return this.uniforms.opacity.value;
626
-
627
- }
628
-
629
- set opacity( value ) {
630
-
631
- if ( ! this.uniforms ) return;
632
- this.uniforms.opacity.value = value;
633
-
634
- }
635
-
636
- /**
637
- * The size of the viewport, in screen pixels. This must be kept updated to make
638
- * screen-space rendering accurate.The `LineSegments2.onBeforeRender` callback
639
- * performs the update for visible objects.
640
- *
641
- * @type {Vector2}
642
- */
643
- get resolution() {
644
-
645
- return this.uniforms.resolution.value;
646
-
647
- }
648
-
649
- set resolution( value ) {
650
-
651
- this.uniforms.resolution.value.copy( value );
652
-
653
- }
654
-
655
- /**
656
- * Whether to use alphaToCoverage or not. When enabled, this can improve the
657
- * anti-aliasing of line edges when using MSAA.
658
- *
659
- * @type {boolean}
660
- */
661
- get alphaToCoverage() {
662
-
663
- return 'USE_ALPHA_TO_COVERAGE' in this.defines;
664
-
665
- }
666
-
667
- set alphaToCoverage( value ) {
668
-
669
- if ( ! this.defines ) return;
670
-
671
- if ( ( value === true ) !== this.alphaToCoverage ) {
672
-
673
- this.needsUpdate = true;
674
-
675
- }
676
-
677
- if ( value === true ) {
678
-
679
- this.defines.USE_ALPHA_TO_COVERAGE = '';
680
-
681
- } else {
682
-
683
- delete this.defines.USE_ALPHA_TO_COVERAGE;
684
-
685
- }
686
-
687
- }
688
-
689
- }
690
-
691
- export { LineMaterial };