laymur 0.16.0 → 0.17.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 (266) hide show
  1. package/README.md +84 -208
  2. package/dist/core/constraints/UIAspectConstraint/UIAspectConstraint.js +41 -0
  3. package/dist/{constraints → core/constraints}/UIConstraint.d.ts +2 -2
  4. package/dist/core/constraints/UIConstraint.js +11 -0
  5. package/dist/core/constraints/UICustomConstraint.js +37 -0
  6. package/dist/core/constraints/UIHeightConstraint/UIHeightConstraint.js +34 -0
  7. package/dist/core/constraints/UIHorizontalDistanceConstraint/UIHorizontalDistanceConstraint.Internal.js +3 -0
  8. package/dist/core/constraints/UIHorizontalDistanceConstraint/UIHorizontalDistanceConstraint.js +100 -0
  9. package/dist/core/constraints/UIHorizontalInterpolationConstraint/UIHorizontalInterpolationConstraint.Internal.js +4 -0
  10. package/dist/core/constraints/UIHorizontalInterpolationConstraint/UIHorizontalInterpolationConstraint.js +136 -0
  11. package/dist/core/constraints/UIHorizontalProportionConstraint/UIHorizontalProportionConstraint.js +40 -0
  12. package/dist/core/constraints/UISingleParameterConstraint/UISingleParameterConstraint.js +71 -0
  13. package/dist/core/constraints/UIVerticalDistanceConstraint/UIVerticalDistanceConstraint.Internal.js +3 -0
  14. package/dist/core/constraints/UIVerticalDistanceConstraint/UIVerticalDistanceConstraint.js +100 -0
  15. package/dist/core/constraints/UIVerticalInterpolationConstraint/UIVerticalInterpolationConstraint.Internal.js +4 -0
  16. package/dist/core/constraints/UIVerticalInterpolationConstraint/UIVerticalInterpolationConstraint.js +136 -0
  17. package/dist/core/constraints/UIVerticalProportionConstraint/UIVerticalProportionConstraint.js +40 -0
  18. package/dist/core/constraints/UIWidthConstraint/UIWidthConstraint.js +34 -0
  19. package/dist/core/constraints/builders/UIConstraint2DBuilder.Internal.js +19 -0
  20. package/dist/core/constraints/builders/UIConstraint2DBuilder.js +138 -0
  21. package/dist/core/constraints/builders/UICoverConstraintBuilder.Internal.js +3 -0
  22. package/dist/core/constraints/builders/UICoverConstraintBuilder.js +63 -0
  23. package/dist/core/constraints/builders/UIFitConstraintBuilder.Internal.js +3 -0
  24. package/dist/core/constraints/builders/UIFitConstraintBuilder.js +63 -0
  25. package/dist/{elements → core/elements}/UIAnchor/UIAnchor.Internal.d.ts +3 -0
  26. package/dist/core/elements/UIAnchor/UIAnchor.Internal.js +5 -0
  27. package/dist/{elements → core/elements}/UIAnchor/UIAnchor.d.ts +3 -3
  28. package/dist/core/elements/UIAnchor/UIAnchor.js +49 -0
  29. package/dist/core/elements/UIAnimatedImage/UIAnimatedImage.Internal.js +15 -0
  30. package/dist/core/elements/UIAnimatedImage/UIAnimatedImage.js +259 -0
  31. package/dist/core/elements/UIDummy/UIDummy.Internal.js +8 -0
  32. package/dist/{elements → core/elements}/UIDummy/UIDummy.d.ts +2 -2
  33. package/dist/core/elements/UIDummy/UIDummy.js +173 -0
  34. package/dist/core/elements/UIElement/UIElement.Internal.js +5 -0
  35. package/dist/{elements → core/elements}/UIElement/UIElement.d.ts +2 -2
  36. package/dist/core/elements/UIElement/UIElement.js +74 -0
  37. package/dist/core/elements/UIGraphics/UIGraphics.Internal.js +7 -0
  38. package/dist/core/elements/UIGraphics/UIGraphics.js +126 -0
  39. package/dist/core/elements/UIImage/UIImage.js +85 -0
  40. package/dist/core/elements/UINineSlice/UINineSlice.Internal.js +12 -0
  41. package/dist/core/elements/UINineSlice/UINineSlice.js +188 -0
  42. package/dist/core/elements/UIProgress/UIProgress.Internal.js +3 -0
  43. package/dist/core/elements/UIProgress/UIProgress.js +165 -0
  44. package/dist/core/elements/UIScene/UIScene.Internal.js +27 -0
  45. package/dist/core/elements/UIScene/UIScene.js +157 -0
  46. package/dist/core/elements/UIText/UIText.Internal.js +12 -0
  47. package/dist/core/elements/UIText/UIText.Measuring.js +153 -0
  48. package/dist/core/elements/UIText/UIText.Rendering.js +61 -0
  49. package/dist/core/elements/UIText/UIText.js +265 -0
  50. package/dist/core/layers/UIFullscreenLayer/UIFullscreenLayer.Internal.js +5 -0
  51. package/dist/core/layers/UIFullscreenLayer/UIFullscreenLayer.js +147 -0
  52. package/dist/core/layers/UILayer/UILayer.Internal.js +7 -0
  53. package/dist/core/layers/UILayer/UILayer.js +113 -0
  54. package/dist/core/miscellaneous/UIExpression.js +128 -0
  55. package/dist/core/miscellaneous/UIMode.js +30 -0
  56. package/dist/core/miscellaneous/UIOrientation.js +20 -0
  57. package/dist/core/miscellaneous/UIPriority.js +63 -0
  58. package/dist/core/miscellaneous/UIRelation.js +40 -0
  59. package/dist/core/miscellaneous/UITransparencyMode.js +12 -0
  60. package/dist/core/miscellaneous/area/UIArea.js +5 -0
  61. package/dist/core/miscellaneous/area/UIAreaCircle.js +32 -0
  62. package/dist/core/miscellaneous/area/UIAreaPolygon.js +40 -0
  63. package/dist/core/miscellaneous/area/UIAreaRectangle.js +36 -0
  64. package/dist/core/miscellaneous/area/UIAreaRoundedRectangle.js +72 -0
  65. package/dist/core/miscellaneous/asserts.js +163 -0
  66. package/dist/core/miscellaneous/canvas.js +37 -0
  67. package/dist/core/miscellaneous/color/UIColor.Internal.js +42 -0
  68. package/dist/core/miscellaneous/color/UIColor.js +636 -0
  69. package/dist/core/miscellaneous/computeTransform.js +82 -0
  70. package/dist/core/miscellaneous/generic-plane/UIGenericInstancedPlane/UIGenericInstancedPlane.Internal.js +168 -0
  71. package/dist/core/miscellaneous/generic-plane/UIGenericInstancedPlane/UIGenericInstancedPlane.js +349 -0
  72. package/dist/core/miscellaneous/generic-plane/UIGenericPlaneRegistry/UIGenericPlaneRegistry.js +357 -0
  73. package/dist/core/miscellaneous/generic-plane/shared.js +228 -0
  74. package/dist/core/miscellaneous/insets/UIInsets.Internal.js +3 -0
  75. package/dist/core/miscellaneous/insets/UIInsets.js +224 -0
  76. package/dist/core/miscellaneous/mask-function/UIProgressMaskFunction.js +19 -0
  77. package/dist/core/miscellaneous/mask-function/UIProgressMaskFunctionCircular.js +51 -0
  78. package/dist/core/miscellaneous/mask-function/UIProgressMaskFunctionDirectional.js +48 -0
  79. package/dist/{miscellaneous → core/miscellaneous}/math.d.ts +2 -0
  80. package/dist/core/miscellaneous/math.js +11 -0
  81. package/dist/core/miscellaneous/micro/UIMicro.Internal.js +15 -0
  82. package/dist/core/miscellaneous/micro/UIMicro.js +181 -0
  83. package/dist/core/miscellaneous/resize-policy/UIResizePolicy.js +9 -0
  84. package/dist/core/miscellaneous/resize-policy/UIResizePolicyCover.js +50 -0
  85. package/dist/core/miscellaneous/resize-policy/UIResizePolicyCross.js +52 -0
  86. package/dist/core/miscellaneous/resize-policy/UIResizePolicyCrossInverted.js +52 -0
  87. package/dist/core/miscellaneous/resize-policy/UIResizePolicyFit.js +50 -0
  88. package/dist/core/miscellaneous/resize-policy/UIResizePolicyFixedHeight.js +52 -0
  89. package/dist/core/miscellaneous/resize-policy/UIResizePolicyFixedWidth.js +52 -0
  90. package/dist/core/miscellaneous/resize-policy/UIResizePolicyNone.js +13 -0
  91. package/dist/core/miscellaneous/shared.js +37 -0
  92. package/dist/core/miscellaneous/text-span/UITextSpan.js +36 -0
  93. package/dist/core/miscellaneous/text-style/UITextStyle.Internal.js +17 -0
  94. package/dist/core/miscellaneous/text-style/UITextStyle.js +372 -0
  95. package/dist/core/miscellaneous/texture/UITextureView.Internal.js +6 -0
  96. package/dist/core/miscellaneous/texture/UITextureView.js +234 -0
  97. package/dist/core/miscellaneous/webglCapabilities.js +103 -0
  98. package/dist/core/shaders/UIImage.glsl.js +3 -0
  99. package/dist/core/shaders/UINineSlice.glsl.js +3 -0
  100. package/dist/core/shaders/UIProgress.glsl.js +3 -0
  101. package/dist/core/shaders/UIProgressMaskFunctionCircular.glsl.js +3 -0
  102. package/dist/core/shaders/UIProgressMaskFunctionDirectional.glsl.js +3 -0
  103. package/dist/{wrappers → core/wrappers}/UIInputWrapper/UIInputWrapper.Internal.d.ts +1 -1
  104. package/dist/{wrappers → core/wrappers}/UIInputWrapper/UIInputWrapper.d.ts +2 -2
  105. package/dist/core/wrappers/UIInputWrapper/UIInputWrapper.js +108 -0
  106. package/dist/{wrappers → core/wrappers}/UISceneWrapper/UISceneWrapper.Internal.d.ts +1 -1
  107. package/dist/{wrappers → core/wrappers}/UISceneWrapper/UISceneWrapper.d.ts +2 -2
  108. package/dist/core/wrappers/UISceneWrapper/UISceneWrapper.js +75 -0
  109. package/dist/{wrappers → core/wrappers}/UISolverWrapper/UISolverWrapper.Internal.d.ts +1 -1
  110. package/dist/{wrappers → core/wrappers}/UISolverWrapper/UISolverWrapper.d.ts +2 -2
  111. package/dist/core/wrappers/UISolverWrapper/UISolverWrapper.js +505 -0
  112. package/dist/index.js +51 -9246
  113. package/dist/particles/behaviorModules/UIBehaviorDirectionalGravity.d.ts +21 -0
  114. package/dist/particles/behaviorModules/UIBehaviorDirectionalGravity.js +47 -0
  115. package/dist/particles/behaviorModules/UIBehaviorModule.d.ts +14 -0
  116. package/dist/particles/behaviorModules/UIBehaviorModule.js +9 -0
  117. package/dist/particles/behaviorModules/UIBehaviorPointGravity.d.ts +39 -0
  118. package/dist/particles/behaviorModules/UIBehaviorPointGravity.js +110 -0
  119. package/dist/particles/behaviorModules/UIBehaviorScaleOverLife.d.ts +22 -0
  120. package/dist/particles/behaviorModules/UIBehaviorScaleOverLife.js +66 -0
  121. package/dist/particles/behaviorModules/UIBehaviorTorqueDamping.d.ts +20 -0
  122. package/dist/particles/behaviorModules/UIBehaviorTorqueDamping.js +48 -0
  123. package/dist/particles/behaviorModules/UIBehaviorTorqueNoise.d.ts +26 -0
  124. package/dist/particles/behaviorModules/UIBehaviorTorqueNoise.js +66 -0
  125. package/dist/particles/behaviorModules/UIBehaviorVelocityDamping.d.ts +20 -0
  126. package/dist/particles/behaviorModules/UIBehaviorVelocityDamping.js +49 -0
  127. package/dist/particles/behaviorModules/UIBehaviorVelocityNoise.d.ts +26 -0
  128. package/dist/particles/behaviorModules/UIBehaviorVelocityNoise.js +70 -0
  129. package/dist/particles/elements/UIEmitter.Internal.d.ts +15 -0
  130. package/dist/particles/elements/UIEmitter.Internal.js +11 -0
  131. package/dist/particles/elements/UIEmitter.d.ts +68 -0
  132. package/dist/particles/elements/UIEmitter.js +203 -0
  133. package/dist/particles/index.d.ts +18 -0
  134. package/dist/particles/index.js +18 -0
  135. package/dist/particles/instancedParticle/UIInstancedParticle.Internal.d.ts +13 -0
  136. package/dist/particles/instancedParticle/UIInstancedParticle.Internal.js +211 -0
  137. package/dist/particles/instancedParticle/UIInstancedParticle.d.ts +17 -0
  138. package/dist/particles/instancedParticle/UIInstancedParticle.js +93 -0
  139. package/dist/particles/miscellaneous/miscellaneous.d.ts +32 -0
  140. package/dist/particles/miscellaneous/miscellaneous.js +67 -0
  141. package/dist/particles/renderingModules/UIRenderingColorOverLife.d.ts +14 -0
  142. package/dist/particles/renderingModules/UIRenderingColorOverLife.js +32 -0
  143. package/dist/particles/renderingModules/UIRenderingColorOverVelocity.d.ts +15 -0
  144. package/dist/particles/renderingModules/UIRenderingColorOverVelocity.js +37 -0
  145. package/dist/particles/renderingModules/UIRenderingModule.d.ts +8 -0
  146. package/dist/particles/renderingModules/UIRenderingModule.js +9 -0
  147. package/dist/particles/renderingModules/UIRenderingTexture.d.ts +14 -0
  148. package/dist/particles/renderingModules/UIRenderingTexture.js +26 -0
  149. package/dist/particles/shaders/UIRenderingColorOverLife.glsl.js +3 -0
  150. package/dist/particles/shaders/UIRenderingColorOverVelocity.glsl.js +3 -0
  151. package/dist/particles/shaders/UIRenderingTexture.glsl.js +3 -0
  152. package/dist/particles/spawnModules/UISpawnModule.d.ts +9 -0
  153. package/dist/particles/spawnModules/UISpawnModule.js +9 -0
  154. package/dist/particles/spawnModules/UISpawnOffset.d.ts +21 -0
  155. package/dist/particles/spawnModules/UISpawnOffset.js +46 -0
  156. package/dist/particles/spawnModules/UISpawnRandomLifetime.d.ts +20 -0
  157. package/dist/particles/spawnModules/UISpawnRandomLifetime.js +47 -0
  158. package/dist/particles/spawnModules/UISpawnRandomRotation.d.ts +20 -0
  159. package/dist/particles/spawnModules/UISpawnRandomRotation.js +45 -0
  160. package/dist/particles/spawnModules/UISpawnRandomScale.d.ts +26 -0
  161. package/dist/particles/spawnModules/UISpawnRandomScale.js +60 -0
  162. package/dist/particles/spawnModules/UISpawnRandomTorque.d.ts +20 -0
  163. package/dist/particles/spawnModules/UISpawnRandomTorque.js +45 -0
  164. package/dist/particles/spawnModules/UISpawnRandomVelocity.d.ts +26 -0
  165. package/dist/particles/spawnModules/UISpawnRandomVelocity.js +64 -0
  166. package/dist/particles/spawnModules/UISpawnRectangle.d.ts +27 -0
  167. package/dist/particles/spawnModules/UISpawnRectangle.js +62 -0
  168. package/package.json +27 -36
  169. package/dist/index.js.map +0 -1
  170. package/dist/index.min.js +0 -2
  171. package/dist/index.min.js.map +0 -1
  172. /package/dist/{constraints → core/constraints}/UIAspectConstraint/UIAspectConstraint.Internal.d.ts +0 -0
  173. /package/dist/{constraints → core/constraints}/UIAspectConstraint/UIAspectConstraint.d.ts +0 -0
  174. /package/dist/{constraints → core/constraints}/UICustomConstraint.d.ts +0 -0
  175. /package/dist/{constraints → core/constraints}/UIHeightConstraint/UIHeightConstraint.Internal.d.ts +0 -0
  176. /package/dist/{constraints → core/constraints}/UIHeightConstraint/UIHeightConstraint.d.ts +0 -0
  177. /package/dist/{constraints → core/constraints}/UIHorizontalDistanceConstraint/UIHorizontalDistanceConstraint.Internal.d.ts +0 -0
  178. /package/dist/{constraints → core/constraints}/UIHorizontalDistanceConstraint/UIHorizontalDistanceConstraint.d.ts +0 -0
  179. /package/dist/{constraints → core/constraints}/UIHorizontalInterpolationConstraint/UIHorizontalInterpolationConstraint.Internal.d.ts +0 -0
  180. /package/dist/{constraints → core/constraints}/UIHorizontalInterpolationConstraint/UIHorizontalInterpolationConstraint.d.ts +0 -0
  181. /package/dist/{constraints → core/constraints}/UIHorizontalProportionConstraint/UIHorizontalProportionConstraint.Internal.d.ts +0 -0
  182. /package/dist/{constraints → core/constraints}/UIHorizontalProportionConstraint/UIHorizontalProportionConstraint.d.ts +0 -0
  183. /package/dist/{constraints → core/constraints}/UISingleParameterConstraint/UISingleParameterConstraint.Internal.d.ts +0 -0
  184. /package/dist/{constraints → core/constraints}/UISingleParameterConstraint/UISingleParameterConstraint.d.ts +0 -0
  185. /package/dist/{constraints → core/constraints}/UIVerticalDistanceConstraint/UIVerticalDistanceConstraint.Internal.d.ts +0 -0
  186. /package/dist/{constraints → core/constraints}/UIVerticalDistanceConstraint/UIVerticalDistanceConstraint.d.ts +0 -0
  187. /package/dist/{constraints → core/constraints}/UIVerticalInterpolationConstraint/UIVerticalInterpolationConstraint.Internal.d.ts +0 -0
  188. /package/dist/{constraints → core/constraints}/UIVerticalInterpolationConstraint/UIVerticalInterpolationConstraint.d.ts +0 -0
  189. /package/dist/{constraints → core/constraints}/UIVerticalProportionConstraint/UIVerticalProportionConstraint.Internal.d.ts +0 -0
  190. /package/dist/{constraints → core/constraints}/UIVerticalProportionConstraint/UIVerticalProportionConstraint.d.ts +0 -0
  191. /package/dist/{constraints → core/constraints}/UIWidthConstraint/UIWidthConstraint.Internal.d.ts +0 -0
  192. /package/dist/{constraints → core/constraints}/UIWidthConstraint/UIWidthConstraint.d.ts +0 -0
  193. /package/dist/{constraints → core/constraints}/builders/UIConstraint2DBuilder.Internal.d.ts +0 -0
  194. /package/dist/{constraints → core/constraints}/builders/UIConstraint2DBuilder.d.ts +0 -0
  195. /package/dist/{constraints → core/constraints}/builders/UICoverConstraintBuilder.Internal.d.ts +0 -0
  196. /package/dist/{constraints → core/constraints}/builders/UICoverConstraintBuilder.d.ts +0 -0
  197. /package/dist/{constraints → core/constraints}/builders/UIFitConstraintBuilder.Internal.d.ts +0 -0
  198. /package/dist/{constraints → core/constraints}/builders/UIFitConstraintBuilder.d.ts +0 -0
  199. /package/dist/{elements → core/elements}/UIAnimatedImage/UIAnimatedImage.Internal.d.ts +0 -0
  200. /package/dist/{elements → core/elements}/UIAnimatedImage/UIAnimatedImage.d.ts +0 -0
  201. /package/dist/{elements → core/elements}/UIDummy/UIDummy.Internal.d.ts +0 -0
  202. /package/dist/{elements → core/elements}/UIElement/UIElement.Internal.d.ts +0 -0
  203. /package/dist/{elements → core/elements}/UIGraphics/UIGraphics.Internal.d.ts +0 -0
  204. /package/dist/{elements → core/elements}/UIGraphics/UIGraphics.d.ts +0 -0
  205. /package/dist/{elements → core/elements}/UIImage/UIImage.Internal.d.ts +0 -0
  206. /package/dist/{elements → core/elements}/UIImage/UIImage.d.ts +0 -0
  207. /package/dist/{elements → core/elements}/UINineSlice/UINineSlice.Internal.d.ts +0 -0
  208. /package/dist/{elements → core/elements}/UINineSlice/UINineSlice.d.ts +0 -0
  209. /package/dist/{elements → core/elements}/UIProgress/UIProgress.Internal.d.ts +0 -0
  210. /package/dist/{elements → core/elements}/UIProgress/UIProgress.d.ts +0 -0
  211. /package/dist/{elements → core/elements}/UIScene/UIScene.Internal.d.ts +0 -0
  212. /package/dist/{elements → core/elements}/UIScene/UIScene.d.ts +0 -0
  213. /package/dist/{elements → core/elements}/UIText/UIText.Interfaces.d.ts +0 -0
  214. /package/dist/{elements → core/elements}/UIText/UIText.Internal.d.ts +0 -0
  215. /package/dist/{elements → core/elements}/UIText/UIText.Measuring.d.ts +0 -0
  216. /package/dist/{elements → core/elements}/UIText/UIText.Rendering.d.ts +0 -0
  217. /package/dist/{elements → core/elements}/UIText/UIText.d.ts +0 -0
  218. /package/dist/{index.d.ts → core/index.d.ts} +0 -0
  219. /package/dist/{layers → core/layers}/UIFullscreenLayer/UIFullscreenLayer.Internal.d.ts +0 -0
  220. /package/dist/{layers → core/layers}/UIFullscreenLayer/UIFullscreenLayer.d.ts +0 -0
  221. /package/dist/{layers → core/layers}/UILayer/UILayer.Internal.d.ts +0 -0
  222. /package/dist/{layers → core/layers}/UILayer/UILayer.d.ts +0 -0
  223. /package/dist/{miscellaneous → core/miscellaneous}/UIExpression.d.ts +0 -0
  224. /package/dist/{miscellaneous → core/miscellaneous}/UIMode.d.ts +0 -0
  225. /package/dist/{miscellaneous → core/miscellaneous}/UIOrientation.d.ts +0 -0
  226. /package/dist/{miscellaneous → core/miscellaneous}/UIPriority.d.ts +0 -0
  227. /package/dist/{miscellaneous → core/miscellaneous}/UIRelation.d.ts +0 -0
  228. /package/dist/{miscellaneous → core/miscellaneous}/UITransparencyMode.d.ts +0 -0
  229. /package/dist/{miscellaneous → core/miscellaneous}/area/UIArea.d.ts +0 -0
  230. /package/dist/{miscellaneous → core/miscellaneous}/area/UIAreaCircle.d.ts +0 -0
  231. /package/dist/{miscellaneous → core/miscellaneous}/area/UIAreaPolygon.d.ts +0 -0
  232. /package/dist/{miscellaneous → core/miscellaneous}/area/UIAreaRectangle.d.ts +0 -0
  233. /package/dist/{miscellaneous → core/miscellaneous}/area/UIAreaRoundedRectangle.d.ts +0 -0
  234. /package/dist/{miscellaneous → core/miscellaneous}/asserts.d.ts +0 -0
  235. /package/dist/{miscellaneous → core/miscellaneous}/canvas.d.ts +0 -0
  236. /package/dist/{miscellaneous → core/miscellaneous}/color/UIColor.Internal.d.ts +0 -0
  237. /package/dist/{miscellaneous → core/miscellaneous}/color/UIColor.d.ts +0 -0
  238. /package/dist/{miscellaneous → core/miscellaneous}/computeTransform.d.ts +0 -0
  239. /package/dist/{miscellaneous → core/miscellaneous}/generic-plane/UIGenericInstancedPlane/UIGenericInstancedPlane.Internal.d.ts +0 -0
  240. /package/dist/{miscellaneous → core/miscellaneous}/generic-plane/UIGenericInstancedPlane/UIGenericInstancedPlane.d.ts +0 -0
  241. /package/dist/{miscellaneous → core/miscellaneous}/generic-plane/UIGenericPlaneRegistry/UIGenericPlaneRegistry.Internal.d.ts +0 -0
  242. /package/dist/{miscellaneous → core/miscellaneous}/generic-plane/UIGenericPlaneRegistry/UIGenericPlaneRegistry.d.ts +0 -0
  243. /package/dist/{miscellaneous → core/miscellaneous}/generic-plane/shared.d.ts +0 -0
  244. /package/dist/{miscellaneous → core/miscellaneous}/insets/UIInsets.Internal.d.ts +0 -0
  245. /package/dist/{miscellaneous → core/miscellaneous}/insets/UIInsets.d.ts +0 -0
  246. /package/dist/{miscellaneous → core/miscellaneous}/mask-function/UIProgressMaskFunction.d.ts +0 -0
  247. /package/dist/{miscellaneous → core/miscellaneous}/mask-function/UIProgressMaskFunctionCircular.d.ts +0 -0
  248. /package/dist/{miscellaneous → core/miscellaneous}/mask-function/UIProgressMaskFunctionDirectional.d.ts +0 -0
  249. /package/dist/{miscellaneous → core/miscellaneous}/micro/UIMicro.Internal.d.ts +0 -0
  250. /package/dist/{miscellaneous → core/miscellaneous}/micro/UIMicro.d.ts +0 -0
  251. /package/dist/{miscellaneous → core/miscellaneous}/resize-policy/UIResizePolicy.d.ts +0 -0
  252. /package/dist/{miscellaneous → core/miscellaneous}/resize-policy/UIResizePolicyCover.d.ts +0 -0
  253. /package/dist/{miscellaneous → core/miscellaneous}/resize-policy/UIResizePolicyCross.d.ts +0 -0
  254. /package/dist/{miscellaneous → core/miscellaneous}/resize-policy/UIResizePolicyCrossInverted.d.ts +0 -0
  255. /package/dist/{miscellaneous → core/miscellaneous}/resize-policy/UIResizePolicyFit.d.ts +0 -0
  256. /package/dist/{miscellaneous → core/miscellaneous}/resize-policy/UIResizePolicyFixedHeight.d.ts +0 -0
  257. /package/dist/{miscellaneous → core/miscellaneous}/resize-policy/UIResizePolicyFixedWidth.d.ts +0 -0
  258. /package/dist/{miscellaneous → core/miscellaneous}/resize-policy/UIResizePolicyNone.d.ts +0 -0
  259. /package/dist/{miscellaneous → core/miscellaneous}/shared.d.ts +0 -0
  260. /package/dist/{miscellaneous → core/miscellaneous}/text-span/UITextSpan.Internal.d.ts +0 -0
  261. /package/dist/{miscellaneous → core/miscellaneous}/text-span/UITextSpan.d.ts +0 -0
  262. /package/dist/{miscellaneous → core/miscellaneous}/text-style/UITextStyle.Internal.d.ts +0 -0
  263. /package/dist/{miscellaneous → core/miscellaneous}/text-style/UITextStyle.d.ts +0 -0
  264. /package/dist/{miscellaneous → core/miscellaneous}/texture/UITextureView.Internal.d.ts +0 -0
  265. /package/dist/{miscellaneous → core/miscellaneous}/texture/UITextureView.d.ts +0 -0
  266. /package/dist/{miscellaneous → core/miscellaneous}/webglCapabilities.d.ts +0 -0
@@ -0,0 +1,163 @@
1
+ import { UILayer } from '../layers/UILayer/UILayer.js';
2
+ import { EPSILON } from './math.js';
3
+ import { isUILayerElement } from './shared.js';
4
+
5
+ /**
6
+ * Validates value is finite number within safe range.
7
+ * @param value Number to validate
8
+ * @param subject Value name for error messages
9
+ * @throws If value is not finite or exceeds safe range
10
+ */
11
+ function assertValidNumber(value, subject) {
12
+ if (process.env.NODE_ENV !== "production") {
13
+ if (!Number.isFinite(value)) {
14
+ throw new Error(`${subject}: value must be a finite number`);
15
+ }
16
+ if (Math.abs(value) > Number.MAX_SAFE_INTEGER) {
17
+ throw new Error(`${subject}: value exceeds maximum safe integer range`);
18
+ }
19
+ }
20
+ }
21
+ /**
22
+ * Validates value is positive (>= EPSILON).
23
+ * @param value Number to validate
24
+ * @param subject Value name for error messages
25
+ * @throws If value is invalid or below EPSILON
26
+ */
27
+ function assertValidPositiveNumber(value, subject) {
28
+ if (process.env.NODE_ENV !== "production") {
29
+ assertValidNumber(value, subject);
30
+ if (value < EPSILON) {
31
+ throw new Error(`${subject}: value must be greater than or equal to ${EPSILON}`);
32
+ }
33
+ }
34
+ }
35
+ /**
36
+ * Validates value is non-negative (>= 0).
37
+ * @param value Number to validate
38
+ * @param subject Value name for error messages
39
+ * @throws If value is invalid or negative
40
+ */
41
+ function assertValidNonNegativeNumber(value, subject) {
42
+ if (process.env.NODE_ENV !== "production") {
43
+ assertValidNumber(value, subject);
44
+ if (value < 0) {
45
+ throw new Error(`${subject}: value must be greater than or equal to 0`);
46
+ }
47
+ }
48
+ }
49
+ /**
50
+ * Validates constraint arguments are from same layer.
51
+ * @param a First constraint subject
52
+ * @param b Second constraint subject
53
+ * @param subject Constraint name for error messages
54
+ * @returns Common layer for both subjects
55
+ * @throws If subjects are invalid or from different layers
56
+ */
57
+ function assertValidConstraintArguments(a, b, subject) {
58
+ if (process.env.NODE_ENV !== "production") {
59
+ if (a instanceof UILayer && b instanceof UILayer) {
60
+ throw new Error(`${subject}: layer cannot be snapped to another layer`);
61
+ }
62
+ let layerA;
63
+ let layerB;
64
+ if (a instanceof UILayer) {
65
+ layerA = a;
66
+ }
67
+ else if (isUILayerElement(a)) {
68
+ layerA = a.layer;
69
+ }
70
+ else {
71
+ throw new Error(`${subject}: A must be a UILayer or a UILayerElement`);
72
+ }
73
+ if (b instanceof UILayer) {
74
+ layerB = b;
75
+ }
76
+ else if (isUILayerElement(b)) {
77
+ layerB = b.layer;
78
+ }
79
+ else {
80
+ throw new Error(`${subject}: B must be a UILayer or a UILayerElement`);
81
+ }
82
+ if (layerA !== layerB) {
83
+ throw new Error(`${subject}: elements must be on the same layer`);
84
+ }
85
+ return layerA;
86
+ }
87
+ if (a instanceof UILayer) {
88
+ return a;
89
+ }
90
+ if (isUILayerElement(a)) {
91
+ return a.layer;
92
+ }
93
+ if (b instanceof UILayer) {
94
+ return b;
95
+ }
96
+ if (isUILayerElement(b)) {
97
+ return b.layer;
98
+ }
99
+ throw new Error(`${subject}: no valid subjects found`);
100
+ }
101
+ /**
102
+ * Validates interpolation constraint subjects.
103
+ * @param subject Constraint name for error messages
104
+ * @param a First element
105
+ * @param b Second element
106
+ * @param c Element to interpolate
107
+ * @param anchorA Anchor on element A
108
+ * @param anchorB Anchor on element B
109
+ * @returns Common layer for all subjects
110
+ * @throws If subjects violate interpolation constraints
111
+ */
112
+ function assertValidInterpolationConstraintArguments(subject, a, b, c, anchorA, anchorB) {
113
+ if (process.env.NODE_ENV !== "production") {
114
+ if (c instanceof UILayer) {
115
+ throw new Error(`${subject}: C cannot be a layer`);
116
+ }
117
+ if (!isUILayerElement(c)) {
118
+ throw new Error(`${subject}: C must be a UILayerElement`);
119
+ }
120
+ let layerA;
121
+ let layerB;
122
+ if (a instanceof UILayer || isUILayerElement(a)) {
123
+ layerA = a instanceof UILayer ? a : a.layer;
124
+ }
125
+ else {
126
+ throw new Error(`${subject}: A must be UILayer or UILayerElement`);
127
+ }
128
+ if (b instanceof UILayer || isUILayerElement(b)) {
129
+ layerB = b instanceof UILayer ? b : b.layer;
130
+ }
131
+ else {
132
+ throw new Error(`${subject}: B must be UILayer or UILayerElement`);
133
+ }
134
+ const layerC = c.layer;
135
+ if (layerA !== layerB || layerA !== layerC) {
136
+ throw new Error(`${subject}: all elements must be on the same layer`);
137
+ }
138
+ if (c === a || c === b) {
139
+ throw new Error(`${subject}: C cannot be equal to A or B`);
140
+ }
141
+ if (a === b) {
142
+ if (Math.abs(anchorA - anchorB) <= EPSILON) {
143
+ throw new Error(`${subject}: when A and B are the same, anchorA and anchorB must differ by more than ${EPSILON}`);
144
+ }
145
+ }
146
+ return layerA;
147
+ }
148
+ if (isUILayerElement(a)) {
149
+ return a.layer;
150
+ }
151
+ if (isUILayerElement(b)) {
152
+ return b.layer;
153
+ }
154
+ if (a instanceof UILayer) {
155
+ return a;
156
+ }
157
+ if (b instanceof UILayer) {
158
+ return b;
159
+ }
160
+ throw new Error(`${subject}: no valid subjects found`);
161
+ }
162
+
163
+ export { assertValidConstraintArguments, assertValidInterpolationConstraintArguments, assertValidNonNegativeNumber, assertValidNumber, assertValidPositiveNumber };
@@ -0,0 +1,37 @@
1
+ import { CanvasTexture, UVMapping, ClampToEdgeWrapping, LinearFilter, RGBAFormat, UnsignedByteType, SRGBColorSpace, NoColorSpace } from 'three';
2
+ import { checkOffscreenCanvasSupport, checkSRGBSupport } from './webglCapabilities.js';
3
+
4
+ /**
5
+ * Creates a canvas using OffscreenCanvas if available, otherwise falls back to HTMLCanvasElement.
6
+ *
7
+ * @param width - Canvas width in pixels
8
+ * @param height - Canvas height in pixels
9
+ * @returns Canvas instance
10
+ */
11
+ function createCanvas(width, height) {
12
+ if (checkOffscreenCanvasSupport()) {
13
+ return new OffscreenCanvas(width, height);
14
+ }
15
+ const canvasElement = document.createElement("canvas");
16
+ canvasElement.width = width;
17
+ canvasElement.height = height;
18
+ return canvasElement;
19
+ }
20
+ /**
21
+ * Creates a CanvasTexture with maximum WebGL1/WebGL2 compatibility.
22
+ * - ClampToEdge wrapping (required for NPOT in WebGL1)
23
+ * - Linear filtering without mipmaps (NPOT-safe)
24
+ * - RGBA/UnsignedByte format (no extensions needed)
25
+ * - sRGB colorspace only if supported
26
+ *
27
+ * @param canvas - Source canvas
28
+ * @returns Configured CanvasTexture
29
+ */
30
+ function createCanvasTexture(canvas) {
31
+ const texture = new CanvasTexture(canvas, UVMapping, ClampToEdgeWrapping, ClampToEdgeWrapping, LinearFilter, LinearFilter, RGBAFormat, UnsignedByteType, 1);
32
+ texture.colorSpace = checkSRGBSupport() ? SRGBColorSpace : NoColorSpace;
33
+ texture.generateMipmaps = false;
34
+ return texture;
35
+ }
36
+
37
+ export { createCanvas, createCanvasTexture };
@@ -0,0 +1,42 @@
1
+ const COLORS = {
2
+ black: 0x000000,
3
+ white: 0xffffff,
4
+ red: 0xff0000,
5
+ green: 0x008000,
6
+ blue: 0x0000ff,
7
+ yellow: 0xffff00,
8
+ cyan: 0x00ffff,
9
+ magenta: 0xff00ff,
10
+ gray: 0x808080,
11
+ grey: 0x808080,
12
+ silver: 0xc0c0c0,
13
+ maroon: 0x800000,
14
+ olive: 0x808000,
15
+ lime: 0x00ff00,
16
+ aqua: 0x00ffff,
17
+ teal: 0x008080,
18
+ navy: 0x000080,
19
+ fuchsia: 0xff00ff,
20
+ purple: 0x800080,
21
+ orange: 0xffa500,
22
+ pink: 0xffc0cb,
23
+ brown: 0xa52a2a,
24
+ gold: 0xffd700,
25
+ violet: 0xee82ee,
26
+ indigo: 0x4b0082,
27
+ coral: 0xff7f50,
28
+ salmon: 0xfa8072,
29
+ khaki: 0xf0e68c,
30
+ plum: 0xdda0dd,
31
+ orchid: 0xda70d6,
32
+ tan: 0xd2b48c,
33
+ beige: 0xf5f5dc,
34
+ mint: 0x98fb98,
35
+ lavender: 0xe6e6fa,
36
+ crimson: 0xdc143c,
37
+ azure: 0xf0ffff,
38
+ ivory: 0xfffff0,
39
+ snow: 0xfffafa,
40
+ };
41
+
42
+ export { COLORS };