@woosh/meep-engine 2.106.1 → 2.107.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 (587) hide show
  1. package/build/meep.cjs +1990 -2364
  2. package/build/meep.min.js +1 -1
  3. package/build/meep.module.js +1990 -2364
  4. package/editor/Editor.js +55 -60
  5. package/editor/SelectionVisualizer.js +111 -109
  6. package/editor/actions/concrete/ComponentAddAction.js +0 -3
  7. package/editor/actions/concrete/ComponentRemoveAction.js +0 -4
  8. package/editor/actions/concrete/EntityCreateAction.js +0 -3
  9. package/editor/actions/concrete/EntityRemoveAction.js +0 -4
  10. package/editor/actions/concrete/SelectionAddAction.js +0 -3
  11. package/editor/actions/concrete/SelectionClearAction.js +0 -3
  12. package/editor/actions/concrete/SelectionRemoveAction.js +0 -3
  13. package/editor/ecs/EditorEntity.js +8 -6
  14. package/editor/tools/SelectionTool.js +0 -5
  15. package/editor/tools/TopDownCameraControlTool.js +2 -5
  16. package/editor/tools/TransformTool.js +137 -136
  17. package/editor/tools/engine/Tool.js +1 -6
  18. package/editor/tools/engine/ToolEngine.js +145 -148
  19. package/editor/tools/v2/TransformControls.js +25 -24
  20. package/editor/view/EditorView.js +0 -5
  21. package/editor/view/ecs/ComponentControlFactory.js +37 -40
  22. package/editor/view/ecs/EntityEditor.js +0 -3
  23. package/editor/view/ecs/EntityList.js +6 -11
  24. package/editor/view/ecs/components/MeshController.js +4 -7
  25. package/editor/view/ecs/components/TransformController.js +3 -9
  26. package/editor/view/tools/ToolView.js +2 -8
  27. package/package.json +1 -1
  28. package/src/core/IdPool.d.ts.map +1 -1
  29. package/src/core/IdPool.js +0 -5
  30. package/src/core/UUID.d.ts.map +1 -1
  31. package/src/core/UUID.js +0 -4
  32. package/src/core/binary/BitSet.d.ts +17 -14
  33. package/src/core/binary/BitSet.d.ts.map +1 -1
  34. package/src/core/binary/BitSet.js +411 -412
  35. package/src/core/binary/type/Field.d.ts +0 -8
  36. package/src/core/binary/type/Field.d.ts.map +1 -1
  37. package/src/core/binary/type/Field.js +16 -19
  38. package/src/core/binary/type/MultiplicityType.js +0 -4
  39. package/src/core/binary/type/PrimitiveTypes.d.ts.map +1 -1
  40. package/src/core/binary/type/PrimitiveTypes.js +0 -4
  41. package/src/core/binary/type/Type.d.ts +0 -6
  42. package/src/core/binary/type/Type.d.ts.map +1 -1
  43. package/src/core/binary/type/Type.js +63 -64
  44. package/src/core/binary/type/TypeBuilder.d.ts +0 -1
  45. package/src/core/binary/type/TypeBuilder.d.ts.map +1 -1
  46. package/src/core/binary/type/TypeBuilder.js +15 -18
  47. package/src/core/binary/type/TypeRegistry.d.ts +6 -4
  48. package/src/core/binary/type/TypeRegistry.d.ts.map +1 -1
  49. package/src/core/binary/type/TypeRegistry.js +38 -42
  50. package/src/core/bvh2/visual/BVHGeometry.d.ts.map +1 -1
  51. package/src/core/bvh2/visual/BVHGeometry.js +0 -3
  52. package/src/core/codegen/LineBuilder.d.ts.map +1 -1
  53. package/src/core/codegen/LineBuilder.js +0 -5
  54. package/src/core/collection/set/ArraySet.d.ts.map +1 -1
  55. package/src/core/collection/set/ArraySet.js +1 -5
  56. package/src/core/collection/table/RowFirstTable.d.ts.map +1 -1
  57. package/src/core/collection/table/RowFirstTable.js +0 -5
  58. package/src/core/color/parse_color.d.ts.map +1 -1
  59. package/src/core/color/parse_color.js +1 -5
  60. package/src/core/geom/2d/Rectangle.d.ts.map +1 -1
  61. package/src/core/geom/2d/Rectangle.js +0 -4
  62. package/src/core/geom/2d/aabb/AABB2.d.ts.map +1 -1
  63. package/src/core/geom/2d/aabb/AABB2.js +0 -6
  64. package/src/core/geom/3d/aabb/AABB3.d.ts.map +1 -1
  65. package/src/core/geom/3d/aabb/AABB3.js +0 -5
  66. package/src/core/geom/3d/morton/Morton.d.ts.map +1 -1
  67. package/src/core/geom/3d/morton/Morton.js +0 -3
  68. package/src/core/geom/3d/sphere/harmonics/sh3_dering_optimize_positive.js +11 -11
  69. package/src/core/geom/Quaternion.d.ts.map +1 -1
  70. package/src/core/geom/Quaternion.js +0 -5
  71. package/src/core/geom/Vector4.d.ts.map +1 -1
  72. package/src/core/geom/Vector4.js +0 -4
  73. package/src/core/graph/Edge.d.ts.map +1 -1
  74. package/src/core/graph/Edge.js +0 -5
  75. package/src/core/graph/WeightedEdge.d.ts.map +1 -1
  76. package/src/core/json/JsonUtils.d.ts.map +1 -1
  77. package/src/core/json/JsonUtils.js +0 -4
  78. package/src/core/math/random/MersenneTwister.d.ts +1 -2
  79. package/src/core/math/random/MersenneTwister.d.ts.map +1 -1
  80. package/src/core/math/random/MersenneTwister.js +134 -133
  81. package/src/core/model/BooleanVector3.d.ts.map +1 -1
  82. package/src/core/model/BooleanVector3.js +108 -108
  83. package/src/core/model/BoundedValue.d.ts +116 -0
  84. package/src/core/model/BoundedValue.d.ts.map +1 -0
  85. package/src/core/model/BoundedValue.js +214 -217
  86. package/src/core/model/LinearValue.d.ts +84 -0
  87. package/src/core/model/LinearValue.d.ts.map +1 -0
  88. package/src/core/model/LinearValue.js +116 -117
  89. package/src/core/model/ObservedEnum.d.ts.map +1 -1
  90. package/src/core/model/ObservedEnum.js +82 -80
  91. package/src/core/model/ObservedValue.d.ts +10 -17
  92. package/src/core/model/ObservedValue.d.ts.map +1 -1
  93. package/src/core/model/ObservedValue.js +85 -88
  94. package/src/core/model/object/ObjectPoolFactory.d.ts +1 -9
  95. package/src/core/model/object/ObjectPoolFactory.d.ts.map +1 -1
  96. package/src/core/model/object/ObjectPoolFactory.js +73 -73
  97. package/src/core/model/scheme/Schema.d.ts +0 -6
  98. package/src/core/model/scheme/Schema.d.ts.map +1 -1
  99. package/src/core/model/scheme/Schema.js +50 -48
  100. package/src/core/model/scheme/SchemeRegistry.d.ts +6 -1
  101. package/src/core/model/scheme/SchemeRegistry.d.ts.map +1 -1
  102. package/src/core/model/scheme/SchemeRegistry.js +46 -44
  103. package/src/core/process/Future.d.ts +14 -9
  104. package/src/core/process/Future.d.ts.map +1 -1
  105. package/src/core/process/Future.js +96 -98
  106. package/src/core/process/executor/ConcurrentExecutor.d.ts.map +1 -1
  107. package/src/core/process/executor/ConcurrentExecutor.js +0 -3
  108. package/src/core/process/task/Task.d.ts.map +1 -1
  109. package/src/core/process/task/Task.js +0 -5
  110. package/src/core/process/task/TaskGroup.d.ts.map +1 -1
  111. package/src/core/process/task/TaskGroup.js +178 -180
  112. package/src/core/process/task/TaskSignal.d.ts.map +1 -1
  113. package/src/core/process/task/TaskSignal.js +0 -5
  114. package/src/core/process/task/TaskState.d.ts.map +1 -1
  115. package/src/core/process/task/TaskState.js +0 -4
  116. package/src/core/process/worker/WorkerBuilder.d.ts.map +1 -1
  117. package/src/core/process/worker/WorkerBuilder.js +0 -5
  118. package/src/core/process/worker/WorkerProxy.d.ts.map +1 -1
  119. package/src/core/process/worker/WorkerProxy.js +0 -5
  120. package/src/engine/Clock.d.ts.map +1 -1
  121. package/src/engine/Clock.js +0 -5
  122. package/src/engine/Engine.js +4 -4
  123. package/src/engine/EntityCreator.d.ts.map +1 -1
  124. package/src/engine/EntityCreator.js +7 -10
  125. package/src/engine/animation/AnimatedActions.d.ts.map +1 -1
  126. package/src/engine/animation/AnimatedActions.js +0 -5
  127. package/src/engine/animation/Animations.d.ts.map +1 -1
  128. package/src/engine/animation/Animations.js +1 -6
  129. package/src/engine/animation/EntityAnimation.js +1 -4
  130. package/src/engine/animation/Tween.js +1 -4
  131. package/src/engine/animation/keyed2/AnimationTrack.d.ts +0 -6
  132. package/src/engine/animation/keyed2/AnimationTrack.d.ts.map +1 -1
  133. package/src/engine/animation/keyed2/AnimationTrack.js +154 -152
  134. package/src/engine/animation/keyed2/AnimationTrackPlayback.d.ts +0 -10
  135. package/src/engine/animation/keyed2/AnimationTrackPlayback.d.ts.map +1 -1
  136. package/src/engine/animation/keyed2/AnimationTrackPlayback.js +173 -171
  137. package/src/engine/asset/AssetManager.d.ts.map +1 -1
  138. package/src/engine/asset/AssetManager.js +0 -5
  139. package/src/engine/asset/preloader/AssetLevel.js +0 -3
  140. package/src/engine/ecs/EntityManager.d.ts.map +1 -1
  141. package/src/engine/ecs/EntityManager.js +0 -4
  142. package/src/engine/ecs/System.d.ts.map +1 -1
  143. package/src/engine/ecs/System.js +0 -5
  144. package/src/engine/ecs/animation/Animation.d.ts.map +1 -1
  145. package/src/engine/ecs/animation/Animation.js +1 -19
  146. package/src/engine/ecs/components/Motion.d.ts.map +1 -1
  147. package/src/engine/ecs/components/Motion.js +0 -5
  148. package/src/engine/ecs/components/PropertySet.d.ts +8 -1
  149. package/src/engine/ecs/components/PropertySet.d.ts.map +1 -1
  150. package/src/engine/ecs/components/PropertySet.js +87 -83
  151. package/src/engine/ecs/components/Script.d.ts +0 -16
  152. package/src/engine/ecs/components/Script.d.ts.map +1 -1
  153. package/src/engine/ecs/components/Script.js +14 -18
  154. package/src/engine/ecs/components/Tag.d.ts.map +1 -1
  155. package/src/engine/ecs/components/Tag.js +4 -5
  156. package/src/engine/ecs/components/Timer.d.ts +0 -5
  157. package/src/engine/ecs/components/Timer.d.ts.map +1 -1
  158. package/src/engine/ecs/components/Timer.js +0 -5
  159. package/src/engine/ecs/grid/HeightMap2NormalMap.d.ts.map +1 -1
  160. package/src/engine/ecs/grid/HeightMap2NormalMap.js +2 -6
  161. package/src/engine/ecs/grid/HeightSampler2NormalSamplerSoft.d.ts.map +1 -1
  162. package/src/engine/ecs/grid/HeightSampler2NormalSamplerSoft.js +0 -3
  163. package/src/engine/ecs/grid/NormalMap2AOMap.d.ts.map +1 -1
  164. package/src/engine/ecs/grid/NormalMap2AOMap.js +3 -8
  165. package/src/engine/ecs/gui/GUIElement.d.ts.map +1 -1
  166. package/src/engine/ecs/gui/GUIElement.js +0 -3
  167. package/src/engine/ecs/gui/GUIElementSystem.d.ts.map +1 -1
  168. package/src/engine/ecs/gui/GUIElementSystem.js +0 -4
  169. package/src/engine/ecs/gui/hud/HeadsUpDisplay.d.ts.map +1 -1
  170. package/src/engine/ecs/gui/hud/HeadsUpDisplay.js +0 -7
  171. package/src/engine/ecs/gui/hud/HeadsUpDisplaySystem.d.ts.map +1 -1
  172. package/src/engine/ecs/gui/hud/HeadsUpDisplaySystem.js +0 -5
  173. package/src/engine/ecs/gui/menu/radial/RadialContextMenu.d.ts.map +1 -1
  174. package/src/engine/ecs/gui/menu/radial/RadialContextMenu.js +5 -8
  175. package/src/engine/ecs/gui/position/ViewportPosition.d.ts.map +1 -1
  176. package/src/engine/ecs/gui/position/ViewportPosition.js +0 -4
  177. package/src/engine/ecs/gui/position/ViewportPositionSystem.d.ts +1 -2
  178. package/src/engine/ecs/gui/position/ViewportPositionSystem.d.ts.map +1 -1
  179. package/src/engine/ecs/gui/position/ViewportPositionSystem.js +6 -10
  180. package/src/engine/ecs/ik/IKProblem.d.ts +1 -2
  181. package/src/engine/ecs/ik/IKProblem.d.ts.map +1 -1
  182. package/src/engine/ecs/renderable/RenderSystem.d.ts.map +1 -1
  183. package/src/engine/ecs/renderable/RenderSystem.js +0 -3
  184. package/src/engine/ecs/renderable/Renderable.d.ts.map +1 -1
  185. package/src/engine/ecs/renderable/Renderable.js +0 -5
  186. package/src/engine/ecs/systems/AnimationSystem.d.ts.map +1 -1
  187. package/src/engine/ecs/systems/AnimationSystem.js +9 -17
  188. package/src/engine/ecs/systems/MotionSystem.d.ts.map +1 -1
  189. package/src/engine/ecs/systems/MotionSystem.js +1 -6
  190. package/src/engine/ecs/systems/ScriptSystem.d.ts.map +1 -1
  191. package/src/engine/ecs/systems/ScriptSystem.js +1 -6
  192. package/src/engine/ecs/systems/TimerSystem.d.ts.map +1 -1
  193. package/src/engine/ecs/systems/TimerSystem.js +1 -6
  194. package/src/engine/ecs/team/Team.d.ts.map +1 -1
  195. package/src/engine/ecs/team/Team.js +0 -3
  196. package/src/engine/ecs/terrain/BufferedGeometryArraysBuilder.d.ts.map +1 -1
  197. package/src/engine/ecs/terrain/BufferedGeometryArraysBuilder.js +0 -5
  198. package/src/engine/ecs/terrain/TerrainClouds.d.ts.map +1 -1
  199. package/src/engine/ecs/terrain/TerrainClouds.js +0 -5
  200. package/src/engine/ecs/terrain/ecs/Terrain.d.ts.map +1 -1
  201. package/src/engine/ecs/terrain/ecs/Terrain.js +0 -5
  202. package/src/engine/ecs/terrain/ecs/cling/ClingToTerrain.d.ts.map +1 -1
  203. package/src/engine/ecs/terrain/ecs/cling/ClingToTerrain.js +0 -3
  204. package/src/engine/ecs/terrain/ecs/cling/ClingToTerrainSystem.d.ts.map +1 -1
  205. package/src/engine/ecs/terrain/ecs/cling/ClingToTerrainSystem.js +11 -14
  206. package/src/engine/ecs/terrain/overlay/TerrainOverlay.d.ts.map +1 -1
  207. package/src/engine/ecs/terrain/overlay/TerrainOverlay.js +0 -5
  208. package/src/engine/ecs/terrain/tiles/TerrainTile.d.ts.map +1 -1
  209. package/src/engine/ecs/terrain/tiles/TerrainTile.js +0 -5
  210. package/src/engine/ecs/terrain/tiles/TerrainTileManager.d.ts +1 -1
  211. package/src/engine/ecs/terrain/tiles/TerrainTileManager.d.ts.map +1 -1
  212. package/src/engine/ecs/terrain/tiles/TerrainTileManager.js +0 -3
  213. package/src/engine/ecs/terrain/tiles/TileBuildWorker.js +0 -4
  214. package/src/engine/ecs/transform/Transform.d.ts.map +1 -1
  215. package/src/engine/ecs/transform/Transform.js +0 -4
  216. package/src/engine/google/gapi.js +0 -4
  217. package/src/engine/graphics/FrameThrottle.d.ts +0 -4
  218. package/src/engine/graphics/FrameThrottle.d.ts.map +1 -1
  219. package/src/engine/graphics/FrameThrottle.js +0 -5
  220. package/src/engine/graphics/GraphicsEngine.d.ts.map +1 -1
  221. package/src/engine/graphics/GraphicsEngine.js +1 -6
  222. package/src/engine/graphics/composit/LayerCompositer.d.ts.map +1 -1
  223. package/src/engine/graphics/composit/LayerCompositer.js +2 -5
  224. package/src/engine/graphics/ecs/animation/AnimationController.d.ts.map +1 -1
  225. package/src/engine/graphics/ecs/animation/AnimationController.js +0 -5
  226. package/src/engine/graphics/ecs/animation/AnimationControllerSystem.d.ts.map +1 -1
  227. package/src/engine/graphics/ecs/animation/AnimationControllerSystem.js +2 -7
  228. package/src/engine/graphics/ecs/animation/AnimationRule.d.ts +0 -1
  229. package/src/engine/graphics/ecs/animation/AnimationRule.d.ts.map +1 -1
  230. package/src/engine/graphics/ecs/animation/AnimationRule.js +70 -66
  231. package/src/engine/graphics/ecs/camera/Camera.d.ts.map +1 -1
  232. package/src/engine/graphics/ecs/camera/Camera.js +0 -5
  233. package/src/engine/graphics/ecs/camera/CameraSystem.d.ts.map +1 -1
  234. package/src/engine/graphics/ecs/camera/CameraSystem.js +0 -5
  235. package/src/engine/graphics/ecs/camera/FrustumProjector.d.ts.map +1 -1
  236. package/src/engine/graphics/ecs/camera/FrustumProjector.js +0 -5
  237. package/src/engine/graphics/ecs/camera/topdown/TopDownCameraController.d.ts.map +1 -1
  238. package/src/engine/graphics/ecs/camera/topdown/TopDownCameraController.js +4 -9
  239. package/src/engine/graphics/ecs/camera/topdown/TopDownCameraControllerSystem.d.ts.map +1 -1
  240. package/src/engine/graphics/ecs/camera/topdown/TopDownCameraControllerSystem.js +3 -8
  241. package/src/engine/graphics/ecs/highlight/Highlight.d.ts.map +1 -1
  242. package/src/engine/graphics/ecs/highlight/Highlight.js +0 -3
  243. package/src/engine/graphics/ecs/highlight/system/MeshHighlightSystem.d.ts.map +1 -1
  244. package/src/engine/graphics/ecs/highlight/system/MeshHighlightSystem.js +3 -8
  245. package/src/engine/graphics/ecs/light/Light.d.ts.map +1 -1
  246. package/src/engine/graphics/ecs/light/Light.js +2 -6
  247. package/src/engine/graphics/ecs/light/LightSystem.d.ts.map +1 -1
  248. package/src/engine/graphics/ecs/light/LightSystem.js +0 -5
  249. package/src/engine/graphics/ecs/mesh/Mesh.d.ts.map +1 -1
  250. package/src/engine/graphics/ecs/mesh/Mesh.js +0 -3
  251. package/src/engine/graphics/ecs/mesh/MeshSystem.d.ts.map +1 -1
  252. package/src/engine/graphics/ecs/mesh/MeshSystem.js +0 -5
  253. package/src/engine/graphics/ecs/trail2d/Trail2D.d.ts.map +1 -1
  254. package/src/engine/graphics/ecs/trail2d/Trail2D.js +0 -5
  255. package/src/engine/graphics/ecs/trail2d/Trail2DSystem.d.ts.map +1 -1
  256. package/src/engine/graphics/ecs/trail2d/Trail2DSystem.js +0 -5
  257. package/src/engine/graphics/ecs/water/Water.d.ts.map +1 -1
  258. package/src/engine/graphics/ecs/water/Water.js +0 -5
  259. package/src/engine/graphics/ecs/water/WaterSystem.d.ts.map +1 -1
  260. package/src/engine/graphics/ecs/water/WaterSystem.js +0 -3
  261. package/src/engine/graphics/filter/ImageFilter.d.ts.map +1 -1
  262. package/src/engine/graphics/filter/ImageFilter.js +0 -5
  263. package/src/engine/graphics/geometry/BufferGeometryWrap.js +1 -3
  264. package/src/engine/graphics/geometry/buffered/ComputeNormals.d.ts.map +1 -1
  265. package/src/engine/graphics/geometry/buffered/ComputeNormals.js +0 -5
  266. package/src/engine/graphics/geometry/ribbon/Ribbon.d.ts.map +1 -1
  267. package/src/engine/graphics/geometry/ribbon/Ribbon.js +1 -4
  268. package/src/engine/graphics/material/SplatMaterial.d.ts.map +1 -1
  269. package/src/engine/graphics/material/SplatMaterial.js +0 -3
  270. package/src/engine/graphics/material/WaterMaterial.d.ts.map +1 -1
  271. package/src/engine/graphics/material/WaterMaterial.js +0 -3
  272. package/src/engine/graphics/particles/particular/engine/MovingBoundingBox.d.ts +0 -5
  273. package/src/engine/graphics/particles/particular/engine/MovingBoundingBox.d.ts.map +1 -1
  274. package/src/engine/graphics/particles/particular/engine/MovingBoundingBox.js +114 -114
  275. package/src/engine/graphics/particles/particular/engine/emitter/ParticleLayer.d.ts +0 -1
  276. package/src/engine/graphics/particles/particular/engine/emitter/ParticleLayer.d.ts.map +1 -1
  277. package/src/engine/graphics/particles/particular/engine/emitter/ParticleLayer.js +347 -348
  278. package/src/engine/graphics/particles/particular/engine/emitter/ParticlePool.d.ts +1 -3
  279. package/src/engine/graphics/particles/particular/engine/emitter/ParticlePool.d.ts.map +1 -1
  280. package/src/engine/graphics/particles/particular/engine/parameter/ParameterSet.d.ts +0 -1
  281. package/src/engine/graphics/particles/particular/engine/parameter/ParameterSet.d.ts.map +1 -1
  282. package/src/engine/graphics/particles/particular/engine/parameter/ParameterSet.js +110 -111
  283. package/src/engine/graphics/particles/particular/engine/parameter/ParameterSheet.d.ts +0 -9
  284. package/src/engine/graphics/particles/particular/engine/parameter/ParameterSheet.d.ts.map +1 -1
  285. package/src/engine/graphics/particles/particular/engine/parameter/ParameterSheet.js +70 -66
  286. package/src/engine/graphics/particles/particular/engine/parameter/ParameterTrackSet.d.ts +0 -5
  287. package/src/engine/graphics/particles/particular/engine/parameter/ParameterTrackSet.d.ts.map +1 -1
  288. package/src/engine/graphics/particles/particular/engine/parameter/ParameterTrackSet.js +82 -82
  289. package/src/engine/graphics/particles/particular/group/Operation.d.ts +0 -7
  290. package/src/engine/graphics/particles/particular/group/Operation.d.ts.map +1 -1
  291. package/src/engine/graphics/particles/particular/group/Operation.js +16 -14
  292. package/src/engine/graphics/particles/particular/group/ParticleAttribute.d.ts +0 -9
  293. package/src/engine/graphics/particles/particular/group/ParticleAttribute.d.ts.map +1 -1
  294. package/src/engine/graphics/particles/particular/group/ParticleAttribute.js +23 -21
  295. package/src/engine/graphics/particles/particular/group/ParticleGroup.d.ts +2 -10
  296. package/src/engine/graphics/particles/particular/group/ParticleGroup.d.ts.map +1 -1
  297. package/src/engine/graphics/particles/particular/group/ParticleGroup.js +463 -464
  298. package/src/engine/graphics/particles/particular/group/ParticleSpecification.d.ts +0 -2
  299. package/src/engine/graphics/particles/particular/group/ParticleSpecification.d.ts.map +1 -1
  300. package/src/engine/graphics/particles/particular/group/ParticleSpecification.js +39 -33
  301. package/src/engine/graphics/render/buffer/FrameBufferManager.d.ts +6 -1
  302. package/src/engine/graphics/render/buffer/FrameBufferManager.d.ts.map +1 -1
  303. package/src/engine/graphics/render/buffer/FrameBufferManager.js +166 -163
  304. package/src/engine/graphics/render/layers/RenderLayer.d.ts.map +1 -1
  305. package/src/engine/graphics/render/layers/RenderLayer.js +0 -5
  306. package/src/engine/graphics/shaders/AlphaBlendShader.js +1 -3
  307. package/src/engine/graphics/shaders/AmbientOcclusionShader.d.ts.map +1 -1
  308. package/src/engine/graphics/shaders/AmbientOcclusionShader.js +0 -3
  309. package/src/engine/graphics/shaders/ClearShader.js +1 -3
  310. package/src/engine/graphics/shaders/CopyShader.d.ts +0 -3
  311. package/src/engine/graphics/shaders/CopyShader.d.ts.map +1 -1
  312. package/src/engine/graphics/shaders/CopyShader.js +1 -3
  313. package/src/engine/graphics/shaders/NormalMapShader2.d.ts.map +1 -1
  314. package/src/engine/graphics/shaders/NormalMapShader2.js +0 -5
  315. package/src/engine/graphics/shaders/TerrainShader.js +0 -4
  316. package/src/engine/graphics/shaders/WaterShader.js +0 -3
  317. package/src/engine/graphics/shaders/lib/ShaderChunks.js +1 -3
  318. package/src/engine/graphics/texture/Canvas2Sampler2D.d.ts.map +1 -1
  319. package/src/engine/graphics/texture/Canvas2Sampler2D.js +1 -4
  320. package/src/engine/graphics/texture/CheckersTexture.d.ts.map +1 -1
  321. package/src/engine/graphics/texture/CheckersTexture.js +0 -3
  322. package/src/engine/graphics/texture/CheckersTextureURI.js +1 -3
  323. package/src/engine/graphics/texture/sampler/Sampler2D.d.ts.map +1 -1
  324. package/src/engine/graphics/texture/sampler/Sampler2D.js +0 -5
  325. package/src/engine/graphics/texture/sampler/Sampler2D2Canvas.d.ts.map +1 -1
  326. package/src/engine/graphics/texture/sampler/Sampler2D2Canvas.js +0 -5
  327. package/src/engine/graphics/texture/sampler/Sampler2D2Texture.d.ts.map +1 -1
  328. package/src/engine/graphics/texture/sampler/Sampler2D2Texture.js +0 -3
  329. package/src/engine/graphics/three/ThreeFactory.d.ts.map +1 -1
  330. package/src/engine/graphics/three/ThreeFactory.js +0 -5
  331. package/src/engine/grid/grid2transform/GridPosition2Transform.d.ts.map +1 -1
  332. package/src/engine/grid/grid2transform/GridPosition2Transform.js +0 -4
  333. package/src/engine/grid/grid2transform/GridPosition2TransformSystem.d.ts.map +1 -1
  334. package/src/engine/grid/grid2transform/GridPosition2TransformSystem.js +4 -7
  335. package/src/engine/grid/obstacle/GridObstacle.d.ts.map +1 -1
  336. package/src/engine/grid/obstacle/GridObstacle.js +0 -5
  337. package/src/engine/grid/position/GridPosition.d.ts.map +1 -1
  338. package/src/engine/grid/position/GridPosition.js +0 -4
  339. package/src/engine/grid/position/GridPositionSystem.d.ts.map +1 -1
  340. package/src/engine/grid/position/GridPositionSystem.js +1 -4
  341. package/src/engine/input/devices/KeyCodes.d.ts.map +1 -1
  342. package/src/engine/input/devices/KeyCodes.js +3 -4
  343. package/src/engine/input/devices/KeyboardDevice.d.ts.map +1 -1
  344. package/src/engine/input/devices/KeyboardDevice.js +0 -4
  345. package/src/engine/input/devices/PointerDevice.d.ts.map +1 -1
  346. package/src/engine/input/devices/PointerDevice.js +0 -3
  347. package/src/engine/input/ecs/components/InputController.d.ts.map +1 -1
  348. package/src/engine/input/ecs/components/InputController.js +1 -5
  349. package/src/engine/input/ecs/controllers/KeyboardCameraController.d.ts.map +1 -1
  350. package/src/engine/input/ecs/controllers/KeyboardCameraController.js +5 -10
  351. package/src/engine/input/ecs/systems/InputControllerSystem.d.ts.map +1 -1
  352. package/src/engine/input/ecs/systems/InputControllerSystem.js +78 -78
  353. package/src/engine/input/ecs/util/TopDownCameraControllerHelper.d.ts.map +1 -1
  354. package/src/engine/input/ecs/util/TopDownCameraControllerHelper.js +3 -6
  355. package/src/engine/intelligence/mcts/MonteCarlo.spec.js +78 -76
  356. package/src/engine/navigation/ecs/components/Path.d.ts.map +1 -1
  357. package/src/engine/navigation/ecs/components/Path.js +0 -5
  358. package/src/engine/navigation/ecs/path_following/PathFollower.d.ts.map +1 -1
  359. package/src/engine/navigation/ecs/path_following/PathFollower.js +1 -6
  360. package/src/engine/navigation/ecs/path_following/PathFollowingSystem.d.ts.map +1 -1
  361. package/src/engine/navigation/ecs/path_following/PathFollowingSystem.js +5 -12
  362. package/src/engine/network/DataChannel.js +284 -284
  363. package/src/engine/network/xhr.d.ts +0 -3
  364. package/src/engine/network/xhr.d.ts.map +1 -1
  365. package/src/engine/network/xhr.js +0 -3
  366. package/src/engine/notify/Notification.d.ts +1 -1
  367. package/src/engine/notify/Notification.d.ts.map +1 -1
  368. package/src/engine/notify/Notification.js +1 -6
  369. package/src/engine/notify/NotificationLog.d.ts.map +1 -1
  370. package/src/engine/notify/NotificationLog.js +0 -5
  371. package/src/engine/options/OptionsView.d.ts.map +1 -1
  372. package/src/engine/options/OptionsView.js +1 -6
  373. package/src/engine/physics/ammo/Body.js +0 -3
  374. package/src/engine/physics/ammo/PhysicsWorker.d.ts.map +1 -1
  375. package/src/engine/physics/ammo/PhysicsWorker.js +1 -3
  376. package/src/engine/physics/ammo/World.d.ts +68 -0
  377. package/src/engine/physics/ammo/World.d.ts.map +1 -0
  378. package/src/engine/physics/ammo/World.js +277 -278
  379. package/src/engine/physics/ammo/shapes/BoxShape.js +0 -3
  380. package/src/engine/physics/ammo/shapes/CapsuleShape.js +0 -3
  381. package/src/engine/physics/ammo/shapes/MeshShape.js +0 -3
  382. package/src/engine/physics/ammo/shapes/PlaneShape.js +0 -3
  383. package/src/engine/physics/ammo/shapes/Shape.js +1 -3
  384. package/src/engine/physics/ammo/shapes/SphereShape.js +0 -3
  385. package/src/engine/physics/cannon/CannonJSPhysicsSystem.d.ts.map +1 -1
  386. package/src/engine/physics/cannon/CannonJSPhysicsSystem.js +3 -6
  387. package/src/engine/save/GameStateLoader.d.ts.map +1 -1
  388. package/src/engine/save/GameStateLoader.js +1 -5
  389. package/src/engine/save/Storage.d.ts.map +1 -1
  390. package/src/engine/save/Storage.js +0 -7
  391. package/src/engine/scene/Scene.d.ts.map +1 -1
  392. package/src/engine/scene/Scene.js +2 -7
  393. package/src/engine/scene/SceneManager.d.ts.map +1 -1
  394. package/src/engine/scene/SceneManager.js +1 -4
  395. package/src/engine/simulation/DormandPrince.d.ts +0 -1
  396. package/src/engine/simulation/DormandPrince.d.ts.map +1 -1
  397. package/src/engine/simulation/DormandPrince.js +5 -5
  398. package/src/engine/simulation/Ticker.d.ts.map +1 -1
  399. package/src/engine/simulation/Ticker.js +0 -3
  400. package/src/engine/sound/ecs/SoundController.d.ts +0 -7
  401. package/src/engine/sound/ecs/SoundController.d.ts.map +1 -1
  402. package/src/engine/sound/ecs/SoundController.js +118 -119
  403. package/src/engine/sound/ecs/SoundControllerSystem.d.ts.map +1 -1
  404. package/src/engine/sound/ecs/SoundControllerSystem.js +3 -8
  405. package/src/engine/sound/ecs/SoundListener.d.ts +0 -1
  406. package/src/engine/sound/ecs/SoundListener.d.ts.map +1 -1
  407. package/src/engine/sound/ecs/SoundListener.js +26 -29
  408. package/src/engine/sound/ecs/SoundListenerSystem.d.ts.map +1 -1
  409. package/src/engine/sound/ecs/SoundListenerSystem.js +0 -5
  410. package/src/engine/sound/ecs/emitter/SoundEmitter.d.ts.map +1 -1
  411. package/src/engine/sound/ecs/emitter/SoundEmitter.js +0 -5
  412. package/src/engine/sound/ecs/emitter/SoundEmitterSystem.d.ts.map +1 -1
  413. package/src/engine/sound/ecs/emitter/SoundEmitterSystem.js +0 -7
  414. package/src/engine/ui/GUIEngine.d.ts.map +1 -1
  415. package/src/engine/ui/GUIEngine.js +0 -5
  416. package/src/engine/ui/tiles2d/TileGrid.d.ts.map +1 -1
  417. package/src/engine/ui/tiles2d/TileGrid.js +1 -4
  418. package/src/generation/markers/debug/visualizeMarkers.js +10 -10
  419. package/src/view/DOM.js +1 -3
  420. package/src/view/SVG.d.ts +0 -3
  421. package/src/view/SVG.d.ts.map +1 -1
  422. package/src/view/SVG.js +0 -4
  423. package/src/view/asset/PreloaderView.d.ts.map +1 -1
  424. package/src/view/asset/PreloaderView.js +0 -3
  425. package/src/view/common/LabelView.d.ts +1 -6
  426. package/src/view/common/LabelView.d.ts.map +1 -1
  427. package/src/view/common/LabelView.js +24 -33
  428. package/src/view/common/ListView.d.ts.map +1 -1
  429. package/src/view/common/ListView.js +0 -6
  430. package/src/view/common/MeshView.js +3 -6
  431. package/src/view/common/VirtualListView.d.ts.map +1 -1
  432. package/src/view/common/VirtualListView.js +0 -5
  433. package/src/view/common/dnd/DragAndDropContext.d.ts +1 -2
  434. package/src/view/common/dnd/DragAndDropContext.d.ts.map +1 -1
  435. package/src/view/common/dnd/DragAndDropContext.js +107 -110
  436. package/src/view/controller/GuiController.d.ts.map +1 -1
  437. package/src/view/controller/GuiController.js +1 -6
  438. package/src/view/controller/controls/BooleanVector3Control.d.ts +1 -1
  439. package/src/view/controller/controls/BooleanVector3Control.d.ts.map +1 -1
  440. package/src/view/controller/controls/GuiControl.js +2 -7
  441. package/src/view/controller/controls/Vector1Control.d.ts +1 -1
  442. package/src/view/controller/controls/Vector1Control.d.ts.map +1 -1
  443. package/src/view/controller/controls/Vector1Control.js +2 -7
  444. package/src/view/controller/controls/Vector2Control.d.ts.map +1 -1
  445. package/src/view/controller/controls/Vector2Control.js +0 -4
  446. package/src/view/controller/controls/Vector3Control.d.ts.map +1 -1
  447. package/src/view/controller/controls/Vector3Control.js +0 -3
  448. package/src/view/elements/ConfirmationDialogView.d.ts.map +1 -1
  449. package/src/view/elements/ConfirmationDialogView.js +1 -6
  450. package/src/view/elements/DropDownSelectionView.d.ts.map +1 -1
  451. package/src/view/elements/DropDownSelectionView.js +0 -5
  452. package/src/view/elements/EmptyView.d.ts.map +1 -1
  453. package/src/view/elements/EmptyView.js +0 -4
  454. package/src/view/elements/Group.d.ts.map +1 -1
  455. package/src/view/elements/Group.js +0 -3
  456. package/src/view/elements/MeshPreview.d.ts.map +1 -1
  457. package/src/view/elements/MeshPreview.js +5 -8
  458. package/src/view/elements/SimpleWindow.d.ts +1 -1
  459. package/src/view/elements/SimpleWindow.d.ts.map +1 -1
  460. package/src/view/elements/SimpleWindow.js +5 -11
  461. package/src/view/elements/button/ButtonView.d.ts.map +1 -1
  462. package/src/view/elements/button/ButtonView.js +1 -5
  463. package/src/view/elements/image/ImageView.d.ts.map +1 -1
  464. package/src/view/elements/image/ImageView.js +0 -4
  465. package/src/view/elements/image/SvgImageView.d.ts.map +1 -1
  466. package/src/view/elements/image/SvgImageView.js +2 -7
  467. package/src/view/elements/label/LabeledValueView.d.ts.map +1 -1
  468. package/src/view/elements/label/LabeledValueView.js +3 -8
  469. package/src/view/elements/navigation/ViewStack.d.ts +0 -7
  470. package/src/view/elements/navigation/ViewStack.d.ts.map +1 -1
  471. package/src/view/elements/navigation/ViewStack.js +17 -19
  472. package/src/view/elements/notify/NotificationView.js +1 -4
  473. package/src/view/elements/notify/ToastLogView.d.ts.map +1 -1
  474. package/src/view/elements/notify/ToastLogView.js +0 -3
  475. package/src/view/elements/progress/SmoothProgressBar.d.ts +72 -0
  476. package/src/view/elements/progress/SmoothProgressBar.d.ts.map +1 -0
  477. package/src/view/elements/radial/RadialMenu.d.ts.map +1 -1
  478. package/src/view/elements/radial/RadialMenu.js +1 -6
  479. package/src/view/elements/radial/RadialMenuElement.d.ts.map +1 -1
  480. package/src/view/elements/radial/RadialMenuElement.js +1 -4
  481. package/src/view/elements/radial/RadialProgressView.d.ts +1 -1
  482. package/src/view/elements/radial/RadialProgressView.d.ts.map +1 -1
  483. package/src/view/elements/radial/RadialProgressView.js +4 -9
  484. package/src/view/elements/tiles2d/Tile.d.ts.map +1 -1
  485. package/src/view/elements/tiles2d/Tile.js +3 -6
  486. package/src/view/elements/tiles2d/TileGrid.d.ts.map +1 -1
  487. package/src/view/elements/tiles2d/TileGrid.js +0 -5
  488. package/src/view/minimap/Minimap.d.ts.map +1 -1
  489. package/src/view/minimap/Minimap.js +11 -16
  490. package/src/view/minimap/dom/MinimapCameraView.d.ts +1 -2
  491. package/src/view/minimap/dom/MinimapCameraView.d.ts.map +1 -1
  492. package/src/view/minimap/dom/MinimapTerrainView.d.ts +1 -1
  493. package/src/view/minimap/dom/MinimapTerrainView.d.ts.map +1 -1
  494. package/src/view/minimap/gl/MarkerGL.d.ts +2 -12
  495. package/src/view/minimap/gl/MarkerGL.d.ts.map +1 -1
  496. package/src/view/minimap/gl/MarkerGL.js +60 -56
  497. package/src/view/minimap/gl/MinimapMarkersGL.d.ts +1 -1
  498. package/src/view/minimap/gl/MinimapMarkersGL.d.ts.map +1 -1
  499. package/src/view/minimap/gl/MinimapTerrainGL.d.ts +1 -2
  500. package/src/view/minimap/gl/MinimapTerrainGL.d.ts.map +1 -1
  501. package/src/view/renderModel.d.ts.map +1 -1
  502. package/src/view/renderModel.js +3 -7
  503. package/src/view/task/TaskProgressView.d.ts.map +1 -1
  504. package/src/view/task/TaskProgressView.js +0 -5
  505. package/src/engine/asset/loaders/LegacyThreeJSONAssetLoader.d.ts +0 -9
  506. package/src/engine/asset/loaders/LegacyThreeJSONAssetLoader.d.ts.map +0 -1
  507. package/src/engine/asset/loaders/LegacyThreeJSONAssetLoader.js +0 -105
  508. package/src/engine/graphics/geometry/decimation/SimplifyModifier.d.ts +0 -117
  509. package/src/engine/graphics/geometry/decimation/SimplifyModifier.d.ts.map +0 -1
  510. package/src/engine/graphics/geometry/decimation/SimplifyModifier.js +0 -971
  511. package/src/engine/graphics/loader/threejs/GLTFLoader.js +0 -3179
  512. package/src/engine/graphics/loader/threejs/LegacyJSONLoader.d.ts +0 -6
  513. package/src/engine/graphics/loader/threejs/LegacyJSONLoader.d.ts.map +0 -1
  514. package/src/engine/graphics/loader/threejs/LegacyJSONLoader.js +0 -845
  515. package/src/engine/graphics/postprocess/Postprocess.js +0 -284
  516. package/src/engine/graphics/postprocess/threejs/Mirror.js +0 -330
  517. package/src/engine/graphics/postprocess/threejs/WaterShader.js +0 -306
  518. package/src/engine/graphics/postprocess/threejs/postprocessing/AdaptiveToneMappingPass.js +0 -338
  519. package/src/engine/graphics/postprocess/threejs/postprocessing/BloomPass.js +0 -132
  520. package/src/engine/graphics/postprocess/threejs/postprocessing/BokehPass.js +0 -115
  521. package/src/engine/graphics/postprocess/threejs/postprocessing/ClearMaskPass.d.ts +0 -4
  522. package/src/engine/graphics/postprocess/threejs/postprocessing/ClearMaskPass.d.ts.map +0 -1
  523. package/src/engine/graphics/postprocess/threejs/postprocessing/ClearMaskPass.js +0 -23
  524. package/src/engine/graphics/postprocess/threejs/postprocessing/DotScreenPass.d.ts +0 -1
  525. package/src/engine/graphics/postprocess/threejs/postprocessing/DotScreenPass.d.ts.map +0 -1
  526. package/src/engine/graphics/postprocess/threejs/postprocessing/DotScreenPass.js +0 -60
  527. package/src/engine/graphics/postprocess/threejs/postprocessing/EffectComposer.js +0 -150
  528. package/src/engine/graphics/postprocess/threejs/postprocessing/FilmPass.d.ts +0 -1
  529. package/src/engine/graphics/postprocess/threejs/postprocessing/FilmPass.d.ts.map +0 -1
  530. package/src/engine/graphics/postprocess/threejs/postprocessing/FilmPass.js +0 -61
  531. package/src/engine/graphics/postprocess/threejs/postprocessing/GlitchPass.d.ts +0 -1
  532. package/src/engine/graphics/postprocess/threejs/postprocessing/GlitchPass.d.ts.map +0 -1
  533. package/src/engine/graphics/postprocess/threejs/postprocessing/GlitchPass.js +0 -117
  534. package/src/engine/graphics/postprocess/threejs/postprocessing/RenderPass.js +0 -63
  535. package/src/engine/graphics/postprocess/threejs/postprocessing/SMAAPass.js +0 -187
  536. package/src/engine/graphics/postprocess/threejs/postprocessing/SavePass.d.ts +0 -1
  537. package/src/engine/graphics/postprocess/threejs/postprocessing/SavePass.d.ts.map +0 -1
  538. package/src/engine/graphics/postprocess/threejs/postprocessing/SavePass.js +0 -67
  539. package/src/engine/graphics/postprocess/threejs/postprocessing/TexturePass.js +0 -50
  540. package/src/engine/graphics/postprocess/threejs/shaders/BokehShader.d.ts +0 -42
  541. package/src/engine/graphics/postprocess/threejs/shaders/BokehShader.d.ts.map +0 -1
  542. package/src/engine/graphics/postprocess/threejs/shaders/BokehShader.js +0 -117
  543. package/src/engine/graphics/postprocess/threejs/shaders/ConvolutionShader.d.ts +0 -30
  544. package/src/engine/graphics/postprocess/threejs/shaders/ConvolutionShader.d.ts.map +0 -1
  545. package/src/engine/graphics/postprocess/threejs/shaders/ConvolutionShader.js +0 -106
  546. package/src/engine/graphics/postprocess/threejs/shaders/FXAAShader.d.ts +0 -19
  547. package/src/engine/graphics/postprocess/threejs/shaders/FXAAShader.d.ts.map +0 -1
  548. package/src/engine/graphics/postprocess/threejs/shaders/FXAAShader.js +0 -90
  549. package/src/engine/graphics/postprocess/threejs/shaders/GammaCorrectionShader.d.ts +0 -12
  550. package/src/engine/graphics/postprocess/threejs/shaders/GammaCorrectionShader.d.ts.map +0 -1
  551. package/src/engine/graphics/postprocess/threejs/shaders/GammaCorrectionShader.js +0 -52
  552. package/src/engine/graphics/postprocess/threejs/shaders/LuminosityShader.d.ts +0 -12
  553. package/src/engine/graphics/postprocess/threejs/shaders/LuminosityShader.d.ts.map +0 -1
  554. package/src/engine/graphics/postprocess/threejs/shaders/LuminosityShader.js +0 -51
  555. package/src/engine/graphics/postprocess/threejs/shaders/SMAAShader.d.ts +0 -76
  556. package/src/engine/graphics/postprocess/threejs/shaders/SMAAShader.d.ts.map +0 -1
  557. package/src/engine/graphics/postprocess/threejs/shaders/SMAAShader.js +0 -468
  558. package/src/engine/graphics/postprocess/threejs/shaders/SSAOShader.d.ts +0 -61
  559. package/src/engine/graphics/postprocess/threejs/shaders/SSAOShader.d.ts.map +0 -1
  560. package/src/engine/graphics/postprocess/threejs/shaders/SSAOShader.js +0 -230
  561. package/src/engine/graphics/postprocess/threejs/shaders/ToneMapShader.d.ts +0 -36
  562. package/src/engine/graphics/postprocess/threejs/shaders/ToneMapShader.d.ts.map +0 -1
  563. package/src/engine/graphics/postprocess/threejs/shaders/ToneMapShader.js +0 -76
  564. package/src/engine/graphics/shaders/GaussianBlurShader.d.ts +0 -22
  565. package/src/engine/graphics/shaders/GaussianBlurShader.d.ts.map +0 -1
  566. package/src/engine/graphics/shaders/GaussianBlurShader.js +0 -79
  567. package/src/engine/graphics/shaders/GaussianGlowShader.d.ts +0 -26
  568. package/src/engine/graphics/shaders/GaussianGlowShader.d.ts.map +0 -1
  569. package/src/engine/graphics/shaders/GaussianGlowShader.js +0 -83
  570. package/src/engine/graphics/shaders/NormalMapShader.d.ts +0 -33
  571. package/src/engine/graphics/shaders/NormalMapShader.d.ts.map +0 -1
  572. package/src/engine/graphics/shaders/NormalMapShader.js +0 -62
  573. package/src/engine/graphics/shaders/SoftOutlineShader.d.ts +0 -3
  574. package/src/engine/graphics/shaders/SoftOutlineShader.d.ts.map +0 -1
  575. package/src/engine/graphics/shaders/SoftOutlineShader.js +0 -111
  576. package/src/engine/graphics/three/Reflector.d.ts +0 -12
  577. package/src/engine/graphics/three/Reflector.d.ts.map +0 -1
  578. package/src/engine/graphics/three/Reflector.js +0 -281
  579. package/src/engine/graphics/three/Refractor.d.ts +0 -11
  580. package/src/engine/graphics/three/Refractor.d.ts.map +0 -1
  581. package/src/engine/graphics/three/Refractor.js +0 -352
  582. package/src/engine/navigation/ecs/components/PathFinder.d.ts +0 -14
  583. package/src/engine/navigation/ecs/components/PathFinder.d.ts.map +0 -1
  584. package/src/engine/navigation/ecs/components/PathFinder.js +0 -11
  585. package/src/view/elements/navigation/NavigationMenu.d.ts +0 -13
  586. package/src/view/elements/navigation/NavigationMenu.d.ts.map +0 -1
  587. package/src/view/elements/navigation/NavigationMenu.js +0 -27
@@ -1,400 +1,399 @@
1
+ import { computeHashIntegerArray } from "../../../../../../core/collection/array/computeHashIntegerArray.js";
2
+ import List from "../../../../../../core/collection/list/List.js";
3
+ import { AABB3 } from "../../../../../../core/geom/3d/aabb/AABB3.js";
4
+ import { computeConeBoundingBox } from "../../../../../../core/geom/3d/cone/computeConeBoundingBox.js";
5
+ import { ConicRay } from "../../../../../../core/geom/ConicRay.js";
1
6
  import Vector3 from "../../../../../../core/geom/Vector3.js";
2
7
  import { NumericInterval } from "../../../../../../core/math/interval/NumericInterval.js";
8
+ import { computeHashFloat } from "../../../../../../core/primitives/numbers/computeHashFloat.js";
9
+ import { computeStringHash } from "../../../../../../core/primitives/strings/computeStringHash.js";
3
10
  import { ParameterTrackSet } from "../parameter/ParameterTrackSet.js";
4
- import { AABB3 } from "../../../../../../core/geom/3d/aabb/AABB3.js";
5
- import { ParticleParameters } from "./ParticleParameters.js";
6
- import { ConicRay } from "../../../../../../core/geom/ConicRay.js";
7
11
  import { SimulationStepDefinition } from "../simulator/SimulationStepDefinition.js";
8
- import List from "../../../../../../core/collection/list/List.js";
9
12
  import { SimulationStepType } from "../simulator/SimulationStepType.js";
10
- import { computeStringHash } from "../../../../../../core/primitives/strings/computeStringHash.js";
11
- import { computeConeBoundingBox } from "../../../../../../core/geom/3d/cone/computeConeBoundingBox.js";
12
13
  import { EmissionFromType } from "./EmissionFromType.js";
13
14
  import { EmissionShapeType } from "./EmissionShapeType.js";
14
- import { computeHashIntegerArray } from "../../../../../../core/collection/array/computeHashIntegerArray.js";
15
- import { computeHashFloat } from "../../../../../../core/primitives/numbers/computeHashFloat.js";
15
+ import { ParticleParameters } from "./ParticleParameters.js";
16
16
 
17
17
  const aabb3 = new AABB3(0, 0, 0, 0, 0, 0);
18
18
 
19
- function ParticleLayer() {
20
- /**
21
- *
22
- * @type {String|null}
23
- */
24
- this.imageURL = null;
25
-
26
- /**
27
- * Patch of the image
28
- * @private
29
- * @type {AtlasPatch}
30
- */
31
- this.__atlasPatch = null;
32
-
33
- /**
34
- * Determines a range of particle life expectancy
35
- * @readonly
36
- * @type {NumericInterval}
37
- */
38
- this.particleLife = new NumericInterval(1, 1);
39
-
40
- /**
41
- * @readonly
42
- * @type {NumericInterval}
43
- */
44
- this.particleSize = new NumericInterval(0.1, 0.2);
45
-
46
- /**
47
- * @readonly
48
- * @type {NumericInterval}
49
- */
50
- this.particleRotation = new NumericInterval(0, 0);
19
+ export class ParticleLayer {
20
+ constructor() {
21
+ /**
22
+ *
23
+ * @type {String|null}
24
+ */
25
+ this.imageURL = null;
26
+
27
+ /**
28
+ * Patch of the image
29
+ * @private
30
+ * @type {AtlasPatch}
31
+ */
32
+ this.__atlasPatch = null;
33
+
34
+ /**
35
+ * Determines a range of particle life expectancy
36
+ * @readonly
37
+ * @type {NumericInterval}
38
+ */
39
+ this.particleLife = new NumericInterval(1, 1);
40
+
41
+ /**
42
+ * @readonly
43
+ * @type {NumericInterval}
44
+ */
45
+ this.particleSize = new NumericInterval(0.1, 0.2);
46
+
47
+ /**
48
+ * @readonly
49
+ * @type {NumericInterval}
50
+ */
51
+ this.particleRotation = new NumericInterval(0, 0);
52
+
53
+ /**
54
+ * Rotation speed of individual particles in Rad/s
55
+ * @readonly
56
+ * @type {NumericInterval}
57
+ */
58
+ this.particleRotationSpeed = new NumericInterval(0, 0);
59
+
60
+ /**
61
+ *
62
+ * @type {EmissionShapeType|number}
63
+ */
64
+ this.emissionShape = EmissionShapeType.Point;
65
+
66
+ /**
67
+ *
68
+ * @type {EmissionFromType|number}
69
+ */
70
+ this.emissionFrom = EmissionFromType.Volume;
71
+
72
+ /**
73
+ *
74
+ * @type {number}
75
+ */
76
+ this.emissionRate = 1;
51
77
 
52
- /**
53
- * Rotation speed of individual particles in Rad/s
54
- * @readonly
55
- * @type {NumericInterval}
56
- */
57
- this.particleRotationSpeed = new NumericInterval(0, 0);
78
+ /**
79
+ * When layer is added - it will immediately emit this number of particles
80
+ * @type {number}
81
+ */
82
+ this.emissionImmediate = 0;
58
83
 
59
- /**
60
- *
61
- * @type {EmissionShapeType|number}
62
- */
63
- this.emissionShape = EmissionShapeType.Point;
84
+ /**
85
+ * @readonly
86
+ * @type {ParameterTrackSet}
87
+ */
88
+ this.parameterTracks = new ParameterTrackSet();
89
+
90
+ /**
91
+ * @readonly
92
+ * @type {Vector3}
93
+ */
94
+ this.position = new Vector3(0, 0, 0);
95
+
96
+ /**
97
+ * @readonly
98
+ * @type {Vector3}
99
+ */
100
+ this.scale = new Vector3(1, 1, 1);
101
+
102
+ /**
103
+ * @readonly
104
+ * @type {ConicRay}
105
+ */
106
+ this.particleVelocityDirection = new ConicRay();
107
+
108
+ /**
109
+ * @readonly
110
+ * @type {NumericInterval}
111
+ */
112
+ this.particleSpeed = new NumericInterval(0, 0);
113
+
114
+ /**
115
+ * Used to track how much time has past since a particle was last emitted
116
+ * @type {number}
117
+ */
118
+ this.timeSinceLastEmission = 0;
119
+
120
+ /**
121
+ * Determines if the layer is spawning new particles or not
122
+ * @type {boolean}
123
+ */
124
+ this.isEmitting = true;
125
+
126
+ /**
127
+ * Simulation steps that are to be applied
128
+ * @readonly
129
+ * @type {List<SimulationStepDefinition>}
130
+ */
131
+ this.steps = new List();
132
+
133
+ /**
134
+ * transient property
135
+ * @type {number}
136
+ */
137
+ this.scaledSpriteHalfSize = -1;
138
+
139
+ /**
140
+ * @readonly
141
+ * @type {AABB3}
142
+ */
143
+ this.baseBoundingBox = new AABB3(0, 0, 0, 0, 0, 0);
144
+ }
64
145
 
65
- /**
66
- *
67
- * @type {EmissionFromType|number}
68
- */
69
- this.emissionFrom = EmissionFromType.Volume;
146
+ computeBoundsAttributes() {
147
+ this.scaledSpriteHalfSize = this.computeScaledSpriteHalfSize();
148
+ this.computePointBoundingBox(this.baseBoundingBox);
149
+ }
70
150
 
71
151
  /**
72
152
  *
73
- * @type {number}
74
- */
75
- this.emissionRate = 1;
76
-
77
- /**
78
- * When layer is added - it will immediately emit this number of particles
79
- * @type {number}
80
- */
81
- this.emissionImmediate = 0;
82
-
83
- /**
84
- * @readonly
85
- * @type {ParameterTrackSet}
86
- */
87
- this.parameterTracks = new ParameterTrackSet();
88
-
89
- /**
90
- * @readonly
91
- * @type {Vector3}
92
- */
93
- this.position = new Vector3(0, 0, 0);
94
-
95
- /**
96
- * @readonly
97
- * @type {Vector3}
98
- */
99
- this.scale = new Vector3(1, 1, 1);
100
-
101
- /**
102
- * @readonly
103
- * @type {ConicRay}
153
+ * @returns {number}
104
154
  */
105
- this.particleVelocityDirection = new ConicRay();
155
+ computeScaledSpriteHalfSize() {
106
156
 
107
- /**
108
- * @readonly
109
- * @type {NumericInterval}
110
- */
111
- this.particleSpeed = new NumericInterval(0, 0);
157
+ //compute maximum particle size
158
+ let maxParticleSize = this.particleSize.max;
112
159
 
113
- /**
114
- * Used to track how much time has past since a particle was last emitted
115
- * @type {number}
116
- */
117
- this.timeSinceLastEmission = 0;
160
+ const scaleTrack = this.parameterTracks.getTrackByName(ParticleParameters.Scale);
118
161
 
119
- /**
120
- * Determines if the layer is spawning new particles or not
121
- * @type {boolean}
122
- */
123
- this.isEmitting = true;
162
+ if (scaleTrack !== undefined) {
163
+ //scale track is present, take it into account
164
+ const lookupTable = scaleTrack.track;
124
165
 
125
- /**
126
- * Simulation steps that are to be applied
127
- * @readonly
128
- * @type {List<SimulationStepDefinition>}
129
- */
130
- this.steps = new List();
166
+ maxParticleSize = maxParticleSize * lookupTable.valueMax;
167
+ }
131
168
 
132
- /**
133
- * transient property
134
- * @type {number}
135
- */
136
- this.scaledSpriteHalfSize = -1;
169
+ return maxParticleSize / 2;
170
+ }
137
171
 
138
172
  /**
139
- * @readonly
140
- * @type {AABB3}
173
+ * Bounding box without taking sprite size into account
174
+ * @param {AABB3} result
141
175
  */
142
- this.baseBoundingBox = new AABB3(0, 0, 0, 0, 0, 0);
143
- }
144
-
145
- ParticleLayer.prototype.computeBoundsAttributes = function () {
146
- this.scaledSpriteHalfSize = this.computeScaledSpriteHalfSize();
147
- this.computePointBoundingBox(this.baseBoundingBox);
148
- };
176
+ computePointBoundingBox(result) {
177
+ let x0, y0, z0, x1, y1, z1;
149
178
 
150
- /**
151
- *
152
- * @returns {number}
153
- */
154
- ParticleLayer.prototype.computeScaledSpriteHalfSize = function () {
155
179
 
156
- //compute maximum particle size
157
- let maxParticleSize = this.particleSize.max;
180
+ //take velocity into account
181
+ const maxDisplacement = this.particleSpeed.max * this.particleLife.max;
158
182
 
159
- const scaleTrack = this.parameterTracks.getTrackByName(ParticleParameters.Scale);
160
183
 
161
- if (scaleTrack !== undefined) {
162
- //scale track is present, take it into account
163
- const lookupTable = scaleTrack.track;
184
+ const particleVelocityDirection = this.particleVelocityDirection;
185
+ const direction = particleVelocityDirection.direction;
164
186
 
165
- maxParticleSize = maxParticleSize * lookupTable.valueMax;
166
- }
187
+ //displace by current position
188
+ const position = this.position;
167
189
 
168
- return maxParticleSize / 2;
169
- };
190
+ computeConeBoundingBox(
191
+ aabb3,
192
+ position.x, position.y, position.z,
193
+ direction.x, direction.y, direction.z,
194
+ particleVelocityDirection.angle, maxDisplacement
195
+ );
170
196
 
197
+ x0 = aabb3.x0;
198
+ y0 = aabb3.y0;
199
+ z0 = aabb3.z0;
200
+ x1 = aabb3.x1;
201
+ y1 = aabb3.y1;
202
+ z1 = aabb3.z1;
171
203
 
172
- /**
173
- * Bounding box without taking sprite size into account
174
- * @param {AABB3} result
175
- */
176
- ParticleLayer.prototype.computePointBoundingBox = function (result) {
177
- let x0, y0, z0, x1, y1, z1;
204
+ //scale the emitter layer
205
+ const scale = this.scale;
178
206
 
207
+ if (this.emissionShape !== EmissionShapeType.Point) {
208
+ x0 -= 0.5 * scale.x;
209
+ y0 -= 0.5 * scale.y;
210
+ z0 -= 0.5 * scale.z;
179
211
 
180
- //take velocity into account
181
- const maxDisplacement = this.particleSpeed.max * this.particleLife.max;
212
+ x1 += 0.5 * scale.x;
213
+ y1 += 0.5 * scale.y;
214
+ z1 += 0.5 * scale.z;
215
+ }
182
216
 
183
217
 
184
- const particleVelocityDirection = this.particleVelocityDirection;
185
- const direction = particleVelocityDirection.direction;
186
-
187
- //displace by current position
188
- const position = this.position;
189
-
190
- computeConeBoundingBox(
191
- aabb3,
192
- position.x, position.y, position.z,
193
- direction.x, direction.y, direction.z,
194
- particleVelocityDirection.angle, maxDisplacement
195
- );
196
-
197
- x0 = aabb3.x0;
198
- y0 = aabb3.y0;
199
- z0 = aabb3.z0;
200
- x1 = aabb3.x1;
201
- y1 = aabb3.y1;
202
- z1 = aabb3.z1;
203
-
204
- //scale the emitter layer
205
- const scale = this.scale;
206
-
207
- if (this.emissionShape !== EmissionShapeType.Point) {
208
- x0 -= 0.5 * scale.x;
209
- y0 -= 0.5 * scale.y;
210
- z0 -= 0.5 * scale.z;
211
-
212
- x1 += 0.5 * scale.x;
213
- y1 += 0.5 * scale.y;
214
- z1 += 0.5 * scale.z;
218
+ result.setBounds(x0, y0, z0, x1, y1, z1);
215
219
  }
216
220
 
217
-
218
- result.setBounds(x0, y0, z0, x1, y1, z1);
219
- };
220
-
221
- /**
222
- *
223
- * @param {AtlasPatch} patch
224
- */
225
- ParticleLayer.prototype.setAtlasPatch = function (patch) {
226
- this.__atlasPatch = patch;
227
- };
228
-
229
- ParticleLayer.prototype.hash = function () {
230
- return computeHashIntegerArray(
231
- computeStringHash(this.imageURL),
232
- this.particleLife.hash(),
233
- this.particleSize.hash(),
234
- this.particleRotation.hash(),
235
- this.particleRotationSpeed.hash(),
236
- this.emissionShape,
237
- this.emissionFrom,
238
- computeHashFloat(this.emissionRate),
239
- this.emissionImmediate,
240
- this.parameterTracks.hash(),
241
- this.position.hash(),
242
- this.scale.hash(),
243
- this.particleVelocityDirection.hash(),
244
- this.particleSpeed.hash()
245
- );
246
- };
247
-
248
- /**
249
- *
250
- * @param {ParticleLayer} other
251
- * @returns {boolean}
252
- */
253
- ParticleLayer.prototype.equals = function (other) {
254
- return this.imageURL === other.imageURL
255
- && this.particleLife.equals(other.particleLife)
256
- && this.particleSize.equals(other.particleSize)
257
- && this.particleRotation.equals(other.particleRotation)
258
- && this.particleRotationSpeed.equals(other.particleRotationSpeed)
259
- && this.emissionShape === other.emissionShape
260
- && this.emissionFrom === other.emissionFrom
261
- && this.emissionRate === other.emissionRate
262
- && this.emissionImmediate === other.emissionImmediate
263
- && this.parameterTracks.equals(other.parameterTracks)
264
- && this.position.equals(other.position)
265
- && this.scale.equals(other.scale)
266
- && this.particleVelocityDirection.equals(other.particleVelocityDirection)
267
- && this.particleSpeed.equals(other.particleSpeed);
268
- };
269
-
270
- ParticleLayer.prototype.toJSON = function () {
271
- return {
272
- imageURL: this.imageURL,
273
- particleLife: this.particleLife.toJSON(),
274
- particleSize: this.particleSize.toJSON(),
275
- particleRotation: this.particleRotation.toJSON(),
276
- particleRotationSpeed: this.particleRotationSpeed.toJSON(),
277
- emissionShape: this.emissionShape,
278
- emissionFrom: this.emissionFrom,
279
- emissionRate: this.emissionRate,
280
- emissionImmediate: this.emissionImmediate,
281
- parameterTracks: this.parameterTracks.toJSON(),
282
- position: this.position.toJSON(),
283
- scale: this.scale.toJSON(),
284
- particleVelocityDirection: this.particleVelocityDirection.toJSON(),
285
- particleSpeed: this.particleSpeed.toJSON(),
286
- steps: this.steps.toJSON()
287
- };
288
- };
289
-
290
- ParticleLayer.prototype.fromJSON = function (json) {
291
- this.imageURL = json.imageURL;
292
- this.particleLife.fromJSON(json.particleLife);
293
- this.particleSize.fromJSON(json.particleSize);
294
- this.particleRotation.fromJSON(json.particleRotation);
295
- this.particleRotationSpeed.fromJSON(json.particleRotationSpeed);
296
- this.emissionShape = json.emissionShape;
297
- this.emissionFrom = json.emissionFrom;
298
-
299
- if (typeof json.emissionRate === "number") {
300
- this.emissionRate = json.emissionRate;
301
- } else {
302
- this.emissionRate = 1;
303
- }
304
-
305
- if (typeof json.emissionImmediate === "number") {
306
- this.emissionImmediate = json.emissionImmediate;
307
- } else {
308
- this.emissionImmediate = 0;
221
+ /**
222
+ *
223
+ * @param {AtlasPatch} patch
224
+ */
225
+ setAtlasPatch(patch) {
226
+ this.__atlasPatch = patch;
309
227
  }
310
228
 
311
- if (json.parameterTracks !== undefined) {
312
- this.parameterTracks.fromJSON(json.parameterTracks);
313
- } else {
314
- this.parameterTracks.clear();
229
+ hash() {
230
+ return computeHashIntegerArray(
231
+ computeStringHash(this.imageURL),
232
+ this.particleLife.hash(),
233
+ this.particleSize.hash(),
234
+ this.particleRotation.hash(),
235
+ this.particleRotationSpeed.hash(),
236
+ this.emissionShape,
237
+ this.emissionFrom,
238
+ computeHashFloat(this.emissionRate),
239
+ this.emissionImmediate,
240
+ this.parameterTracks.hash(),
241
+ this.position.hash(),
242
+ this.scale.hash(),
243
+ this.particleVelocityDirection.hash(),
244
+ this.particleSpeed.hash()
245
+ );
315
246
  }
316
247
 
317
- if (json.position !== undefined) {
318
- this.position.fromJSON(json.position);
319
- } else {
320
- this.position.set(0, 0, 0);
248
+ /**
249
+ *
250
+ * @param {ParticleLayer} other
251
+ * @returns {boolean}
252
+ */
253
+ equals(other) {
254
+ return this.imageURL === other.imageURL
255
+ && this.particleLife.equals(other.particleLife)
256
+ && this.particleSize.equals(other.particleSize)
257
+ && this.particleRotation.equals(other.particleRotation)
258
+ && this.particleRotationSpeed.equals(other.particleRotationSpeed)
259
+ && this.emissionShape === other.emissionShape
260
+ && this.emissionFrom === other.emissionFrom
261
+ && this.emissionRate === other.emissionRate
262
+ && this.emissionImmediate === other.emissionImmediate
263
+ && this.parameterTracks.equals(other.parameterTracks)
264
+ && this.position.equals(other.position)
265
+ && this.scale.equals(other.scale)
266
+ && this.particleVelocityDirection.equals(other.particleVelocityDirection)
267
+ && this.particleSpeed.equals(other.particleSpeed);
321
268
  }
322
269
 
323
- if (json.scale !== undefined) {
324
- this.scale.fromJSON(json.scale);
325
- } else {
326
- this.scale.set(1, 1, 1);
270
+ toJSON() {
271
+ return {
272
+ imageURL: this.imageURL,
273
+ particleLife: this.particleLife.toJSON(),
274
+ particleSize: this.particleSize.toJSON(),
275
+ particleRotation: this.particleRotation.toJSON(),
276
+ particleRotationSpeed: this.particleRotationSpeed.toJSON(),
277
+ emissionShape: this.emissionShape,
278
+ emissionFrom: this.emissionFrom,
279
+ emissionRate: this.emissionRate,
280
+ emissionImmediate: this.emissionImmediate,
281
+ parameterTracks: this.parameterTracks.toJSON(),
282
+ position: this.position.toJSON(),
283
+ scale: this.scale.toJSON(),
284
+ particleVelocityDirection: this.particleVelocityDirection.toJSON(),
285
+ particleSpeed: this.particleSpeed.toJSON(),
286
+ steps: this.steps.toJSON()
287
+ };
327
288
  }
328
289
 
329
- if (json.particleVelocityDirection !== undefined) {
330
- this.particleVelocityDirection.fromJSON(json.particleVelocityDirection);
331
- } else {
332
- this.particleVelocityDirection.angle = Math.PI;
333
- this.particleVelocityDirection.direction.set(0, 1, 0);
290
+ fromJSON(json) {
291
+ this.imageURL = json.imageURL;
292
+ this.particleLife.fromJSON(json.particleLife);
293
+ this.particleSize.fromJSON(json.particleSize);
294
+ this.particleRotation.fromJSON(json.particleRotation);
295
+ this.particleRotationSpeed.fromJSON(json.particleRotationSpeed);
296
+ this.emissionShape = json.emissionShape;
297
+ this.emissionFrom = json.emissionFrom;
298
+
299
+ if (typeof json.emissionRate === "number") {
300
+ this.emissionRate = json.emissionRate;
301
+ } else {
302
+ this.emissionRate = 1;
303
+ }
304
+
305
+ if (typeof json.emissionImmediate === "number") {
306
+ this.emissionImmediate = json.emissionImmediate;
307
+ } else {
308
+ this.emissionImmediate = 0;
309
+ }
310
+
311
+ if (json.parameterTracks !== undefined) {
312
+ this.parameterTracks.fromJSON(json.parameterTracks);
313
+ } else {
314
+ this.parameterTracks.clear();
315
+ }
316
+
317
+ if (json.position !== undefined) {
318
+ this.position.fromJSON(json.position);
319
+ } else {
320
+ this.position.set(0, 0, 0);
321
+ }
322
+
323
+ if (json.scale !== undefined) {
324
+ this.scale.fromJSON(json.scale);
325
+ } else {
326
+ this.scale.set(1, 1, 1);
327
+ }
328
+
329
+ if (json.particleVelocityDirection !== undefined) {
330
+ this.particleVelocityDirection.fromJSON(json.particleVelocityDirection);
331
+ } else {
332
+ this.particleVelocityDirection.angle = Math.PI;
333
+ this.particleVelocityDirection.direction.set(0, 1, 0);
334
+ }
335
+
336
+ if (json.particleSpeed !== undefined) {
337
+ this.particleSpeed.fromJSON(json.particleSpeed);
338
+ } else {
339
+ this.particleSpeed.set(0, 0);
340
+ }
341
+
342
+ if (json.steps !== undefined) {
343
+ this.steps.fromJSON(json.steps, SimulationStepDefinition);
344
+ } else {
345
+ // steps are not defined, use "fixed physics" for backwards compatibility
346
+
347
+ this.steps.reset();
348
+ this.steps.add(SimulationStepDefinition.from(SimulationStepType.FixedPhysics, []));
349
+ }
350
+
351
+ //reset bounds attributes
352
+ this.scaledSpriteHalfSize = -1;
334
353
  }
335
354
 
336
- if (json.particleSpeed !== undefined) {
337
- this.particleSpeed.fromJSON(json.particleSpeed);
338
- } else {
339
- this.particleSpeed.set(0, 0);
355
+ /**
356
+ * @deprecated
357
+ * @param {BinaryBuffer} buffer
358
+ */
359
+ toBinaryBuffer(buffer) {
360
+ buffer.writeUTF8String(this.imageURL);
361
+ this.particleLife.toBinaryBuffer(buffer);
362
+ this.particleSize.toBinaryBuffer(buffer);
363
+ this.particleRotation.toBinaryBuffer(buffer);
364
+ this.particleRotationSpeed.toBinaryBuffer(buffer);
365
+ buffer.writeUint8(this.emissionShape);
366
+ buffer.writeUint8(this.emissionFrom);
367
+ buffer.writeFloat64(this.emissionRate);
368
+ buffer.writeUint32(this.emissionImmediate);
369
+ this.parameterTracks.toBinaryBuffer(buffer);
370
+ this.position.toBinaryBufferFloat32(buffer);
371
+ this.scale.toBinaryBufferFloat32(buffer);
372
+ this.particleVelocityDirection.toBinaryBuffer(buffer);
373
+ this.particleSpeed.toBinaryBuffer(buffer);
340
374
  }
341
375
 
342
- if (json.steps !== undefined) {
343
- this.steps.fromJSON(json.steps, SimulationStepDefinition);
344
- } else {
345
- // steps are not defined, use "fixed physics" for backwards compatibility
346
-
347
- this.steps.reset();
348
- this.steps.add(SimulationStepDefinition.from(SimulationStepType.FixedPhysics, []));
376
+ /**
377
+ * @deprecated
378
+ * @param {BinaryBuffer} buffer
379
+ */
380
+ fromBinaryBuffer(buffer) {
381
+ this.imageURL = buffer.readUTF8String();
382
+ this.particleLife.fromBinaryBuffer(buffer);
383
+ this.particleSize.fromBinaryBuffer(buffer);
384
+ this.particleRotation.fromBinaryBuffer(buffer);
385
+ this.particleRotationSpeed.fromBinaryBuffer(buffer);
386
+ this.emissionShape = buffer.readUint8();
387
+ this.emissionFrom = buffer.readUint8();
388
+ this.emissionRate = buffer.readFloat64();
389
+ this.emissionImmediate = buffer.readUint32();
390
+ this.parameterTracks.fromBinaryBuffer(buffer);
391
+ this.position.fromBinaryBufferFloat32(buffer);
392
+ this.scale.fromBinaryBufferFloat32(buffer);
393
+ this.particleVelocityDirection.fromBinaryBuffer(buffer);
394
+ this.particleSpeed.fromBinaryBuffer(buffer);
395
+
396
+ //reset bounds attributes
397
+ this.scaledSpriteHalfSize = -1;
349
398
  }
350
-
351
- //reset bounds attributes
352
- this.scaledSpriteHalfSize = -1;
353
- };
354
-
355
- /**
356
- * @deprecated
357
- * @param {BinaryBuffer} buffer
358
- */
359
- ParticleLayer.prototype.toBinaryBuffer = function (buffer) {
360
- buffer.writeUTF8String(this.imageURL);
361
- this.particleLife.toBinaryBuffer(buffer);
362
- this.particleSize.toBinaryBuffer(buffer);
363
- this.particleRotation.toBinaryBuffer(buffer);
364
- this.particleRotationSpeed.toBinaryBuffer(buffer);
365
- buffer.writeUint8(this.emissionShape);
366
- buffer.writeUint8(this.emissionFrom);
367
- buffer.writeFloat64(this.emissionRate);
368
- buffer.writeUint32(this.emissionImmediate);
369
- this.parameterTracks.toBinaryBuffer(buffer);
370
- this.position.toBinaryBufferFloat32(buffer);
371
- this.scale.toBinaryBufferFloat32(buffer);
372
- this.particleVelocityDirection.toBinaryBuffer(buffer);
373
- this.particleSpeed.toBinaryBuffer(buffer);
374
- };
375
-
376
- /**
377
- * @deprecated
378
- * @param {BinaryBuffer} buffer
379
- */
380
- ParticleLayer.prototype.fromBinaryBuffer = function (buffer) {
381
- this.imageURL = buffer.readUTF8String();
382
- this.particleLife.fromBinaryBuffer(buffer);
383
- this.particleSize.fromBinaryBuffer(buffer);
384
- this.particleRotation.fromBinaryBuffer(buffer);
385
- this.particleRotationSpeed.fromBinaryBuffer(buffer);
386
- this.emissionShape = buffer.readUint8();
387
- this.emissionFrom = buffer.readUint8();
388
- this.emissionRate = buffer.readFloat64();
389
- this.emissionImmediate = buffer.readUint32();
390
- this.parameterTracks.fromBinaryBuffer(buffer);
391
- this.position.fromBinaryBufferFloat32(buffer);
392
- this.scale.fromBinaryBufferFloat32(buffer);
393
- this.particleVelocityDirection.fromBinaryBuffer(buffer);
394
- this.particleSpeed.fromBinaryBuffer(buffer);
395
-
396
- //reset bounds attributes
397
- this.scaledSpriteHalfSize = -1;
398
- };
399
-
400
- export { ParticleLayer };
399
+ }