@woosh/meep-engine 2.165.6 → 2.166.0

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 (1016) hide show
  1. package/build/bundle-worker-image-decoder.js +1 -1
  2. package/editor/tools/v2/GizmoNode.d.ts +21 -0
  3. package/editor/tools/v2/GizmoNode.d.ts.map +1 -0
  4. package/editor/tools/v2/TransformControls.d.ts +87 -20
  5. package/editor/tools/v2/TransformControls.d.ts.map +1 -0
  6. package/editor/tools/v2/TransformControlsGizmo.d.ts +22 -0
  7. package/editor/tools/v2/TransformControlsGizmo.d.ts.map +1 -0
  8. package/editor/tools/v2/TransformControlsPlane.d.ts +6 -0
  9. package/editor/tools/v2/TransformControlsPlane.d.ts.map +1 -0
  10. package/editor/tools/v2/TranslateHelperGeometry.d.ts +6 -0
  11. package/editor/tools/v2/TranslateHelperGeometry.d.ts.map +1 -0
  12. package/package.json +1 -1
  13. package/src/CORRECTNESS_HUNT_2026_07_24.md +142 -0
  14. package/src/core/binary/BinaryBuffer.js +1 -1
  15. package/src/core/binary/EncodingBinaryBuffer.d.ts.map +1 -1
  16. package/src/core/binary/EncodingBinaryBuffer.js +3 -1
  17. package/src/core/binary/data_view/DataType2DataViewReaders.d.ts +8 -12
  18. package/src/core/binary/data_view/DataType2DataViewReaders.d.ts.map +1 -1
  19. package/src/core/binary/data_view/DataType2DataViewWriters.d.ts +8 -12
  20. package/src/core/binary/data_view/DataType2DataViewWriters.d.ts.map +1 -1
  21. package/src/core/binary/data_view/DataViewStructAccessor.d.ts +39 -18
  22. package/src/core/binary/type/BinaryDataType.d.ts +15 -15
  23. package/src/core/binary/type/DataType2TypedArrayConstructorMapping.d.ts +7 -11
  24. package/src/core/binary/type/DataType2TypedArrayConstructorMapping.d.ts.map +1 -1
  25. package/src/core/binary/type/DataTypeByteSizes.d.ts +7 -13
  26. package/src/core/binary/type/DataTypeByteSizes.d.ts.map +1 -1
  27. package/src/core/binary/type/DataTypeIndices.d.ts +8 -11
  28. package/src/core/binary/type/DataTypeIndices.d.ts.map +1 -1
  29. package/src/core/cache/Cache.d.ts +226 -56
  30. package/src/core/cache/Cache.d.ts.map +1 -1
  31. package/src/core/cache/Cache.js +0 -4
  32. package/src/core/cache/CacheElement.d.ts.map +1 -1
  33. package/src/core/cache/CacheElement.js +4 -0
  34. package/src/core/cache/FrequencySketch.d.ts +0 -21
  35. package/src/core/cache/FrequencySketch.d.ts.map +1 -1
  36. package/src/core/cache/FrequencySketch.js +66 -65
  37. package/src/core/cache/LoadingCache.d.ts +72 -23
  38. package/src/core/cache/wtinylfu/CacheElementWTinylfu.d.ts +17 -0
  39. package/src/core/cache/wtinylfu/CacheElementWTinylfu.d.ts.map +1 -0
  40. package/src/core/cache/wtinylfu/CacheElementWTinylfu.js +18 -0
  41. package/src/core/cache/wtinylfu/CacheRegionType.d.ts +10 -0
  42. package/src/core/cache/wtinylfu/CacheRegionType.d.ts.map +1 -0
  43. package/src/core/cache/wtinylfu/CacheRegionType.js +10 -0
  44. package/src/core/cache/wtinylfu/CacheRegionWTinylfu.d.ts +66 -0
  45. package/src/core/cache/wtinylfu/CacheRegionWTinylfu.d.ts.map +1 -0
  46. package/src/core/cache/wtinylfu/CacheRegionWTinylfu.js +183 -0
  47. package/src/core/cache/wtinylfu/CacheWTinylfu.d.ts +279 -0
  48. package/src/core/cache/wtinylfu/CacheWTinylfu.d.ts.map +1 -0
  49. package/src/core/cache/wtinylfu/CacheWTinylfu.js +807 -0
  50. package/src/core/cache/wtinylfu/benchmark/CacheWTinylfu.bench.md +243 -0
  51. package/src/core/cache/wtinylfu/wtinylfuDecisions.d.ts +80 -0
  52. package/src/core/cache/wtinylfu/wtinylfuDecisions.d.ts.map +1 -0
  53. package/src/core/cache/wtinylfu/wtinylfuDecisions.js +102 -0
  54. package/src/core/collection/RingBuffer.d.ts.map +1 -1
  55. package/src/core/collection/RingBuffer.js +15 -3
  56. package/src/core/collection/Stack.d.ts +2 -2
  57. package/src/core/collection/array/array_copy.d.ts +12 -7
  58. package/src/core/collection/array/computeHashArray.d.ts +9 -1
  59. package/src/core/collection/array/isArrayEqualStrict.d.ts +8 -1
  60. package/src/core/collection/array/isArraysEqualWithComparator.d.ts +10 -1
  61. package/src/core/collection/array/iterator/ArrayIteratorRandom.d.ts +3 -1
  62. package/src/core/collection/array/iterator/ArrayIteratorRandom.d.ts.map +1 -1
  63. package/src/core/collection/list/List.d.ts +334 -45
  64. package/src/core/collection/list/List.d.ts.map +1 -1
  65. package/src/core/collection/list/ListForwarder.d.ts +37 -18
  66. package/src/core/collection/map/HashMap.d.ts +199 -40
  67. package/src/core/collection/map/HashMap.d.ts.map +1 -1
  68. package/src/core/collection/map/HashMap.js +5 -17
  69. package/src/core/collection/queue/Deque.d.ts +113 -37
  70. package/src/core/collection/set/ArraySet.d.ts +87 -26
  71. package/src/core/collection/set/HashSet.d.ts +66 -33
  72. package/src/core/collection/set/HashSet.d.ts.map +1 -1
  73. package/src/core/collection/table/bind/TableRecord.d.ts +21 -20
  74. package/src/core/color/Color.d.ts +1 -2
  75. package/src/core/color/Color.d.ts.map +1 -1
  76. package/src/core/events/signal/Signal.d.ts +210 -57
  77. package/src/core/events/signal/signal_filter.d.ts +1 -1
  78. package/src/core/fsm/simple/SimpleStateMachine.d.ts +83 -27
  79. package/src/core/fsm/simple/SimpleStateMachineDescription.d.ts +90 -21
  80. package/src/core/geom/2d/aabb/AABB2.d.ts +335 -51
  81. package/src/core/geom/2d/line/line2_compute_segment_point_distance_sqr.d.ts.map +1 -1
  82. package/src/core/geom/2d/line/line2_compute_segment_point_distance_sqr.js +5 -0
  83. package/src/core/geom/2d/quad-tree/QuadTreeDatum.d.ts +1 -6
  84. package/src/core/geom/2d/quad-tree/QuadTreeDatum.d.ts.map +1 -1
  85. package/src/core/geom/2d/quad-tree/QuadTreeNode.d.ts +1 -2
  86. package/src/core/geom/2d/quad-tree/QuadTreeNode.d.ts.map +1 -1
  87. package/src/core/geom/3d/SurfacePoint3.d.ts +62 -17
  88. package/src/core/geom/3d/aabb/aabb3_build_corners.d.ts +13 -1
  89. package/src/core/geom/3d/frustum/read_three_planes_to_array.d.ts +7 -3
  90. package/src/core/geom/3d/line/line3_compute_nearest_point_to_point.d.ts +7 -6
  91. package/src/core/geom/3d/sphere/harmonics/sh3_sample_by_direction.d.ts +16 -6
  92. package/src/core/geom/ConicRay.d.ts.map +1 -1
  93. package/src/core/geom/ConicRay.js +9 -2
  94. package/src/core/geom/Quaternion.d.ts +1 -2
  95. package/src/core/geom/Quaternion.d.ts.map +1 -1
  96. package/src/core/geom/Quaternion.js +7 -3
  97. package/src/core/geom/Vector1.d.ts +1 -2
  98. package/src/core/geom/Vector1.d.ts.map +1 -1
  99. package/src/core/geom/Vector2.d.ts +1 -2
  100. package/src/core/geom/Vector2.d.ts.map +1 -1
  101. package/src/core/geom/Vector3.d.ts +1 -2
  102. package/src/core/geom/Vector3.d.ts.map +1 -1
  103. package/src/core/geom/Vector4.d.ts +1 -1
  104. package/src/core/geom/Vector4.d.ts.map +1 -1
  105. package/src/core/graph/v2/Graph.d.ts +4 -4
  106. package/src/core/graph/v2/Graph.d.ts.map +1 -1
  107. package/src/core/json/resolvePathByArray.d.ts +10 -1
  108. package/src/core/math/build_gaussian_kernel_1d.d.ts +2 -2
  109. package/src/core/math/build_gaussian_kernel_1d.d.ts.map +1 -1
  110. package/src/core/math/build_gaussian_kernel_1d.js +4 -2
  111. package/src/core/math/build_gaussian_kernel_2d.d.ts +2 -2
  112. package/src/core/math/build_gaussian_kernel_2d.d.ts.map +1 -1
  113. package/src/core/math/build_gaussian_kernel_2d.js +4 -2
  114. package/src/core/math/clamp.d.ts +9 -1
  115. package/src/core/math/epsilonEquals.d.ts +9 -1
  116. package/src/core/math/gaussian.d.ts +2 -2
  117. package/src/core/math/gaussian.js +2 -2
  118. package/src/core/math/interval/NumericInterval.d.ts +1 -2
  119. package/src/core/math/interval/NumericInterval.d.ts.map +1 -1
  120. package/src/core/math/noise/create_simplex_noise_2d.d.ts +7 -1
  121. package/src/core/math/random/seededRandom.d.ts +3 -1
  122. package/src/core/math/remap.d.ts +12 -5
  123. package/src/core/math/sign.d.ts +10 -1
  124. package/src/core/math/spline/spline3_bezier_bounds.d.ts.map +1 -1
  125. package/src/core/math/spline/spline3_bezier_bounds.js +10 -3
  126. package/src/core/math/spline/spline3_bezier_to_hermite.d.ts +8 -7
  127. package/src/core/math/spline/spline3_bezier_to_hermite.d.ts.map +1 -1
  128. package/src/core/math/spline/spline3_bezier_to_hermite.js +13 -12
  129. package/src/core/math/spline/spline3_hermite_bounds.d.ts.map +1 -1
  130. package/src/core/math/spline/spline3_hermite_bounds.js +10 -3
  131. package/src/core/math/spline/spline3_hermite_bounds_t.d.ts.map +1 -1
  132. package/src/core/math/spline/spline3_hermite_bounds_t.js +115 -109
  133. package/src/core/math/spline/spline3_hermite_to_bezier.d.ts +2 -0
  134. package/src/core/math/spline/spline3_hermite_to_bezier.d.ts.map +1 -1
  135. package/src/core/math/spline/spline3_hermite_to_bezier.js +2 -0
  136. package/src/core/math/statistics/computeStatisticalMean.js +1 -1
  137. package/src/core/math/statistics/gaussian_amplitude.d.ts.map +1 -1
  138. package/src/core/math/statistics/gaussian_amplitude.js +3 -1
  139. package/src/core/model/BooleanVector3.d.ts +77 -28
  140. package/src/core/model/BooleanVector3.d.ts.map +1 -1
  141. package/src/core/model/BoundedValue.d.ts +5 -5
  142. package/src/core/model/BoundedValue.d.ts.map +1 -1
  143. package/src/core/model/ModuleRegistry.d.ts +45 -3
  144. package/src/core/model/ObservedBoolean.d.ts +1 -2
  145. package/src/core/model/ObservedBoolean.d.ts.map +1 -1
  146. package/src/core/model/ObservedEnum.d.ts +91 -7
  147. package/src/core/model/ObservedEnum.d.ts.map +1 -1
  148. package/src/core/model/ObservedString.d.ts +1 -2
  149. package/src/core/model/ObservedString.d.ts.map +1 -1
  150. package/src/core/model/ObservedValue.d.ts +1 -1
  151. package/src/core/model/ObservedValue.d.ts.map +1 -1
  152. package/src/core/model/node-graph/Connection.d.ts +57 -12
  153. package/src/core/model/node-graph/NodeGraph.d.ts +2 -2
  154. package/src/core/model/node-graph/node/NodeDescription.d.ts +166 -15
  155. package/src/core/model/node-graph/node/NodeDescription.d.ts.map +1 -1
  156. package/src/core/model/node-graph/node/NodeInstance.d.ts +181 -22
  157. package/src/core/model/node-graph/node/NodeInstance.d.ts.map +1 -1
  158. package/src/core/model/node-graph/node/NodeInstancePortReference.d.ts +82 -3
  159. package/src/core/model/node-graph/node/Port.d.ts +72 -3
  160. package/src/core/model/node-graph/node/Port.d.ts.map +1 -1
  161. package/src/core/model/node-graph/node/PortDirection.d.ts +7 -5
  162. package/src/core/model/node-graph/type/DataType.d.ts +61 -4
  163. package/src/core/model/node-graph/type/ParametricDataType.d.ts +0 -1
  164. package/src/core/model/node-graph/type/ParametricDataType.d.ts.map +1 -1
  165. package/src/core/model/object/ImmutableObjectPool.d.ts +1 -2
  166. package/src/core/model/object/ImmutableObjectPool.d.ts.map +1 -1
  167. package/src/core/model/object/invokeObjectEquals.d.ts +9 -5
  168. package/src/core/model/object/invokeObjectHash.d.ts +7 -5
  169. package/src/core/model/object/objectDeepEquals.d.ts +10 -1
  170. package/src/core/model/object/objectKeyByValue.d.ts +10 -1
  171. package/src/core/model/object/read_property.d.ts +11 -1
  172. package/src/core/model/object/write_property.d.ts +10 -1
  173. package/src/core/model/reactive/evaluation/MultiPredicateEvaluator.d.ts +6 -0
  174. package/src/core/model/reactive/evaluation/MultiPredicateEvaluator.d.ts.map +1 -1
  175. package/src/core/model/reactive/evaluation/MultiPredicateEvaluator.js +12 -12
  176. package/src/core/model/reactive/js/compileReactiveToJS.d.ts.map +1 -1
  177. package/src/core/model/reactive/js/compileReactiveToJS.js +35 -1
  178. package/src/core/model/reactive/model/ReactiveBinaryExpression.d.ts +1 -3
  179. package/src/core/model/reactive/model/ReactiveBinaryExpression.d.ts.map +1 -1
  180. package/src/core/model/reactive/model/ReactiveExpression.d.ts +63 -10
  181. package/src/core/model/reactive/model/ReactiveExpression.d.ts.map +1 -1
  182. package/src/core/model/reactive/model/ReactiveUnaryExpression.d.ts +0 -12
  183. package/src/core/model/reactive/model/ReactiveUnaryExpression.d.ts.map +1 -1
  184. package/src/core/model/reactive/model/arithmetic/ReactiveAdd.d.ts +1 -1
  185. package/src/core/model/reactive/model/arithmetic/ReactiveAdd.d.ts.map +1 -1
  186. package/src/core/model/reactive/model/arithmetic/ReactiveDivide.d.ts +1 -1
  187. package/src/core/model/reactive/model/arithmetic/ReactiveDivide.d.ts.map +1 -1
  188. package/src/core/model/reactive/model/arithmetic/ReactiveMultiply.d.ts +1 -1
  189. package/src/core/model/reactive/model/arithmetic/ReactiveMultiply.d.ts.map +1 -1
  190. package/src/core/model/reactive/model/arithmetic/ReactiveNegate.d.ts +1 -1
  191. package/src/core/model/reactive/model/arithmetic/ReactiveNegate.d.ts.map +1 -1
  192. package/src/core/model/reactive/model/arithmetic/ReactiveSubtract.d.ts +1 -1
  193. package/src/core/model/reactive/model/arithmetic/ReactiveSubtract.d.ts.map +1 -1
  194. package/src/core/model/reactive/model/comparative/ReactiveEquals.d.ts +1 -1
  195. package/src/core/model/reactive/model/comparative/ReactiveEquals.d.ts.map +1 -1
  196. package/src/core/model/reactive/model/comparative/ReactiveGreaterThan.d.ts +1 -1
  197. package/src/core/model/reactive/model/comparative/ReactiveGreaterThan.d.ts.map +1 -1
  198. package/src/core/model/reactive/model/comparative/ReactiveGreaterThanOrEqual.d.ts +1 -1
  199. package/src/core/model/reactive/model/comparative/ReactiveGreaterThanOrEqual.d.ts.map +1 -1
  200. package/src/core/model/reactive/model/comparative/ReactiveLessThan.d.ts +1 -1
  201. package/src/core/model/reactive/model/comparative/ReactiveLessThan.d.ts.map +1 -1
  202. package/src/core/model/reactive/model/comparative/ReactiveLessThanOrEqual.d.ts +1 -1
  203. package/src/core/model/reactive/model/comparative/ReactiveLessThanOrEqual.d.ts.map +1 -1
  204. package/src/core/model/reactive/model/comparative/ReactiveNotEquals.d.ts +1 -1
  205. package/src/core/model/reactive/model/comparative/ReactiveNotEquals.d.ts.map +1 -1
  206. package/src/core/model/reactive/model/logic/ReactiveAnd.d.ts +41 -5
  207. package/src/core/model/reactive/model/logic/ReactiveAnd.d.ts.map +1 -1
  208. package/src/core/model/reactive/model/logic/ReactiveNot.d.ts +1 -1
  209. package/src/core/model/reactive/model/logic/ReactiveNot.d.ts.map +1 -1
  210. package/src/core/model/reactive/model/logic/ReactiveOr.d.ts +2 -1
  211. package/src/core/model/reactive/model/logic/ReactiveOr.d.ts.map +1 -1
  212. package/src/core/model/reactive/model/terminal/ReactiveLiteralBoolean.d.ts +2 -1
  213. package/src/core/model/reactive/model/terminal/ReactiveLiteralBoolean.d.ts.map +1 -1
  214. package/src/core/model/reactive/model/terminal/ReactiveLiteralNumber.d.ts +2 -3
  215. package/src/core/model/reactive/model/terminal/ReactiveLiteralNumber.d.ts.map +1 -1
  216. package/src/core/model/reactive/model/terminal/ReactiveLiteralString.d.ts +2 -4
  217. package/src/core/model/reactive/model/terminal/ReactiveLiteralString.d.ts.map +1 -1
  218. package/src/core/model/reactive/model/terminal/ReactiveReference.d.ts +68 -11
  219. package/src/core/model/reactive/model/terminal/ReactiveReference.d.ts.map +1 -1
  220. package/src/core/model/stat/LinearModifier.d.ts +79 -24
  221. package/src/core/parser/simple/DataType.d.ts +13 -5
  222. package/src/core/parser/simple/Token.d.ts +52 -13
  223. package/src/core/parser/simple/readArrayLiteral.d.ts +1 -0
  224. package/src/core/parser/simple/readArrayLiteral.d.ts.map +1 -1
  225. package/src/core/parser/simple/readBooleanToken.d.ts +1 -0
  226. package/src/core/parser/simple/readBooleanToken.d.ts.map +1 -1
  227. package/src/core/parser/simple/readHexToken.d.ts +1 -0
  228. package/src/core/parser/simple/readHexToken.d.ts.map +1 -1
  229. package/src/core/parser/simple/readIdentifierToken.d.ts +1 -0
  230. package/src/core/parser/simple/readIdentifierToken.d.ts.map +1 -1
  231. package/src/core/parser/simple/readNumberToken.d.ts +1 -0
  232. package/src/core/parser/simple/readNumberToken.d.ts.map +1 -1
  233. package/src/core/parser/simple/readReferenceToken.d.ts +1 -0
  234. package/src/core/parser/simple/readReferenceToken.d.ts.map +1 -1
  235. package/src/core/parser/simple/readStringToken.d.ts +1 -0
  236. package/src/core/parser/simple/readStringToken.d.ts.map +1 -1
  237. package/src/core/parser/simple/readUnsignedIntegerToken.d.ts +1 -0
  238. package/src/core/parser/simple/readUnsignedIntegerToken.d.ts.map +1 -1
  239. package/src/core/process/BaseProcess.d.ts +17 -5
  240. package/src/core/process/BaseProcess.d.ts.map +1 -1
  241. package/src/core/process/CompositeProcess.d.ts +0 -1
  242. package/src/core/process/CompositeProcess.d.ts.map +1 -1
  243. package/src/core/process/action/AsynchronousAction.d.ts +3 -3
  244. package/src/core/process/executor/ConcurrentExecutor.d.ts +3 -3
  245. package/src/core/process/filter/MutableFilter.d.ts +1 -1
  246. package/src/core/process/filter/MutableFilter.d.ts.map +1 -1
  247. package/src/core/process/task/Task.d.ts +1 -1
  248. package/src/core/process/task/Task.d.ts.map +1 -1
  249. package/src/core/process/task/TaskGroup.d.ts +3 -3
  250. package/src/core/process/task/TaskSignal.d.ts +8 -6
  251. package/src/core/process/undo/Action.d.ts +31 -9
  252. package/src/core/process/undo/ActionGroup.d.ts +20 -5
  253. package/src/core/process/undo/ActionProcessor.d.ts +163 -27
  254. package/src/core/process/undo/ActionProcessor.d.ts.map +1 -1
  255. package/src/engine/Engine.d.ts +178 -42
  256. package/src/engine/Engine.d.ts.map +1 -1
  257. package/src/engine/EngineConfiguration.d.ts +74 -20
  258. package/src/engine/achievements/AchievementGateway.d.ts +17 -5
  259. package/src/engine/achievements/AchievementManager.d.ts +0 -1
  260. package/src/engine/achievements/AchievementManager.d.ts.map +1 -1
  261. package/src/engine/animation/Tween.d.ts +1 -1
  262. package/src/engine/animation/clip/AnimationClip.d.ts +24 -4
  263. package/src/engine/animation/clip/AnimationClipBinding.d.ts +35 -14
  264. package/src/engine/animation/clip/ecd_bind_animation_curve.d.ts.map +1 -1
  265. package/src/engine/animation/clip/ecd_bind_animation_curve.js +10 -1
  266. package/src/engine/animation/clip/hemisphere_align_quaternion_values.d.ts +20 -0
  267. package/src/engine/animation/clip/hemisphere_align_quaternion_values.d.ts.map +1 -0
  268. package/src/engine/animation/clip/hemisphere_align_quaternion_values.js +37 -0
  269. package/src/engine/animation/curve/actionProcessorOperations/curveActions.d.ts +2 -2
  270. package/src/engine/animation/curve/actionProcessorOperations/curveActions.d.ts.map +1 -1
  271. package/src/engine/animation/curve/editor/createKeyframeMarker.d.ts +1 -1
  272. package/src/engine/animation/curve/editor/createKeyframeMarker.d.ts.map +1 -1
  273. package/src/engine/animation/keyed2/AnimationTrackPlayback.d.ts +1 -1
  274. package/src/engine/animation/keyed2/AnimationTrackPlayback.d.ts.map +1 -1
  275. package/src/engine/animation/keyed2/AnimationTrackPlayback.js +5 -1
  276. package/src/engine/animation/keyed2/behavior/AnimationBehavior.d.ts +0 -1
  277. package/src/engine/animation/keyed2/behavior/AnimationBehavior.d.ts.map +1 -1
  278. package/src/engine/asset/Asset.d.ts +47 -7
  279. package/src/engine/asset/AssetManager.d.ts +258 -60
  280. package/src/engine/asset/AssetRequestScope.d.ts +27 -3
  281. package/src/engine/asset/AssetTransformer.d.ts +16 -5
  282. package/src/engine/asset/CORS/CrossOriginConfig.d.ts +8 -5
  283. package/src/engine/asset/CORS/CrossOriginConfig.d.ts.map +1 -1
  284. package/src/engine/asset/CORS/CrossOriginKind.d.ts +5 -4
  285. package/src/engine/asset/loaders/AssetLoader.d.ts +50 -12
  286. package/src/engine/asset/loaders/GLTFAssetLoader.d.ts +71 -6
  287. package/src/engine/asset/loaders/image/ImageRGBADataAsset.d.ts +0 -1
  288. package/src/engine/asset/loaders/image/ImageRGBADataAsset.d.ts.map +1 -1
  289. package/src/engine/asset/loaders/material/StaticMaterialCache.d.ts +30 -7
  290. package/src/engine/asset/loaders/material/computeMaterialEquality.d.ts +8 -3
  291. package/src/engine/asset/loaders/material/computeMaterialHash.d.ts +7 -3
  292. package/src/engine/asset/loaders/material/traverseMaterialTextures.d.ts +8 -3
  293. package/src/engine/asset/loaders/texture/TextureAssetLoader.d.ts +6 -6
  294. package/src/engine/asset/preloader/AssetPreloader.d.ts +6 -15
  295. package/src/engine/asset/preloader/AssetPreloader.d.ts.map +1 -1
  296. package/src/engine/control/first-person/FirstPersonPlayerController.d.ts +13 -13
  297. package/src/engine/control/first-person/FirstPersonPlayerController.d.ts.map +1 -1
  298. package/src/engine/control/first-person/FirstPersonPlayerControllerSystem.d.ts +14 -4
  299. package/src/engine/control/first-person/FirstPersonPlayerControllerSystem.d.ts.map +1 -1
  300. package/src/engine/control/first-person/sensors/FirstPersonSensorsSystem.d.ts +1 -1
  301. package/src/engine/ecs/Entity.d.ts +228 -41
  302. package/src/engine/ecs/EntityBlueprint.d.ts +43 -17
  303. package/src/engine/ecs/EntityComponentDataset.d.ts +580 -60
  304. package/src/engine/ecs/EntityComponentDataset.d.ts.map +1 -1
  305. package/src/engine/ecs/EntityComponentDataset.js +5 -21
  306. package/src/engine/ecs/EntityManager.d.ts +10 -9
  307. package/src/engine/ecs/EntityManager.d.ts.map +1 -1
  308. package/src/engine/ecs/EntityObserver.d.ts +80 -13
  309. package/src/engine/ecs/System.d.ts +162 -33
  310. package/src/engine/ecs/animation/AnimationSerializationAdapter.d.ts +0 -1
  311. package/src/engine/ecs/animation/AnimationSerializationAdapter.d.ts.map +1 -1
  312. package/src/engine/ecs/attachment/AttachmentSystem.d.ts +1 -1
  313. package/src/engine/ecs/attachment/AttachmentSystem.d.ts.map +1 -1
  314. package/src/engine/ecs/components/PropertySetSerializationAdapter.d.ts +0 -1
  315. package/src/engine/ecs/components/PropertySetSerializationAdapter.d.ts.map +1 -1
  316. package/src/engine/ecs/components/SerializationMetadataSerializationAdapter.d.ts +0 -1
  317. package/src/engine/ecs/components/SerializationMetadataSerializationAdapter.d.ts.map +1 -1
  318. package/src/engine/ecs/components/TagSerializationAdapter.d.ts +0 -1
  319. package/src/engine/ecs/components/TagSerializationAdapter.d.ts.map +1 -1
  320. package/src/engine/ecs/dynamic_actions/rules/DynamicRuleDescriptionTable.d.ts +1 -1
  321. package/src/engine/ecs/dynamic_actions/rules/DynamicRuleDescriptionTable.d.ts.map +1 -1
  322. package/src/engine/ecs/fow/FogOfWar.d.ts +10 -1
  323. package/src/engine/ecs/fow/FogOfWar.d.ts.map +1 -1
  324. package/src/engine/ecs/fow/FogOfWar.js +133 -54
  325. package/src/engine/ecs/fow/FogOfWarRevealerSystem.d.ts +1 -1
  326. package/src/engine/ecs/fow/FogOfWarSystem.d.ts +1 -6
  327. package/src/engine/ecs/fow/FogOfWarSystem.d.ts.map +1 -1
  328. package/src/engine/ecs/fow/serialization/FogOfWarRevealerSerializationAdapter.d.ts +0 -1
  329. package/src/engine/ecs/fow/serialization/FogOfWarRevealerSerializationAdapter.d.ts.map +1 -1
  330. package/src/engine/ecs/fow/serialization/FogOfWarSerializationAdapter.d.ts +0 -1
  331. package/src/engine/ecs/fow/serialization/FogOfWarSerializationAdapter.d.ts.map +1 -1
  332. package/src/engine/ecs/fow/serialization/FogOfWarSerializationAdapter.js +3 -0
  333. package/src/engine/ecs/gui/GUIElement.d.ts +115 -5
  334. package/src/engine/ecs/gui/GUIElementSerializationAdapter.d.ts +0 -1
  335. package/src/engine/ecs/gui/GUIElementSerializationAdapter.d.ts.map +1 -1
  336. package/src/engine/ecs/gui/GUIElementSystem.d.ts +59 -8
  337. package/src/engine/ecs/gui/GUIElementSystem.d.ts.map +1 -1
  338. package/src/engine/ecs/gui/hud/HeadsUpDisplaySerializationAdapter.d.ts +0 -1
  339. package/src/engine/ecs/gui/hud/HeadsUpDisplaySerializationAdapter.d.ts.map +1 -1
  340. package/src/engine/ecs/gui/hud/HeadsUpDisplaySystem.d.ts +42 -6
  341. package/src/engine/ecs/gui/menu/radial/RadialContextMenu.d.ts +23 -22
  342. package/src/engine/ecs/gui/parallax/GuiElementParallaxSystem.d.ts +1 -1
  343. package/src/engine/ecs/gui/position/ViewportPositionSerializationAdapter.d.ts +0 -1
  344. package/src/engine/ecs/gui/position/ViewportPositionSerializationAdapter.d.ts.map +1 -1
  345. package/src/engine/ecs/gui/position/ViewportPositionSystem.d.ts +1 -1
  346. package/src/engine/ecs/gui/view/ViewEntity.d.ts +1 -2
  347. package/src/engine/ecs/gui/view/ViewEntity.d.ts.map +1 -1
  348. package/src/engine/ecs/guid/UUIDSerializationAdapter.d.ts +0 -1
  349. package/src/engine/ecs/guid/UUIDSerializationAdapter.d.ts.map +1 -1
  350. package/src/engine/ecs/ik/InverseKinematicsSerializationAdapter.d.ts +0 -1
  351. package/src/engine/ecs/ik/InverseKinematicsSerializationAdapter.d.ts.map +1 -1
  352. package/src/engine/ecs/ik/InverseKinematicsSystem.d.ts +1 -1
  353. package/src/engine/ecs/ik/InverseKinematicsSystem.d.ts.map +1 -1
  354. package/src/engine/ecs/name/NameSerializationAdapter.d.ts +0 -1
  355. package/src/engine/ecs/name/NameSerializationAdapter.d.ts.map +1 -1
  356. package/src/engine/ecs/parent/ChildEntities.d.ts +23 -3
  357. package/src/engine/ecs/parent/EntityNode.d.ts +157 -25
  358. package/src/engine/ecs/parent/ParentEntity.d.ts +31 -11
  359. package/src/engine/ecs/parent/ParentEntitySystem.d.ts +44 -11
  360. package/src/engine/ecs/renderable/RenderSystem.d.ts +65 -7
  361. package/src/engine/ecs/renderable/Renderable.d.ts +95 -25
  362. package/src/engine/ecs/speaker/VoiceSystem.d.ts +3 -3
  363. package/src/engine/ecs/speaker/VoiceSystem.d.ts.map +1 -1
  364. package/src/engine/ecs/storage/binary/BinaryClassSerializationAdapter.d.ts +86 -21
  365. package/src/engine/ecs/storage/binary/collection/BinaryCollectionDeSerializer.d.ts.map +1 -1
  366. package/src/engine/ecs/storage/binary/collection/BinaryCollectionDeSerializer.js +3 -1
  367. package/src/engine/ecs/storage/binary/object-v2/serializerTestHarness.d.ts +1 -1
  368. package/src/engine/ecs/storage/binary/object-v2/serializerTestHarness.d.ts.map +1 -1
  369. package/src/engine/ecs/system/AbstractContextSystem.d.ts +1 -1
  370. package/src/engine/ecs/system_validate_class.d.ts +1 -1
  371. package/src/engine/ecs/system_validate_class.d.ts.map +1 -1
  372. package/src/engine/ecs/systems/AnimationSystem.d.ts +41 -6
  373. package/src/engine/ecs/systems/AnimationSystem.d.ts.map +1 -1
  374. package/src/engine/ecs/systems/ScriptSystem.d.ts +9 -5
  375. package/src/engine/ecs/systems/ScriptSystem.d.ts.map +1 -1
  376. package/src/engine/ecs/systems/TimerSystem.d.ts +1 -1
  377. package/src/engine/ecs/systems/TimerSystem.d.ts.map +1 -1
  378. package/src/engine/ecs/team/TeamSerializationAdapter.d.ts +0 -1
  379. package/src/engine/ecs/team/TeamSerializationAdapter.d.ts.map +1 -1
  380. package/src/engine/ecs/terrain/ecs/OffsetScaleTransform2D.d.ts +7 -6
  381. package/src/engine/ecs/terrain/ecs/Terrain.d.ts +389 -17
  382. package/src/engine/ecs/terrain/ecs/TerrainSystem.d.ts +65 -8
  383. package/src/engine/ecs/terrain/ecs/cling/ClingToTerrainSerializationAdapter.d.ts +0 -1
  384. package/src/engine/ecs/terrain/ecs/cling/ClingToTerrainSerializationAdapter.d.ts.map +1 -1
  385. package/src/engine/ecs/terrain/ecs/cling/ClingToTerrainSystem.d.ts +1 -1
  386. package/src/engine/ecs/terrain/ecs/cling/ClingToTerrainSystem.d.ts.map +1 -1
  387. package/src/engine/ecs/terrain/serialization/TerrainSerializationAdapter.d.ts +0 -1
  388. package/src/engine/ecs/terrain/serialization/TerrainSerializationAdapter.d.ts.map +1 -1
  389. package/src/engine/ecs/terrain/tiles/TerrainTile.d.ts +2 -2
  390. package/src/engine/ecs/terrain/tiles/TerrainTile.d.ts.map +1 -1
  391. package/src/engine/ecs/terrain/tiles/TerrainTileManager.d.ts +2 -2
  392. package/src/engine/ecs/tooltip/TooltipComponentSerializationAdapter.d.ts +0 -1
  393. package/src/engine/ecs/tooltip/TooltipComponentSerializationAdapter.d.ts.map +1 -1
  394. package/src/engine/ecs/tooltip/TooltipComponentSystem.d.ts +1 -1
  395. package/src/engine/ecs/transform/TransformSerializationAdapter.d.ts +0 -1
  396. package/src/engine/ecs/transform/TransformSerializationAdapter.d.ts.map +1 -1
  397. package/src/engine/ecs/transform-attachment/TransformAttachment.d.ts +116 -19
  398. package/src/engine/ecs/transform-attachment/TransformAttachmentSystem.d.ts +58 -6
  399. package/src/engine/graphics/GraphicsEngine.d.ts +224 -41
  400. package/src/engine/graphics/GraphicsEngine.d.ts.map +1 -1
  401. package/src/engine/graphics/GraphicsEngine.js +14 -3
  402. package/src/engine/graphics/camera/CameraShake.d.ts +6 -6
  403. package/src/engine/graphics/camera/CameraShake.d.ts.map +1 -1
  404. package/src/engine/graphics/camera/CameraShakeBehavior.d.ts +1 -2
  405. package/src/engine/graphics/camera/CameraShakeBehavior.d.ts.map +1 -1
  406. package/src/engine/graphics/camera/CameraShakeTraumaBehavior.d.ts +1 -2
  407. package/src/engine/graphics/camera/CameraShakeTraumaBehavior.d.ts.map +1 -1
  408. package/src/engine/graphics/camera/camera_compute_distance_to_fit_length.d.ts +8 -1
  409. package/src/engine/graphics/camera/makeScreenScissorFrustum.d.ts +8 -4
  410. package/src/engine/graphics/composit/CompositLayer.d.ts +1 -1
  411. package/src/engine/graphics/composit/CompositLayer.d.ts.map +1 -1
  412. package/src/engine/graphics/composit/CompositLayer.js +258 -255
  413. package/src/engine/graphics/composit/LayerCompositer.d.ts +12 -0
  414. package/src/engine/graphics/composit/LayerCompositer.d.ts.map +1 -1
  415. package/src/engine/graphics/composit/LayerCompositer.js +19 -10
  416. package/src/engine/graphics/ecs/animation/AnimationControllerSerializationAdapter.d.ts +0 -1
  417. package/src/engine/graphics/ecs/animation/AnimationControllerSerializationAdapter.d.ts.map +1 -1
  418. package/src/engine/graphics/ecs/animation/AnimationControllerSystem.d.ts +1 -2
  419. package/src/engine/graphics/ecs/animation/AnimationControllerSystem.d.ts.map +1 -1
  420. package/src/engine/graphics/ecs/animation/animator/AnimationGraphSystem.d.ts +1 -1
  421. package/src/engine/graphics/ecs/animation/animator/graph/AnimationGraphSerializationAdapter.d.ts +0 -1
  422. package/src/engine/graphics/ecs/animation/animator/graph/AnimationGraphSerializationAdapter.d.ts.map +1 -1
  423. package/src/engine/graphics/ecs/animation/animator/graph/definition/serialization/AnimationGraphDefinitionSerializationAdapter.d.ts +0 -1
  424. package/src/engine/graphics/ecs/animation/animator/graph/definition/serialization/AnimationGraphDefinitionSerializationAdapter.d.ts.map +1 -1
  425. package/src/engine/graphics/ecs/camera/Camera.d.ts +113 -18
  426. package/src/engine/graphics/ecs/camera/Camera.d.ts.map +1 -1
  427. package/src/engine/graphics/ecs/camera/CameraSystem.d.ts +74 -10
  428. package/src/engine/graphics/ecs/camera/serialization/CameraSerializationAdapter.d.ts +0 -1
  429. package/src/engine/graphics/ecs/camera/serialization/CameraSerializationAdapter.d.ts.map +1 -1
  430. package/src/engine/graphics/ecs/camera/topdown/TopDownCameraController.d.ts +90 -33
  431. package/src/engine/graphics/ecs/camera/topdown/TopDownCameraControllerSerializationAdapter.d.ts +0 -1
  432. package/src/engine/graphics/ecs/camera/topdown/TopDownCameraControllerSerializationAdapter.d.ts.map +1 -1
  433. package/src/engine/graphics/ecs/camera/topdown/TopDownCameraControllerSystem.d.ts +34 -5
  434. package/src/engine/graphics/ecs/camera/topdown/TopDownCameraLander.d.ts +0 -1
  435. package/src/engine/graphics/ecs/camera/topdown/TopDownCameraLander.d.ts.map +1 -1
  436. package/src/engine/graphics/ecs/camera/topdown/TopDownCameraLanderSystem.d.ts +1 -1
  437. package/src/engine/graphics/ecs/decal/v2/Decal.d.ts +52 -15
  438. package/src/engine/graphics/ecs/decal/v2/DecalSerializationAdapter.d.ts +0 -1
  439. package/src/engine/graphics/ecs/decal/v2/DecalSerializationAdapter.d.ts.map +1 -1
  440. package/src/engine/graphics/ecs/decal/v2/FPDecalSystem.d.ts +70 -24
  441. package/src/engine/graphics/ecs/highlight/Highlight.d.ts +61 -16
  442. package/src/engine/graphics/ecs/highlight/HighlightDefinition.d.ts +57 -19
  443. package/src/engine/graphics/ecs/highlight/HighlightSerializationAdapter.d.ts +0 -1
  444. package/src/engine/graphics/ecs/highlight/HighlightSerializationAdapter.d.ts.map +1 -1
  445. package/src/engine/graphics/ecs/highlight/plugin/OutlineRenderPlugin.d.ts +1 -2
  446. package/src/engine/graphics/ecs/highlight/plugin/OutlineRenderPlugin.d.ts.map +1 -1
  447. package/src/engine/graphics/ecs/highlight/plugin/OutlineRenderPlugin.js +10 -4
  448. package/src/engine/graphics/ecs/highlight/renderer/OutlineRenderer.d.ts +6 -0
  449. package/src/engine/graphics/ecs/highlight/renderer/OutlineRenderer.d.ts.map +1 -1
  450. package/src/engine/graphics/ecs/highlight/renderer/OutlineRenderer.js +21 -0
  451. package/src/engine/graphics/ecs/highlight/system/MeshHighlightSystem.d.ts +57 -8
  452. package/src/engine/graphics/ecs/highlight/system/MeshHighlightSystem.d.ts.map +1 -1
  453. package/src/engine/graphics/ecs/highlight/system/RenderableHighlightSystem.d.ts +62 -8
  454. package/src/engine/graphics/ecs/highlight/system/RenderableHighlightSystem.d.ts.map +1 -1
  455. package/src/engine/graphics/ecs/highlight/system/ShadedGeometryHighlightSystem.d.ts +68 -8
  456. package/src/engine/graphics/ecs/highlight/system/ShadedGeometryHighlightSystem.d.ts.map +1 -1
  457. package/src/engine/graphics/ecs/light/Light.d.ts +79 -19
  458. package/src/engine/graphics/ecs/light/Light.d.ts.map +1 -1
  459. package/src/engine/graphics/ecs/light/LightSerializationAdapter.d.ts +0 -1
  460. package/src/engine/graphics/ecs/light/LightSerializationAdapter.d.ts.map +1 -1
  461. package/src/engine/graphics/ecs/light/LightSystem.d.ts +123 -11
  462. package/src/engine/graphics/ecs/light/LightType.d.ts +8 -6
  463. package/src/engine/graphics/ecs/mesh/Mesh.d.ts +176 -30
  464. package/src/engine/graphics/ecs/mesh/MeshEvents.d.ts +6 -12
  465. package/src/engine/graphics/ecs/mesh/MeshSystem.d.ts +99 -7
  466. package/src/engine/graphics/ecs/mesh/serialization/MeshSerializationAdapter.d.ts +0 -1
  467. package/src/engine/graphics/ecs/mesh/serialization/MeshSerializationAdapter.d.ts.map +1 -1
  468. package/src/engine/graphics/ecs/mesh-v2/DrawMode.d.ts +8 -6
  469. package/src/engine/graphics/ecs/mesh-v2/ShadedGeometrySystem.d.ts +147 -32
  470. package/src/engine/graphics/ecs/mesh-v2/ShadedGeometrySystem.d.ts.map +1 -1
  471. package/src/engine/graphics/ecs/mesh-v2/ShadedGeometrySystem.js +37 -0
  472. package/src/engine/graphics/ecs/mesh-v2/aggregate/SGAnimationPlayback.d.ts +6 -5
  473. package/src/engine/graphics/ecs/mesh-v2/aggregate/SGMesh.d.ts +162 -25
  474. package/src/engine/graphics/ecs/mesh-v2/aggregate/SGMeshAnimationController.d.ts +40 -12
  475. package/src/engine/graphics/ecs/mesh-v2/aggregate/SGMeshAnimationControllerSystem.d.ts +31 -11
  476. package/src/engine/graphics/ecs/mesh-v2/aggregate/SGMeshEvents.d.ts +5 -12
  477. package/src/engine/graphics/ecs/mesh-v2/aggregate/SGMeshHighlightSystem.d.ts +36 -7
  478. package/src/engine/graphics/ecs/mesh-v2/aggregate/SGMeshSystem.d.ts +63 -8
  479. package/src/engine/graphics/ecs/mesh-v2/sg_hierarchy_compute_bounding_box_via_parent_entity.d.ts +9 -4
  480. package/src/engine/graphics/ecs/path/PathDisplay.d.ts +21 -9
  481. package/src/engine/graphics/ecs/path/PathDisplayEvents.d.ts +6 -3
  482. package/src/engine/graphics/ecs/path/PathDisplaySpec.d.ts +28 -11
  483. package/src/engine/graphics/ecs/path/PathDisplaySystem.d.ts +55 -10
  484. package/src/engine/graphics/ecs/path/PathDisplaySystem.d.ts.map +1 -1
  485. package/src/engine/graphics/ecs/path/PathDisplayType.d.ts +8 -6
  486. package/src/engine/graphics/ecs/path/entity/EntityPathMarkerDefinition.d.ts +39 -8
  487. package/src/engine/graphics/ecs/path/entity/EntityPathStyle.d.ts +38 -12
  488. package/src/engine/graphics/ecs/path/highlight/PathDisplayHighlightSystem.d.ts +31 -7
  489. package/src/engine/graphics/ecs/path/ribbon/RibbonPathBuilder.d.ts.map +1 -1
  490. package/src/engine/graphics/ecs/path/ribbon/RibbonPathBuilder.js +5 -23
  491. package/src/engine/graphics/ecs/path/ribbon/RibbonPathStyle.d.ts +24 -7
  492. package/src/engine/graphics/ecs/path/tube/BasicMaterialDefinition.d.ts +4 -3
  493. package/src/engine/graphics/ecs/path/tube/CapType.d.ts +7 -5
  494. package/src/engine/graphics/ecs/path/tube/MatcapMaterialDefinition.d.ts +11 -3
  495. package/src/engine/graphics/ecs/path/tube/PathNormalType.d.ts +6 -4
  496. package/src/engine/graphics/ecs/path/tube/StandardMaterialDefinition.d.ts +9 -4
  497. package/src/engine/graphics/ecs/path/tube/TubeMaterialType.d.ts +7 -6
  498. package/src/engine/graphics/ecs/path/tube/TubePathStyle.d.ts +114 -35
  499. package/src/engine/graphics/ecs/path/tube/TubePathStyle.d.ts.map +1 -1
  500. package/src/engine/graphics/ecs/path/tube/build/estimatePathViaIterativeIntegral.d.ts.map +1 -1
  501. package/src/engine/graphics/ecs/path/tube/build/estimatePathViaIterativeIntegral.js +6 -4
  502. package/src/engine/graphics/ecs/trail2d/Trail2DSystem.d.ts +85 -6
  503. package/src/engine/graphics/ecs/trail3d/Trail3DSystem.d.ts +1 -1
  504. package/src/engine/graphics/ecs/water/WaterSerializationAdapter.d.ts +0 -1
  505. package/src/engine/graphics/ecs/water/WaterSerializationAdapter.d.ts.map +1 -1
  506. package/src/engine/graphics/ecs/water/WaterSystem.d.ts +1 -1
  507. package/src/engine/graphics/ecs/water/WaterSystem.d.ts.map +1 -1
  508. package/src/engine/graphics/ecs/water/WaterSystem.js +9 -3
  509. package/src/engine/graphics/geometry/AttributeGroupSpec.d.ts +75 -25
  510. package/src/engine/graphics/geometry/AttributeSpec.d.ts +85 -12
  511. package/src/engine/graphics/geometry/instancing/InstancedMeshGroup.d.ts +1 -2
  512. package/src/engine/graphics/geometry/instancing/InstancedMeshGroup.d.ts.map +1 -1
  513. package/src/engine/graphics/impostors/octahedral/grid/OctahedralUvEncoder.d.ts +6 -4
  514. package/src/engine/graphics/material/manager/MaterialManager.d.ts +12 -0
  515. package/src/engine/graphics/material/manager/MaterialManager.d.ts.map +1 -1
  516. package/src/engine/graphics/material/manager/MaterialManager.js +78 -41
  517. package/src/engine/graphics/particles/ecs/ParticleEmitterSystem.d.ts +67 -7
  518. package/src/engine/graphics/particles/ecs/ParticleEmitterSystem.d.ts.map +1 -1
  519. package/src/engine/graphics/particles/ecs/ParticleEmitterSystem.js +46 -9
  520. package/src/engine/graphics/particles/node-based/codegen/glsl/getTypeByteSize.d.ts +9 -9
  521. package/src/engine/graphics/particles/node-based/editor/ParticleSpecificationEditorView.d.ts +1 -2
  522. package/src/engine/graphics/particles/node-based/editor/ParticleSpecificationEditorView.d.ts.map +1 -1
  523. package/src/engine/graphics/particles/node-based/nodes/FloatConstant.d.ts +0 -1
  524. package/src/engine/graphics/particles/node-based/nodes/FloatConstant.d.ts.map +1 -1
  525. package/src/engine/graphics/particles/node-based/nodes/ParticleDataTypes.d.ts +10 -9
  526. package/src/engine/graphics/particles/node-based/nodes/ParticleDataTypes.d.ts.map +1 -1
  527. package/src/engine/graphics/particles/node-based/nodes/ReadFloatUniform.d.ts +0 -1
  528. package/src/engine/graphics/particles/node-based/nodes/ReadFloatUniform.d.ts.map +1 -1
  529. package/src/engine/graphics/particles/node-based/nodes/ReadVelocity.d.ts +0 -1
  530. package/src/engine/graphics/particles/node-based/nodes/ReadVelocity.d.ts.map +1 -1
  531. package/src/engine/graphics/particles/node-based/nodes/Vector3Constant.d.ts +0 -1
  532. package/src/engine/graphics/particles/node-based/nodes/Vector3Constant.d.ts.map +1 -1
  533. package/src/engine/graphics/particles/node-based/nodes/Vector3Merge.d.ts +0 -1
  534. package/src/engine/graphics/particles/node-based/nodes/Vector3Merge.d.ts.map +1 -1
  535. package/src/engine/graphics/particles/node-based/nodes/Vector3Split.d.ts +0 -1
  536. package/src/engine/graphics/particles/node-based/nodes/Vector3Split.d.ts.map +1 -1
  537. package/src/engine/graphics/particles/node-based/nodes/WriteVelocity.d.ts +0 -1
  538. package/src/engine/graphics/particles/node-based/nodes/WriteVelocity.d.ts.map +1 -1
  539. package/src/engine/graphics/particles/node-based/nodes/attribute/ReadVector3Attribute.d.ts +0 -1
  540. package/src/engine/graphics/particles/node-based/nodes/attribute/ReadVector3Attribute.d.ts.map +1 -1
  541. package/src/engine/graphics/particles/node-based/nodes/attribute/WriteVector3Attribute.d.ts +0 -1
  542. package/src/engine/graphics/particles/node-based/nodes/attribute/WriteVector3Attribute.d.ts.map +1 -1
  543. package/src/engine/graphics/particles/node-based/nodes/math/AddFloatNode.d.ts +0 -1
  544. package/src/engine/graphics/particles/node-based/nodes/math/AddFloatNode.d.ts.map +1 -1
  545. package/src/engine/graphics/particles/node-based/nodes/math/Vector3Add.d.ts +0 -1
  546. package/src/engine/graphics/particles/node-based/nodes/math/Vector3Add.d.ts.map +1 -1
  547. package/src/engine/graphics/particles/node-based/nodes/math/Vector3Divide.d.ts +0 -1
  548. package/src/engine/graphics/particles/node-based/nodes/math/Vector3Divide.d.ts.map +1 -1
  549. package/src/engine/graphics/particles/node-based/nodes/math/Vector3Multiply.d.ts +0 -1
  550. package/src/engine/graphics/particles/node-based/nodes/math/Vector3Multiply.d.ts.map +1 -1
  551. package/src/engine/graphics/particles/node-based/nodes/math/Vector3Subtract.d.ts +0 -1
  552. package/src/engine/graphics/particles/node-based/nodes/math/Vector3Subtract.d.ts.map +1 -1
  553. package/src/engine/graphics/particles/node-based/nodes/noise/CurlNoiseNode.d.ts +0 -1
  554. package/src/engine/graphics/particles/node-based/nodes/noise/CurlNoiseNode.d.ts.map +1 -1
  555. package/src/engine/graphics/particles/node-based/particle/ParticleAttributeSpecification.d.ts +18 -18
  556. package/src/engine/graphics/particles/particular/engine/ParticularEngine.d.ts +5 -0
  557. package/src/engine/graphics/particles/particular/engine/ParticularEngine.d.ts.map +1 -1
  558. package/src/engine/graphics/particles/particular/engine/ParticularEngine.js +8 -0
  559. package/src/engine/graphics/particles/particular/engine/emitter/ParticleEmitter.d.ts +252 -2
  560. package/src/engine/graphics/particles/particular/engine/emitter/serde/ParameterLookupTableSerializationAdapter.d.ts +0 -1
  561. package/src/engine/graphics/particles/particular/engine/emitter/serde/ParameterLookupTableSerializationAdapter.d.ts.map +1 -1
  562. package/src/engine/graphics/particles/particular/engine/emitter/serde/ParticleEmitterSerializationAdapter.d.ts +0 -1
  563. package/src/engine/graphics/particles/particular/engine/emitter/serde/ParticleEmitterSerializationAdapter.d.ts.map +1 -1
  564. package/src/engine/graphics/particles/particular/engine/parameter/ParameterLookupTable.d.ts +2 -15
  565. package/src/engine/graphics/particles/particular/engine/parameter/ParameterTrack.d.ts +5 -1
  566. package/src/engine/graphics/particles/particular/engine/parameter/ParameterTrack.d.ts.map +1 -1
  567. package/src/engine/graphics/particles/particular/engine/parameter/ParameterTrackSet.d.ts +1 -1
  568. package/src/engine/graphics/particles/particular/engine/parameter/ParameterTrackSet.d.ts.map +1 -1
  569. package/src/engine/graphics/particles/particular/engine/parameter/ParticleParameter.d.ts +5 -1
  570. package/src/engine/graphics/particles/particular/engine/parameter/ParticleParameter.d.ts.map +1 -1
  571. package/src/engine/graphics/particles/particular/engine/shader/MaterialRecord.d.ts +7 -0
  572. package/src/engine/graphics/particles/particular/engine/shader/MaterialRecord.d.ts.map +1 -1
  573. package/src/engine/graphics/particles/particular/engine/shader/MaterialRecord.js +8 -0
  574. package/src/engine/graphics/particles/particular/engine/shader/ShaderManager.d.ts +10 -2
  575. package/src/engine/graphics/particles/particular/engine/shader/ShaderManager.d.ts.map +1 -1
  576. package/src/engine/graphics/particles/particular/engine/shader/ShaderManager.js +42 -10
  577. package/src/engine/graphics/particles/particular/engine/utils/volume/AttributeValue.d.ts +76 -16
  578. package/src/engine/graphics/particles/particular/engine/utils/volume/SamplingFunctionKind.d.ts +6 -4
  579. package/src/engine/graphics/render/buffer/FrameBuffer.d.ts.map +1 -1
  580. package/src/engine/graphics/render/buffer/FrameBuffer.js +5 -2
  581. package/src/engine/graphics/render/buffer/simple-fx/ao/AmbientOcclusionPostProcessEffect.d.ts +104 -8
  582. package/src/engine/graphics/render/buffer/simple-fx/ao/AmbientOcclusionPostProcessEffect.d.ts.map +1 -1
  583. package/src/engine/graphics/render/buffer/simple-fx/ao/AmbientOcclusionPostProcessEffect.js +40 -7
  584. package/src/engine/graphics/render/buffer/simple-fx/ao/SAOUpscaleShader.js +78 -37
  585. package/src/engine/graphics/render/buffer/simple-fx/taa/TemporalSupersamplingRenderPlugin.d.ts +0 -3
  586. package/src/engine/graphics/render/buffer/simple-fx/taa/TemporalSupersamplingRenderPlugin.d.ts.map +1 -1
  587. package/src/engine/graphics/render/buffer/simple-fx/taa/TemporalSupersamplingRenderPlugin.js +10 -4
  588. package/src/engine/graphics/render/forward_plus/LightManager.d.ts.map +1 -1
  589. package/src/engine/graphics/render/forward_plus/LightManager.js +1235 -1232
  590. package/src/engine/graphics/render/forward_plus/model/Decal.d.ts +1 -1
  591. package/src/engine/graphics/render/forward_plus/model/Decal.d.ts.map +1 -1
  592. package/src/engine/graphics/render/forward_plus/plugin/ForwardPlusRenderingPlugin.d.ts +32 -5
  593. package/src/engine/graphics/render/forward_plus/plugin/ForwardPlusRenderingPlugin.d.ts.map +1 -1
  594. package/src/engine/graphics/render/forward_plus/plugin/ForwardPlusRenderingPlugin.js +11 -10
  595. package/src/engine/graphics/render/forward_plus/plugin/MaterialTransformer.d.ts.map +1 -1
  596. package/src/engine/graphics/render/forward_plus/plugin/MaterialTransformer.js +4 -9
  597. package/src/engine/graphics/render/forward_plus/plugin/forwardPlusMaterialMarker.d.ts +16 -0
  598. package/src/engine/graphics/render/forward_plus/plugin/forwardPlusMaterialMarker.d.ts.map +1 -0
  599. package/src/engine/graphics/render/forward_plus/plugin/forwardPlusMaterialMarker.js +18 -0
  600. package/src/engine/graphics/render/forward_plus/plugin/isForwardPlusLightingSkipped.d.ts +16 -0
  601. package/src/engine/graphics/render/forward_plus/plugin/isForwardPlusLightingSkipped.d.ts.map +1 -0
  602. package/src/engine/graphics/render/forward_plus/plugin/isForwardPlusLightingSkipped.js +31 -0
  603. package/src/engine/graphics/render/frame_graph/FrameGraph.d.ts +1 -1
  604. package/src/engine/graphics/render/frame_graph/FrameGraph.d.ts.map +1 -1
  605. package/src/engine/graphics/render/frame_graph/resource/TextureResourceDescriptor.d.ts +1 -1
  606. package/src/engine/graphics/render/gizmo/Gizmo.d.ts +7 -3
  607. package/src/engine/graphics/render/gizmo/GizmoRenderingPlugin.d.ts +5 -5
  608. package/src/engine/graphics/render/gizmo/GizmoRenderingPlugin.d.ts.map +1 -1
  609. package/src/engine/graphics/render/gizmo/GizmoShapeRenderingInterface.d.ts +72 -13
  610. package/src/engine/graphics/render/layers/RenderLayer.d.ts +78 -22
  611. package/src/engine/graphics/render/layers/RenderLayerManager.d.ts +72 -17
  612. package/src/engine/graphics/render/layers/RenderLayerState.d.ts +18 -3
  613. package/src/engine/graphics/render/view/CameraView.d.ts +3 -3
  614. package/src/engine/graphics/render/view/CameraViewManager.d.ts +2 -2
  615. package/src/engine/graphics/render/visibility/IncrementalDeltaSet.d.ts +143 -24
  616. package/src/engine/graphics/sh3/lpg/serialization/LightProbeGridSerializationAdapter.d.ts +0 -1
  617. package/src/engine/graphics/sh3/lpg/serialization/LightProbeGridSerializationAdapter.d.ts.map +1 -1
  618. package/src/engine/graphics/sh3/lpv/PathTracerProbeRenderer.d.ts +3 -1
  619. package/src/engine/graphics/sh3/lpv/PathTracerProbeRenderer.d.ts.map +1 -1
  620. package/src/engine/graphics/sh3/lpv/serialization/LightProbeVolumeSerializationAdapter.d.ts +0 -1
  621. package/src/engine/graphics/sh3/lpv/serialization/LightProbeVolumeSerializationAdapter.d.ts.map +1 -1
  622. package/src/engine/graphics/sh3/path_tracer/material/StandardTexture.d.ts +1 -2
  623. package/src/engine/graphics/sh3/path_tracer/material/StandardTexture.d.ts.map +1 -1
  624. package/src/engine/graphics/texture/atlas/TextureAtlas.d.ts +3 -3
  625. package/src/engine/graphics/texture/atlas/TextureAtlas.d.ts.map +1 -1
  626. package/src/engine/graphics/texture/cubemap/load_environment_map.d.ts +13 -8
  627. package/src/engine/graphics/texture/sampler/Sampler2D.d.ts +1 -1
  628. package/src/engine/graphics/texture/sampler/serialization/Sampler2DSerializationAdapter.d.ts +0 -1
  629. package/src/engine/graphics/texture/sampler/serialization/Sampler2DSerializationAdapter.d.ts.map +1 -1
  630. package/src/engine/graphics/texture/virtual/VirtualTextureTileLoader.d.ts +1 -3
  631. package/src/engine/graphics/texture/virtual/VirtualTextureTileLoader.d.ts.map +1 -1
  632. package/src/engine/graphics/three/cloneObject3D.d.ts +7 -3
  633. package/src/engine/graphics/trail/tube/TubeX.d.ts.map +1 -1
  634. package/src/engine/graphics/trail/tube/TubeX.js +557 -555
  635. package/src/engine/graphics/trail/tube/TubeXPlugin.d.ts +0 -1
  636. package/src/engine/graphics/trail/tube/TubeXPlugin.d.ts.map +1 -1
  637. package/src/engine/graphics/trail/x/RibbonXMaterialSpec.d.ts +13 -3
  638. package/src/engine/graphics/trail/x/RibbonXPlugin.d.ts +12 -4
  639. package/src/engine/graphics/trail/x/RibbonXPlugin.d.ts.map +1 -1
  640. package/src/engine/graphics/trail/x/RibbonXPlugin.js +15 -8
  641. package/src/engine/graphics/util/promiseMaterialLoaded.d.ts +7 -3
  642. package/src/engine/grid/grid2transform/GridPosition2TransformSerializationAdapter.d.ts +0 -1
  643. package/src/engine/grid/grid2transform/GridPosition2TransformSerializationAdapter.d.ts.map +1 -1
  644. package/src/engine/grid/grid2transform/GridPosition2TransformSystem.d.ts +1 -1
  645. package/src/engine/grid/obstacle/GridObstacleSerializationAdapter.d.ts +0 -1
  646. package/src/engine/grid/obstacle/GridObstacleSerializationAdapter.d.ts.map +1 -1
  647. package/src/engine/grid/position/GridPositionSerializationAdapter.d.ts +0 -1
  648. package/src/engine/grid/position/GridPositionSerializationAdapter.d.ts.map +1 -1
  649. package/src/engine/grid/position/GridPositionSystem.d.ts +1 -1
  650. package/src/engine/grid/transform2grid/Transform2GridPositionSystem.d.ts +1 -1
  651. package/src/engine/input/GAMEPAD_API_PROPOSAL.md +717 -0
  652. package/src/engine/input/analog/apply_radial_dead_zone.d.ts +23 -0
  653. package/src/engine/input/analog/apply_radial_dead_zone.d.ts.map +1 -0
  654. package/src/engine/input/analog/apply_radial_dead_zone.js +38 -0
  655. package/src/engine/input/devices/GamepadDevice.d.ts +140 -23
  656. package/src/engine/input/devices/GamepadDevice.d.ts.map +1 -1
  657. package/src/engine/input/devices/GamepadDevice.js +202 -16
  658. package/src/engine/input/devices/InputDeviceSwitch.d.ts +44 -11
  659. package/src/engine/input/devices/InputDeviceSwitch.d.ts.map +1 -1
  660. package/src/engine/input/devices/KeyCodes.d.ts +112 -1
  661. package/src/engine/input/devices/KeyboardDevice.d.ts +2 -3
  662. package/src/engine/input/devices/KeyboardDevice.d.ts.map +1 -1
  663. package/src/engine/input/devices/PointerDevice.d.ts +96 -31
  664. package/src/engine/input/devices/PointerDevice.d.ts.map +1 -1
  665. package/src/engine/input/devices/events/KeyboardEvents.d.ts +5 -4
  666. package/src/engine/input/devices/events/MouseEvents.d.ts +18 -12
  667. package/src/engine/input/devices/events/TouchEvents.d.ts +12 -6
  668. package/src/engine/input/devices/gamepad/GamepadAxes.d.ts +5 -1
  669. package/src/engine/input/devices/gamepad/GamepadAxes.d.ts.map +1 -1
  670. package/src/engine/input/devices/gamepad/GamepadAxes.js +5 -1
  671. package/src/engine/input/devices/gamepad/GamepadHandle.d.ts +130 -26
  672. package/src/engine/input/devices/gamepad/GamepadHandle.d.ts.map +1 -1
  673. package/src/engine/input/devices/gamepad/GamepadHandle.js +60 -34
  674. package/src/engine/input/devices/gamepad/GamepadStandardMapping.d.ts +20 -0
  675. package/src/engine/input/devices/gamepad/GamepadStandardMapping.d.ts.map +1 -0
  676. package/src/engine/input/devices/gamepad/GamepadStandardMapping.js +20 -0
  677. package/src/engine/input/devices/gamepad/GamepadStick.d.ts +93 -0
  678. package/src/engine/input/devices/gamepad/GamepadStick.d.ts.map +1 -0
  679. package/src/engine/input/devices/gamepad/GamepadStick.js +165 -0
  680. package/src/engine/input/devices/gamepad/GamepadStickCalibration.d.ts +84 -0
  681. package/src/engine/input/devices/gamepad/GamepadStickCalibration.d.ts.map +1 -0
  682. package/src/engine/input/devices/gamepad/GamepadStickCalibration.js +119 -0
  683. package/src/engine/input/devices/gamepad/GamepadStickCalibrator.d.ts +92 -0
  684. package/src/engine/input/devices/gamepad/GamepadStickCalibrator.d.ts.map +1 -0
  685. package/src/engine/input/devices/gamepad/GamepadStickCalibrator.js +250 -0
  686. package/src/engine/input/devices/gamepad/gamepad_write_dpad_vector.d.ts +17 -0
  687. package/src/engine/input/devices/gamepad/gamepad_write_dpad_vector.d.ts.map +1 -0
  688. package/src/engine/input/devices/gamepad/gamepad_write_dpad_vector.js +30 -0
  689. package/src/engine/input/devices/touch/TouchDevice.d.ts +3 -3
  690. package/src/engine/input/ecs/components/Input.d.ts +49 -6
  691. package/src/engine/input/ecs/components/InputController.d.ts +33 -3
  692. package/src/engine/input/ecs/ism/InputBinding.d.ts +40 -4
  693. package/src/engine/input/ecs/systems/InputControllerSystem.d.ts +28 -6
  694. package/src/engine/input/ecs/systems/InputControllerSystem.d.ts.map +1 -1
  695. package/src/engine/input/ecs/systems/InputControllerSystem.js +9 -6
  696. package/src/engine/input/ecs/systems/InputSystem.d.ts +59 -6
  697. package/src/engine/intelligence/behavior/Behavior.d.ts +58 -16
  698. package/src/engine/intelligence/behavior/Behavior.d.ts.map +1 -1
  699. package/src/engine/intelligence/behavior/BehaviorStatus.d.ts +10 -8
  700. package/src/engine/intelligence/behavior/SelectorBehavior.d.ts +0 -1
  701. package/src/engine/intelligence/behavior/SelectorBehavior.d.ts.map +1 -1
  702. package/src/engine/intelligence/behavior/composite/ParallelBehavior.d.ts +0 -8
  703. package/src/engine/intelligence/behavior/composite/ParallelBehavior.d.ts.map +1 -1
  704. package/src/engine/intelligence/behavior/composite/ParallelBehaviorSerializationAdapter.d.ts +0 -1
  705. package/src/engine/intelligence/behavior/composite/ParallelBehaviorSerializationAdapter.d.ts.map +1 -1
  706. package/src/engine/intelligence/behavior/composite/SequenceBehavior.d.ts +0 -1
  707. package/src/engine/intelligence/behavior/composite/SequenceBehavior.d.ts.map +1 -1
  708. package/src/engine/intelligence/behavior/composite/SequenceBehaviorSerializationAdapter.d.ts +0 -1
  709. package/src/engine/intelligence/behavior/composite/SequenceBehaviorSerializationAdapter.d.ts.map +1 -1
  710. package/src/engine/intelligence/behavior/decorator/AbstractDecoratorBehavior.d.ts +0 -1
  711. package/src/engine/intelligence/behavior/decorator/AbstractDecoratorBehavior.d.ts.map +1 -1
  712. package/src/engine/intelligence/behavior/decorator/IgnoreFailureBehavior.d.ts +1 -2
  713. package/src/engine/intelligence/behavior/decorator/IgnoreFailureBehavior.d.ts.map +1 -1
  714. package/src/engine/intelligence/behavior/decorator/InvertStatusBehavior.d.ts +1 -2
  715. package/src/engine/intelligence/behavior/decorator/InvertStatusBehavior.d.ts.map +1 -1
  716. package/src/engine/intelligence/behavior/decorator/InvertStatusBehaviorSerializationAdapter.d.ts +0 -1
  717. package/src/engine/intelligence/behavior/decorator/InvertStatusBehaviorSerializationAdapter.d.ts.map +1 -1
  718. package/src/engine/intelligence/behavior/decorator/OverrideContextBehavior.d.ts +1 -1
  719. package/src/engine/intelligence/behavior/decorator/OverrideContextBehavior.d.ts.map +1 -1
  720. package/src/engine/intelligence/behavior/decorator/RepeatBehavior.d.ts +1 -2
  721. package/src/engine/intelligence/behavior/decorator/RepeatBehavior.d.ts.map +1 -1
  722. package/src/engine/intelligence/behavior/decorator/RepeatBehaviorSerializationAdapter.d.ts +0 -1
  723. package/src/engine/intelligence/behavior/decorator/RepeatBehaviorSerializationAdapter.d.ts.map +1 -1
  724. package/src/engine/intelligence/behavior/decorator/RepeatUntilSuccessBehavior.d.ts +1 -2
  725. package/src/engine/intelligence/behavior/decorator/RepeatUntilSuccessBehavior.d.ts.map +1 -1
  726. package/src/engine/intelligence/behavior/ecs/BehaviorComponentSerializationAdapter.d.ts +0 -1
  727. package/src/engine/intelligence/behavior/ecs/BehaviorComponentSerializationAdapter.d.ts.map +1 -1
  728. package/src/engine/intelligence/behavior/ecs/BehaviorSystem.d.ts +1 -1
  729. package/src/engine/intelligence/behavior/ecs/DieBehavior.d.ts +1 -2
  730. package/src/engine/intelligence/behavior/ecs/DieBehavior.d.ts.map +1 -1
  731. package/src/engine/intelligence/behavior/ecs/EntityBehavior.d.ts +0 -1
  732. package/src/engine/intelligence/behavior/ecs/EntityBehavior.d.ts.map +1 -1
  733. package/src/engine/intelligence/behavior/ecs/KillBehavior.d.ts +1 -2
  734. package/src/engine/intelligence/behavior/ecs/KillBehavior.d.ts.map +1 -1
  735. package/src/engine/intelligence/behavior/ecs/OrbitingBehavior.d.ts +1 -2
  736. package/src/engine/intelligence/behavior/ecs/OrbitingBehavior.d.ts.map +1 -1
  737. package/src/engine/intelligence/behavior/ecs/SendEventBehavior.d.ts +1 -2
  738. package/src/engine/intelligence/behavior/ecs/SendEventBehavior.d.ts.map +1 -1
  739. package/src/engine/intelligence/behavior/ecs/WaitForEventBehavior.d.ts +1 -2
  740. package/src/engine/intelligence/behavior/ecs/WaitForEventBehavior.d.ts.map +1 -1
  741. package/src/engine/intelligence/behavior/ecs/WaitForEventBehaviorSerializationAdapter.d.ts +0 -1
  742. package/src/engine/intelligence/behavior/ecs/WaitForEventBehaviorSerializationAdapter.d.ts.map +1 -1
  743. package/src/engine/intelligence/behavior/primitive/ActionBehavior.d.ts +1 -2
  744. package/src/engine/intelligence/behavior/primitive/ActionBehavior.d.ts.map +1 -1
  745. package/src/engine/intelligence/behavior/primitive/FailingBehavior.d.ts +1 -3
  746. package/src/engine/intelligence/behavior/primitive/FailingBehavior.d.ts.map +1 -1
  747. package/src/engine/intelligence/behavior/primitive/FailingBehaviorSerializationAdapter.d.ts +0 -1
  748. package/src/engine/intelligence/behavior/primitive/FailingBehaviorSerializationAdapter.d.ts.map +1 -1
  749. package/src/engine/intelligence/behavior/primitive/PromiseBehavior.d.ts +2 -4
  750. package/src/engine/intelligence/behavior/primitive/PromiseBehavior.d.ts.map +1 -1
  751. package/src/engine/intelligence/behavior/primitive/SucceedingBehavior.d.ts +1 -3
  752. package/src/engine/intelligence/behavior/primitive/SucceedingBehavior.d.ts.map +1 -1
  753. package/src/engine/intelligence/behavior/primitive/SucceedingBehaviorSerializationAdapter.d.ts +0 -1
  754. package/src/engine/intelligence/behavior/primitive/SucceedingBehaviorSerializationAdapter.d.ts.map +1 -1
  755. package/src/engine/intelligence/behavior/selector/WeightedRandomBehavior.d.ts +1 -2
  756. package/src/engine/intelligence/behavior/selector/WeightedRandomBehavior.d.ts.map +1 -1
  757. package/src/engine/intelligence/behavior/util/BranchBehavior.d.ts +1 -3
  758. package/src/engine/intelligence/behavior/util/BranchBehavior.d.ts.map +1 -1
  759. package/src/engine/intelligence/behavior/util/ConditionBehavior.d.ts +1 -2
  760. package/src/engine/intelligence/behavior/util/ConditionBehavior.d.ts.map +1 -1
  761. package/src/engine/intelligence/behavior/util/DelayBehavior.d.ts +1 -3
  762. package/src/engine/intelligence/behavior/util/DelayBehavior.d.ts.map +1 -1
  763. package/src/engine/intelligence/behavior/util/LogMessageBehavior.d.ts +1 -2
  764. package/src/engine/intelligence/behavior/util/LogMessageBehavior.d.ts.map +1 -1
  765. package/src/engine/intelligence/behavior/util/RandomDelayBehavior.d.ts +4 -4
  766. package/src/engine/intelligence/behavior/util/RandomDelayBehavior.d.ts.map +1 -1
  767. package/src/engine/intelligence/behavior/util/RotationBehavior.d.ts +1 -2
  768. package/src/engine/intelligence/behavior/util/RotationBehavior.d.ts.map +1 -1
  769. package/src/engine/intelligence/blackboard/AbstractBlackboard.d.ts +58 -15
  770. package/src/engine/intelligence/blackboard/AbstractBlackboard.d.ts.map +1 -1
  771. package/src/engine/intelligence/blackboard/Blackboard.d.ts +79 -11
  772. package/src/engine/intelligence/blackboard/Blackboard.d.ts.map +1 -1
  773. package/src/engine/intelligence/blackboard/BlackboardSerializationAdapter.d.ts +0 -1
  774. package/src/engine/intelligence/blackboard/BlackboardSerializationAdapter.d.ts.map +1 -1
  775. package/src/engine/intelligence/blackboard/BlackboardValue.d.ts +1 -0
  776. package/src/engine/intelligence/blackboard/BlackboardValue.d.ts.map +1 -1
  777. package/src/engine/intelligence/controller/graph/StateGraphSystem.d.ts +1 -3
  778. package/src/engine/intelligence/controller/graph/StateGraphSystem.d.ts.map +1 -1
  779. package/src/engine/interpolation/InterpolationSystem.d.ts +1 -5
  780. package/src/engine/interpolation/InterpolationSystem.d.ts.map +1 -1
  781. package/src/engine/interpolation/TransformPoseSerializationAdapter.d.ts +0 -1
  782. package/src/engine/interpolation/TransformPoseSerializationAdapter.d.ts.map +1 -1
  783. package/src/engine/knowledge/database/StaticKnowledgeDataTable.d.ts +140 -9
  784. package/src/engine/knowledge/database/StaticKnowledgeDataTableDescriptor.d.ts +26 -7
  785. package/src/engine/knowledge/database/StaticKnowledgeDatabase.d.ts +2 -3
  786. package/src/engine/knowledge/database/StaticKnowledgeDatabase.d.ts.map +1 -1
  787. package/src/engine/navigation/ecs/components/InterpolationType.d.ts +8 -4
  788. package/src/engine/navigation/ecs/components/Path.d.ts +170 -47
  789. package/src/engine/navigation/ecs/components/Path.d.ts.map +1 -1
  790. package/src/engine/navigation/ecs/components/Path.js +10 -4
  791. package/src/engine/navigation/ecs/components/PathEvents.d.ts +8 -6
  792. package/src/engine/navigation/ecs/components/PathSerializationAdapter.d.ts +0 -1
  793. package/src/engine/navigation/ecs/components/PathSerializationAdapter.d.ts.map +1 -1
  794. package/src/engine/navigation/ecs/path_following/PathFollower.d.ts +85 -45
  795. package/src/engine/navigation/ecs/path_following/PathFollowerEventType.d.ts +5 -3
  796. package/src/engine/navigation/ecs/path_following/PathFollowerFlags.d.ts +14 -20
  797. package/src/engine/navigation/ecs/path_following/PathFollowerSerializationAdapter.d.ts +0 -1
  798. package/src/engine/navigation/ecs/path_following/PathFollowerSerializationAdapter.d.ts.map +1 -1
  799. package/src/engine/navigation/ecs/path_following/PathFollowingSystem.d.ts +31 -6
  800. package/src/engine/navigation/ecs/path_following/PathFollowingSystem.d.ts.map +1 -1
  801. package/src/engine/navigation/ecs/path_following/PathFollowingSystem.js +1 -1
  802. package/src/engine/network/adapters/TransformReplicationAdapter.d.ts +0 -1
  803. package/src/engine/network/adapters/TransformReplicationAdapter.d.ts.map +1 -1
  804. package/src/engine/network/ecs/NetworkSystem.d.ts +1 -1
  805. package/src/engine/network/ecs/serialization/NetworkIdentitySerializationAdapter.d.ts +0 -1
  806. package/src/engine/network/ecs/serialization/NetworkIdentitySerializationAdapter.d.ts.map +1 -1
  807. package/src/engine/options/Option.d.ts +3 -3
  808. package/src/engine/options/OptionsView.d.ts +1 -2
  809. package/src/engine/options/OptionsView.d.ts.map +1 -1
  810. package/src/engine/physics/body/SolverBodyState.d.ts.map +1 -1
  811. package/src/engine/physics/body/SolverBodyState.js +10 -1
  812. package/src/engine/physics/constraint/solve_constraints.d.ts.map +1 -1
  813. package/src/engine/physics/constraint/solve_constraints.js +840 -830
  814. package/src/engine/physics/ecs/ColliderObserverSystem.d.ts +3 -3
  815. package/src/engine/physics/ecs/ColliderObserverSystem.d.ts.map +1 -1
  816. package/src/engine/physics/ecs/ColliderSerializationAdapter.d.ts +0 -1
  817. package/src/engine/physics/ecs/ColliderSerializationAdapter.d.ts.map +1 -1
  818. package/src/engine/physics/ecs/JointSerializationAdapter.d.ts +0 -1
  819. package/src/engine/physics/ecs/JointSerializationAdapter.d.ts.map +1 -1
  820. package/src/engine/physics/ecs/PhysicsSystem.d.ts +14 -2
  821. package/src/engine/physics/ecs/PhysicsSystem.d.ts.map +1 -1
  822. package/src/engine/physics/ecs/PhysicsSystem.js +2246 -2172
  823. package/src/engine/physics/ecs/RigidBodySerializationAdapter.d.ts +0 -1
  824. package/src/engine/physics/ecs/RigidBodySerializationAdapter.d.ts.map +1 -1
  825. package/src/engine/physics/fluid/ecs/FluidObstacleSystem.d.ts +12 -8
  826. package/src/engine/physics/fluid/ecs/FluidObstacleSystem.d.ts.map +1 -1
  827. package/src/engine/physics/fluid/ecs/FluidSystem.d.ts +8 -4
  828. package/src/engine/physics/fluid/ecs/FluidSystem.d.ts.map +1 -1
  829. package/src/engine/physics/integration/integrate_velocity.d.ts.map +1 -1
  830. package/src/engine/physics/integration/integrate_velocity.js +25 -2
  831. package/src/engine/physics/narrowphase/capsule_contacts.d.ts.map +1 -1
  832. package/src/engine/physics/narrowphase/capsule_contacts.js +622 -617
  833. package/src/engine/physics/narrowphase/convex_convex_manifold.d.ts.map +1 -1
  834. package/src/engine/physics/narrowphase/convex_convex_manifold.js +632 -568
  835. package/src/engine/physics/solver/solve_contacts.d.ts +6 -5
  836. package/src/engine/physics/solver/solve_contacts.d.ts.map +1 -1
  837. package/src/engine/physics/solver/solve_contacts.js +1506 -1482
  838. package/src/engine/platform/EnginePlatform.d.ts +24 -14
  839. package/src/engine/platform/WebEnginePlatform.d.ts +20 -5
  840. package/src/engine/platform/WebEnginePlatform.d.ts.map +1 -1
  841. package/src/engine/plugin/EnginePlugin.d.ts +36 -3
  842. package/src/engine/plugin/EnginePlugin.d.ts.map +1 -1
  843. package/src/engine/plugin/EnginePluginManager.d.ts +85 -16
  844. package/src/engine/plugin/EnginePluginManager.d.ts.map +1 -1
  845. package/src/engine/plugin/PluginReferenceContext.d.ts +1 -1
  846. package/src/engine/reference/v2/Reference.d.ts +55 -17
  847. package/src/engine/reference/v2/Reference.d.ts.map +1 -1
  848. package/src/engine/save/GameStateLoader.d.ts +0 -1
  849. package/src/engine/save/GameStateLoader.d.ts.map +1 -1
  850. package/src/engine/save/Storage.d.ts +75 -15
  851. package/src/engine/save/storage/InMemoryStorage.d.ts +0 -1
  852. package/src/engine/save/storage/InMemoryStorage.d.ts.map +1 -1
  853. package/src/engine/save/storage/IndexedDBStorage.d.ts +0 -2
  854. package/src/engine/save/storage/IndexedDBStorage.d.ts.map +1 -1
  855. package/src/engine/scene/Scene.d.ts +65 -7
  856. package/src/engine/scene/SceneManager.d.ts +125 -25
  857. package/src/engine/simulation/Ticker.d.ts +1 -2
  858. package/src/engine/simulation/Ticker.d.ts.map +1 -1
  859. package/src/engine/sound/SoundEngine.d.ts +46 -3
  860. package/src/engine/sound/ecs/SoundController.d.ts +0 -1
  861. package/src/engine/sound/ecs/SoundController.d.ts.map +1 -1
  862. package/src/engine/sound/ecs/SoundControllerSystem.d.ts +1 -2
  863. package/src/engine/sound/ecs/SoundControllerSystem.d.ts.map +1 -1
  864. package/src/engine/sound/ecs/SoundListener.d.ts +0 -1
  865. package/src/engine/sound/ecs/SoundListener.d.ts.map +1 -1
  866. package/src/engine/sound/ecs/SoundListenerSystem.d.ts +1 -1
  867. package/src/engine/sound/ecs/audio/AudioEmitterSystem.d.ts +1 -1
  868. package/src/engine/sound/ecs/emitter/SoundEmitter.d.ts +1 -1
  869. package/src/engine/sound/ecs/emitter/SoundEmitter.d.ts.map +1 -1
  870. package/src/engine/sound/ecs/emitter/SoundEmitterSerializationAdapter.d.ts +0 -1
  871. package/src/engine/sound/ecs/emitter/SoundEmitterSerializationAdapter.d.ts.map +1 -1
  872. package/src/engine/sound/ecs/emitter/SoundEmitterSystem.d.ts +1 -1
  873. package/src/engine/sound/ecs/emitter/SoundTrack.d.ts +1 -2
  874. package/src/engine/sound/ecs/emitter/SoundTrack.d.ts.map +1 -1
  875. package/src/engine/sound/simulation/core/AcousticMediumSerializationAdapter.d.ts +0 -1
  876. package/src/engine/sound/simulation/core/AcousticMediumSerializationAdapter.d.ts.map +1 -1
  877. package/src/engine/sound/simulation/definition/AcousticDirectivitySerializationAdapter.d.ts +0 -1
  878. package/src/engine/sound/simulation/definition/AcousticDirectivitySerializationAdapter.d.ts.map +1 -1
  879. package/src/engine/sound/simulation/definition/AcousticMaterialSerializationAdapter.d.ts +0 -1
  880. package/src/engine/sound/simulation/definition/AcousticMaterialSerializationAdapter.d.ts.map +1 -1
  881. package/src/engine/sound/simulation/ecs/AcousticBodySerializationAdapter.d.ts +0 -1
  882. package/src/engine/sound/simulation/ecs/AcousticBodySerializationAdapter.d.ts.map +1 -1
  883. package/src/engine/sound/simulation/ecs/AcousticProbeFieldSystem.d.ts +1 -1
  884. package/src/engine/sound/simulation/ecs/AcousticSimulationSystem.d.ts +1 -1
  885. package/src/engine/sound/simulation/ecs/AcousticVolumeSerializationAdapter.d.ts +0 -1
  886. package/src/engine/sound/simulation/ecs/AcousticVolumeSerializationAdapter.d.ts.map +1 -1
  887. package/src/engine/sound/simulation/ecs/AcousticVolumeSystem.d.ts +1 -1
  888. package/src/engine/sound/simulation/probe/AcousticProbeFieldSerializationAdapter.d.ts +0 -1
  889. package/src/engine/sound/simulation/probe/AcousticProbeFieldSerializationAdapter.d.ts.map +1 -1
  890. package/src/engine/sound/sopra/definition/BusDefinitionSerializationAdapter.d.ts +0 -1
  891. package/src/engine/sound/sopra/definition/BusDefinitionSerializationAdapter.d.ts.map +1 -1
  892. package/src/engine/sound/sopra/definition/DuckingRuleSerializationAdapter.d.ts +0 -1
  893. package/src/engine/sound/sopra/definition/DuckingRuleSerializationAdapter.d.ts.map +1 -1
  894. package/src/engine/sound/sopra/definition/EventDescriptionSerializationAdapter.d.ts +0 -1
  895. package/src/engine/sound/sopra/definition/EventDescriptionSerializationAdapter.d.ts.map +1 -1
  896. package/src/engine/sound/sopra/definition/MixerSnapshotSerializationAdapter.d.ts +0 -1
  897. package/src/engine/sound/sopra/definition/MixerSnapshotSerializationAdapter.d.ts.map +1 -1
  898. package/src/engine/sound/sopra/definition/ParameterDefinitionSerializationAdapter.d.ts +0 -1
  899. package/src/engine/sound/sopra/definition/ParameterDefinitionSerializationAdapter.d.ts.map +1 -1
  900. package/src/engine/sound/sopra/definition/clip/BlendContainerAudioClipSerializationAdapter.d.ts +0 -1
  901. package/src/engine/sound/sopra/definition/clip/BlendContainerAudioClipSerializationAdapter.d.ts.map +1 -1
  902. package/src/engine/sound/sopra/definition/clip/RandomContainerAudioClipSerializationAdapter.d.ts +0 -1
  903. package/src/engine/sound/sopra/definition/clip/RandomContainerAudioClipSerializationAdapter.d.ts.map +1 -1
  904. package/src/engine/sound/sopra/definition/clip/SampleAudioClipSerializationAdapter.d.ts +0 -1
  905. package/src/engine/sound/sopra/definition/clip/SampleAudioClipSerializationAdapter.d.ts.map +1 -1
  906. package/src/engine/sound/sopra/definition/clip/SequenceContainerAudioClipSerializationAdapter.d.ts +0 -1
  907. package/src/engine/sound/sopra/definition/clip/SequenceContainerAudioClipSerializationAdapter.d.ts.map +1 -1
  908. package/src/engine/sound/sopra/definition/clip/SilenceAudioClipSerializationAdapter.d.ts +0 -1
  909. package/src/engine/sound/sopra/definition/clip/SilenceAudioClipSerializationAdapter.d.ts.map +1 -1
  910. package/src/engine/sound/sopra/definition/clip/SwitchContainerAudioClipSerializationAdapter.d.ts +0 -1
  911. package/src/engine/sound/sopra/definition/clip/SwitchContainerAudioClipSerializationAdapter.d.ts.map +1 -1
  912. package/src/engine/sound/sopra/definition/effect/CompressorEffectSerializationAdapter.d.ts +0 -1
  913. package/src/engine/sound/sopra/definition/effect/CompressorEffectSerializationAdapter.d.ts.map +1 -1
  914. package/src/engine/sound/sopra/definition/effect/EqEffectSerializationAdapter.d.ts +0 -1
  915. package/src/engine/sound/sopra/definition/effect/EqEffectSerializationAdapter.d.ts.map +1 -1
  916. package/src/engine/sound/sopra/definition/effect/ReverbEffectSerializationAdapter.d.ts +0 -1
  917. package/src/engine/sound/sopra/definition/effect/ReverbEffectSerializationAdapter.d.ts.map +1 -1
  918. package/src/engine/sound/sopra/runtime/EventInstance.d.ts +1 -2
  919. package/src/engine/sound/sopra/runtime/EventInstance.d.ts.map +1 -1
  920. package/src/engine/sound/sopra/runtime/ParameterStore.d.ts +1 -2
  921. package/src/engine/sound/sopra/runtime/ParameterStore.d.ts.map +1 -1
  922. package/src/engine/ui/bindings/DomElementProcessorManager.d.ts +0 -3
  923. package/src/engine/ui/bindings/DomElementProcessorManager.d.ts.map +1 -1
  924. package/src/engine/ui/modal/ModalStack.d.ts +3 -3
  925. package/src/engine/ui/notification/AnimatedObjectEmitter.d.ts +2 -2
  926. package/src/engine/ui/notification/ViewEmitter.d.ts +2 -2
  927. package/src/generation/filtering/CellFilter.d.ts +1 -1
  928. package/src/generation/filtering/CellFilter.d.ts.map +1 -1
  929. package/src/generation/markers/actions/placement/MarkerNodeEntityProcessorRandomRotation.d.ts +3 -1
  930. package/src/generation/markers/actions/placement/MarkerNodeEntityProcessorRandomRotation.d.ts.map +1 -1
  931. package/src/generation/markers/actions/probability/MarkerNodeActionSelectWeighted.d.ts +3 -1
  932. package/src/generation/markers/actions/probability/MarkerNodeActionSelectWeighted.d.ts.map +1 -1
  933. package/src/generation/markers/transform/MarkerNodeTransformRotateRandom.d.ts +3 -1
  934. package/src/generation/markers/transform/MarkerNodeTransformRotateRandom.d.ts.map +1 -1
  935. package/src/generation/markers/transform/MarkerNodeTransformerRecordPropertyClosure.d.ts +3 -1
  936. package/src/generation/markers/transform/MarkerNodeTransformerRecordPropertyClosure.d.ts.map +1 -1
  937. package/src/generation/markers/transform/MarkerNodeTransformerRecordUniqueRandomEnum.d.ts +3 -1
  938. package/src/generation/markers/transform/MarkerNodeTransformerRecordUniqueRandomEnum.d.ts.map +1 -1
  939. package/src/generation/placement/action/util/CellMatcherWithinAABB.d.ts +1 -1
  940. package/src/generation/placement/action/util/CellMatcherWithinAABB.d.ts.map +1 -1
  941. package/src/misc/makeMatcapSelectionOption.d.ts +11 -13
  942. package/src/view/View.d.ts +313 -30
  943. package/src/view/asset/AssetLoaderStatusView.d.ts +1 -1
  944. package/src/view/asset/PreloaderView.d.ts +1 -1
  945. package/src/view/common/LabelView.d.ts +2 -1
  946. package/src/view/common/LabelView.d.ts.map +1 -1
  947. package/src/view/common/ListView.d.ts +2 -2
  948. package/src/view/common/ListView.d.ts.map +1 -1
  949. package/src/view/common/TabbedView.d.ts +1 -1
  950. package/src/view/common/VirtualListView.d.ts +3 -3
  951. package/src/view/common/VirtualListView.d.ts.map +1 -1
  952. package/src/view/common/dnd/Draggable.d.ts +2 -2
  953. package/src/view/common/dnd/DropTarget.d.ts +6 -6
  954. package/src/view/controller/GuiController.d.ts +1 -2
  955. package/src/view/controller/GuiController.d.ts.map +1 -1
  956. package/src/view/controller/controls/BooleanVector3Control.d.ts +1 -2
  957. package/src/view/controller/controls/BooleanVector3Control.d.ts.map +1 -1
  958. package/src/view/controller/controls/NativeListController.d.ts +1 -1
  959. package/src/view/controller/controls/Vector1Control.d.ts +1 -1
  960. package/src/view/currency/CompositeCurrencyLabelView.d.ts +1 -1
  961. package/src/view/currency/CurrencyDenominationLabelView.d.ts +1 -1
  962. package/src/view/elements/BottomLeftResizeHandleView.d.ts +1 -1
  963. package/src/view/elements/CanvasView.d.ts +1 -2
  964. package/src/view/elements/CanvasView.d.ts.map +1 -1
  965. package/src/view/elements/CheckboxView.d.ts +1 -1
  966. package/src/view/elements/CompassArrowView.d.ts +1 -2
  967. package/src/view/elements/CompassArrowView.d.ts.map +1 -1
  968. package/src/view/elements/ConfirmationDialogView.d.ts +1 -1
  969. package/src/view/elements/DropDownSelectionView.d.ts +1 -1
  970. package/src/view/elements/EmptyView.d.ts +1 -2
  971. package/src/view/elements/EmptyView.d.ts.map +1 -1
  972. package/src/view/elements/Group.d.ts +1 -2
  973. package/src/view/elements/Group.d.ts.map +1 -1
  974. package/src/view/elements/MeshPreview.d.ts +1 -1
  975. package/src/view/elements/SimpleWindow.d.ts +1 -1
  976. package/src/view/elements/button/ButtonView.d.ts +1 -1
  977. package/src/view/elements/image/ImageView.d.ts +1 -2
  978. package/src/view/elements/image/ImageView.d.ts.map +1 -1
  979. package/src/view/elements/image/SvgImageView.d.ts +1 -1
  980. package/src/view/elements/label/LabeledValueView.d.ts +1 -1
  981. package/src/view/elements/navigation/ViewStack.d.ts +1 -8
  982. package/src/view/elements/navigation/ViewStack.d.ts.map +1 -1
  983. package/src/view/elements/notify/ToastLogView.d.ts +1 -1
  984. package/src/view/elements/progress/RectangularPieProgressView.d.ts +1 -1
  985. package/src/view/elements/progress/SmoothProgressBar.d.ts +1 -1
  986. package/src/view/elements/progress/segmented/SegmentedResourceBarView.d.ts +1 -1
  987. package/src/view/elements/radial/RadialMenu.d.ts +1 -1
  988. package/src/view/elements/radial/RadialMenuElement.d.ts +1 -1
  989. package/src/view/elements/radial/RadialMenuElementDefinition.d.ts +125 -39
  990. package/src/view/elements/radial/RadialProgressView.d.ts +1 -1
  991. package/src/view/elements/radial/RadialText.d.ts +1 -1
  992. package/src/view/elements/tiles2d/Tile.d.ts +1 -1
  993. package/src/view/elements/tiles2d/TileGrid.d.ts +4 -5
  994. package/src/view/elements/tiles2d/TileGrid.d.ts.map +1 -1
  995. package/src/view/elements/video/VideoView.d.ts +2 -2
  996. package/src/view/elements/video/VideoView.d.ts.map +1 -1
  997. package/src/view/elements/windrose/WindRoseDiagram.d.ts +1 -1
  998. package/src/view/game/achievements/AchievementNotificationView.d.ts +1 -1
  999. package/src/view/math/FunctionGraphView.d.ts +1 -1
  1000. package/src/view/minimap/Minimap.d.ts +1 -1
  1001. package/src/view/minimap/dom/MinimapCameraView.d.ts +1 -1
  1002. package/src/view/minimap/dom/MinimapMarkerView.d.ts +1 -1
  1003. package/src/view/minimap/dom/MinimapTerrainView.d.ts +1 -1
  1004. package/src/view/task/TaskProgressView.d.ts +1 -1
  1005. package/src/view/tooltip/DomTooltipObserver.d.ts +2 -2
  1006. package/src/view/tooltip/TooltipView.d.ts +1 -1
  1007. package/src/view/tooltip/gml/parser/parseTooltipString.d.ts +1 -0
  1008. package/src/view/tooltip/gml/parser/parseTooltipString.d.ts.map +1 -1
  1009. package/src/view/tooltip/gml/parser/readReferenceToken.d.ts +1 -0
  1010. package/src/view/tooltip/gml/parser/readReferenceToken.d.ts.map +1 -1
  1011. package/src/view/tooltip/gml/parser/readReferenceValueToken.d.ts +2 -1
  1012. package/src/view/tooltip/gml/parser/readReferenceValueToken.d.ts.map +1 -1
  1013. package/src/view/tooltip/gml/parser/readStyleToken.d.ts +1 -0
  1014. package/src/view/tooltip/gml/parser/readStyleToken.d.ts.map +1 -1
  1015. package/editor/ecs/component/TypeSchema.d.ts +0 -38
  1016. package/editor/tools/v2/BlenderCameraOrientationGizmo.d.ts +0 -50
@@ -1,555 +1,557 @@
1
- import {
2
- BufferAttribute,
3
- BufferGeometry,
4
- DynamicDrawUsage,
5
- InterleavedBuffer,
6
- InterleavedBufferAttribute
7
- } from "three";
8
- import { assert } from "../../../../core/assert.js";
9
- import { RowFirstTable } from "../../../../core/collection/table/RowFirstTable.js";
10
- import { aabb3_array_set } from "../../../../core/geom/3d/aabb/aabb3_array_set.js";
11
- import { v3_orthonormal_matrix_from_normal } from "../../../../core/geom/vec3/v3_orthonormal_matrix_from_normal.js";
12
- import { max2 } from "../../../../core/math/max2.js";
13
- import { min2 } from "../../../../core/math/min2.js";
14
- import {
15
- TUBE_ATTRIBUTE_ADDRESS_ALPHA,
16
- TUBE_ATTRIBUTE_ADDRESS_BINORMAL,
17
- TUBE_ATTRIBUTE_ADDRESS_COLOR,
18
- TUBE_ATTRIBUTE_ADDRESS_NORMAL,
19
- TUBE_ATTRIBUTE_ADDRESS_OFF,
20
- TUBE_ATTRIBUTE_ADDRESS_POSITION,
21
- TUBE_ATTRIBUTE_ADDRESS_THICKNESS,
22
- tube_attributes_spec
23
- } from "./tube_attributes_spec.js";
24
-
25
- /**
26
- * Default number of radial subdivisions around the tube. Overridable per-tube
27
- * via {@link TubeX#setCount}; never hard-coded into the geometry.
28
- * @type {number}
29
- */
30
- const DEFAULT_RADIAL_SEGMENTS = 8;
31
-
32
- /**
33
- * Scratch for the arbitrary default frame written at build time; module-static so
34
- * setCount stays allocation-free on the data path.
35
- * @type {Float64Array}
36
- */
37
- const m3_default_frame = new Float64Array(9);
38
-
39
- /**
40
- * Dynamic, non-allocating 3D tube geometry — the volumetric analogue of
41
- * {@link RibbonX}.
42
- *
43
- * A tube is a ring buffer of `count` KNOTS along a centre-line. Each knot owns a
44
- * ring of `radial + 1` vertices: the extra vertex duplicates vertex 0 so the UV
45
- * seam (u = 0 meeting u = 1) closes cleanly when the texture wraps the tube.
46
- * Vertices are extruded in the vertex shader from the knot's stored tangent
47
- * frame, so the CPU only ever writes per-knot data (centre, frame, colour, …) —
48
- * never per-triangle.
49
- *
50
- * Like {@link RibbonX} the geometry is a fixed-capacity ring: {@link rotate}
51
- * recycles the oldest knot as the new head and rewrites a single segment's worth
52
- * of indices, so steady-state updates allocate nothing.
53
- */
54
- export class TubeX {
55
-
56
- /**
57
- * @type {BufferGeometry}
58
- */
59
- #geometry = new BufferGeometry();
60
-
61
- /**
62
- * @type {RowFirstTable}
63
- */
64
- #data = new RowFirstTable(tube_attributes_spec);
65
-
66
- /**
67
- * Knot index at the END (oldest) of the tube.
68
- * @type {number}
69
- */
70
- #tail_index = 0;
71
-
72
- /**
73
- * Knot index at the START (newest) of the tube.
74
- * @type {number}
75
- */
76
- #head_index = 0;
77
-
78
- /**
79
- * Index of the segment (knot-to-knot span of `radial` quads) currently at the
80
- * tail; recycled by {@link rotate}.
81
- * @type {number}
82
- */
83
- #tail_segment_index = 0;
84
-
85
- /**
86
- * Number of knots.
87
- * @type {number}
88
- */
89
- #count = 0;
90
-
91
- /**
92
- * Number of radial subdivisions. Ring vertex count per knot = radial + 1.
93
- * @type {number}
94
- */
95
- #radial = DEFAULT_RADIAL_SEGMENTS;
96
-
97
- // Interleaved buffers + attribute views over #data; created in buildGeometry().
98
- #ib_uint8 = null;
99
- #ib_float32 = null;
100
- #iba_position = null;
101
- #iba_normal = null;
102
- #iba_binormal = null;
103
- #iba_uv = null;
104
- #iba_alpha = null;
105
- #iba_thickness = null;
106
- #iba_color = null;
107
- #ba_index = null;
108
-
109
- dispose() {
110
- this.#geometry.dispose();
111
- }
112
-
113
- /**
114
- * @returns {BufferGeometry}
115
- */
116
- getGeometry() {
117
- return this.#geometry;
118
- }
119
-
120
- /**
121
- * @returns {number} number of knots
122
- */
123
- getCount() {
124
- return this.#count;
125
- }
126
-
127
- /**
128
- * @returns {number} radial subdivisions
129
- */
130
- getRadialSegments() {
131
- return this.#radial;
132
- }
133
-
134
- getHeadIndex() {
135
- return this.#head_index;
136
- }
137
-
138
- getTailIndex() {
139
- return this.#tail_index;
140
- }
141
-
142
- /**
143
- * Number of vertices in a single knot ring (includes the duplicated seam vertex).
144
- * @returns {number}
145
- */
146
- get #ring_vertex_count() {
147
- return this.#radial + 1;
148
- }
149
-
150
- buildGeometry() {
151
- const a_uint8 = new Uint8Array(this.#data.data);
152
- const a_float32 = new Float32Array(this.#data.data);
153
-
154
- const bpr = this.#data.spec.bytesPerRecord;
155
-
156
- this.#ib_uint8 = new InterleavedBuffer(a_uint8, bpr);
157
- this.#ib_float32 = new InterleavedBuffer(a_float32, bpr >> 2);
158
-
159
- this.#iba_position = new InterleavedBufferAttribute(this.#ib_float32, 3, 1, false);
160
- this.#iba_normal = new InterleavedBufferAttribute(this.#ib_float32, 3, 4, false);
161
- this.#iba_binormal = new InterleavedBufferAttribute(this.#ib_float32, 3, 7, false);
162
-
163
- // off (uv.x) and uv_v (uv.y) are contiguous, exposed as a single vec2.
164
- this.#iba_uv = new InterleavedBufferAttribute(this.#ib_float32, 2, 10, false);
165
- this.#iba_alpha = new InterleavedBufferAttribute(this.#ib_float32, 1, 12, false);
166
- this.#iba_thickness = new InterleavedBufferAttribute(this.#ib_float32, 1, 13, false);
167
-
168
- this.#iba_color = new InterleavedBufferAttribute(this.#ib_uint8, 3, 56, false);
169
-
170
- // Uint32 (not Uint16): vertex count = count * (radial + 1) easily exceeds
171
- // 65535 for a long tube with high radial resolution. WebGL2 supports it natively.
172
- this.#ba_index = new BufferAttribute(new Uint32Array(0), 1, false);
173
-
174
- this.#geometry.setAttribute('position', this.#iba_position);
175
- this.#geometry.setAttribute('tn', this.#iba_normal);
176
- this.#geometry.setAttribute('tb', this.#iba_binormal);
177
- this.#geometry.setAttribute('tubeUv', this.#iba_uv);
178
- this.#geometry.setAttribute('alpha', this.#iba_alpha);
179
- this.#geometry.setAttribute('thickness', this.#iba_thickness);
180
- this.#geometry.setAttribute('color', this.#iba_color);
181
-
182
- this.#geometry.setIndex(this.#ba_index);
183
-
184
- this.#ib_uint8.setUsage(DynamicDrawUsage);
185
- this.#ib_float32.setUsage(DynamicDrawUsage);
186
- this.#ba_index.setUsage(DynamicDrawUsage);
187
- }
188
-
189
- /**
190
- * Write the static angular `off` coordinate (uv.x) for every ring vertex. The
191
- * value goes 0 → 1 across the `radial + 1` vertices; vertex `radial` lands on
192
- * 1.0 so its shader angle is 2π — co-incident with vertex 0's angle 0, closing
193
- * the seam without a wrap-around index.
194
- */
195
- #initialize_off() {
196
- const data = this.#data;
197
- const count = this.#count;
198
- const radial = this.#radial;
199
- const v = this.#ring_vertex_count;
200
-
201
- for (let k = 0; k < count; k++) {
202
- const base = k * v;
203
- for (let j = 0; j <= radial; j++) {
204
- data.writeCellValue(base + j, TUBE_ATTRIBUTE_ADDRESS_OFF, j / radial);
205
- }
206
- }
207
- }
208
-
209
- /**
210
- * Seed every knot with a valid (arbitrary) orthonormal frame so the geometry is
211
- * well-formed from the moment it is built, before any head movement supplies a
212
- * real tangent. Without this the frames would be zero-initialised and the
213
- * transport's degeneracy fallback would have to cover the fresh-tube case; a
214
- * concrete default keeps the invariant "every knot frame is unit + orthonormal"
215
- * unconditionally true (read e.g. by getKnotNormal during transport).
216
- */
217
- #initialize_frame() {
218
- v3_orthonormal_matrix_from_normal(m3_default_frame, 0, 0, 1, 0);
219
-
220
- const nx = m3_default_frame[0], ny = m3_default_frame[1], nz = m3_default_frame[2];
221
- const bx = m3_default_frame[3], by = m3_default_frame[4], bz = m3_default_frame[5];
222
-
223
- const count = this.#count;
224
-
225
- for (let k = 0; k < count; k++) {
226
- this.setKnotFrame(k, nx, ny, nz, bx, by, bz);
227
- }
228
- }
229
-
230
- /**
231
- * Write the `radial` quads (2 triangles each) bridging the ring of knot `lo`
232
- * to the ring of knot `hi`, starting at `address` in the index array.
233
- * Winding matches the engine's static tube mesher (make_ring_faces).
234
- * @param {number} address index-array offset (in index entries)
235
- * @param {number} lo knot index whose ring is the "left" edge
236
- * @param {number} hi knot index whose ring is the "right" edge
237
- */
238
- #write_segment_indices(address, lo, hi) {
239
- const indices = this.#ba_index.array;
240
- const radial = this.#radial;
241
- const v = this.#ring_vertex_count;
242
-
243
- const lo_base = lo * v;
244
- const hi_base = hi * v;
245
-
246
- for (let r = 0; r < radial; r++) {
247
- const a = lo_base + r;
248
- const b = hi_base + r;
249
- const c = hi_base + r + 1;
250
- const d = lo_base + r + 1;
251
-
252
- const ci = address + r * 6;
253
-
254
- indices[ci] = a;
255
- indices[ci + 1] = b;
256
- indices[ci + 2] = d;
257
-
258
- indices[ci + 3] = b;
259
- indices[ci + 4] = c;
260
- indices[ci + 5] = d;
261
- }
262
- }
263
-
264
- /**
265
- * Build the index buffer as a linear strip of `count - 1` segments.
266
- */
267
- #initialize_index() {
268
- const segment_count = this.#count - 1;
269
- const indices_per_segment = this.#radial * 6;
270
-
271
- for (let s = 0; s < segment_count; s++) {
272
- this.#write_segment_indices(s * indices_per_segment, s, s + 1);
273
- }
274
- }
275
-
276
- /**
277
- * @param {number[]|Float32Array} result
278
- * @param {number} knot_index
279
- */
280
- getKnotPosition(result, knot_index) {
281
- const row = knot_index * this.#ring_vertex_count;
282
- const data = this.#data;
283
-
284
- result[0] = data.readCellValue(row, TUBE_ATTRIBUTE_ADDRESS_POSITION);
285
- result[1] = data.readCellValue(row, TUBE_ATTRIBUTE_ADDRESS_POSITION + 1);
286
- result[2] = data.readCellValue(row, TUBE_ATTRIBUTE_ADDRESS_POSITION + 2);
287
- }
288
-
289
- /**
290
- * Read the stored ring normal of a knot. Used by the head to parallel-transport
291
- * its frame from the previous knot.
292
- * @param {number[]|Float32Array} result
293
- * @param {number} knot_index
294
- */
295
- getKnotNormal(result, knot_index) {
296
- const row = knot_index * this.#ring_vertex_count;
297
- const data = this.#data;
298
-
299
- result[0] = data.readCellValue(row, TUBE_ATTRIBUTE_ADDRESS_NORMAL);
300
- result[1] = data.readCellValue(row, TUBE_ATTRIBUTE_ADDRESS_NORMAL + 1);
301
- result[2] = data.readCellValue(row, TUBE_ATTRIBUTE_ADDRESS_NORMAL + 2);
302
- }
303
-
304
- /**
305
- * Read the stored ring binormal of a knot.
306
- * @param {number[]|Float32Array} result
307
- * @param {number} knot_index
308
- */
309
- getKnotBinormal(result, knot_index) {
310
- const row = knot_index * this.#ring_vertex_count;
311
- const data = this.#data;
312
-
313
- result[0] = data.readCellValue(row, TUBE_ATTRIBUTE_ADDRESS_BINORMAL);
314
- result[1] = data.readCellValue(row, TUBE_ATTRIBUTE_ADDRESS_BINORMAL + 1);
315
- result[2] = data.readCellValue(row, TUBE_ATTRIBUTE_ADDRESS_BINORMAL + 2);
316
- }
317
-
318
- /**
319
- * Write a vec3 attribute to all ring vertices of a knot.
320
- * @param {number} knot_index
321
- * @param {number} attribute_index
322
- * @param {number} x
323
- * @param {number} y
324
- * @param {number} z
325
- */
326
- setKnotAttribute_Vector3(knot_index, attribute_index, x, y, z) {
327
- const data = this.#data;
328
- const v = this.#ring_vertex_count;
329
- const base = knot_index * v;
330
-
331
- for (let j = 0; j < v; j++) {
332
- const row = base + j;
333
- data.writeCellValue(row, attribute_index, x);
334
- data.writeCellValue(row, attribute_index + 1, y);
335
- data.writeCellValue(row, attribute_index + 2, z);
336
- }
337
- }
338
-
339
- /**
340
- * Write a scalar attribute to all ring vertices of a knot.
341
- * @param {number} knot_index
342
- * @param {number} attribute_index
343
- * @param {number} value
344
- */
345
- setKnotAttribute_Scalar(knot_index, attribute_index, value) {
346
- const data = this.#data;
347
- const v = this.#ring_vertex_count;
348
- const base = knot_index * v;
349
-
350
- for (let j = 0; j < v; j++) {
351
- data.writeCellValue(base + j, attribute_index, value);
352
- }
353
- }
354
-
355
- /**
356
- * Add `delta` to a scalar attribute on every ring vertex of a knot.
357
- * @param {number} knot_index
358
- * @param {number} attribute_index
359
- * @param {number} delta
360
- * @returns {number} incremented value
361
- */
362
- incrementKnotAttribute_Scalar(knot_index, attribute_index, delta) {
363
- const data = this.#data;
364
- const v = this.#ring_vertex_count;
365
- const base = knot_index * v;
366
-
367
- const value = data.readCellValue(base, attribute_index) + delta;
368
-
369
- for (let j = 0; j < v; j++) {
370
- data.writeCellValue(base + j, attribute_index, value);
371
- }
372
-
373
- return value;
374
- }
375
-
376
- /**
377
- * @param {number} knot_index
378
- * @param {number} x
379
- * @param {number} y
380
- * @param {number} z
381
- */
382
- setKnotPosition(knot_index, x, y, z) {
383
- assert.isNonNegativeInteger(knot_index, 'knot_index');
384
-
385
- this.setKnotAttribute_Vector3(knot_index, TUBE_ATTRIBUTE_ADDRESS_POSITION, x, y, z);
386
-
387
- this.#ib_float32.needsUpdate = true;
388
- }
389
-
390
- /**
391
- * Set the orienting tangent frame of a knot. `nx,ny,nz` and `bx,by,bz` must be
392
- * unit vectors, mutually orthogonal and perpendicular to the local tangent.
393
- * @param {number} knot_index
394
- * @param {number} nx
395
- * @param {number} ny
396
- * @param {number} nz
397
- * @param {number} bx
398
- * @param {number} by
399
- * @param {number} bz
400
- */
401
- setKnotFrame(knot_index, nx, ny, nz, bx, by, bz) {
402
- this.setKnotAttribute_Vector3(knot_index, TUBE_ATTRIBUTE_ADDRESS_NORMAL, nx, ny, nz);
403
- this.setKnotAttribute_Vector3(knot_index, TUBE_ATTRIBUTE_ADDRESS_BINORMAL, bx, by, bz);
404
-
405
- this.#ib_float32.needsUpdate = true;
406
- }
407
-
408
- /**
409
- * @param {number} knot_index
410
- * @param {number} r 0..255
411
- * @param {number} g 0..255
412
- * @param {number} b 0..255
413
- */
414
- setKnotColor(knot_index, r, g, b) {
415
- assert.isNonNegativeInteger(knot_index, 'knot_index');
416
-
417
- this.setKnotAttribute_Vector3(knot_index, TUBE_ATTRIBUTE_ADDRESS_COLOR, r, g, b);
418
-
419
- this.#ib_uint8.needsUpdate = true;
420
- }
421
-
422
- /**
423
- * @param {number} knot_index
424
- * @param {number} value
425
- */
426
- setKnotAlpha(knot_index, value) {
427
- this.setKnotAttribute_Scalar(knot_index, TUBE_ATTRIBUTE_ADDRESS_ALPHA, value);
428
-
429
- this.#ib_float32.needsUpdate = true;
430
- }
431
-
432
- /**
433
- * @param {number} knot_index
434
- * @param {number} value tube diameter
435
- */
436
- setKnotThickness(knot_index, value) {
437
- this.setKnotAttribute_Scalar(knot_index, TUBE_ATTRIBUTE_ADDRESS_THICKNESS, value);
438
-
439
- this.#ib_float32.needsUpdate = true;
440
- }
441
-
442
- /**
443
- * @param {number} count number of knots (>= 2)
444
- * @param {number} [radial] radial subdivisions (>= 3)
445
- */
446
- setCount(count, radial = DEFAULT_RADIAL_SEGMENTS) {
447
- assert.greaterThanOrEqual(count, 2, 'a tube needs at least 2 knots (one segment)');
448
- assert.isNonNegativeInteger(count, 'count');
449
- assert.greaterThanOrEqual(radial, 3, 'a tube ring needs at least 3 radial segments');
450
- assert.isNonNegativeInteger(radial, 'radial');
451
-
452
- this.#geometry.dispose();
453
-
454
- this.#radial = radial;
455
-
456
- const v = radial + 1;
457
- const vertex_count = count * v;
458
-
459
- if (this.#data.length > vertex_count) {
460
- this.#data.removeRows(vertex_count, this.#data.length - vertex_count);
461
- }
462
-
463
- this.#data.setCapacity(vertex_count);
464
- this.#data.length = vertex_count;
465
-
466
- const a_uint8 = new Uint8Array(this.#data.data);
467
- const a_float32 = new Float32Array(this.#data.data);
468
-
469
- const segment_count = count - 1;
470
- const triangle_count = segment_count * radial * 2;
471
- const index_array_size = triangle_count * 3;
472
- const index_array = new Uint32Array(index_array_size);
473
-
474
- this.#ba_index.array = index_array;
475
- this.#ba_index.count = index_array_size;
476
-
477
- this.#ib_uint8.array = a_uint8;
478
- this.#ib_float32.array = a_float32;
479
-
480
- this.#ib_uint8.count = vertex_count;
481
- this.#ib_float32.count = vertex_count;
482
-
483
- this.#head_index = 0;
484
- this.#tail_index = count - 1;
485
- this.#tail_segment_index = segment_count - 1;
486
-
487
- this.#count = count;
488
-
489
- this.#initialize_off();
490
- this.#initialize_frame();
491
- this.#initialize_index();
492
- }
493
-
494
- /**
495
- * NOTE: takes tube thickness into account.
496
- * @param {AABB3|ArrayLike<number>} result
497
- */
498
- computeBoundingBox(result) {
499
- const count = this.#count;
500
- const v = this.#ring_vertex_count;
501
- const data = this.#data;
502
-
503
- let _x0 = Infinity, _y0 = Infinity, _z0 = Infinity;
504
- let _x1 = -Infinity, _y1 = -Infinity, _z1 = -Infinity;
505
-
506
- for (let k = 0; k < count; k++) {
507
- const row = k * v;
508
-
509
- const half_thickness = data.readCellValue(row, TUBE_ATTRIBUTE_ADDRESS_THICKNESS) * 0.5;
510
-
511
- const x = data.readCellValue(row, TUBE_ATTRIBUTE_ADDRESS_POSITION);
512
- const y = data.readCellValue(row, TUBE_ATTRIBUTE_ADDRESS_POSITION + 1);
513
- const z = data.readCellValue(row, TUBE_ATTRIBUTE_ADDRESS_POSITION + 2);
514
-
515
- _x0 = min2(_x0, x - half_thickness);
516
- _y0 = min2(_y0, y - half_thickness);
517
- _z0 = min2(_z0, z - half_thickness);
518
- _x1 = max2(_x1, x + half_thickness);
519
- _y1 = max2(_y1, y + half_thickness);
520
- _z1 = max2(_z1, z + half_thickness);
521
- }
522
-
523
- aabb3_array_set(result, 0, _x0, _y0, _z0, _x1, _y1, _z1);
524
- }
525
-
526
- /**
527
- * Recycle the oldest knot as the new head, in O(radial). Mirrors
528
- * {@link RibbonX#rotate}: the head/tail pointers decrement together (preserving
529
- * `head === (tail + 1) mod count`), and the single tail segment's indices are
530
- * rewritten to bridge the previous head's ring to the recycled (new head) ring.
531
- */
532
- rotate() {
533
- const old_tail = this.#tail_index;
534
- const old_head = this.#head_index;
535
-
536
- const max_index = this.#count - 1;
537
-
538
- // The recycled slot (old tail) becomes the new head: head and tail step
539
- // back in lockstep so head stays exactly one slot ahead of tail.
540
- this.#tail_index = old_tail <= 0 ? max_index : old_tail - 1;
541
- this.#head_index = old_head <= 0 ? max_index : old_head - 1;
542
-
543
- const old_segment = this.#tail_segment_index;
544
- const address = old_segment * this.#radial * 6;
545
-
546
- this.#tail_segment_index = old_segment > 0 ? old_segment - 1 : this.#count - 2;
547
-
548
- // Bridge old head -> new head (== old tail slot) with a fresh segment.
549
- this.#write_segment_indices(address, old_head, old_tail);
550
-
551
- this.#ba_index.needsUpdate = true;
552
- }
553
- }
554
-
555
- TubeX.DEFAULT_RADIAL_SEGMENTS = DEFAULT_RADIAL_SEGMENTS;
1
+ import {
2
+ BufferAttribute,
3
+ BufferGeometry,
4
+ DynamicDrawUsage,
5
+ InterleavedBuffer,
6
+ InterleavedBufferAttribute
7
+ } from "three";
8
+ import { assert } from "../../../../core/assert.js";
9
+ import { RowFirstTable } from "../../../../core/collection/table/RowFirstTable.js";
10
+ import { aabb3_array_set } from "../../../../core/geom/3d/aabb/aabb3_array_set.js";
11
+ import { v3_orthonormal_matrix_from_normal } from "../../../../core/geom/vec3/v3_orthonormal_matrix_from_normal.js";
12
+ import { max2 } from "../../../../core/math/max2.js";
13
+ import { min2 } from "../../../../core/math/min2.js";
14
+ import {
15
+ TUBE_ATTRIBUTE_ADDRESS_ALPHA,
16
+ TUBE_ATTRIBUTE_ADDRESS_BINORMAL,
17
+ TUBE_ATTRIBUTE_ADDRESS_COLOR,
18
+ TUBE_ATTRIBUTE_ADDRESS_NORMAL,
19
+ TUBE_ATTRIBUTE_ADDRESS_OFF,
20
+ TUBE_ATTRIBUTE_ADDRESS_POSITION,
21
+ TUBE_ATTRIBUTE_ADDRESS_THICKNESS,
22
+ tube_attributes_spec
23
+ } from "./tube_attributes_spec.js";
24
+
25
+ /**
26
+ * Default number of radial subdivisions around the tube. Overridable per-tube
27
+ * via {@link TubeX#setCount}; never hard-coded into the geometry.
28
+ * @type {number}
29
+ */
30
+ const DEFAULT_RADIAL_SEGMENTS = 8;
31
+
32
+ /**
33
+ * Scratch for the arbitrary default frame written at build time; module-static so
34
+ * setCount stays allocation-free on the data path.
35
+ * @type {Float64Array}
36
+ */
37
+ const m3_default_frame = new Float64Array(9);
38
+
39
+ /**
40
+ * Dynamic, non-allocating 3D tube geometry — the volumetric analogue of
41
+ * {@link RibbonX}.
42
+ *
43
+ * A tube is a ring buffer of `count` KNOTS along a centre-line. Each knot owns a
44
+ * ring of `radial + 1` vertices: the extra vertex duplicates vertex 0 so the UV
45
+ * seam (u = 0 meeting u = 1) closes cleanly when the texture wraps the tube.
46
+ * Vertices are extruded in the vertex shader from the knot's stored tangent
47
+ * frame, so the CPU only ever writes per-knot data (centre, frame, colour, …) —
48
+ * never per-triangle.
49
+ *
50
+ * Like {@link RibbonX} the geometry is a fixed-capacity ring: {@link rotate}
51
+ * recycles the oldest knot as the new head and rewrites a single segment's worth
52
+ * of indices, so steady-state updates allocate nothing.
53
+ */
54
+ export class TubeX {
55
+
56
+ /**
57
+ * @type {BufferGeometry}
58
+ */
59
+ #geometry = new BufferGeometry();
60
+
61
+ /**
62
+ * @type {RowFirstTable}
63
+ */
64
+ #data = new RowFirstTable(tube_attributes_spec);
65
+
66
+ /**
67
+ * Knot index at the END (oldest) of the tube.
68
+ * @type {number}
69
+ */
70
+ #tail_index = 0;
71
+
72
+ /**
73
+ * Knot index at the START (newest) of the tube.
74
+ * @type {number}
75
+ */
76
+ #head_index = 0;
77
+
78
+ /**
79
+ * Index of the segment (knot-to-knot span of `radial` quads) currently at the
80
+ * tail; recycled by {@link rotate}.
81
+ * @type {number}
82
+ */
83
+ #tail_segment_index = 0;
84
+
85
+ /**
86
+ * Number of knots.
87
+ * @type {number}
88
+ */
89
+ #count = 0;
90
+
91
+ /**
92
+ * Number of radial subdivisions. Ring vertex count per knot = radial + 1.
93
+ * @type {number}
94
+ */
95
+ #radial = DEFAULT_RADIAL_SEGMENTS;
96
+
97
+ // Interleaved buffers + attribute views over #data; created in buildGeometry().
98
+ #ib_uint8 = null;
99
+ #ib_float32 = null;
100
+ #iba_position = null;
101
+ #iba_normal = null;
102
+ #iba_binormal = null;
103
+ #iba_uv = null;
104
+ #iba_alpha = null;
105
+ #iba_thickness = null;
106
+ #iba_color = null;
107
+ #ba_index = null;
108
+
109
+ dispose() {
110
+ this.#geometry.dispose();
111
+ }
112
+
113
+ /**
114
+ * @returns {BufferGeometry}
115
+ */
116
+ getGeometry() {
117
+ return this.#geometry;
118
+ }
119
+
120
+ /**
121
+ * @returns {number} number of knots
122
+ */
123
+ getCount() {
124
+ return this.#count;
125
+ }
126
+
127
+ /**
128
+ * @returns {number} radial subdivisions
129
+ */
130
+ getRadialSegments() {
131
+ return this.#radial;
132
+ }
133
+
134
+ getHeadIndex() {
135
+ return this.#head_index;
136
+ }
137
+
138
+ getTailIndex() {
139
+ return this.#tail_index;
140
+ }
141
+
142
+ /**
143
+ * Number of vertices in a single knot ring (includes the duplicated seam vertex).
144
+ * @returns {number}
145
+ */
146
+ get #ring_vertex_count() {
147
+ return this.#radial + 1;
148
+ }
149
+
150
+ buildGeometry() {
151
+ const a_uint8 = new Uint8Array(this.#data.data);
152
+ const a_float32 = new Float32Array(this.#data.data);
153
+
154
+ const bpr = this.#data.spec.bytesPerRecord;
155
+
156
+ this.#ib_uint8 = new InterleavedBuffer(a_uint8, bpr);
157
+ this.#ib_float32 = new InterleavedBuffer(a_float32, bpr >> 2);
158
+
159
+ this.#iba_position = new InterleavedBufferAttribute(this.#ib_float32, 3, 1, false);
160
+ this.#iba_normal = new InterleavedBufferAttribute(this.#ib_float32, 3, 4, false);
161
+ this.#iba_binormal = new InterleavedBufferAttribute(this.#ib_float32, 3, 7, false);
162
+
163
+ // off (uv.x) and uv_v (uv.y) are contiguous, exposed as a single vec2.
164
+ this.#iba_uv = new InterleavedBufferAttribute(this.#ib_float32, 2, 10, false);
165
+ this.#iba_alpha = new InterleavedBufferAttribute(this.#ib_float32, 1, 12, false);
166
+ this.#iba_thickness = new InterleavedBufferAttribute(this.#ib_float32, 1, 13, false);
167
+
168
+ this.#iba_color = new InterleavedBufferAttribute(this.#ib_uint8, 3, 56, false);
169
+
170
+ // Uint32 (not Uint16): vertex count = count * (radial + 1) easily exceeds
171
+ // 65535 for a long tube with high radial resolution. WebGL2 supports it natively.
172
+ this.#ba_index = new BufferAttribute(new Uint32Array(0), 1, false);
173
+
174
+ this.#geometry.setAttribute('position', this.#iba_position);
175
+ this.#geometry.setAttribute('tn', this.#iba_normal);
176
+ this.#geometry.setAttribute('tb', this.#iba_binormal);
177
+ this.#geometry.setAttribute('tubeUv', this.#iba_uv);
178
+ this.#geometry.setAttribute('alpha', this.#iba_alpha);
179
+ this.#geometry.setAttribute('thickness', this.#iba_thickness);
180
+ this.#geometry.setAttribute('color', this.#iba_color);
181
+
182
+ this.#geometry.setIndex(this.#ba_index);
183
+
184
+ this.#ib_uint8.setUsage(DynamicDrawUsage);
185
+ this.#ib_float32.setUsage(DynamicDrawUsage);
186
+ this.#ba_index.setUsage(DynamicDrawUsage);
187
+ }
188
+
189
+ /**
190
+ * Write the static angular `off` coordinate (uv.x) for every ring vertex. The
191
+ * value goes 0 → 1 across the `radial + 1` vertices; vertex `radial` lands on
192
+ * 1.0 so its shader angle is 2π — co-incident with vertex 0's angle 0, closing
193
+ * the seam without a wrap-around index.
194
+ */
195
+ #initialize_off() {
196
+ const data = this.#data;
197
+ const count = this.#count;
198
+ const radial = this.#radial;
199
+ const v = this.#ring_vertex_count;
200
+
201
+ for (let k = 0; k < count; k++) {
202
+ const base = k * v;
203
+ for (let j = 0; j <= radial; j++) {
204
+ data.writeCellValue(base + j, TUBE_ATTRIBUTE_ADDRESS_OFF, j / radial);
205
+ }
206
+ }
207
+ }
208
+
209
+ /**
210
+ * Seed every knot with a valid (arbitrary) orthonormal frame so the geometry is
211
+ * well-formed from the moment it is built, before any head movement supplies a
212
+ * real tangent. Without this the frames would be zero-initialised and the
213
+ * transport's degeneracy fallback would have to cover the fresh-tube case; a
214
+ * concrete default keeps the invariant "every knot frame is unit + orthonormal"
215
+ * unconditionally true (read e.g. by getKnotNormal during transport).
216
+ */
217
+ #initialize_frame() {
218
+ v3_orthonormal_matrix_from_normal(m3_default_frame, 0, 0, 1, 0);
219
+
220
+ const nx = m3_default_frame[0], ny = m3_default_frame[1], nz = m3_default_frame[2];
221
+ const bx = m3_default_frame[3], by = m3_default_frame[4], bz = m3_default_frame[5];
222
+
223
+ const count = this.#count;
224
+
225
+ for (let k = 0; k < count; k++) {
226
+ this.setKnotFrame(k, nx, ny, nz, bx, by, bz);
227
+ }
228
+ }
229
+
230
+ /**
231
+ * Write the `radial` quads (2 triangles each) bridging the ring of knot `lo`
232
+ * to the ring of knot `hi`, starting at `address` in the index array.
233
+ * Winding matches the engine's static tube mesher (make_ring_faces).
234
+ * @param {number} address index-array offset (in index entries)
235
+ * @param {number} lo knot index whose ring is the "left" edge
236
+ * @param {number} hi knot index whose ring is the "right" edge
237
+ */
238
+ #write_segment_indices(address, lo, hi) {
239
+ const indices = this.#ba_index.array;
240
+ const radial = this.#radial;
241
+ const v = this.#ring_vertex_count;
242
+
243
+ const lo_base = lo * v;
244
+ const hi_base = hi * v;
245
+
246
+ for (let r = 0; r < radial; r++) {
247
+ const a = lo_base + r;
248
+ const b = hi_base + r;
249
+ const c = hi_base + r + 1;
250
+ const d = lo_base + r + 1;
251
+
252
+ const ci = address + r * 6;
253
+
254
+ indices[ci] = a;
255
+ indices[ci + 1] = b;
256
+ indices[ci + 2] = d;
257
+
258
+ indices[ci + 3] = b;
259
+ indices[ci + 4] = c;
260
+ indices[ci + 5] = d;
261
+ }
262
+ }
263
+
264
+ /**
265
+ * Build the index buffer as a linear strip of `count - 1` segments.
266
+ */
267
+ #initialize_index() {
268
+ const segment_count = this.#count - 1;
269
+ const indices_per_segment = this.#radial * 6;
270
+
271
+ for (let s = 0; s < segment_count; s++) {
272
+ this.#write_segment_indices(s * indices_per_segment, s, s + 1);
273
+ }
274
+ }
275
+
276
+ /**
277
+ * @param {number[]|Float32Array} result
278
+ * @param {number} knot_index
279
+ */
280
+ getKnotPosition(result, knot_index) {
281
+ const row = knot_index * this.#ring_vertex_count;
282
+ const data = this.#data;
283
+
284
+ result[0] = data.readCellValue(row, TUBE_ATTRIBUTE_ADDRESS_POSITION);
285
+ result[1] = data.readCellValue(row, TUBE_ATTRIBUTE_ADDRESS_POSITION + 1);
286
+ result[2] = data.readCellValue(row, TUBE_ATTRIBUTE_ADDRESS_POSITION + 2);
287
+ }
288
+
289
+ /**
290
+ * Read the stored ring normal of a knot. Used by the head to parallel-transport
291
+ * its frame from the previous knot.
292
+ * @param {number[]|Float32Array} result
293
+ * @param {number} knot_index
294
+ */
295
+ getKnotNormal(result, knot_index) {
296
+ const row = knot_index * this.#ring_vertex_count;
297
+ const data = this.#data;
298
+
299
+ result[0] = data.readCellValue(row, TUBE_ATTRIBUTE_ADDRESS_NORMAL);
300
+ result[1] = data.readCellValue(row, TUBE_ATTRIBUTE_ADDRESS_NORMAL + 1);
301
+ result[2] = data.readCellValue(row, TUBE_ATTRIBUTE_ADDRESS_NORMAL + 2);
302
+ }
303
+
304
+ /**
305
+ * Read the stored ring binormal of a knot.
306
+ * @param {number[]|Float32Array} result
307
+ * @param {number} knot_index
308
+ */
309
+ getKnotBinormal(result, knot_index) {
310
+ const row = knot_index * this.#ring_vertex_count;
311
+ const data = this.#data;
312
+
313
+ result[0] = data.readCellValue(row, TUBE_ATTRIBUTE_ADDRESS_BINORMAL);
314
+ result[1] = data.readCellValue(row, TUBE_ATTRIBUTE_ADDRESS_BINORMAL + 1);
315
+ result[2] = data.readCellValue(row, TUBE_ATTRIBUTE_ADDRESS_BINORMAL + 2);
316
+ }
317
+
318
+ /**
319
+ * Write a vec3 attribute to all ring vertices of a knot.
320
+ * @param {number} knot_index
321
+ * @param {number} attribute_index
322
+ * @param {number} x
323
+ * @param {number} y
324
+ * @param {number} z
325
+ */
326
+ setKnotAttribute_Vector3(knot_index, attribute_index, x, y, z) {
327
+ const data = this.#data;
328
+ const v = this.#ring_vertex_count;
329
+ const base = knot_index * v;
330
+
331
+ for (let j = 0; j < v; j++) {
332
+ const row = base + j;
333
+ data.writeCellValue(row, attribute_index, x);
334
+ data.writeCellValue(row, attribute_index + 1, y);
335
+ data.writeCellValue(row, attribute_index + 2, z);
336
+ }
337
+ }
338
+
339
+ /**
340
+ * Write a scalar attribute to all ring vertices of a knot.
341
+ * @param {number} knot_index
342
+ * @param {number} attribute_index
343
+ * @param {number} value
344
+ */
345
+ setKnotAttribute_Scalar(knot_index, attribute_index, value) {
346
+ const data = this.#data;
347
+ const v = this.#ring_vertex_count;
348
+ const base = knot_index * v;
349
+
350
+ for (let j = 0; j < v; j++) {
351
+ data.writeCellValue(base + j, attribute_index, value);
352
+ }
353
+ }
354
+
355
+ /**
356
+ * Add `delta` to a scalar attribute on every ring vertex of a knot.
357
+ * @param {number} knot_index
358
+ * @param {number} attribute_index
359
+ * @param {number} delta
360
+ * @returns {number} incremented value
361
+ */
362
+ incrementKnotAttribute_Scalar(knot_index, attribute_index, delta) {
363
+ const data = this.#data;
364
+ const v = this.#ring_vertex_count;
365
+ const base = knot_index * v;
366
+
367
+ const value = data.readCellValue(base, attribute_index) + delta;
368
+
369
+ for (let j = 0; j < v; j++) {
370
+ data.writeCellValue(base + j, attribute_index, value);
371
+ }
372
+
373
+ return value;
374
+ }
375
+
376
+ /**
377
+ * @param {number} knot_index
378
+ * @param {number} x
379
+ * @param {number} y
380
+ * @param {number} z
381
+ */
382
+ setKnotPosition(knot_index, x, y, z) {
383
+ assert.isNonNegativeInteger(knot_index, 'knot_index');
384
+
385
+ this.setKnotAttribute_Vector3(knot_index, TUBE_ATTRIBUTE_ADDRESS_POSITION, x, y, z);
386
+
387
+ this.#ib_float32.needsUpdate = true;
388
+ }
389
+
390
+ /**
391
+ * Set the orienting tangent frame of a knot. `nx,ny,nz` and `bx,by,bz` must be
392
+ * unit vectors, mutually orthogonal and perpendicular to the local tangent.
393
+ * @param {number} knot_index
394
+ * @param {number} nx
395
+ * @param {number} ny
396
+ * @param {number} nz
397
+ * @param {number} bx
398
+ * @param {number} by
399
+ * @param {number} bz
400
+ */
401
+ setKnotFrame(knot_index, nx, ny, nz, bx, by, bz) {
402
+ this.setKnotAttribute_Vector3(knot_index, TUBE_ATTRIBUTE_ADDRESS_NORMAL, nx, ny, nz);
403
+ this.setKnotAttribute_Vector3(knot_index, TUBE_ATTRIBUTE_ADDRESS_BINORMAL, bx, by, bz);
404
+
405
+ this.#ib_float32.needsUpdate = true;
406
+ }
407
+
408
+ /**
409
+ * @param {number} knot_index
410
+ * @param {number} r 0..255
411
+ * @param {number} g 0..255
412
+ * @param {number} b 0..255
413
+ */
414
+ setKnotColor(knot_index, r, g, b) {
415
+ assert.isNonNegativeInteger(knot_index, 'knot_index');
416
+
417
+ this.setKnotAttribute_Vector3(knot_index, TUBE_ATTRIBUTE_ADDRESS_COLOR, r, g, b);
418
+
419
+ this.#ib_uint8.needsUpdate = true;
420
+ }
421
+
422
+ /**
423
+ * @param {number} knot_index
424
+ * @param {number} value
425
+ */
426
+ setKnotAlpha(knot_index, value) {
427
+ this.setKnotAttribute_Scalar(knot_index, TUBE_ATTRIBUTE_ADDRESS_ALPHA, value);
428
+
429
+ this.#ib_float32.needsUpdate = true;
430
+ }
431
+
432
+ /**
433
+ * @param {number} knot_index
434
+ * @param {number} value tube diameter
435
+ */
436
+ setKnotThickness(knot_index, value) {
437
+ this.setKnotAttribute_Scalar(knot_index, TUBE_ATTRIBUTE_ADDRESS_THICKNESS, value);
438
+
439
+ this.#ib_float32.needsUpdate = true;
440
+ }
441
+
442
+ /**
443
+ * @param {number} count number of knots (>= 2)
444
+ * @param {number} [radial] radial subdivisions (>= 3)
445
+ */
446
+ setCount(count, radial = DEFAULT_RADIAL_SEGMENTS) {
447
+ assert.greaterThanOrEqual(count, 2, 'a tube needs at least 2 knots (one segment)');
448
+ assert.isNonNegativeInteger(count, 'count');
449
+ assert.greaterThanOrEqual(radial, 3, 'a tube ring needs at least 3 radial segments');
450
+ assert.isNonNegativeInteger(radial, 'radial');
451
+
452
+ this.#geometry.dispose();
453
+
454
+ this.#radial = radial;
455
+
456
+ const v = radial + 1;
457
+ const vertex_count = count * v;
458
+
459
+ if (this.#data.length > vertex_count) {
460
+ this.#data.removeRows(vertex_count, this.#data.length - vertex_count);
461
+ }
462
+
463
+ this.#data.setCapacity(vertex_count);
464
+ this.#data.length = vertex_count;
465
+
466
+ const a_uint8 = new Uint8Array(this.#data.data);
467
+ const a_float32 = new Float32Array(this.#data.data);
468
+
469
+ const segment_count = count - 1;
470
+ const triangle_count = segment_count * radial * 2;
471
+ const index_array_size = triangle_count * 3;
472
+ const index_array = new Uint32Array(index_array_size);
473
+
474
+ this.#ba_index.array = index_array;
475
+ this.#ba_index.count = index_array_size;
476
+
477
+ this.#ib_uint8.array = a_uint8;
478
+ this.#ib_float32.array = a_float32;
479
+
480
+ this.#ib_uint8.count = vertex_count;
481
+ this.#ib_float32.count = vertex_count;
482
+
483
+ this.#head_index = 0;
484
+ this.#tail_index = count - 1;
485
+ this.#tail_segment_index = segment_count - 1;
486
+
487
+ this.#count = count;
488
+
489
+ this.#initialize_off();
490
+ this.#initialize_frame();
491
+ this.#initialize_index();
492
+ }
493
+
494
+ /**
495
+ * NOTE: takes tube thickness into account.
496
+ * @param {AABB3|ArrayLike<number>} result
497
+ */
498
+ computeBoundingBox(result) {
499
+ const count = this.#count;
500
+ const v = this.#ring_vertex_count;
501
+ const data = this.#data;
502
+
503
+ let _x0 = Infinity, _y0 = Infinity, _z0 = Infinity;
504
+ let _x1 = -Infinity, _y1 = -Infinity, _z1 = -Infinity;
505
+
506
+ for (let k = 0; k < count; k++) {
507
+ const row = k * v;
508
+
509
+ const half_thickness = data.readCellValue(row, TUBE_ATTRIBUTE_ADDRESS_THICKNESS) * 0.5;
510
+
511
+ const x = data.readCellValue(row, TUBE_ATTRIBUTE_ADDRESS_POSITION);
512
+ const y = data.readCellValue(row, TUBE_ATTRIBUTE_ADDRESS_POSITION + 1);
513
+ const z = data.readCellValue(row, TUBE_ATTRIBUTE_ADDRESS_POSITION + 2);
514
+
515
+ _x0 = min2(_x0, x - half_thickness);
516
+ _y0 = min2(_y0, y - half_thickness);
517
+ _z0 = min2(_z0, z - half_thickness);
518
+ _x1 = max2(_x1, x + half_thickness);
519
+ _y1 = max2(_y1, y + half_thickness);
520
+ _z1 = max2(_z1, z + half_thickness);
521
+ }
522
+
523
+ aabb3_array_set(result, 0, _x0, _y0, _z0, _x1, _y1, _z1);
524
+ }
525
+
526
+ /**
527
+ * Recycle the oldest knot as the new head, in O(radial). Mirrors
528
+ * {@link RibbonX#rotate}: the head/tail pointers decrement together (preserving
529
+ * `head === (tail + 1) mod count`), and the single tail segment's indices are
530
+ * rewritten to bridge the previous head's ring to the recycled (new head) ring.
531
+ */
532
+ rotate() {
533
+ const old_tail = this.#tail_index;
534
+ const old_head = this.#head_index;
535
+
536
+ const max_index = this.#count - 1;
537
+
538
+ // The recycled slot (old tail) becomes the new head: head and tail step
539
+ // back in lockstep so head stays exactly one slot ahead of tail.
540
+ this.#tail_index = old_tail <= 0 ? max_index : old_tail - 1;
541
+ this.#head_index = old_head <= 0 ? max_index : old_head - 1;
542
+
543
+ const old_segment = this.#tail_segment_index;
544
+ const address = old_segment * this.#radial * 6;
545
+
546
+ this.#tail_segment_index = old_segment > 0 ? old_segment - 1 : this.#count - 2;
547
+
548
+ // Bridge old head -> new head (== old tail slot) with a fresh segment. The new head (old_tail slot)
549
+ // is the more head-ward knot, so it takes the `lo` position to match #initialize_index's winding
550
+ // convention (lo = more head-ward); swapping the two would invert this segment's triangle winding.
551
+ this.#write_segment_indices(address, old_tail, old_head);
552
+
553
+ this.#ba_index.needsUpdate = true;
554
+ }
555
+ }
556
+
557
+ TubeX.DEFAULT_RADIAL_SEGMENTS = DEFAULT_RADIAL_SEGMENTS;