@hellpig/anarchy-engine 22.0.2 → 22.0.3

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 (371) hide show
  1. package/dist/Abstract/Entities/AbstractEntity.js.map +1 -1
  2. package/dist/Abstract/Factories/AbstractFactory.js.map +1 -1
  3. package/dist/Abstract/Factories/ReactiveFactory.js.map +1 -1
  4. package/dist/Abstract/Loaders/AbstractLoader.js.map +1 -1
  5. package/dist/Abstract/Mixins/WithWrapperIdMixin.js.map +1 -1
  6. package/dist/Abstract/Models/THtmlElementStyleDeclaration.d.ts +4 -4
  7. package/dist/Abstract/Registries/AbstractEntityAsyncRegistry.js.map +1 -1
  8. package/dist/Abstract/Registries/AbstractEntityRegistry.js.map +1 -1
  9. package/dist/Abstract/Registries/AbstractResourceAsyncRegistry.js.map +1 -1
  10. package/dist/Abstract/Registries/AbstractSimpleRegistry.js.map +1 -1
  11. package/dist/Abstract/Registries/AbstractWatcherRegistry.js.map +1 -1
  12. package/dist/Abstract/Registries/Mixin/Registry/WithBaseAccessorsRegistry.js.map +1 -1
  13. package/dist/Abstract/Registries/Mixin/Registry/WithReactiveRegistry.js.map +1 -1
  14. package/dist/Abstract/Services/AbstractService.js.map +1 -1
  15. package/dist/Abstract/Watchers/AbstractWatcher.js.map +1 -1
  16. package/dist/Abstract/Watchers/AbstractWatcherWithState.js.map +1 -1
  17. package/dist/Abstract/Wrappers/AbstractWrapper.js.map +1 -1
  18. package/dist/Actor/Adapters/ConfigToParams.js.map +1 -1
  19. package/dist/Actor/Adapters/EntityToConfig.js.map +1 -1
  20. package/dist/Actor/Adapters/Helpers/ActorStatesConfigToParams.js.map +1 -1
  21. package/dist/Actor/Adapters/Helpers/Model3dSettingsConfigToParams.js.map +1 -1
  22. package/dist/Actor/Entities/Actor/Actor.js.map +1 -1
  23. package/dist/Actor/Factories/ActorFactory.js.map +1 -1
  24. package/dist/Actor/Mixins/WithActorStates.js.map +1 -1
  25. package/dist/Actor/Registries/ActorRegistry.js.map +1 -1
  26. package/dist/Actor/Registries/Model3dToActorConnectionRegistry.js.map +1 -1
  27. package/dist/Actor/Services/ActorService.js.map +1 -1
  28. package/dist/Actor/TransformDrive/ActorTransformDrive.js.map +1 -1
  29. package/dist/Actor/Utils/ActorUtils.js.map +1 -1
  30. package/dist/Animations/Adapters/EntityToConfig.js.map +1 -1
  31. package/dist/Animations/Loader/AnimationsLoader.js.map +1 -1
  32. package/dist/Animations/Registries/AnimationsMetaInfoRegistry.js.map +1 -1
  33. package/dist/Animations/Registries/AnimationsResourceAsyncRegistry.js.map +1 -1
  34. package/dist/Animations/Services/AnimationsService.js.map +1 -1
  35. package/dist/Animations/Utils/SerializationUtils.js.map +1 -1
  36. package/dist/Audio/Adapters/AudioConfigToParams.js.map +1 -1
  37. package/dist/Audio/Adapters/EntityToConfig.js.map +1 -1
  38. package/dist/Audio/Factories/AudioFactory.js.map +1 -1
  39. package/dist/Audio/Loader/AudioLoader.js.map +1 -1
  40. package/dist/Audio/Registries/AudioListenersRegistry.js.map +1 -1
  41. package/dist/Audio/Registries/AudioMetaInfoRegistry.js.map +1 -1
  42. package/dist/Audio/Registries/AudioRegistry.js.map +1 -1
  43. package/dist/Audio/Registries/AudioResourceAsyncRegistry.js.map +1 -1
  44. package/dist/Audio/Services/AudioService.js.map +1 -1
  45. package/dist/Audio/TransformDrive/Audio3dTransformDrive.js.map +1 -1
  46. package/dist/Audio/Utils/AudioUtils.js.map +1 -1
  47. package/dist/Audio/Utils/DebugAudioRenderer.js.map +1 -1
  48. package/dist/Audio/Wrappers/AbstractAudioWrapper.js.map +1 -1
  49. package/dist/Audio/Wrappers/Audio3dWrapper.js.map +1 -1
  50. package/dist/Audio/Wrappers/AudioWrapper.js.map +1 -1
  51. package/dist/Camera/Adapters/ConfigToParams.js.map +1 -1
  52. package/dist/Camera/Adapters/EntityToConfig.js.map +1 -1
  53. package/dist/Camera/Factories/CameraFactory.js.map +1 -1
  54. package/dist/Camera/Registries/AbstractCameraRegistry.js.map +1 -1
  55. package/dist/Camera/Services/CameraService.js.map +1 -1
  56. package/dist/Camera/TransformDrive/CameraTransformDrive.js.map +1 -1
  57. package/dist/Camera/Utils/CameraUtils.js.map +1 -1
  58. package/dist/Camera/Wrappers/Accessors.js.map +1 -1
  59. package/dist/Camera/Wrappers/OrthographicCameraWrapper.js.map +1 -1
  60. package/dist/Camera/Wrappers/PerspectiveCameraWrapper.js.map +1 -1
  61. package/dist/Collisions/Mixins/WithCollisions.js.map +1 -1
  62. package/dist/Collisions/Services/BvhService.js.map +1 -1
  63. package/dist/Collisions/Services/CollisionsService.js.map +1 -1
  64. package/dist/Color/Adapters/EntityToConfig.js.map +1 -1
  65. package/dist/Color/Wrappers/ColorWrapper.js.map +1 -1
  66. package/dist/Context/AmbientContext/AmbientContext.js.map +1 -1
  67. package/dist/Controls/Adapters/ConfigToParams.js.map +1 -1
  68. package/dist/Controls/Adapters/EntityToConfig.js.map +1 -1
  69. package/dist/Controls/Factories/ControlsFactory.js.map +1 -1
  70. package/dist/Controls/Loop/ControlsLoopEffect.js.map +1 -1
  71. package/dist/Controls/Registries/ControlsRegistry.js.map +1 -1
  72. package/dist/Controls/Services/ControlsService.js.map +1 -1
  73. package/dist/Controls/Utils/ControlsUtils.js.map +1 -1
  74. package/dist/Controls/Wrappers/FpsControls/FpsControlsAccessors.js.map +1 -1
  75. package/dist/Controls/Wrappers/FpsControls/FpsControlsWrapper.js.map +1 -1
  76. package/dist/Controls/Wrappers/FpsControls/FpsControlsWrapperHelper.js.map +1 -1
  77. package/dist/Controls/Wrappers/OrbitControls/OrbitControlsAccessors.js.map +1 -1
  78. package/dist/Controls/Wrappers/OrbitControls/OrbitControlsWrapper.js.map +1 -1
  79. package/dist/Controls/Wrappers/OrbitControls/OrbitControlsWrapperHelper.js.map +1 -1
  80. package/dist/Distance/Utils/DistanceUtils.js.map +1 -1
  81. package/dist/EnvMap/Adapters/ConfigToParams.js.map +1 -1
  82. package/dist/EnvMap/Adapters/EntityToConfig.js.map +1 -1
  83. package/dist/EnvMap/Factories/EnvMapFactory.js.map +1 -1
  84. package/dist/EnvMap/Loader/EnvMapLoader.js.map +1 -1
  85. package/dist/EnvMap/Registries/EnvMapMetaInfoRegistry.js.map +1 -1
  86. package/dist/EnvMap/Registries/EnvMapRegistry.js.map +1 -1
  87. package/dist/EnvMap/Registries/EnvMapTextureAsyncRegistry.js.map +1 -1
  88. package/dist/EnvMap/Services/EnvMapService.js.map +1 -1
  89. package/dist/EnvMap/Wrappers/EnvMapWrapper.js.map +1 -1
  90. package/dist/Fog/Adapters/ConfigToParams.js.map +1 -1
  91. package/dist/Fog/Adapters/EntityToConfig.js.map +1 -1
  92. package/dist/Fog/Factories/FogFactory.js.map +1 -1
  93. package/dist/Fog/Registries/FogRegistry.js.map +1 -1
  94. package/dist/Fog/Services/FogService.js.map +1 -1
  95. package/dist/Fog/Wrappers/FogWrapper.js.map +1 -1
  96. package/dist/Fsm/Adapters/ConfigToParams.js.map +1 -1
  97. package/dist/Fsm/Adapters/EntityToConfig.js.map +1 -1
  98. package/dist/Fsm/Entities/FsmSource.js.map +1 -1
  99. package/dist/Fsm/Factories/FsmInstanceFactory.js.map +1 -1
  100. package/dist/Fsm/Factories/FsmSourceFactory.js.map +1 -1
  101. package/dist/Fsm/Registries/FsmInstanceRegistry.js.map +1 -1
  102. package/dist/Fsm/Registries/FsmSourceRegistry.js.map +1 -1
  103. package/dist/Fsm/Services/FsmInstanceService.js.map +1 -1
  104. package/dist/Fsm/Services/FsmService.js.map +1 -1
  105. package/dist/Fsm/Services/FsmSourceService.js.map +1 -1
  106. package/dist/Fsm/Wrappers/FsmWrapper.js.map +1 -1
  107. package/dist/Global/Decorators/ContainerDecorator.js.map +1 -1
  108. package/dist/Global/Utils/ContainerUtils.js.map +1 -1
  109. package/dist/Intersections/Adapters/ConfigToParams.js.map +1 -1
  110. package/dist/Intersections/Adapters/EntityToConfig.js.map +1 -1
  111. package/dist/Intersections/Factories/IntersectionsWatcherFactory.js.map +1 -1
  112. package/dist/Intersections/Registries/IntersectionsWatcherRegistry.js.map +1 -1
  113. package/dist/Intersections/Services/IntersectionsWatcherService.js.map +1 -1
  114. package/dist/Intersections/Utils/IntersectionsWatcherUtils.js.map +1 -1
  115. package/dist/Intersections/Watchers/AbstractIntersectionsWatcher.js.map +1 -1
  116. package/dist/Intersections/Watchers/IntersectionsCameraWatcher.js.map +1 -1
  117. package/dist/Intersections/Watchers/IntersectionsDirectionWatcher.js.map +1 -1
  118. package/dist/Keyboard/Factories/KeyWatcherFactory.js.map +1 -1
  119. package/dist/Keyboard/Registries/KeyWatcherRegistry.js.map +1 -1
  120. package/dist/Keyboard/Services/KeyboardService.js.map +1 -1
  121. package/dist/Keyboard/Utils/KeysRxJsUtils.js.map +1 -1
  122. package/dist/Keyboard/Utils/KeysUtils.js.map +1 -1
  123. package/dist/Keyboard/Watchers/KeyComboWatcher.js.map +1 -1
  124. package/dist/Keyboard/Watchers/KeyPressWatcher.js.map +1 -1
  125. package/dist/Keyboard/Watchers/KeyReleaseWatcher.js.map +1 -1
  126. package/dist/Kinematic/Adapters/ConfigToParams.js.map +1 -1
  127. package/dist/Kinematic/Adapters/EntityToConfig.js.map +1 -1
  128. package/dist/Kinematic/Constants/KinematicConstants.js.map +1 -1
  129. package/dist/Kinematic/Utils/KinematicUtils.js.map +1 -1
  130. package/dist/Light/Adapters/ConfigToParams.js.map +1 -1
  131. package/dist/Light/Adapters/EntityToConfig.js.map +1 -1
  132. package/dist/Light/Factories/LightFactory.js.map +1 -1
  133. package/dist/Light/Registries/LightRegistry.js.map +1 -1
  134. package/dist/Light/Services/LightService.js.map +1 -1
  135. package/dist/Light/TransformDrive/LightTransformDrive.js.map +1 -1
  136. package/dist/Light/Utils/Utils.js.map +1 -1
  137. package/dist/Light/Wrappers/AbstractLightWrapper.js.map +1 -1
  138. package/dist/Light/Wrappers/AmbientLightWrapper.js.map +1 -1
  139. package/dist/Light/Wrappers/DirectionalLightWrapper.js.map +1 -1
  140. package/dist/Light/Wrappers/HemisphereLightWrapper.js.map +1 -1
  141. package/dist/Light/Wrappers/LightWrapperHelper.js.map +1 -1
  142. package/dist/Light/Wrappers/PointLightWrapper.js.map +1 -1
  143. package/dist/Light/Wrappers/RectAreaLightWrapper.js.map +1 -1
  144. package/dist/Light/Wrappers/SpotLightWrapper.js.map +1 -1
  145. package/dist/LoadingManager/Factories/LoadingManagerFactory.js.map +1 -1
  146. package/dist/LoadingManager/Registries/LoadingManagerRegistry.js.map +1 -1
  147. package/dist/LoadingManager/Services/LoadingManagerService.js.map +1 -1
  148. package/dist/LoadingManager/Wrappers/LoadingManagerWrapper.js.map +1 -1
  149. package/dist/Loop/Constants/LoopsDefaultSettings.js.map +1 -1
  150. package/dist/Loop/Entities/DeltaCalculator.js.map +1 -1
  151. package/dist/Loop/Entities/Loop.js.map +1 -1
  152. package/dist/Loop/Factories/LoopFactory.js.map +1 -1
  153. package/dist/Loop/Registries/LoopRegistry.js.map +1 -1
  154. package/dist/Loop/Services/LoopService.js.map +1 -1
  155. package/dist/Loop/Utils/LoopDebugUtils.js.map +1 -1
  156. package/dist/Loop/Utils/LoopUtils.js.map +1 -1
  157. package/dist/Material/Adapters/ConfigToParams.js.map +1 -1
  158. package/dist/Material/Adapters/EntityToConfig.js.map +1 -1
  159. package/dist/Material/Constants/Material/MaterialMap.js.map +1 -1
  160. package/dist/Material/Factories/MaterialFactory.js.map +1 -1
  161. package/dist/Material/Mixins/WithMaterial.js.map +1 -1
  162. package/dist/Material/Registries/MaterialRegistry.js.map +1 -1
  163. package/dist/Material/Services/MaterialService.js.map +1 -1
  164. package/dist/Material/Utils/MaterialUtils.js.map +1 -1
  165. package/dist/Material/Wrappers/MaterialWrapper.js.map +1 -1
  166. package/dist/Math/Utils/AnglesUtils.js.map +1 -1
  167. package/dist/Math/Utils/DistanceUtils.js.map +1 -1
  168. package/dist/Measurements/Constants/Distance.js.map +1 -1
  169. package/dist/Measurements/Constants/Time.js.map +1 -1
  170. package/dist/Measurements/Utils/MeasurementsUtils.d.ts +1 -1
  171. package/dist/Measurements/Utils/MeasurementsUtils.js.map +1 -1
  172. package/dist/Mixins/GameObjects/Mixins/Movable/WithMoveBy2dMixin.js.map +1 -1
  173. package/dist/Mixins/GameObjects/Mixins/Movable/WithMoveBy3dMixin.js.map +1 -1
  174. package/dist/Mixins/GameObjects/Mixins/Movable/WithMoveBy4dMixin.js.map +1 -1
  175. package/dist/Mixins/GameObjects/Mixins/Movable/WithMoveByWMixin.js.map +1 -1
  176. package/dist/Mixins/GameObjects/Mixins/Movable/WithMoveByXMixin.js.map +1 -1
  177. package/dist/Mixins/GameObjects/Mixins/Movable/WithMoveByYMixin.js.map +1 -1
  178. package/dist/Mixins/GameObjects/Mixins/Movable/WithMoveByZMixin.js.map +1 -1
  179. package/dist/Mixins/GameObjects/Mixins/Position/WithPosition2dMixin.js.map +1 -1
  180. package/dist/Mixins/GameObjects/Mixins/Position/WithPosition3dMixin.js.map +1 -1
  181. package/dist/Mixins/GameObjects/Mixins/Position/WithPosition4dMixin.js.map +1 -1
  182. package/dist/Mixins/GameObjects/Mixins/Position/WithPositionMixin.js.map +1 -1
  183. package/dist/Mixins/GameObjects/Mixins/Rotatable/WithRotationByWMixin.js.map +1 -1
  184. package/dist/Mixins/GameObjects/Mixins/Rotatable/WithRotationByXMixin.js.map +1 -1
  185. package/dist/Mixins/GameObjects/Mixins/Rotatable/WithRotationByXyzMixin.js.map +1 -1
  186. package/dist/Mixins/GameObjects/Mixins/Rotatable/WithRotationByYMixin.js.map +1 -1
  187. package/dist/Mixins/GameObjects/Mixins/Rotatable/WithRotationByZMixin.js.map +1 -1
  188. package/dist/Mixins/GameObjects/Mixins/Rotatable/WithRotationMixin.js.map +1 -1
  189. package/dist/Mixins/GameObjects/Mixins/Scalable/WithScaleMixin.js.map +1 -1
  190. package/dist/Mixins/GameObjects/Mixins/WithObject3D.js.map +1 -1
  191. package/dist/Mixins/Generics/DestroyableMixin.js.map +1 -1
  192. package/dist/Mixins/Generics/ExtractSerializableRegistrableFields.js.map +1 -1
  193. package/dist/Mixins/Generics/WithActiveEntityServiceMixin.js.map +1 -1
  194. package/dist/Mixins/Generics/WithActiveMixin.js.map +1 -1
  195. package/dist/Mixins/Generics/WithNameAndNameAccessorsMixin.js.map +1 -1
  196. package/dist/Mixins/Services/WithCreateFromConfigService.js.map +1 -1
  197. package/dist/Mixins/Services/WithCreateService.js.map +1 -1
  198. package/dist/Mixins/Services/WithFactoryService.js.map +1 -1
  199. package/dist/Mixins/Services/WithRegistryService.js.map +1 -1
  200. package/dist/Mixins/Services/WithSceneGetterService.js.map +1 -1
  201. package/dist/Mixins/Services/WithSerializableEntities.js.map +1 -1
  202. package/dist/Mixins/Services/WithSerializeAllResources.js.map +1 -1
  203. package/dist/Models3d/Adapters/ConfigToParams.js.map +1 -1
  204. package/dist/Models3d/Adapters/EntityToConfig.js.map +1 -1
  205. package/dist/Models3d/Entities/Model3d.js.map +1 -1
  206. package/dist/Models3d/Factories/Models3dFactory.js.map +1 -1
  207. package/dist/Models3d/Loaders/Loader3dCore.js.map +1 -1
  208. package/dist/Models3d/Loaders/Models3dLoader.js.map +1 -1
  209. package/dist/Models3d/Mixins/WithModel3dEntities.js.map +1 -1
  210. package/dist/Models3d/Registries/Model3dRawToModel3dConnectionRegistry.js.map +1 -1
  211. package/dist/Models3d/Registries/Models3dMetaInfoRegistry.js.map +1 -1
  212. package/dist/Models3d/Registries/Models3dRegistry.js.map +1 -1
  213. package/dist/Models3d/Registries/Models3dResourceAsyncRegistry.js.map +1 -1
  214. package/dist/Models3d/Services/Models3dService.js.map +1 -1
  215. package/dist/Models3d/Utils/SerializationUtils.js.map +1 -1
  216. package/dist/Models3d/Utils/UtilsModel3d.js.map +1 -1
  217. package/dist/Models3d/Utils/UtilsModels3dService.js.map +1 -1
  218. package/dist/Models3d/Utils/UtilsPrimitiveModels3d.js.map +1 -1
  219. package/dist/Mouse/Factories/MouseClickWatcherFactory.js.map +1 -1
  220. package/dist/Mouse/Factories/MousePositionWatcherFactory.js.map +1 -1
  221. package/dist/Mouse/Registries/MouseClickWatcherRegistry.js.map +1 -1
  222. package/dist/Mouse/Registries/MousePositionWatcherRegistry.js.map +1 -1
  223. package/dist/Mouse/Services/MouseService.js.map +1 -1
  224. package/dist/Mouse/Utils/MouseUtils.js.map +1 -1
  225. package/dist/Mouse/Watchers/MouseClickWatcher.js.map +1 -1
  226. package/dist/Mouse/Watchers/MousePositionWatcher.js.map +1 -1
  227. package/dist/Particles/Adapters/ConfigToParams.js.map +1 -1
  228. package/dist/Particles/Adapters/EntityToConfig.js.map +1 -1
  229. package/dist/Particles/Factories/ParticlesFactory.js.map +1 -1
  230. package/dist/Particles/Registries/ParticlesRegistry.js.map +1 -1
  231. package/dist/Particles/Services/ParticlesService.js.map +1 -1
  232. package/dist/Particles/TransformDrive/ParticlesTransformDrive.js.map +1 -1
  233. package/dist/Particles/Wrappers/ParticlesWrapper.js.map +1 -1
  234. package/dist/Physics/Adapters/EntityToConfig.d.ts +1 -1
  235. package/dist/Physics/Adapters/EntityToConfig.js.map +1 -1
  236. package/dist/Physics/Adapters/PhysicsBodyConfigToParams.js.map +1 -1
  237. package/dist/Physics/Adapters/PhysicsWorldConfigToParams.js.map +1 -1
  238. package/dist/Physics/Constants/RigidBodyTypesMap.d.ts +1 -1
  239. package/dist/Physics/Constants/RigidBodyTypesMap.js +1 -1
  240. package/dist/Physics/Constants/RigidBodyTypesMap.js.map +1 -1
  241. package/dist/Physics/Entities/PhysicsBody.js.map +1 -1
  242. package/dist/Physics/Entities/PhysicsBodyUtils.d.ts +1 -1
  243. package/dist/Physics/Entities/PhysicsBodyUtils.js +1 -1
  244. package/dist/Physics/Entities/PhysicsBodyUtils.js.map +1 -1
  245. package/dist/Physics/Factories/PhysicsBodyFactory.js.map +1 -1
  246. package/dist/Physics/Mixins/WithPhysicsBodyEntities.js.map +1 -1
  247. package/dist/Physics/Models/TPhysicsWorldService.d.ts +1 -1
  248. package/dist/Physics/Registries/PhysicsBodyRegistry.js.map +1 -1
  249. package/dist/Physics/Renderers/PhysicsDebugRenderer.d.ts +1 -1
  250. package/dist/Physics/Renderers/PhysicsDebugRenderer.js.map +1 -1
  251. package/dist/Physics/Services/PhysicsBodyService.js.map +1 -1
  252. package/dist/Physics/Services/PhysicsWorldService.js +1 -1
  253. package/dist/Physics/Services/PhysicsWorldService.js.map +1 -1
  254. package/dist/Physics/Utils/ParamsUtils.js.map +1 -1
  255. package/dist/Physics/Utils/PhysicsMovementUtils.d.ts +2 -2
  256. package/dist/Physics/Utils/PhysicsMovementUtils.js +1 -1
  257. package/dist/Physics/Utils/PhysicsMovementUtils.js.map +1 -1
  258. package/dist/Renderer/Adapters/ConfigToParams.js.map +1 -1
  259. package/dist/Renderer/Adapters/EntityToConfig.js.map +1 -1
  260. package/dist/Renderer/Factories/RendererFactory.js.map +1 -1
  261. package/dist/Renderer/Loop/RendererLoopEffect.js.map +1 -1
  262. package/dist/Renderer/Mixins/WithThreeJsRendererParamsAccessors.js.map +1 -1
  263. package/dist/Renderer/Mixins/WithThreeJsRendererPropsAccessors.js.map +1 -1
  264. package/dist/Renderer/Registries/RendererRegistry.js.map +1 -1
  265. package/dist/Renderer/Services/RendererService.js.map +1 -1
  266. package/dist/Renderer/Wrappers/Accessors.js.map +1 -1
  267. package/dist/Renderer/Wrappers/RendererWrapper.js.map +1 -1
  268. package/dist/Scene/Adapters/ConfigToParams.js.map +1 -1
  269. package/dist/Scene/Adapters/EntityToConfig.js.map +1 -1
  270. package/dist/Scene/Factories/SceneFactory.js.map +1 -1
  271. package/dist/Scene/Registries/SceneRegistry.js.map +1 -1
  272. package/dist/Scene/Services/ScenesService.js.map +1 -1
  273. package/dist/Scene/Wrappers/SceneWrapper.js.map +1 -1
  274. package/dist/Space/Adapters/ConfigToParams.js.map +1 -1
  275. package/dist/Space/Adapters/EntityToConfig.js.map +1 -1
  276. package/dist/Space/Entities/Space.js.map +1 -1
  277. package/dist/Space/Entities/SpaceFromConfig.js.map +1 -1
  278. package/dist/Space/Factories/SpaceFactory.js.map +1 -1
  279. package/dist/Space/Registries/SpaceRegistry.js.map +1 -1
  280. package/dist/Space/Services/SpaceService.js.map +1 -1
  281. package/dist/Space/Utils/CanvasUtils.js.map +1 -1
  282. package/dist/Space/Utils/CreateEntitiesUtils.js.map +1 -1
  283. package/dist/Space/Utils/CreateLoopsUtils.js.map +1 -1
  284. package/dist/Space/Utils/LoadResourcesUtils.js.map +1 -1
  285. package/dist/Space/Utils/PrepareServicesUtils.js.map +1 -1
  286. package/dist/Space/Utils/SchemaValidationUtils.js.map +1 -1
  287. package/dist/Space/Validators/SchemasValidator.js.map +1 -1
  288. package/dist/Space/Validators/ValidateConfig.js.map +1 -1
  289. package/dist/Space/Validators/ValidateSpace.js.map +1 -1
  290. package/dist/Spatial/Adapters/ConfigToParams.js.map +1 -1
  291. package/dist/Spatial/Adapters/ConfigToParamsSpatialData.js.map +1 -1
  292. package/dist/Spatial/Adapters/EntityToConfig.js.map +1 -1
  293. package/dist/Spatial/Factories/SpatialGridFactory.js.map +1 -1
  294. package/dist/Spatial/Mixins/WithReactivePosition.js.map +1 -1
  295. package/dist/Spatial/Mixins/WithReactiveRotation.js.map +1 -1
  296. package/dist/Spatial/Mixins/WithSpatial.js.map +1 -1
  297. package/dist/Spatial/Mixins/WithUpdateSpatialCell.js.map +1 -1
  298. package/dist/Spatial/Registries/SpatialGridRegistry.js.map +1 -1
  299. package/dist/Spatial/Services/SpatialGridService.js.map +1 -1
  300. package/dist/Spatial/Services/SpatialHelper.js.map +1 -1
  301. package/dist/Spatial/Wrappers/SpatialCellWrapper.js.map +1 -1
  302. package/dist/Spatial/Wrappers/SpatialGridWrapper.js.map +1 -1
  303. package/dist/Text/Adapters/ConfigToParams.js.map +1 -1
  304. package/dist/Text/Adapters/EntityToConfig.js.map +1 -1
  305. package/dist/Text/Factories/TextFactory.js.map +1 -1
  306. package/dist/Text/Loop/TextLoopEffect.js.map +1 -1
  307. package/dist/Text/Registries/Text2dRegistry.js.map +1 -1
  308. package/dist/Text/Registries/Text2dRendererRegistry.js.map +1 -1
  309. package/dist/Text/Registries/Text3dRegistry.js.map +1 -1
  310. package/dist/Text/Registries/Text3dRendererRegistry.js.map +1 -1
  311. package/dist/Text/Registries/Text3dTextureRegistry.js.map +1 -1
  312. package/dist/Text/Renderers/Text2dRenderer.js.map +1 -1
  313. package/dist/Text/Renderers/Text3dRenderer.js.map +1 -1
  314. package/dist/Text/Renderers/TextRendererBuilder.js.map +1 -1
  315. package/dist/Text/Services/TextService.js.map +1 -1
  316. package/dist/Text/TransformDrive/TextTransformDrive.js.map +1 -1
  317. package/dist/Text/Utils/TextUtils.js.map +1 -1
  318. package/dist/Text/Wrappers/Accessors.js.map +1 -1
  319. package/dist/Text/Wrappers/Text2dWrapper.js.map +1 -1
  320. package/dist/Text/Wrappers/Text3dTextureWrapper.js.map +1 -1
  321. package/dist/Text/Wrappers/Text3dWrapper.js.map +1 -1
  322. package/dist/Text/Wrappers/TextTextureWrapper.js.map +1 -1
  323. package/dist/Text/Wrappers/TextWrapper.js.map +1 -1
  324. package/dist/Text/Wrappers/TextWrapperBuilder.js.map +1 -1
  325. package/dist/Text/Wrappers/TextWrapperHelper.js.map +1 -1
  326. package/dist/Texture/Loaders/TexturesLoader.js.map +1 -1
  327. package/dist/Texture/Registries/TextureMetaInfoRegistry.js.map +1 -1
  328. package/dist/Texture/Registries/TextureResourceAsyncRegistry.js.map +1 -1
  329. package/dist/Texture/Services/TextureService.js.map +1 -1
  330. package/dist/Texture/Utils/TextureServiceHelper.js.map +1 -1
  331. package/dist/ThreeLib/Utils/Object3dUtils.js.map +1 -1
  332. package/dist/TransformDrive/Adapters/EntityToConfig.js.map +1 -1
  333. package/dist/TransformDrive/Entities/Agents/AbstractTransformAgent.js.map +1 -1
  334. package/dist/TransformDrive/Entities/Agents/ConnectedTransformAgent.js.map +1 -1
  335. package/dist/TransformDrive/Entities/Agents/DefaultTransformAgent.js.map +1 -1
  336. package/dist/TransformDrive/Entities/Agents/KinematicTransformAgent.js.map +1 -1
  337. package/dist/TransformDrive/Entities/Agents/PhysicsTransformAgent.js.map +1 -1
  338. package/dist/TransformDrive/Entities/Connectors/DriveToTargetConnector.js.map +1 -1
  339. package/dist/TransformDrive/Entities/Drive/TransformDrive.js.map +1 -1
  340. package/dist/TransformDrive/Factories/TransformDriveFactory.js.map +1 -1
  341. package/dist/TransformDrive/Mixins/WithMutablePositionConnector.js.map +1 -1
  342. package/dist/TransformDrive/Mixins/WithMutableRotationConnector.js.map +1 -1
  343. package/dist/TransformDrive/Mixins/WithMutableScaleConnector.js.map +1 -1
  344. package/dist/TransformDrive/Mixins/WithProxyTransform.js.map +1 -1
  345. package/dist/TransformDrive/Registries/TransformDriveRegistry.js.map +1 -1
  346. package/dist/TransformDrive/Services/TransformDriveService.js.map +1 -1
  347. package/dist/TransformDrive/Utils/ActorDriveUtils.js.map +1 -1
  348. package/dist/TransformDrive/Utils/AgentUtils.js.map +1 -1
  349. package/dist/TransformDrive/Utils/KinematicAgentUtils.js.map +1 -1
  350. package/dist/TransformDrive/Utils/PhysicsTransformAgentUtils.d.ts +1 -1
  351. package/dist/TransformDrive/Utils/PhysicsTransformAgentUtils.js.map +1 -1
  352. package/dist/TransformDrive/Utils/TransformDriveUtils.js.map +1 -1
  353. package/dist/Utils/CheckUtils.js.map +1 -1
  354. package/dist/Utils/CoordsUtils.js.map +1 -1
  355. package/dist/Utils/DestroyUtils.js.map +1 -1
  356. package/dist/Utils/DomUtils.js.map +1 -1
  357. package/dist/Utils/EntityUtils.js.map +1 -1
  358. package/dist/Utils/RegistryAsyncUtils.js.map +1 -1
  359. package/dist/Utils/RegistryUtils.js.map +1 -1
  360. package/dist/Utils/RxJsUtils.js.map +1 -1
  361. package/dist/Utils/ScreenUtils.js.map +1 -1
  362. package/dist/Utils/TagsUtils.js.map +1 -1
  363. package/dist/Utils/TransformUtils.js.map +1 -1
  364. package/dist/Utils/WrapperHelpers.js.map +1 -1
  365. package/dist/assets/Loop.worker-D1bMWlsN.js.map +1 -1
  366. package/dist/packages/anarchy-shared/src/Utils/AsyncUtils.js.map +1 -1
  367. package/dist/packages/anarchy-shared/src/Utils/CssUtils.js.map +1 -1
  368. package/dist/packages/anarchy-shared/src/Utils/ObjectUtils.js.map +1 -1
  369. package/legal/NOTICE.md +1 -1
  370. package/legal/THIRD_PARTY_LICENSES.md +1 -1
  371. package/package.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"OrbitControlsWrapperHelper.js","sources":["../../../../src/Controls/Wrappers/OrbitControls/OrbitControlsWrapperHelper.ts"],"sourcesContent":["import type { TOrbitControlsParamsOptions, TOrbitControlsWrapper } from '@Anarchy/Engine/Controls/Models';\nimport { isDefined, isNotDefined } from '@Anarchy/Shared/Utils';\n\nexport function applyOrbitControlsParams(wrapper: TOrbitControlsWrapper, options: TOrbitControlsParamsOptions | undefined): void {\n if (isNotDefined(options)) return;\n\n if (isDefined(options.enableDamping)) wrapper.setDamping(options.enableDamping);\n if (isDefined(options.autoRotate)) wrapper.setAutoRotate(options.autoRotate);\n if (isDefined(options.minDistance)) wrapper.setMinDistance(options.minDistance);\n if (isDefined(options.maxDistance)) wrapper.setMaxDistance(options.maxDistance);\n if (isDefined(options.minZoom)) wrapper.setMinZoom(options.minZoom);\n if (isDefined(options.maxZoom)) wrapper.setMaxZoom(options.maxZoom);\n if (isDefined(options.minTargetRadius)) wrapper.setMinTargetRadius(options.minTargetRadius);\n if (isDefined(options.maxTargetRadius)) wrapper.setMaxTargetRadius(options.maxTargetRadius);\n if (isDefined(options.minPolarAngle)) wrapper.setMinPolarAngle(options.minPolarAngle);\n if (isDefined(options.maxPolarAngle)) wrapper.setMaxPolarAngle(options.maxPolarAngle);\n if (isDefined(options.minAzimuthAngle)) wrapper.setMinAzimuthAngle(options.minAzimuthAngle);\n if (isDefined(options.maxAzimuthAngle)) wrapper.setMaxAzimuthAngle(options.maxAzimuthAngle);\n if (isDefined(options.dampingFactor)) wrapper.setDampingFactor(options.dampingFactor);\n if (isDefined(options.enableZoom)) wrapper.setEnableZoom(options.enableZoom);\n if (isDefined(options.zoomSpeed)) wrapper.setZoomSpeed(options.zoomSpeed);\n if (isDefined(options.zoomToCursor)) wrapper.setZoomToCursor(options.zoomToCursor);\n if (isDefined(options.enableRotate)) wrapper.setEnableRotate(options.enableRotate);\n if (isDefined(options.rotateSpeed)) wrapper.setRotateSpeed(options.rotateSpeed);\n if (isDefined(options.enablePan)) wrapper.setEnablePan(options.enablePan);\n if (isDefined(options.panSpeed)) wrapper.setPanSpeed(options.panSpeed);\n if (isDefined(options.screenSpacePanning)) wrapper.setScreenSpacePanning(options.screenSpacePanning);\n if (isDefined(options.keyPanSpeed)) wrapper.setKeyPanSpeed(options.keyPanSpeed);\n if (isDefined(options.autoRotateSpeed)) wrapper.setAutoRotateSpeed(options.autoRotateSpeed);\n}\n"],"names":["applyOrbitControlsParams","wrapper","options","isNotDefined","isDefined","enableDamping","setDamping","autoRotate","setAutoRotate","minDistance","setMinDistance","maxDistance","setMaxDistance","minZoom","setMinZoom","maxZoom","setMaxZoom","minTargetRadius","setMinTargetRadius","maxTargetRadius","setMaxTargetRadius","minPolarAngle","setMinPolarAngle","maxPolarAngle","setMaxPolarAngle","minAzimuthAngle","setMinAzimuthAngle","maxAzimuthAngle","setMaxAzimuthAngle","dampingFactor","setDampingFactor","enableZoom","setEnableZoom","zoomSpeed","setZoomSpeed","zoomToCursor","setZoomToCursor","enableRotate","setEnableRotate","rotateSpeed","setRotateSpeed","enablePan","setEnablePan","panSpeed","setPanSpeed","screenSpacePanning","setScreenSpacePanning","keyPanSpeed","setKeyPanSpeed","autoRotateSpeed","setAutoRotateSpeed"],"mappings":"6FAGO,SAASA,yBAAyBC,QAAgCC,SACnEC,aAAaD,WAEbE,UAAUF,QAAQG,gBAAgBJ,QAAQK,WAAWJ,QAAQG,eAC7DD,UAAUF,QAAQK,aAAaN,QAAQO,cAAcN,QAAQK,YAC7DH,UAAUF,QAAQO,cAAcR,QAAQS,eAAeR,QAAQO,aAC/DL,UAAUF,QAAQS,cAAcV,QAAQW,eAAeV,QAAQS,aAC/DP,UAAUF,QAAQW,UAAUZ,QAAQa,WAAWZ,QAAQW,SACvDT,UAAUF,QAAQa,UAAUd,QAAQe,WAAWd,QAAQa,SACvDX,UAAUF,QAAQe,kBAAkBhB,QAAQiB,mBAAmBhB,QAAQe,iBACvEb,UAAUF,QAAQiB,kBAAkBlB,QAAQmB,mBAAmBlB,QAAQiB,iBACvEf,UAAUF,QAAQmB,gBAAgBpB,QAAQqB,iBAAiBpB,QAAQmB,eACnEjB,UAAUF,QAAQqB,gBAAgBtB,QAAQuB,iBAAiBtB,QAAQqB,eACnEnB,UAAUF,QAAQuB,kBAAkBxB,QAAQyB,mBAAmBxB,QAAQuB,iBACvErB,UAAUF,QAAQyB,kBAAkB1B,QAAQ2B,mBAAmB1B,QAAQyB,iBACvEvB,UAAUF,QAAQ2B,gBAAgB5B,QAAQ6B,iBAAiB5B,QAAQ2B,eACnEzB,UAAUF,QAAQ6B,aAAa9B,QAAQ+B,cAAc9B,QAAQ6B,YAC7D3B,UAAUF,QAAQ+B,YAAYhC,QAAQiC,aAAahC,QAAQ+B,WAC3D7B,UAAUF,QAAQiC,eAAelC,QAAQmC,gBAAgBlC,QAAQiC,cACjE/B,UAAUF,QAAQmC,eAAepC,QAAQqC,gBAAgBpC,QAAQmC,cACjEjC,UAAUF,QAAQqC,cAActC,QAAQuC,eAAetC,QAAQqC,aAC/DnC,UAAUF,QAAQuC,YAAYxC,QAAQyC,aAAaxC,QAAQuC,WAC3DrC,UAAUF,QAAQyC,WAAW1C,QAAQ2C,YAAY1C,QAAQyC,UACzDvC,UAAUF,QAAQ2C,qBAAqB5C,QAAQ6C,sBAAsB5C,QAAQ2C,oBAC7EzC,UAAUF,QAAQ6C,cAAc9C,QAAQ+C,eAAe9C,QAAQ6C,aAC/D3C,UAAUF,QAAQ+C,kBAAkBhD,QAAQiD,mBAAmBhD,QAAQ+C,iBAC7E"}
1
+ {"version":3,"file":"OrbitControlsWrapperHelper.js","sources":["../../../../src/Controls/Wrappers/OrbitControls/OrbitControlsWrapperHelper.ts"],"sourcesContent":["import type { TOrbitControlsParamsOptions, TOrbitControlsWrapper } from '@hellpig/anarchy-engine/Controls/Models';\nimport { isDefined, isNotDefined } from '@hellpig/anarchy-shared/Utils';\n\nexport function applyOrbitControlsParams(wrapper: TOrbitControlsWrapper, options: TOrbitControlsParamsOptions | undefined): void {\n if (isNotDefined(options)) return;\n\n if (isDefined(options.enableDamping)) wrapper.setDamping(options.enableDamping);\n if (isDefined(options.autoRotate)) wrapper.setAutoRotate(options.autoRotate);\n if (isDefined(options.minDistance)) wrapper.setMinDistance(options.minDistance);\n if (isDefined(options.maxDistance)) wrapper.setMaxDistance(options.maxDistance);\n if (isDefined(options.minZoom)) wrapper.setMinZoom(options.minZoom);\n if (isDefined(options.maxZoom)) wrapper.setMaxZoom(options.maxZoom);\n if (isDefined(options.minTargetRadius)) wrapper.setMinTargetRadius(options.minTargetRadius);\n if (isDefined(options.maxTargetRadius)) wrapper.setMaxTargetRadius(options.maxTargetRadius);\n if (isDefined(options.minPolarAngle)) wrapper.setMinPolarAngle(options.minPolarAngle);\n if (isDefined(options.maxPolarAngle)) wrapper.setMaxPolarAngle(options.maxPolarAngle);\n if (isDefined(options.minAzimuthAngle)) wrapper.setMinAzimuthAngle(options.minAzimuthAngle);\n if (isDefined(options.maxAzimuthAngle)) wrapper.setMaxAzimuthAngle(options.maxAzimuthAngle);\n if (isDefined(options.dampingFactor)) wrapper.setDampingFactor(options.dampingFactor);\n if (isDefined(options.enableZoom)) wrapper.setEnableZoom(options.enableZoom);\n if (isDefined(options.zoomSpeed)) wrapper.setZoomSpeed(options.zoomSpeed);\n if (isDefined(options.zoomToCursor)) wrapper.setZoomToCursor(options.zoomToCursor);\n if (isDefined(options.enableRotate)) wrapper.setEnableRotate(options.enableRotate);\n if (isDefined(options.rotateSpeed)) wrapper.setRotateSpeed(options.rotateSpeed);\n if (isDefined(options.enablePan)) wrapper.setEnablePan(options.enablePan);\n if (isDefined(options.panSpeed)) wrapper.setPanSpeed(options.panSpeed);\n if (isDefined(options.screenSpacePanning)) wrapper.setScreenSpacePanning(options.screenSpacePanning);\n if (isDefined(options.keyPanSpeed)) wrapper.setKeyPanSpeed(options.keyPanSpeed);\n if (isDefined(options.autoRotateSpeed)) wrapper.setAutoRotateSpeed(options.autoRotateSpeed);\n}\n"],"names":["applyOrbitControlsParams","wrapper","options","isNotDefined","isDefined","enableDamping","setDamping","autoRotate","setAutoRotate","minDistance","setMinDistance","maxDistance","setMaxDistance","minZoom","setMinZoom","maxZoom","setMaxZoom","minTargetRadius","setMinTargetRadius","maxTargetRadius","setMaxTargetRadius","minPolarAngle","setMinPolarAngle","maxPolarAngle","setMaxPolarAngle","minAzimuthAngle","setMinAzimuthAngle","maxAzimuthAngle","setMaxAzimuthAngle","dampingFactor","setDampingFactor","enableZoom","setEnableZoom","zoomSpeed","setZoomSpeed","zoomToCursor","setZoomToCursor","enableRotate","setEnableRotate","rotateSpeed","setRotateSpeed","enablePan","setEnablePan","panSpeed","setPanSpeed","screenSpacePanning","setScreenSpacePanning","keyPanSpeed","setKeyPanSpeed","autoRotateSpeed","setAutoRotateSpeed"],"mappings":"6FAGO,SAASA,yBAAyBC,QAAgCC,SACnEC,aAAaD,WAEbE,UAAUF,QAAQG,gBAAgBJ,QAAQK,WAAWJ,QAAQG,eAC7DD,UAAUF,QAAQK,aAAaN,QAAQO,cAAcN,QAAQK,YAC7DH,UAAUF,QAAQO,cAAcR,QAAQS,eAAeR,QAAQO,aAC/DL,UAAUF,QAAQS,cAAcV,QAAQW,eAAeV,QAAQS,aAC/DP,UAAUF,QAAQW,UAAUZ,QAAQa,WAAWZ,QAAQW,SACvDT,UAAUF,QAAQa,UAAUd,QAAQe,WAAWd,QAAQa,SACvDX,UAAUF,QAAQe,kBAAkBhB,QAAQiB,mBAAmBhB,QAAQe,iBACvEb,UAAUF,QAAQiB,kBAAkBlB,QAAQmB,mBAAmBlB,QAAQiB,iBACvEf,UAAUF,QAAQmB,gBAAgBpB,QAAQqB,iBAAiBpB,QAAQmB,eACnEjB,UAAUF,QAAQqB,gBAAgBtB,QAAQuB,iBAAiBtB,QAAQqB,eACnEnB,UAAUF,QAAQuB,kBAAkBxB,QAAQyB,mBAAmBxB,QAAQuB,iBACvErB,UAAUF,QAAQyB,kBAAkB1B,QAAQ2B,mBAAmB1B,QAAQyB,iBACvEvB,UAAUF,QAAQ2B,gBAAgB5B,QAAQ6B,iBAAiB5B,QAAQ2B,eACnEzB,UAAUF,QAAQ6B,aAAa9B,QAAQ+B,cAAc9B,QAAQ6B,YAC7D3B,UAAUF,QAAQ+B,YAAYhC,QAAQiC,aAAahC,QAAQ+B,WAC3D7B,UAAUF,QAAQiC,eAAelC,QAAQmC,gBAAgBlC,QAAQiC,cACjE/B,UAAUF,QAAQmC,eAAepC,QAAQqC,gBAAgBpC,QAAQmC,cACjEjC,UAAUF,QAAQqC,cAActC,QAAQuC,eAAetC,QAAQqC,aAC/DnC,UAAUF,QAAQuC,YAAYxC,QAAQyC,aAAaxC,QAAQuC,WAC3DrC,UAAUF,QAAQyC,WAAW1C,QAAQ2C,YAAY1C,QAAQyC,UACzDvC,UAAUF,QAAQ2C,qBAAqB5C,QAAQ6C,sBAAsB5C,QAAQ2C,oBAC7EzC,UAAUF,QAAQ6C,cAAc9C,QAAQ+C,eAAe9C,QAAQ6C,aAC/D3C,UAAUF,QAAQ+C,kBAAkBhD,QAAQiD,mBAAmBhD,QAAQ+C,iBAC7E"}
@@ -1 +1 @@
1
- {"version":3,"file":"DistanceUtils.js","sources":["../../../src/Distance/Utils/DistanceUtils.ts"],"sourcesContent":["import type { TKilometers, TKilometersPerHour, TMeters, TMetersPerSecond, TMilliseconds, TRadians, TRadiansPerSecond } from '@Anarchy/Engine/Math/Types';\nimport { HOUR, SECOND } from '@Anarchy/Engine/Measurements';\n\n//move with speed in meters per second\nexport const mpsSpeed = (mps: TMetersPerSecond, delta: TMilliseconds): TMetersPerSecond => (mps * delta) as TMetersPerSecond;\n\n//move with speed in kilometers per hour\nexport const kmphSpeed = (kmph: TKilometersPerHour, delta: TMilliseconds): TKilometersPerHour => (((kmph * SECOND) / HOUR) * delta) as TKilometersPerHour;\n\nexport const metersPerSecond = (meters: number | TMeters): TMetersPerSecond => meters as TMetersPerSecond;\nexport const kilometersPerHour = (km: number | TKilometers): TKilometersPerHour => km as TKilometersPerHour;\nexport const radiansPerSecond = (rps: number | TRadians): TRadiansPerSecond => rps as TRadiansPerSecond;\n"],"names":["mpsSpeed","mps","delta","kmphSpeed","kmph","SECOND","HOUR","metersPerSecond","meters","kilometersPerHour","km","radiansPerSecond","rps"],"mappings":"8DAIO,MAAMA,SAAW,CAACC,IAAuBC,QAA4CD,IAAMC,MAGrFC,UAAY,CAACC,KAA0BF,QAAgDE,KAAOC,OAAUC,KAAQJ,MAEhHK,gBAAmBC,QAA+CA,OAClEC,kBAAqBC,IAAiDA,GACtEC,iBAAoBC,KAA8CA"}
1
+ {"version":3,"file":"DistanceUtils.js","sources":["../../../src/Distance/Utils/DistanceUtils.ts"],"sourcesContent":["import type { TKilometers, TKilometersPerHour, TMeters, TMetersPerSecond, TMilliseconds, TRadians, TRadiansPerSecond } from '@hellpig/anarchy-engine/Math/Types';\nimport { HOUR, SECOND } from '@hellpig/anarchy-engine/Measurements';\n\n//move with speed in meters per second\nexport const mpsSpeed = (mps: TMetersPerSecond, delta: TMilliseconds): TMetersPerSecond => (mps * delta) as TMetersPerSecond;\n\n//move with speed in kilometers per hour\nexport const kmphSpeed = (kmph: TKilometersPerHour, delta: TMilliseconds): TKilometersPerHour => (((kmph * SECOND) / HOUR) * delta) as TKilometersPerHour;\n\nexport const metersPerSecond = (meters: number | TMeters): TMetersPerSecond => meters as TMetersPerSecond;\nexport const kilometersPerHour = (km: number | TKilometers): TKilometersPerHour => km as TKilometersPerHour;\nexport const radiansPerSecond = (rps: number | TRadians): TRadiansPerSecond => rps as TRadiansPerSecond;\n"],"names":["mpsSpeed","mps","delta","kmphSpeed","kmph","SECOND","HOUR","metersPerSecond","meters","kilometersPerHour","km","radiansPerSecond","rps"],"mappings":"8DAIO,MAAMA,SAAW,CAACC,IAAuBC,QAA4CD,IAAMC,MAGrFC,UAAY,CAACC,KAA0BF,QAAgDE,KAAOC,OAAUC,KAAQJ,MAEhHK,gBAAmBC,QAA+CA,OAClEC,kBAAqBC,IAAiDA,GACtEC,iBAAoBC,KAA8CA"}
@@ -1 +1 @@
1
- {"version":3,"file":"ConfigToParams.js","sources":["../../../src/EnvMap/Adapters/ConfigToParams.ts"],"sourcesContent":["import type { TEnvMapConfig, TEnvMapConfigToParamsDependencies, TEnvMapParams, TEnvMapTexture } from '@Anarchy/Engine/EnvMap/Models';\n\nexport function envMapConfigToParams(config: TEnvMapConfig, { resourcesRegistry }: TEnvMapConfigToParamsDependencies): TEnvMapParams | never {\n const texture: TEnvMapTexture | undefined = resourcesRegistry.getByKey(config.texture);\n\n return {\n ...config,\n texture\n };\n}\n"],"names":["envMapConfigToParams","config","resourcesRegistry","texture","getByKey"],"mappings":"AAEO,SAASA,qBAAqBC,QAAuBC,kBAAEA,oBAC5D,MAAMC,QAAsCD,kBAAkBE,SAASH,OAAOE,SAE9E,MAAO,IACFF,OACHE,gBAEJ"}
1
+ {"version":3,"file":"ConfigToParams.js","sources":["../../../src/EnvMap/Adapters/ConfigToParams.ts"],"sourcesContent":["import type { TEnvMapConfig, TEnvMapConfigToParamsDependencies, TEnvMapParams, TEnvMapTexture } from '@hellpig/anarchy-engine/EnvMap/Models';\n\nexport function envMapConfigToParams(config: TEnvMapConfig, { resourcesRegistry }: TEnvMapConfigToParamsDependencies): TEnvMapParams | never {\n const texture: TEnvMapTexture | undefined = resourcesRegistry.getByKey(config.texture);\n\n return {\n ...config,\n texture\n };\n}\n"],"names":["envMapConfigToParams","config","resourcesRegistry","texture","getByKey"],"mappings":"AAEO,SAASA,qBAAqBC,QAAuBC,kBAAEA,oBAC5D,MAAMC,QAAsCD,kBAAkBE,SAASH,OAAOE,SAE9E,MAAO,IACFF,OACHE,gBAEJ"}
@@ -1 +1 @@
1
- {"version":3,"file":"EntityToConfig.js","sources":["../../../src/EnvMap/Adapters/EntityToConfig.ts"],"sourcesContent":["import type { TEnvMapConfig, TEnvMapConfigToParamsDependencies, TEnvMapWrapper } from '@Anarchy/Engine/EnvMap/Models';\nimport { extractSerializableRegistrableFields } from '@Anarchy/Engine/Mixins';\nimport { filterOutEmptyFields } from '@Anarchy/Shared/Utils';\n\nexport function envMapEntityToConfig(entity: TEnvMapWrapper, { resourcesRegistry }: TEnvMapConfigToParamsDependencies): TEnvMapConfig {\n const texture: string = resourcesRegistry.getKeyByValue(entity.entity);\n\n return filterOutEmptyFields({\n isActive: entity.isActive(),\n texture,\n ...extractSerializableRegistrableFields(entity)\n });\n}\n"],"names":["envMapEntityToConfig","entity","resourcesRegistry","texture","getKeyByValue","filterOutEmptyFields","isActive","extractSerializableRegistrableFields"],"mappings":"yMAIO,SAASA,qBAAqBC,QAAwBC,kBAAEA,oBAC7D,MAAMC,QAAkBD,kBAAkBE,cAAcH,OAAOA,QAE/D,OAAOI,qBAAqB,CAC1BC,SAAUL,OAAOK,WACjBH,mBACGI,qCAAqCN,SAE5C"}
1
+ {"version":3,"file":"EntityToConfig.js","sources":["../../../src/EnvMap/Adapters/EntityToConfig.ts"],"sourcesContent":["import type { TEnvMapConfig, TEnvMapConfigToParamsDependencies, TEnvMapWrapper } from '@hellpig/anarchy-engine/EnvMap/Models';\nimport { extractSerializableRegistrableFields } from '@hellpig/anarchy-engine/Mixins';\nimport { filterOutEmptyFields } from '@hellpig/anarchy-shared/Utils';\n\nexport function envMapEntityToConfig(entity: TEnvMapWrapper, { resourcesRegistry }: TEnvMapConfigToParamsDependencies): TEnvMapConfig {\n const texture: string = resourcesRegistry.getKeyByValue(entity.entity);\n\n return filterOutEmptyFields({\n isActive: entity.isActive(),\n texture,\n ...extractSerializableRegistrableFields(entity)\n });\n}\n"],"names":["envMapEntityToConfig","entity","resourcesRegistry","texture","getKeyByValue","filterOutEmptyFields","isActive","extractSerializableRegistrableFields"],"mappings":"yMAIO,SAASA,qBAAqBC,QAAwBC,kBAAEA,oBAC7D,MAAMC,QAAkBD,kBAAkBE,cAAcH,OAAOA,QAE/D,OAAOI,qBAAqB,CAC1BC,SAAUL,OAAOK,WACjBH,mBACGI,qCAAqCN,SAE5C"}
@@ -1 +1 @@
1
- {"version":3,"file":"EnvMapFactory.js","sources":["../../../src/EnvMap/Factories/EnvMapFactory.ts"],"sourcesContent":["import type { TReactiveFactory } from '@Anarchy/Engine/Abstract';\nimport { FactoryType, ReactiveFactory } from '@Anarchy/Engine/Abstract';\nimport { envMapConfigToParams } from '@Anarchy/Engine/EnvMap/Adapters';\nimport type { TEnvMapFactory, TEnvMapParams, TEnvMapWrapper } from '@Anarchy/Engine/EnvMap/Models';\nimport { EnvMapWrapper } from '@Anarchy/Engine/EnvMap/Wrappers';\n\nexport function EnvMapFactory(): TEnvMapFactory {\n const factory: TReactiveFactory<TEnvMapWrapper, TEnvMapParams> = ReactiveFactory(FactoryType.EnvMap, EnvMapWrapper);\n // eslint-disable-next-line functional/immutable-data\n return Object.assign(factory, { configToParams: envMapConfigToParams });\n}\n"],"names":["EnvMapFactory","factory","ReactiveFactory","FactoryType","EnvMap","EnvMapWrapper","Object","assign","configToParams","envMapConfigToParams"],"mappings":"kQAMO,SAASA,gBACd,MAAMC,QAA2DC,gBAAgBC,YAAYC,OAAQC,eAErG,OAAOC,OAAOC,OAAON,QAAS,CAAEO,eAAgBC,sBAClD"}
1
+ {"version":3,"file":"EnvMapFactory.js","sources":["../../../src/EnvMap/Factories/EnvMapFactory.ts"],"sourcesContent":["import type { TReactiveFactory } from '@hellpig/anarchy-engine/Abstract';\nimport { FactoryType, ReactiveFactory } from '@hellpig/anarchy-engine/Abstract';\nimport { envMapConfigToParams } from '@hellpig/anarchy-engine/EnvMap/Adapters';\nimport type { TEnvMapFactory, TEnvMapParams, TEnvMapWrapper } from '@hellpig/anarchy-engine/EnvMap/Models';\nimport { EnvMapWrapper } from '@hellpig/anarchy-engine/EnvMap/Wrappers';\n\nexport function EnvMapFactory(): TEnvMapFactory {\n const factory: TReactiveFactory<TEnvMapWrapper, TEnvMapParams> = ReactiveFactory(FactoryType.EnvMap, EnvMapWrapper);\n // eslint-disable-next-line functional/immutable-data\n return Object.assign(factory, { configToParams: envMapConfigToParams });\n}\n"],"names":["EnvMapFactory","factory","ReactiveFactory","FactoryType","EnvMap","EnvMapWrapper","Object","assign","configToParams","envMapConfigToParams"],"mappings":"kQAMO,SAASA,gBACd,MAAMC,QAA2DC,gBAAgBC,YAAYC,OAAQC,eAErG,OAAOC,OAAOC,OAAON,QAAS,CAAEO,eAAgBC,sBAClD"}
@@ -1 +1 @@
1
- {"version":3,"file":"EnvMapLoader.js","sources":["../../../src/EnvMap/Loader/EnvMapLoader.ts"],"sourcesContent":["import { AbstractLoader, LoaderType } from '@Anarchy/Engine/Abstract';\nimport { EnvMapMappingTypesMap, EnvMapMappingTypesName } from '@Anarchy/Engine/EnvMap/Constants';\nimport type { TEnvMapLoader, TEnvMapMetaInfoRegistry, TEnvMapResourceConfig, TEnvMapTexture, TEnvMapTextureAsyncRegistry } from '@Anarchy/Engine/EnvMap/Models';\nimport type { TLoadingManagerWrapper } from '@Anarchy/Engine/LoadingManager';\nimport type { TWriteable } from '@Anarchy/Shared/Utils';\nimport { isDefined } from '@Anarchy/Shared/Utils';\nimport { EquirectangularReflectionMapping } from 'three';\nimport { HDRLoader } from 'three/examples/jsm/loaders/HDRLoader';\n\nexport function EnvMapLoader(registry: TEnvMapTextureAsyncRegistry, metaInfoRegistry: TEnvMapMetaInfoRegistry, loadingManagerWrapper: TLoadingManagerWrapper): TEnvMapLoader {\n const envMapLoader: HDRLoader = new HDRLoader(loadingManagerWrapper.entity);\n const loader: TEnvMapLoader = AbstractLoader(envMapLoader, registry, metaInfoRegistry, LoaderType.EnvMap);\n\n function applyParamsOnLoaded(loaded: TWriteable<TEnvMapTexture>, options?: TEnvMapResourceConfig['options']): TEnvMapTexture {\n // eslint-disable-next-line functional/immutable-data\n loaded.mapping = isDefined(options?.mapping) ? EnvMapMappingTypesMap[EnvMapMappingTypesName[options.mapping]] : EquirectangularReflectionMapping;\n\n return loaded;\n }\n\n loader.setOnLoadedFn(applyParamsOnLoaded);\n\n return loader;\n}\n"],"names":["EnvMapLoader","registry","metaInfoRegistry","loadingManagerWrapper","envMapLoader","HDRLoader","entity","loader","AbstractLoader","LoaderType","EnvMap","setOnLoadedFn","loaded","options","mapping","isDefined","EnvMapMappingTypesMap","EnvMapMappingTypesName","EquirectangularReflectionMapping"],"mappings":"qdASO,SAASA,aAAaC,SAAuCC,iBAA2CC,uBAC7G,MAAMC,aAA0B,IAAIC,UAAUF,sBAAsBG,QAC9DC,OAAwBC,eAAeJ,aAAcH,SAAUC,iBAAkBO,WAAWC,QAWlG,OAFAH,OAAOI,cAPP,SAA6BC,OAAoCC,SAI/D,OAFAD,OAAOE,QAAUC,UAAUF,SAASC,SAAWE,sBAAsBC,uBAAuBJ,QAAQC,UAAYI,iCAEzGN,MACT,GAIOL,MACT"}
1
+ {"version":3,"file":"EnvMapLoader.js","sources":["../../../src/EnvMap/Loader/EnvMapLoader.ts"],"sourcesContent":["import { AbstractLoader, LoaderType } from '@hellpig/anarchy-engine/Abstract';\nimport { EnvMapMappingTypesMap, EnvMapMappingTypesName } from '@hellpig/anarchy-engine/EnvMap/Constants';\nimport type { TEnvMapLoader, TEnvMapMetaInfoRegistry, TEnvMapResourceConfig, TEnvMapTexture, TEnvMapTextureAsyncRegistry } from '@hellpig/anarchy-engine/EnvMap/Models';\nimport type { TLoadingManagerWrapper } from '@hellpig/anarchy-engine/LoadingManager';\nimport type { TWriteable } from '@hellpig/anarchy-shared/Utils';\nimport { isDefined } from '@hellpig/anarchy-shared/Utils';\nimport { EquirectangularReflectionMapping } from 'three';\nimport { HDRLoader } from 'three/examples/jsm/loaders/HDRLoader';\n\nexport function EnvMapLoader(registry: TEnvMapTextureAsyncRegistry, metaInfoRegistry: TEnvMapMetaInfoRegistry, loadingManagerWrapper: TLoadingManagerWrapper): TEnvMapLoader {\n const envMapLoader: HDRLoader = new HDRLoader(loadingManagerWrapper.entity);\n const loader: TEnvMapLoader = AbstractLoader(envMapLoader, registry, metaInfoRegistry, LoaderType.EnvMap);\n\n function applyParamsOnLoaded(loaded: TWriteable<TEnvMapTexture>, options?: TEnvMapResourceConfig['options']): TEnvMapTexture {\n // eslint-disable-next-line functional/immutable-data\n loaded.mapping = isDefined(options?.mapping) ? EnvMapMappingTypesMap[EnvMapMappingTypesName[options.mapping]] : EquirectangularReflectionMapping;\n\n return loaded;\n }\n\n loader.setOnLoadedFn(applyParamsOnLoaded);\n\n return loader;\n}\n"],"names":["EnvMapLoader","registry","metaInfoRegistry","loadingManagerWrapper","envMapLoader","HDRLoader","entity","loader","AbstractLoader","LoaderType","EnvMap","setOnLoadedFn","loaded","options","mapping","isDefined","EnvMapMappingTypesMap","EnvMapMappingTypesName","EquirectangularReflectionMapping"],"mappings":"qdASO,SAASA,aAAaC,SAAuCC,iBAA2CC,uBAC7G,MAAMC,aAA0B,IAAIC,UAAUF,sBAAsBG,QAC9DC,OAAwBC,eAAeJ,aAAcH,SAAUC,iBAAkBO,WAAWC,QAWlG,OAFAH,OAAOI,cAPP,SAA6BC,OAAoCC,SAI/D,OAFAD,OAAOE,QAAUC,UAAUF,SAASC,SAAWE,sBAAsBC,uBAAuBJ,QAAQC,UAAYI,iCAEzGN,MACT,GAIOL,MACT"}
@@ -1 +1 @@
1
- {"version":3,"file":"EnvMapMetaInfoRegistry.js","sources":["../../../src/EnvMap/Registries/EnvMapMetaInfoRegistry.ts"],"sourcesContent":["import { AbstractSimpleRegistry, RegistryType } from '@Anarchy/Engine/Abstract';\nimport type { TEnvMapMetaInfoRegistry, TEnvMapResourceConfig } from '@Anarchy/Engine/EnvMap/Models';\n\nexport function EnvMapMetaInfoRegistry(): TEnvMapMetaInfoRegistry {\n return AbstractSimpleRegistry<TEnvMapResourceConfig>(RegistryType.EnvMapMetaInfo);\n}\n"],"names":["EnvMapMetaInfoRegistry","AbstractSimpleRegistry","RegistryType","EnvMapMetaInfo"],"mappings":"2JAGO,SAASA,yBACd,OAAOC,uBAA8CC,aAAaC,eACpE"}
1
+ {"version":3,"file":"EnvMapMetaInfoRegistry.js","sources":["../../../src/EnvMap/Registries/EnvMapMetaInfoRegistry.ts"],"sourcesContent":["import { AbstractSimpleRegistry, RegistryType } from '@hellpig/anarchy-engine/Abstract';\nimport type { TEnvMapMetaInfoRegistry, TEnvMapResourceConfig } from '@hellpig/anarchy-engine/EnvMap/Models';\n\nexport function EnvMapMetaInfoRegistry(): TEnvMapMetaInfoRegistry {\n return AbstractSimpleRegistry<TEnvMapResourceConfig>(RegistryType.EnvMapMetaInfo);\n}\n"],"names":["EnvMapMetaInfoRegistry","AbstractSimpleRegistry","RegistryType","EnvMapMetaInfo"],"mappings":"2JAGO,SAASA,yBACd,OAAOC,uBAA8CC,aAAaC,eACpE"}
@@ -1 +1 @@
1
- {"version":3,"file":"EnvMapRegistry.js","sources":["../../../src/EnvMap/Registries/EnvMapRegistry.ts"],"sourcesContent":["import { AbstractEntityRegistry, RegistryType } from '@Anarchy/Engine/Abstract';\nimport type { TEnvMapRegistry, TEnvMapWrapper } from '@Anarchy/Engine/EnvMap/Models';\n\nexport function EnvMapRegistry(): TEnvMapRegistry {\n return AbstractEntityRegistry<TEnvMapWrapper>(RegistryType.EnvMap);\n}\n"],"names":["EnvMapRegistry","AbstractEntityRegistry","RegistryType","EnvMap"],"mappings":"2JAGO,SAASA,iBACd,OAAOC,uBAAuCC,aAAaC,OAC7D"}
1
+ {"version":3,"file":"EnvMapRegistry.js","sources":["../../../src/EnvMap/Registries/EnvMapRegistry.ts"],"sourcesContent":["import { AbstractEntityRegistry, RegistryType } from '@hellpig/anarchy-engine/Abstract';\nimport type { TEnvMapRegistry, TEnvMapWrapper } from '@hellpig/anarchy-engine/EnvMap/Models';\n\nexport function EnvMapRegistry(): TEnvMapRegistry {\n return AbstractEntityRegistry<TEnvMapWrapper>(RegistryType.EnvMap);\n}\n"],"names":["EnvMapRegistry","AbstractEntityRegistry","RegistryType","EnvMap"],"mappings":"2JAGO,SAASA,iBACd,OAAOC,uBAAuCC,aAAaC,OAC7D"}
@@ -1 +1 @@
1
- {"version":3,"file":"EnvMapTextureAsyncRegistry.js","sources":["../../../src/EnvMap/Registries/EnvMapTextureAsyncRegistry.ts"],"sourcesContent":["import { AbstractResourceAsyncRegistry, RegistryType } from '@Anarchy/Engine/Abstract';\nimport type { TEnvMapTexture, TEnvMapTextureAsyncRegistry } from '@Anarchy/Engine/EnvMap/Models';\n\nexport function EnvMapTextureAsyncRegistry(): TEnvMapTextureAsyncRegistry {\n return AbstractResourceAsyncRegistry<TEnvMapTexture>(RegistryType.EnvMapTexture);\n}\n"],"names":["EnvMapTextureAsyncRegistry","AbstractResourceAsyncRegistry","RegistryType","EnvMapTexture"],"mappings":"yKAGO,SAASA,6BACd,OAAOC,8BAA8CC,aAAaC,cACpE"}
1
+ {"version":3,"file":"EnvMapTextureAsyncRegistry.js","sources":["../../../src/EnvMap/Registries/EnvMapTextureAsyncRegistry.ts"],"sourcesContent":["import { AbstractResourceAsyncRegistry, RegistryType } from '@hellpig/anarchy-engine/Abstract';\nimport type { TEnvMapTexture, TEnvMapTextureAsyncRegistry } from '@hellpig/anarchy-engine/EnvMap/Models';\n\nexport function EnvMapTextureAsyncRegistry(): TEnvMapTextureAsyncRegistry {\n return AbstractResourceAsyncRegistry<TEnvMapTexture>(RegistryType.EnvMapTexture);\n}\n"],"names":["EnvMapTextureAsyncRegistry","AbstractResourceAsyncRegistry","RegistryType","EnvMapTexture"],"mappings":"yKAGO,SAASA,6BACd,OAAOC,8BAA8CC,aAAaC,cACpE"}
@@ -1 +1 @@
1
- {"version":3,"file":"EnvMapService.js","sources":["../../../src/EnvMap/Services/EnvMapService.ts"],"sourcesContent":["import type { TAbstractService, TRegistryPack } from '@Anarchy/Engine/Abstract';\nimport { AbstractService } from '@Anarchy/Engine/Abstract';\nimport { EnvMapLoader } from '@Anarchy/Engine/EnvMap/Loader';\nimport type {\n TEnvMapConfig,\n TEnvMapConfigToParamsDependencies,\n TEnvMapFactory,\n TEnvMapLoader,\n TEnvMapMetaInfoRegistry,\n TEnvMapRegistry,\n TEnvMapResourceConfig,\n TEnvMapSerializeResourcesDependencies,\n TEnvMapService,\n TEnvMapServiceWithCreate,\n TEnvMapServiceWithCreateFromConfig,\n TEnvMapServiceWithFactory,\n TEnvMapServiceWithRegistry,\n TEnvMapTextureAsyncRegistry,\n TEnvMapWrapper\n} from '@Anarchy/Engine/EnvMap/Models';\nimport type { TLoadingManagerWrapper } from '@Anarchy/Engine/LoadingManager';\nimport type { TDisposable, TWithActiveMixinResult } from '@Anarchy/Engine/Mixins';\nimport {\n withActiveEntityServiceMixin,\n withCreateFromConfigServiceMixin,\n withCreateServiceMixin,\n withFactoryService,\n withRegistryService,\n withSceneGetterService,\n withSerializableEntities,\n withSerializeAllResources\n} from '@Anarchy/Engine/Mixins';\nimport type { TSceneWrapper } from '@Anarchy/Engine/Scene';\nimport { mergeAll } from '@Anarchy/Engine/Utils';\nimport { isDefined } from '@Anarchy/Shared/Utils';\nimport type { Subscription } from 'rxjs';\n\nexport function EnvMapService(\n factory: TEnvMapFactory,\n registry: TEnvMapRegistry,\n resourcesRegistry: TEnvMapTextureAsyncRegistry,\n metaInfoRegistry: TEnvMapMetaInfoRegistry,\n sceneW: TSceneWrapper,\n loadingManagerWrapper: TLoadingManagerWrapper\n): TEnvMapService {\n const registrySub$: Subscription = registry.added$.subscribe(({ value }: TRegistryPack<TEnvMapWrapper>): void => {\n if (value.isActive()) withActive.active$.next(value);\n });\n\n const factorySub$: Subscription = factory.entityCreated$.subscribe((wrapper: TEnvMapWrapper): void => registry.add(wrapper));\n\n const withActive: TWithActiveMixinResult<TEnvMapWrapper> = withActiveEntityServiceMixin<TEnvMapWrapper>(registry);\n const envMapLoader: TEnvMapLoader = EnvMapLoader(resourcesRegistry, metaInfoRegistry, loadingManagerWrapper);\n\n const disposable: ReadonlyArray<TDisposable> = [registry, resourcesRegistry, factory, envMapLoader, registrySub$, factorySub$];\n const abstractService: TAbstractService = AbstractService(disposable);\n\n const withCreateService: TEnvMapServiceWithCreate = withCreateServiceMixin(factory, undefined);\n const withCreateFromConfigService: TEnvMapServiceWithCreateFromConfig = withCreateFromConfigServiceMixin(withCreateService.create, factory.configToParams, { resourcesRegistry });\n const withFactory: TEnvMapServiceWithFactory = withFactoryService(factory);\n const withRegistry: TEnvMapServiceWithRegistry = withRegistryService(registry);\n\n withActive.active$.subscribe((wrapper: TEnvMapWrapper | undefined): void => {\n if (isDefined(wrapper)) {\n sceneW.setBackground(wrapper.entity);\n sceneW.setEnvironmentMap(wrapper.entity);\n }\n });\n\n const findActive = withActive.findActive;\n\n const destroySub$: Subscription = abstractService.destroy$.subscribe((): void => {\n destroySub$.unsubscribe();\n\n withActive.active$.complete();\n });\n\n return mergeAll(\n abstractService,\n withCreateService,\n withCreateFromConfigService,\n withFactory,\n withRegistry,\n withSceneGetterService(sceneW),\n withSerializeAllResources<TEnvMapResourceConfig, TEnvMapSerializeResourcesDependencies>(resourcesRegistry, { metaInfoRegistry }),\n withSerializableEntities<TEnvMapWrapper, TEnvMapConfig, TEnvMapConfigToParamsDependencies>(registry, { resourcesRegistry }),\n {\n loadAsync: envMapLoader.loadAsync,\n loadFromConfigAsync: envMapLoader.loadFromConfigAsync,\n setActive: withActive.setActive,\n findActive,\n getActive: withActive.getActive,\n active$: withActive.active$,\n getResourceRegistry: (): TEnvMapTextureAsyncRegistry => resourcesRegistry,\n getMetaInfoRegistry: (): TEnvMapMetaInfoRegistry => metaInfoRegistry\n }\n );\n}\n"],"names":["EnvMapService","factory","registry","resourcesRegistry","metaInfoRegistry","sceneW","loadingManagerWrapper","registrySub$","added$","subscribe","value","isActive","withActive","active$","next","factorySub$","entityCreated$","wrapper","add","withActiveEntityServiceMixin","envMapLoader","EnvMapLoader","abstractService","AbstractService","withCreateService","withCreateServiceMixin","withCreateFromConfigService","withCreateFromConfigServiceMixin","create","configToParams","withFactory","withFactoryService","withRegistry","withRegistryService","isDefined","setBackground","entity","setEnvironmentMap","findActive","destroySub$","destroy$","unsubscribe","complete","mergeAll","withSceneGetterService","withSerializeAllResources","withSerializableEntities","loadAsync","loadFromConfigAsync","setActive","getActive","getResourceRegistry","getMetaInfoRegistry"],"mappings":"46BAqCO,SAASA,cACdC,QACAC,SACAC,kBACAC,iBACAC,OACAC,uBAEA,MAAMC,aAA6BL,SAASM,OAAOC,UAAU,EAAGC,gBAC1DA,MAAMC,YAAYC,WAAWC,QAAQC,KAAKJ,SAG1CK,YAA4Bd,QAAQe,eAAeP,UAAWQ,SAAkCf,SAASgB,IAAID,UAE7GL,WAAqDO,6BAA6CjB,UAClGkB,aAA8BC,aAAalB,kBAAmBC,iBAAkBE,uBAGhFgB,gBAAoCC,gBADK,CAACrB,SAAUC,kBAAmBF,QAASmB,aAAcb,aAAcQ,cAG5GS,kBAA8CC,uBAAuBxB,gBACrEyB,4BAAkEC,iCAAiCH,kBAAkBI,OAAQ3B,QAAQ4B,eAAgB,CAAE1B,sCACvJ2B,YAAyCC,mBAAmB9B,SAC5D+B,aAA2CC,oBAAoB/B,UAErEU,WAAWC,QAAQJ,UAAWQ,UACxBiB,UAAUjB,WACZZ,OAAO8B,cAAclB,QAAQmB,QAC7B/B,OAAOgC,kBAAkBpB,QAAQmB,WAIrC,MAAME,WAAa1B,WAAW0B,WAExBC,YAA4BjB,gBAAgBkB,SAAS/B,UAAU,KACnE8B,YAAYE,cAEZ7B,WAAWC,QAAQ6B,aAGrB,OAAOC,SACLrB,gBACAE,kBACAE,4BACAI,YACAE,aACAY,uBAAuBvC,QACvBwC,0BAAwF1C,kBAAmB,CAAEC,oCAC7G0C,yBAA2F5C,SAAU,CAAEC,sCACvG,CACE4C,UAAW3B,aAAa2B,UACxBC,oBAAqB5B,aAAa4B,oBAClCC,UAAWrC,WAAWqC,UACtBX,sBACAY,UAAWtC,WAAWsC,UACtBrC,QAASD,WAAWC,QACpBsC,oBAAqB,IAAmChD,kBACxDiD,oBAAqB,IAA+BhD,kBAG1D"}
1
+ {"version":3,"file":"EnvMapService.js","sources":["../../../src/EnvMap/Services/EnvMapService.ts"],"sourcesContent":["import type { TAbstractService, TRegistryPack } from '@hellpig/anarchy-engine/Abstract';\nimport { AbstractService } from '@hellpig/anarchy-engine/Abstract';\nimport { EnvMapLoader } from '@hellpig/anarchy-engine/EnvMap/Loader';\nimport type {\n TEnvMapConfig,\n TEnvMapConfigToParamsDependencies,\n TEnvMapFactory,\n TEnvMapLoader,\n TEnvMapMetaInfoRegistry,\n TEnvMapRegistry,\n TEnvMapResourceConfig,\n TEnvMapSerializeResourcesDependencies,\n TEnvMapService,\n TEnvMapServiceWithCreate,\n TEnvMapServiceWithCreateFromConfig,\n TEnvMapServiceWithFactory,\n TEnvMapServiceWithRegistry,\n TEnvMapTextureAsyncRegistry,\n TEnvMapWrapper\n} from '@hellpig/anarchy-engine/EnvMap/Models';\nimport type { TLoadingManagerWrapper } from '@hellpig/anarchy-engine/LoadingManager';\nimport type { TDisposable, TWithActiveMixinResult } from '@hellpig/anarchy-engine/Mixins';\nimport {\n withActiveEntityServiceMixin,\n withCreateFromConfigServiceMixin,\n withCreateServiceMixin,\n withFactoryService,\n withRegistryService,\n withSceneGetterService,\n withSerializableEntities,\n withSerializeAllResources\n} from '@hellpig/anarchy-engine/Mixins';\nimport type { TSceneWrapper } from '@hellpig/anarchy-engine/Scene';\nimport { mergeAll } from '@hellpig/anarchy-engine/Utils';\nimport { isDefined } from '@hellpig/anarchy-shared/Utils';\nimport type { Subscription } from 'rxjs';\n\nexport function EnvMapService(\n factory: TEnvMapFactory,\n registry: TEnvMapRegistry,\n resourcesRegistry: TEnvMapTextureAsyncRegistry,\n metaInfoRegistry: TEnvMapMetaInfoRegistry,\n sceneW: TSceneWrapper,\n loadingManagerWrapper: TLoadingManagerWrapper\n): TEnvMapService {\n const registrySub$: Subscription = registry.added$.subscribe(({ value }: TRegistryPack<TEnvMapWrapper>): void => {\n if (value.isActive()) withActive.active$.next(value);\n });\n\n const factorySub$: Subscription = factory.entityCreated$.subscribe((wrapper: TEnvMapWrapper): void => registry.add(wrapper));\n\n const withActive: TWithActiveMixinResult<TEnvMapWrapper> = withActiveEntityServiceMixin<TEnvMapWrapper>(registry);\n const envMapLoader: TEnvMapLoader = EnvMapLoader(resourcesRegistry, metaInfoRegistry, loadingManagerWrapper);\n\n const disposable: ReadonlyArray<TDisposable> = [registry, resourcesRegistry, factory, envMapLoader, registrySub$, factorySub$];\n const abstractService: TAbstractService = AbstractService(disposable);\n\n const withCreateService: TEnvMapServiceWithCreate = withCreateServiceMixin(factory, undefined);\n const withCreateFromConfigService: TEnvMapServiceWithCreateFromConfig = withCreateFromConfigServiceMixin(withCreateService.create, factory.configToParams, { resourcesRegistry });\n const withFactory: TEnvMapServiceWithFactory = withFactoryService(factory);\n const withRegistry: TEnvMapServiceWithRegistry = withRegistryService(registry);\n\n withActive.active$.subscribe((wrapper: TEnvMapWrapper | undefined): void => {\n if (isDefined(wrapper)) {\n sceneW.setBackground(wrapper.entity);\n sceneW.setEnvironmentMap(wrapper.entity);\n }\n });\n\n const findActive = withActive.findActive;\n\n const destroySub$: Subscription = abstractService.destroy$.subscribe((): void => {\n destroySub$.unsubscribe();\n\n withActive.active$.complete();\n });\n\n return mergeAll(\n abstractService,\n withCreateService,\n withCreateFromConfigService,\n withFactory,\n withRegistry,\n withSceneGetterService(sceneW),\n withSerializeAllResources<TEnvMapResourceConfig, TEnvMapSerializeResourcesDependencies>(resourcesRegistry, { metaInfoRegistry }),\n withSerializableEntities<TEnvMapWrapper, TEnvMapConfig, TEnvMapConfigToParamsDependencies>(registry, { resourcesRegistry }),\n {\n loadAsync: envMapLoader.loadAsync,\n loadFromConfigAsync: envMapLoader.loadFromConfigAsync,\n setActive: withActive.setActive,\n findActive,\n getActive: withActive.getActive,\n active$: withActive.active$,\n getResourceRegistry: (): TEnvMapTextureAsyncRegistry => resourcesRegistry,\n getMetaInfoRegistry: (): TEnvMapMetaInfoRegistry => metaInfoRegistry\n }\n );\n}\n"],"names":["EnvMapService","factory","registry","resourcesRegistry","metaInfoRegistry","sceneW","loadingManagerWrapper","registrySub$","added$","subscribe","value","isActive","withActive","active$","next","factorySub$","entityCreated$","wrapper","add","withActiveEntityServiceMixin","envMapLoader","EnvMapLoader","abstractService","AbstractService","withCreateService","withCreateServiceMixin","withCreateFromConfigService","withCreateFromConfigServiceMixin","create","configToParams","withFactory","withFactoryService","withRegistry","withRegistryService","isDefined","setBackground","entity","setEnvironmentMap","findActive","destroySub$","destroy$","unsubscribe","complete","mergeAll","withSceneGetterService","withSerializeAllResources","withSerializableEntities","loadAsync","loadFromConfigAsync","setActive","getActive","getResourceRegistry","getMetaInfoRegistry"],"mappings":"46BAqCO,SAASA,cACdC,QACAC,SACAC,kBACAC,iBACAC,OACAC,uBAEA,MAAMC,aAA6BL,SAASM,OAAOC,UAAU,EAAGC,gBAC1DA,MAAMC,YAAYC,WAAWC,QAAQC,KAAKJ,SAG1CK,YAA4Bd,QAAQe,eAAeP,UAAWQ,SAAkCf,SAASgB,IAAID,UAE7GL,WAAqDO,6BAA6CjB,UAClGkB,aAA8BC,aAAalB,kBAAmBC,iBAAkBE,uBAGhFgB,gBAAoCC,gBADK,CAACrB,SAAUC,kBAAmBF,QAASmB,aAAcb,aAAcQ,cAG5GS,kBAA8CC,uBAAuBxB,gBACrEyB,4BAAkEC,iCAAiCH,kBAAkBI,OAAQ3B,QAAQ4B,eAAgB,CAAE1B,sCACvJ2B,YAAyCC,mBAAmB9B,SAC5D+B,aAA2CC,oBAAoB/B,UAErEU,WAAWC,QAAQJ,UAAWQ,UACxBiB,UAAUjB,WACZZ,OAAO8B,cAAclB,QAAQmB,QAC7B/B,OAAOgC,kBAAkBpB,QAAQmB,WAIrC,MAAME,WAAa1B,WAAW0B,WAExBC,YAA4BjB,gBAAgBkB,SAAS/B,UAAU,KACnE8B,YAAYE,cAEZ7B,WAAWC,QAAQ6B,aAGrB,OAAOC,SACLrB,gBACAE,kBACAE,4BACAI,YACAE,aACAY,uBAAuBvC,QACvBwC,0BAAwF1C,kBAAmB,CAAEC,oCAC7G0C,yBAA2F5C,SAAU,CAAEC,sCACvG,CACE4C,UAAW3B,aAAa2B,UACxBC,oBAAqB5B,aAAa4B,oBAClCC,UAAWrC,WAAWqC,UACtBX,sBACAY,UAAWtC,WAAWsC,UACtBrC,QAASD,WAAWC,QACpBsC,oBAAqB,IAAmChD,kBACxDiD,oBAAqB,IAA+BhD,kBAG1D"}
@@ -1 +1 @@
1
- {"version":3,"file":"EnvMapWrapper.js","sources":["../../../src/EnvMap/Wrappers/EnvMapWrapper.ts"],"sourcesContent":["import { AbstractWrapper, WrapperType } from '@Anarchy/Engine/Abstract';\nimport { envMapEntityToConfig } from '@Anarchy/Engine/EnvMap/Adapters';\nimport type { TEnvMapConfig, TEnvMapConfigToParamsDependencies, TEnvMapParams, TEnvMapTexture, TEnvMapWrapper } from '@Anarchy/Engine/EnvMap/Models';\nimport { withActiveMixin } from '@Anarchy/Engine/Mixins';\nimport type { Subscription } from 'rxjs';\n\nexport function EnvMapWrapper(params: TEnvMapParams): TEnvMapWrapper {\n const { texture, isActive } = params;\n const entity: TEnvMapTexture = texture;\n\n const wrapper = Object.assign(AbstractWrapper(entity, WrapperType.EnvMap, params), {\n getName: (): string => params.name,\n ...withActiveMixin(),\n serialize: (dependencies: TEnvMapConfigToParamsDependencies): TEnvMapConfig => envMapEntityToConfig(wrapper, dependencies)\n });\n\n wrapper._setActive(isActive, true);\n\n const destroySub$: Subscription = wrapper.destroy$.subscribe((): void => {\n texture.dispose();\n destroySub$.unsubscribe();\n });\n\n return wrapper;\n}\n"],"names":["EnvMapWrapper","params","texture","isActive","wrapper","Object","assign","AbstractWrapper","WrapperType","EnvMap","getName","name","withActiveMixin","serialize","dependencies","envMapEntityToConfig","_setActive","destroySub$","destroy$","subscribe","dispose","unsubscribe"],"mappings":"+QAMO,SAASA,cAAcC,QAC5B,MAAMC,QAAEA,QAAAC,SAASA,UAAaF,OAGxBG,QAAUC,OAAOC,OAAOC,gBAFCL,QAEuBM,YAAYC,OAAQR,QAAS,CACjFS,QAAS,IAAcT,OAAOU,QAC3BC,kBACHC,UAAYC,cAAmEC,qBAAqBX,QAASU,gBAG/GV,QAAQY,WAAWb,UAAU,GAE7B,MAAMc,YAA4Bb,QAAQc,SAASC,UAAU,KAC3DjB,QAAQkB,UACRH,YAAYI,gBAGd,OAAOjB,OACT"}
1
+ {"version":3,"file":"EnvMapWrapper.js","sources":["../../../src/EnvMap/Wrappers/EnvMapWrapper.ts"],"sourcesContent":["import { AbstractWrapper, WrapperType } from '@hellpig/anarchy-engine/Abstract';\nimport { envMapEntityToConfig } from '@hellpig/anarchy-engine/EnvMap/Adapters';\nimport type { TEnvMapConfig, TEnvMapConfigToParamsDependencies, TEnvMapParams, TEnvMapTexture, TEnvMapWrapper } from '@hellpig/anarchy-engine/EnvMap/Models';\nimport { withActiveMixin } from '@hellpig/anarchy-engine/Mixins';\nimport type { Subscription } from 'rxjs';\n\nexport function EnvMapWrapper(params: TEnvMapParams): TEnvMapWrapper {\n const { texture, isActive } = params;\n const entity: TEnvMapTexture = texture;\n\n const wrapper = Object.assign(AbstractWrapper(entity, WrapperType.EnvMap, params), {\n getName: (): string => params.name,\n ...withActiveMixin(),\n serialize: (dependencies: TEnvMapConfigToParamsDependencies): TEnvMapConfig => envMapEntityToConfig(wrapper, dependencies)\n });\n\n wrapper._setActive(isActive, true);\n\n const destroySub$: Subscription = wrapper.destroy$.subscribe((): void => {\n texture.dispose();\n destroySub$.unsubscribe();\n });\n\n return wrapper;\n}\n"],"names":["EnvMapWrapper","params","texture","isActive","wrapper","Object","assign","AbstractWrapper","WrapperType","EnvMap","getName","name","withActiveMixin","serialize","dependencies","envMapEntityToConfig","_setActive","destroySub$","destroy$","subscribe","dispose","unsubscribe"],"mappings":"+QAMO,SAASA,cAAcC,QAC5B,MAAMC,QAAEA,QAAAC,SAASA,UAAaF,OAGxBG,QAAUC,OAAOC,OAAOC,gBAFCL,QAEuBM,YAAYC,OAAQR,QAAS,CACjFS,QAAS,IAAcT,OAAOU,QAC3BC,kBACHC,UAAYC,cAAmEC,qBAAqBX,QAASU,gBAG/GV,QAAQY,WAAWb,UAAU,GAE7B,MAAMc,YAA4Bb,QAAQc,SAASC,UAAU,KAC3DjB,QAAQkB,UACRH,YAAYI,gBAGd,OAAOjB,OACT"}
@@ -1 +1 @@
1
- {"version":3,"file":"ConfigToParams.js","sources":["../../../src/Fog/Adapters/ConfigToParams.ts"],"sourcesContent":["import type { TFogConfig, TFogParams } from '@Anarchy/Engine/Fog/Models';\nimport { Color } from 'three';\n\nexport function fogConfigToParams(config: TFogConfig): TFogParams {\n const { color, ...rest } = config;\n\n return {\n ...rest,\n ...getColorParams(color)\n };\n}\n\nfunction getColorParams(colorStr: string): Readonly<{ color: Color }> {\n return { color: new Color(colorStr) };\n}\n"],"names":["fogConfigToParams","config","color","rest","colorStr","Color"],"mappings":"yBAGO,SAASA,kBAAkBC,QAChC,MAAMC,MAAEA,SAAUC,MAASF,OAE3B,MAAO,IACFE,SAKiBC,SAJFF,MAKb,CAAEA,MAAO,IAAIG,MAAMD,aAD5B,IAAwBA,QAFxB"}
1
+ {"version":3,"file":"ConfigToParams.js","sources":["../../../src/Fog/Adapters/ConfigToParams.ts"],"sourcesContent":["import type { TFogConfig, TFogParams } from '@hellpig/anarchy-engine/Fog/Models';\nimport { Color } from 'three';\n\nexport function fogConfigToParams(config: TFogConfig): TFogParams {\n const { color, ...rest } = config;\n\n return {\n ...rest,\n ...getColorParams(color)\n };\n}\n\nfunction getColorParams(colorStr: string): Readonly<{ color: Color }> {\n return { color: new Color(colorStr) };\n}\n"],"names":["fogConfigToParams","config","color","rest","colorStr","Color"],"mappings":"yBAGO,SAASA,kBAAkBC,QAChC,MAAMC,MAAEA,SAAUC,MAASF,OAE3B,MAAO,IACFE,SAKiBC,SAJFF,MAKb,CAAEA,MAAO,IAAIG,MAAMD,aAD5B,IAAwBA,QAFxB"}
@@ -1 +1 @@
1
- {"version":3,"file":"EntityToConfig.js","sources":["../../../src/Fog/Adapters/EntityToConfig.ts"],"sourcesContent":["import { serializeColor } from '@Anarchy/Engine/Color';\nimport type { TFogConfig, TFogWrapper } from '@Anarchy/Engine/Fog/Models';\nimport { extractSerializableRegistrableFields } from '@Anarchy/Engine/Mixins';\nimport { filterOutEmptyFields } from '@Anarchy/Shared/Utils';\nimport type { FogJSON } from 'three';\n\nexport function fogEntityToConfig(entity: TFogWrapper): TFogConfig {\n const json: FogJSON = entity.entity.toJSON();\n\n return filterOutEmptyFields({\n color: serializeColor(entity.entity.color),\n near: json.near,\n far: json.far,\n ...extractSerializableRegistrableFields(entity)\n });\n}\n"],"names":["fogEntityToConfig","entity","json","toJSON","filterOutEmptyFields","color","serializeColor","near","far","extractSerializableRegistrableFields"],"mappings":"4QAMO,SAASA,kBAAkBC,QAChC,MAAMC,KAAgBD,OAAOA,OAAOE,SAEpC,OAAOC,qBAAqB,CAC1BC,MAAOC,eAAeL,OAAOA,OAAOI,OACpCE,KAAML,KAAKK,KACXC,IAAKN,KAAKM,OACPC,qCAAqCR,SAE5C"}
1
+ {"version":3,"file":"EntityToConfig.js","sources":["../../../src/Fog/Adapters/EntityToConfig.ts"],"sourcesContent":["import { serializeColor } from '@hellpig/anarchy-engine/Color';\nimport type { TFogConfig, TFogWrapper } from '@hellpig/anarchy-engine/Fog/Models';\nimport { extractSerializableRegistrableFields } from '@hellpig/anarchy-engine/Mixins';\nimport { filterOutEmptyFields } from '@hellpig/anarchy-shared/Utils';\nimport type { FogJSON } from 'three';\n\nexport function fogEntityToConfig(entity: TFogWrapper): TFogConfig {\n const json: FogJSON = entity.entity.toJSON();\n\n return filterOutEmptyFields({\n color: serializeColor(entity.entity.color),\n near: json.near,\n far: json.far,\n ...extractSerializableRegistrableFields(entity)\n });\n}\n"],"names":["fogEntityToConfig","entity","json","toJSON","filterOutEmptyFields","color","serializeColor","near","far","extractSerializableRegistrableFields"],"mappings":"4QAMO,SAASA,kBAAkBC,QAChC,MAAMC,KAAgBD,OAAOA,OAAOE,SAEpC,OAAOC,qBAAqB,CAC1BC,MAAOC,eAAeL,OAAOA,OAAOI,OACpCE,KAAML,KAAKK,KACXC,IAAKN,KAAKM,OACPC,qCAAqCR,SAE5C"}
@@ -1 +1 @@
1
- {"version":3,"file":"FogFactory.js","sources":["../../../src/Fog/Factories/FogFactory.ts"],"sourcesContent":["import type { TReactiveFactory } from '@Anarchy/Engine/Abstract';\nimport { FactoryType, ReactiveFactory } from '@Anarchy/Engine/Abstract';\nimport { fogConfigToParams } from '@Anarchy/Engine/Fog/Adapters';\nimport type { TFogFactory, TFogParams, TFogWrapper } from '@Anarchy/Engine/Fog/Models';\nimport { FogWrapper } from '@Anarchy/Engine/Fog/Wrappers';\n\nexport function FogFactory(): TFogFactory {\n const factory: TReactiveFactory<TFogWrapper, TFogParams> = ReactiveFactory(FactoryType.Fog, FogWrapper);\n // eslint-disable-next-line functional/immutable-data\n return Object.assign(factory, { configToParams: fogConfigToParams });\n}\n"],"names":["FogFactory","factory","ReactiveFactory","FactoryType","Fog","FogWrapper","Object","assign","configToParams","fogConfigToParams"],"mappings":"yPAMO,SAASA,aACd,MAAMC,QAAqDC,gBAAgBC,YAAYC,IAAKC,YAE5F,OAAOC,OAAOC,OAAON,QAAS,CAAEO,eAAgBC,mBAClD"}
1
+ {"version":3,"file":"FogFactory.js","sources":["../../../src/Fog/Factories/FogFactory.ts"],"sourcesContent":["import type { TReactiveFactory } from '@hellpig/anarchy-engine/Abstract';\nimport { FactoryType, ReactiveFactory } from '@hellpig/anarchy-engine/Abstract';\nimport { fogConfigToParams } from '@hellpig/anarchy-engine/Fog/Adapters';\nimport type { TFogFactory, TFogParams, TFogWrapper } from '@hellpig/anarchy-engine/Fog/Models';\nimport { FogWrapper } from '@hellpig/anarchy-engine/Fog/Wrappers';\n\nexport function FogFactory(): TFogFactory {\n const factory: TReactiveFactory<TFogWrapper, TFogParams> = ReactiveFactory(FactoryType.Fog, FogWrapper);\n // eslint-disable-next-line functional/immutable-data\n return Object.assign(factory, { configToParams: fogConfigToParams });\n}\n"],"names":["FogFactory","factory","ReactiveFactory","FactoryType","Fog","FogWrapper","Object","assign","configToParams","fogConfigToParams"],"mappings":"yPAMO,SAASA,aACd,MAAMC,QAAqDC,gBAAgBC,YAAYC,IAAKC,YAE5F,OAAOC,OAAOC,OAAON,QAAS,CAAEO,eAAgBC,mBAClD"}
@@ -1 +1 @@
1
- {"version":3,"file":"FogRegistry.js","sources":["../../../src/Fog/Registries/FogRegistry.ts"],"sourcesContent":["import { RegistryType } from '@Anarchy/Engine/Abstract/Constants';\nimport { AbstractEntityRegistry } from '@Anarchy/Engine/Abstract/Registries';\nimport type { TFogRegistry, TFogWrapper } from '@Anarchy/Engine/Fog/Models';\n\nexport function FogRegistry(): TFogRegistry {\n return AbstractEntityRegistry<TFogWrapper>(RegistryType.Fog);\n}\n"],"names":["FogRegistry","AbstractEntityRegistry","RegistryType","Fog"],"mappings":"2JAIO,SAASA,cACd,OAAOC,uBAAoCC,aAAaC,IAC1D"}
1
+ {"version":3,"file":"FogRegistry.js","sources":["../../../src/Fog/Registries/FogRegistry.ts"],"sourcesContent":["import { RegistryType } from '@hellpig/anarchy-engine/Abstract/Constants';\nimport { AbstractEntityRegistry } from '@hellpig/anarchy-engine/Abstract/Registries';\nimport type { TFogRegistry, TFogWrapper } from '@hellpig/anarchy-engine/Fog/Models';\n\nexport function FogRegistry(): TFogRegistry {\n return AbstractEntityRegistry<TFogWrapper>(RegistryType.Fog);\n}\n"],"names":["FogRegistry","AbstractEntityRegistry","RegistryType","Fog"],"mappings":"2JAIO,SAASA,cACd,OAAOC,uBAAoCC,aAAaC,IAC1D"}
@@ -1 +1 @@
1
- {"version":3,"file":"FogService.js","sources":["../../../src/Fog/Services/FogService.ts"],"sourcesContent":["import type { TAbstractService, TRegistryPack } from '@Anarchy/Engine/Abstract';\nimport { AbstractService } from '@Anarchy/Engine/Abstract';\nimport type {\n TFogConfig,\n TFogFactory,\n TFogRegistry,\n TFogService,\n TFogServiceWithCreate,\n TFogServiceWithCreateFromConfig,\n TFogServiceWithFactory,\n TFogServiceWithRegistry,\n TFogWrapper\n} from '@Anarchy/Engine/Fog/Models';\nimport type { TDisposable } from '@Anarchy/Engine/Mixins';\nimport { withCreateFromConfigServiceMixin, withCreateServiceMixin, withFactoryService, withRegistryService, withSceneGetterService, withSerializableEntities } from '@Anarchy/Engine/Mixins';\nimport type { TSceneWrapper } from '@Anarchy/Engine/Scene';\nimport { mergeAll } from '@Anarchy/Engine/Utils';\nimport type { Subscription } from 'rxjs';\n\nexport function FogService(factory: TFogFactory, registry: TFogRegistry, scene: TSceneWrapper): TFogService {\n const registrySub$: Subscription = registry.added$.subscribe(({ value }: TRegistryPack<TFogWrapper>): void => scene.setFog(value));\n const factorySub$: Subscription = factory.entityCreated$.subscribe((fog: TFogWrapper): void => registry.add(fog));\n const disposable: ReadonlyArray<TDisposable> = [registry, factory, registrySub$, factorySub$];\n const abstractService: TAbstractService = AbstractService(disposable);\n\n const withCreateService: TFogServiceWithCreate = withCreateServiceMixin(factory, undefined);\n const withCreateFromConfigService: TFogServiceWithCreateFromConfig = withCreateFromConfigServiceMixin(withCreateService.create, factory.configToParams, undefined);\n const withFactory: TFogServiceWithFactory = withFactoryService(factory);\n const withRegistry: TFogServiceWithRegistry = withRegistryService(registry);\n\n return mergeAll(\n abstractService,\n withCreateService,\n withCreateFromConfigService,\n withFactory,\n withRegistry,\n withSerializableEntities<TFogWrapper, TFogConfig, undefined>(registry),\n withSceneGetterService(scene)\n );\n}\n"],"names":["FogService","factory","registry","scene","registrySub$","added$","subscribe","value","setFog","factorySub$","entityCreated$","fog","add","abstractService","AbstractService","withCreateService","withCreateServiceMixin","withCreateFromConfigService","withCreateFromConfigServiceMixin","create","configToParams","withFactory","withFactoryService","withRegistry","withRegistryService","mergeAll","withSerializableEntities","withSceneGetterService"],"mappings":"inBAmBO,SAASA,WAAWC,QAAsBC,SAAwBC,OACvE,MAAMC,aAA6BF,SAASG,OAAOC,UAAU,EAAGC,eAA8CJ,MAAMK,OAAOD,QACrHE,YAA4BR,QAAQS,eAAeJ,UAAWK,KAA2BT,SAASU,IAAID,MAEtGE,gBAAoCC,gBADK,CAACZ,SAAUD,QAASG,aAAcK,cAG3EM,kBAA2CC,uBAAuBf,gBAClEgB,4BAA+DC,iCAAiCH,kBAAkBI,OAAQlB,QAAQmB,uBAClIC,YAAsCC,mBAAmBrB,SACzDsB,aAAwCC,oBAAoBtB,UAElE,OAAOuB,SACLZ,gBACAE,kBACAE,4BACAI,YACAE,aACAG,yBAA6DxB,UAC7DyB,uBAAuBxB,OAE3B"}
1
+ {"version":3,"file":"FogService.js","sources":["../../../src/Fog/Services/FogService.ts"],"sourcesContent":["import type { TAbstractService, TRegistryPack } from '@hellpig/anarchy-engine/Abstract';\nimport { AbstractService } from '@hellpig/anarchy-engine/Abstract';\nimport type {\n TFogConfig,\n TFogFactory,\n TFogRegistry,\n TFogService,\n TFogServiceWithCreate,\n TFogServiceWithCreateFromConfig,\n TFogServiceWithFactory,\n TFogServiceWithRegistry,\n TFogWrapper\n} from '@hellpig/anarchy-engine/Fog/Models';\nimport type { TDisposable } from '@hellpig/anarchy-engine/Mixins';\nimport { withCreateFromConfigServiceMixin, withCreateServiceMixin, withFactoryService, withRegistryService, withSceneGetterService, withSerializableEntities } from '@hellpig/anarchy-engine/Mixins';\nimport type { TSceneWrapper } from '@hellpig/anarchy-engine/Scene';\nimport { mergeAll } from '@hellpig/anarchy-engine/Utils';\nimport type { Subscription } from 'rxjs';\n\nexport function FogService(factory: TFogFactory, registry: TFogRegistry, scene: TSceneWrapper): TFogService {\n const registrySub$: Subscription = registry.added$.subscribe(({ value }: TRegistryPack<TFogWrapper>): void => scene.setFog(value));\n const factorySub$: Subscription = factory.entityCreated$.subscribe((fog: TFogWrapper): void => registry.add(fog));\n const disposable: ReadonlyArray<TDisposable> = [registry, factory, registrySub$, factorySub$];\n const abstractService: TAbstractService = AbstractService(disposable);\n\n const withCreateService: TFogServiceWithCreate = withCreateServiceMixin(factory, undefined);\n const withCreateFromConfigService: TFogServiceWithCreateFromConfig = withCreateFromConfigServiceMixin(withCreateService.create, factory.configToParams, undefined);\n const withFactory: TFogServiceWithFactory = withFactoryService(factory);\n const withRegistry: TFogServiceWithRegistry = withRegistryService(registry);\n\n return mergeAll(\n abstractService,\n withCreateService,\n withCreateFromConfigService,\n withFactory,\n withRegistry,\n withSerializableEntities<TFogWrapper, TFogConfig, undefined>(registry),\n withSceneGetterService(scene)\n );\n}\n"],"names":["FogService","factory","registry","scene","registrySub$","added$","subscribe","value","setFog","factorySub$","entityCreated$","fog","add","abstractService","AbstractService","withCreateService","withCreateServiceMixin","withCreateFromConfigService","withCreateFromConfigServiceMixin","create","configToParams","withFactory","withFactoryService","withRegistry","withRegistryService","mergeAll","withSerializableEntities","withSceneGetterService"],"mappings":"inBAmBO,SAASA,WAAWC,QAAsBC,SAAwBC,OACvE,MAAMC,aAA6BF,SAASG,OAAOC,UAAU,EAAGC,eAA8CJ,MAAMK,OAAOD,QACrHE,YAA4BR,QAAQS,eAAeJ,UAAWK,KAA2BT,SAASU,IAAID,MAEtGE,gBAAoCC,gBADK,CAACZ,SAAUD,QAASG,aAAcK,cAG3EM,kBAA2CC,uBAAuBf,gBAClEgB,4BAA+DC,iCAAiCH,kBAAkBI,OAAQlB,QAAQmB,uBAClIC,YAAsCC,mBAAmBrB,SACzDsB,aAAwCC,oBAAoBtB,UAElE,OAAOuB,SACLZ,gBACAE,kBACAE,4BACAI,YACAE,aACAG,yBAA6DxB,UAC7DyB,uBAAuBxB,OAE3B"}
@@ -1 +1 @@
1
- {"version":3,"file":"FogWrapper.js","sources":["../../../src/Fog/Wrappers/FogWrapper.ts"],"sourcesContent":["import type { TAbstractWrapper } from '@Anarchy/Engine/Abstract';\nimport { AbstractWrapper, WrapperType } from '@Anarchy/Engine/Abstract';\nimport { fogEntityToConfig } from '@Anarchy/Engine/Fog/Adapters';\nimport type { TFog, TFogConfig, TFogParams, TFogWrapper } from '@Anarchy/Engine/Fog/Models';\nimport { Fog } from 'three';\n\nexport function FogWrapper(params: TFogParams): TFogWrapper {\n const entity: TFog = new Fog(params.color, params.near, params.far);\n\n const wrapper: TAbstractWrapper<TFog> = AbstractWrapper(entity, WrapperType.Fog, params);\n\n // eslint-disable-next-line functional/immutable-data\n const result = Object.assign(wrapper, {\n entity,\n serialize: (): TFogConfig => fogEntityToConfig(result)\n });\n\n return result;\n}\n"],"names":["FogWrapper","params","entity","Fog","color","near","far","wrapper","AbstractWrapper","WrapperType","result","Object","assign","serialize","fogEntityToConfig"],"mappings":"6NAMO,SAASA,WAAWC,QACzB,MAAMC,OAAe,IAAIC,IAAIF,OAAOG,MAAOH,OAAOI,KAAMJ,OAAOK,KAEzDC,QAAkCC,gBAAgBN,OAAQO,YAAYN,IAAKF,QAG3ES,OAASC,OAAOC,OAAOL,QAAS,CACpCL,cACAW,UAAW,IAAkBC,kBAAkBJ,UAGjD,OAAOA,MACT"}
1
+ {"version":3,"file":"FogWrapper.js","sources":["../../../src/Fog/Wrappers/FogWrapper.ts"],"sourcesContent":["import type { TAbstractWrapper } from '@hellpig/anarchy-engine/Abstract';\nimport { AbstractWrapper, WrapperType } from '@hellpig/anarchy-engine/Abstract';\nimport { fogEntityToConfig } from '@hellpig/anarchy-engine/Fog/Adapters';\nimport type { TFog, TFogConfig, TFogParams, TFogWrapper } from '@hellpig/anarchy-engine/Fog/Models';\nimport { Fog } from 'three';\n\nexport function FogWrapper(params: TFogParams): TFogWrapper {\n const entity: TFog = new Fog(params.color, params.near, params.far);\n\n const wrapper: TAbstractWrapper<TFog> = AbstractWrapper(entity, WrapperType.Fog, params);\n\n // eslint-disable-next-line functional/immutable-data\n const result = Object.assign(wrapper, {\n entity,\n serialize: (): TFogConfig => fogEntityToConfig(result)\n });\n\n return result;\n}\n"],"names":["FogWrapper","params","entity","Fog","color","near","far","wrapper","AbstractWrapper","WrapperType","result","Object","assign","serialize","fogEntityToConfig"],"mappings":"6NAMO,SAASA,WAAWC,QACzB,MAAMC,OAAe,IAAIC,IAAIF,OAAOG,MAAOH,OAAOI,KAAMJ,OAAOK,KAEzDC,QAAkCC,gBAAgBN,OAAQO,YAAYN,IAAKF,QAG3ES,OAASC,OAAOC,OAAOL,QAAS,CACpCL,cACAW,UAAW,IAAkBC,kBAAkBJ,UAGjD,OAAOA,MACT"}
@@ -1 +1 @@
1
- {"version":3,"file":"ConfigToParams.js","sources":["../../../src/Fsm/Adapters/ConfigToParams.ts"],"sourcesContent":["import type { TFsmConfig, TFsmEvents, TFsmParams, TFsmSource } from '@Anarchy/Engine/Fsm/Models';\n\nexport function fsmConfigToParams(config: TFsmConfig): TFsmParams | never {\n if (hasFunctions(config)) throw new Error('Config must not contains functions');\n\n if (config.transitions.every((t: ReadonlyArray<TFsmSource | TFsmEvents>): boolean => t.length !== 3)) throw new Error('Transitions must be an array of 3 elements');\n\n return {\n ...config,\n transitions: config.transitions as TFsmParams['transitions']\n };\n}\n\nfunction hasFunctions(obj: any): boolean {\n // eslint-disable-next-line functional/no-loop-statements\n for (const key in obj) {\n if (typeof obj[key] === 'function') {\n return true;\n } else if (typeof obj[key] === 'object' && obj[key] !== null) {\n if (hasFunctions(obj[key])) return true;\n }\n }\n return false;\n}\n"],"names":["fsmConfigToParams","config","hasFunctions","Error","transitions","every","t","length","obj","key"],"mappings":"AAEO,SAASA,kBAAkBC,QAChC,GAAIC,aAAaD,QAAS,MAAM,IAAIE,MAAM,sCAE1C,GAAIF,OAAOG,YAAYC,MAAOC,GAAoE,IAAbA,EAAEC,QAAe,MAAM,IAAIJ,MAAM,8CAEtH,MAAO,IACFF,OACHG,YAAaH,OAAOG,YAExB,CAEA,SAASF,aAAaM,KAEpB,IAAA,MAAWC,OAAOD,IAAK,CACrB,GAAwB,mBAAbA,IAAIC,KACb,OAAO,EACT,GAA+B,iBAAbD,IAAIC,MAAkC,OAAbD,IAAIC,MACzCP,aAAaM,IAAIC,MAAO,OAAO,CAEvC,CACA,OAAO,CACT"}
1
+ {"version":3,"file":"ConfigToParams.js","sources":["../../../src/Fsm/Adapters/ConfigToParams.ts"],"sourcesContent":["import type { TFsmConfig, TFsmEvents, TFsmParams, TFsmSource } from '@hellpig/anarchy-engine/Fsm/Models';\n\nexport function fsmConfigToParams(config: TFsmConfig): TFsmParams | never {\n if (hasFunctions(config)) throw new Error('Config must not contains functions');\n\n if (config.transitions.every((t: ReadonlyArray<TFsmSource | TFsmEvents>): boolean => t.length !== 3)) throw new Error('Transitions must be an array of 3 elements');\n\n return {\n ...config,\n transitions: config.transitions as TFsmParams['transitions']\n };\n}\n\nfunction hasFunctions(obj: any): boolean {\n // eslint-disable-next-line functional/no-loop-statements\n for (const key in obj) {\n if (typeof obj[key] === 'function') {\n return true;\n } else if (typeof obj[key] === 'object' && obj[key] !== null) {\n if (hasFunctions(obj[key])) return true;\n }\n }\n return false;\n}\n"],"names":["fsmConfigToParams","config","hasFunctions","Error","transitions","every","t","length","obj","key"],"mappings":"AAEO,SAASA,kBAAkBC,QAChC,GAAIC,aAAaD,QAAS,MAAM,IAAIE,MAAM,sCAE1C,GAAIF,OAAOG,YAAYC,MAAOC,GAAoE,IAAbA,EAAEC,QAAe,MAAM,IAAIJ,MAAM,8CAEtH,MAAO,IACFF,OACHG,YAAaH,OAAOG,YAExB,CAEA,SAASF,aAAaM,KAEpB,IAAA,MAAWC,OAAOD,IAAK,CACrB,GAAwB,mBAAbA,IAAIC,KACb,OAAO,EACT,GAA+B,iBAAbD,IAAIC,MAAkC,OAAbD,IAAIC,MACzCP,aAAaM,IAAIC,MAAO,OAAO,CAEvC,CACA,OAAO,CACT"}
@@ -1 +1 @@
1
- {"version":3,"file":"EntityToConfig.js","sources":["../../../src/Fsm/Adapters/EntityToConfig.ts"],"sourcesContent":["import type { TFsmConfig, TFsmWrapper } from '@Anarchy/Engine/Fsm/Models';\nimport { extractSerializableRegistrableFields } from '@Anarchy/Engine/Mixins';\nimport { filterOutEmptyFields } from '@Anarchy/Shared/Utils';\n\nexport function fsmEntityToConfig(entity: TFsmWrapper): TFsmConfig {\n return filterOutEmptyFields({\n initial: entity.getInitial(),\n currentState: entity.getState(),\n transitions: entity.getTransitions(),\n type: entity.type,\n strategy: entity.strategy$.value,\n ...extractSerializableRegistrableFields(entity)\n });\n}\n"],"names":["fsmEntityToConfig","entity","filterOutEmptyFields","initial","getInitial","currentState","getState","transitions","getTransitions","type","strategy","strategy$","value","extractSerializableRegistrableFields"],"mappings":"yMAIO,SAASA,kBAAkBC,QAChC,OAAOC,qBAAqB,CAC1BC,QAASF,OAAOG,aAChBC,aAAcJ,OAAOK,WACrBC,YAAaN,OAAOO,iBACpBC,KAAMR,OAAOQ,KACbC,SAAUT,OAAOU,UAAUC,SACxBC,qCAAqCZ,SAE5C"}
1
+ {"version":3,"file":"EntityToConfig.js","sources":["../../../src/Fsm/Adapters/EntityToConfig.ts"],"sourcesContent":["import type { TFsmConfig, TFsmWrapper } from '@hellpig/anarchy-engine/Fsm/Models';\nimport { extractSerializableRegistrableFields } from '@hellpig/anarchy-engine/Mixins';\nimport { filterOutEmptyFields } from '@hellpig/anarchy-shared/Utils';\n\nexport function fsmEntityToConfig(entity: TFsmWrapper): TFsmConfig {\n return filterOutEmptyFields({\n initial: entity.getInitial(),\n currentState: entity.getState(),\n transitions: entity.getTransitions(),\n type: entity.type,\n strategy: entity.strategy$.value,\n ...extractSerializableRegistrableFields(entity)\n });\n}\n"],"names":["fsmEntityToConfig","entity","filterOutEmptyFields","initial","getInitial","currentState","getState","transitions","getTransitions","type","strategy","strategy$","value","extractSerializableRegistrableFields"],"mappings":"yMAIO,SAASA,kBAAkBC,QAChC,OAAOC,qBAAqB,CAC1BC,QAASF,OAAOG,aAChBC,aAAcJ,OAAOK,WACrBC,YAAaN,OAAOO,iBACpBC,KAAMR,OAAOQ,KACbC,SAAUT,OAAOU,UAAUC,SACxBC,qCAAqCZ,SAE5C"}
@@ -1 +1 @@
1
- {"version":3,"file":"FsmSource.js","sources":["../../../src/Fsm/Entities/FsmSource.ts"],"sourcesContent":["import type { TFsmConfig, TFsmParams, TFsmSource } from '@Anarchy/Engine/Fsm/Models';\nimport { omitInObjectWithoutMutation } from '@Anarchy/Shared/Utils';\nimport { nanoid } from 'nanoid';\n\nexport function FsmSource(params: TFsmParams): TFsmSource {\n const id: string = params.type + '_fsm_' + nanoid();\n\n const result = {\n id,\n ...params,\n tags: params.tags || [],\n serialize: (): TFsmConfig => omitInObjectWithoutMutation(result, ['id', 'tags', 'serialize'])\n };\n\n return result;\n}\n"],"names":["FsmSource","params","result","id","type","nanoid","tags","serialize","omitInObjectWithoutMutation"],"mappings":"uLAIO,SAASA,UAAUC,QACxB,MAEMC,OAAS,CACbC,GAHiBF,OAAOG,KAAO,QAAUC,YAItCJ,OACHK,KAAML,OAAOK,MAAQ,GACrBC,UAAW,IAAkBC,4BAA4BN,OAAQ,CAAC,KAAM,OAAQ,eAGlF,OAAOA,MACT"}
1
+ {"version":3,"file":"FsmSource.js","sources":["../../../src/Fsm/Entities/FsmSource.ts"],"sourcesContent":["import type { TFsmConfig, TFsmParams, TFsmSource } from '@hellpig/anarchy-engine/Fsm/Models';\nimport { omitInObjectWithoutMutation } from '@hellpig/anarchy-shared/Utils';\nimport { nanoid } from 'nanoid';\n\nexport function FsmSource(params: TFsmParams): TFsmSource {\n const id: string = params.type + '_fsm_' + nanoid();\n\n const result = {\n id,\n ...params,\n tags: params.tags || [],\n serialize: (): TFsmConfig => omitInObjectWithoutMutation(result, ['id', 'tags', 'serialize'])\n };\n\n return result;\n}\n"],"names":["FsmSource","params","result","id","type","nanoid","tags","serialize","omitInObjectWithoutMutation"],"mappings":"uLAIO,SAASA,UAAUC,QACxB,MAEMC,OAAS,CACbC,GAHiBF,OAAOG,KAAO,QAAUC,YAItCJ,OACHK,KAAML,OAAOK,MAAQ,GACrBC,UAAW,IAAkBC,4BAA4BN,OAAQ,CAAC,KAAM,OAAQ,eAGlF,OAAOA,MACT"}
@@ -1 +1 @@
1
- {"version":3,"file":"FsmInstanceFactory.js","sources":["../../../src/Fsm/Factories/FsmInstanceFactory.ts"],"sourcesContent":["import type { TReactiveFactory } from '@Anarchy/Engine/Abstract';\nimport { FactoryType, ReactiveFactory } from '@Anarchy/Engine/Abstract';\nimport { fsmConfigToParams } from '@Anarchy/Engine/Fsm/Adapters';\nimport type { TFsmInstanceFactory, TFsmParams, TFsmWrapper } from '@Anarchy/Engine/Fsm/Models';\nimport { FsmWrapper } from '@Anarchy/Engine/Fsm/Wrappers';\n\nexport function FsmInstanceFactory(): TFsmInstanceFactory {\n const factory: TReactiveFactory<TFsmWrapper, TFsmParams> = ReactiveFactory(FactoryType.FsmInstance, FsmWrapper);\n // eslint-disable-next-line functional/immutable-data\n return Object.assign(factory, { configToParams: fsmConfigToParams });\n}\n"],"names":["FsmInstanceFactory","factory","ReactiveFactory","FactoryType","FsmInstance","FsmWrapper","Object","assign","configToParams","fsmConfigToParams"],"mappings":"yPAMO,SAASA,qBACd,MAAMC,QAAqDC,gBAAgBC,YAAYC,YAAaC,YAEpG,OAAOC,OAAOC,OAAON,QAAS,CAAEO,eAAgBC,mBAClD"}
1
+ {"version":3,"file":"FsmInstanceFactory.js","sources":["../../../src/Fsm/Factories/FsmInstanceFactory.ts"],"sourcesContent":["import type { TReactiveFactory } from '@hellpig/anarchy-engine/Abstract';\nimport { FactoryType, ReactiveFactory } from '@hellpig/anarchy-engine/Abstract';\nimport { fsmConfigToParams } from '@hellpig/anarchy-engine/Fsm/Adapters';\nimport type { TFsmInstanceFactory, TFsmParams, TFsmWrapper } from '@hellpig/anarchy-engine/Fsm/Models';\nimport { FsmWrapper } from '@hellpig/anarchy-engine/Fsm/Wrappers';\n\nexport function FsmInstanceFactory(): TFsmInstanceFactory {\n const factory: TReactiveFactory<TFsmWrapper, TFsmParams> = ReactiveFactory(FactoryType.FsmInstance, FsmWrapper);\n // eslint-disable-next-line functional/immutable-data\n return Object.assign(factory, { configToParams: fsmConfigToParams });\n}\n"],"names":["FsmInstanceFactory","factory","ReactiveFactory","FactoryType","FsmInstance","FsmWrapper","Object","assign","configToParams","fsmConfigToParams"],"mappings":"yPAMO,SAASA,qBACd,MAAMC,QAAqDC,gBAAgBC,YAAYC,YAAaC,YAEpG,OAAOC,OAAOC,OAAON,QAAS,CAAEO,eAAgBC,mBAClD"}
@@ -1 +1 @@
1
- {"version":3,"file":"FsmSourceFactory.js","sources":["../../../src/Fsm/Factories/FsmSourceFactory.ts"],"sourcesContent":["import type { TReactiveFactory } from '@Anarchy/Engine/Abstract';\nimport { FactoryType, ReactiveFactory } from '@Anarchy/Engine/Abstract';\nimport { fsmConfigToParams } from '@Anarchy/Engine/Fsm/Adapters';\nimport { FsmSource } from '@Anarchy/Engine/Fsm/Entities';\nimport type { TFsmParams, TFsmSource, TFsmSourceFactory } from '@Anarchy/Engine/Fsm/Models';\n\nexport function FsmSourceFactory(): TFsmSourceFactory {\n const factory: TReactiveFactory<TFsmSource, TFsmParams> = ReactiveFactory(FactoryType.FsmSource, FsmSource);\n // eslint-disable-next-line functional/immutable-data\n return Object.assign(factory, { configToParams: fsmConfigToParams });\n}\n"],"names":["FsmSourceFactory","factory","ReactiveFactory","FactoryType","FsmSource","Object","assign","configToParams","fsmConfigToParams"],"mappings":"uPAMO,SAASA,mBACd,MAAMC,QAAoDC,gBAAgBC,YAAYC,UAAWA,WAEjG,OAAOC,OAAOC,OAAOL,QAAS,CAAEM,eAAgBC,mBAClD"}
1
+ {"version":3,"file":"FsmSourceFactory.js","sources":["../../../src/Fsm/Factories/FsmSourceFactory.ts"],"sourcesContent":["import type { TReactiveFactory } from '@hellpig/anarchy-engine/Abstract';\nimport { FactoryType, ReactiveFactory } from '@hellpig/anarchy-engine/Abstract';\nimport { fsmConfigToParams } from '@hellpig/anarchy-engine/Fsm/Adapters';\nimport { FsmSource } from '@hellpig/anarchy-engine/Fsm/Entities';\nimport type { TFsmParams, TFsmSource, TFsmSourceFactory } from '@hellpig/anarchy-engine/Fsm/Models';\n\nexport function FsmSourceFactory(): TFsmSourceFactory {\n const factory: TReactiveFactory<TFsmSource, TFsmParams> = ReactiveFactory(FactoryType.FsmSource, FsmSource);\n // eslint-disable-next-line functional/immutable-data\n return Object.assign(factory, { configToParams: fsmConfigToParams });\n}\n"],"names":["FsmSourceFactory","factory","ReactiveFactory","FactoryType","FsmSource","Object","assign","configToParams","fsmConfigToParams"],"mappings":"uPAMO,SAASA,mBACd,MAAMC,QAAoDC,gBAAgBC,YAAYC,UAAWA,WAEjG,OAAOC,OAAOC,OAAOL,QAAS,CAAEM,eAAgBC,mBAClD"}
@@ -1 +1 @@
1
- {"version":3,"file":"FsmInstanceRegistry.js","sources":["../../../src/Fsm/Registries/FsmInstanceRegistry.ts"],"sourcesContent":["import { RegistryType } from '@Anarchy/Engine/Abstract/Constants';\nimport { AbstractEntityRegistry } from '@Anarchy/Engine/Abstract/Registries';\nimport type { TFsmInstanceRegistry, TFsmWrapper } from '@Anarchy/Engine/Fsm/Models';\n\nexport function FsmInstanceRegistry(): TFsmInstanceRegistry {\n return AbstractEntityRegistry<TFsmWrapper>(RegistryType.FsmInstance);\n}\n"],"names":["FsmInstanceRegistry","AbstractEntityRegistry","RegistryType","FsmInstance"],"mappings":"2JAIO,SAASA,sBACd,OAAOC,uBAAoCC,aAAaC,YAC1D"}
1
+ {"version":3,"file":"FsmInstanceRegistry.js","sources":["../../../src/Fsm/Registries/FsmInstanceRegistry.ts"],"sourcesContent":["import { RegistryType } from '@hellpig/anarchy-engine/Abstract/Constants';\nimport { AbstractEntityRegistry } from '@hellpig/anarchy-engine/Abstract/Registries';\nimport type { TFsmInstanceRegistry, TFsmWrapper } from '@hellpig/anarchy-engine/Fsm/Models';\n\nexport function FsmInstanceRegistry(): TFsmInstanceRegistry {\n return AbstractEntityRegistry<TFsmWrapper>(RegistryType.FsmInstance);\n}\n"],"names":["FsmInstanceRegistry","AbstractEntityRegistry","RegistryType","FsmInstance"],"mappings":"2JAIO,SAASA,sBACd,OAAOC,uBAAoCC,aAAaC,YAC1D"}
@@ -1 +1 @@
1
- {"version":3,"file":"FsmSourceRegistry.js","sources":["../../../src/Fsm/Registries/FsmSourceRegistry.ts"],"sourcesContent":["import { RegistryType } from '@Anarchy/Engine/Abstract/Constants';\nimport { AbstractSimpleRegistry } from '@Anarchy/Engine/Abstract/Registries';\nimport type { TFsmSource, TFsmSourceRegistry } from '@Anarchy/Engine/Fsm/Models';\n\nexport function FsmSourceRegistry(): TFsmSourceRegistry {\n return AbstractSimpleRegistry<TFsmSource>(RegistryType.FsmSource);\n}\n"],"names":["FsmSourceRegistry","AbstractSimpleRegistry","RegistryType","FsmSource"],"mappings":"2JAIO,SAASA,oBACd,OAAOC,uBAAmCC,aAAaC,UACzD"}
1
+ {"version":3,"file":"FsmSourceRegistry.js","sources":["../../../src/Fsm/Registries/FsmSourceRegistry.ts"],"sourcesContent":["import { RegistryType } from '@hellpig/anarchy-engine/Abstract/Constants';\nimport { AbstractSimpleRegistry } from '@hellpig/anarchy-engine/Abstract/Registries';\nimport type { TFsmSource, TFsmSourceRegistry } from '@hellpig/anarchy-engine/Fsm/Models';\n\nexport function FsmSourceRegistry(): TFsmSourceRegistry {\n return AbstractSimpleRegistry<TFsmSource>(RegistryType.FsmSource);\n}\n"],"names":["FsmSourceRegistry","AbstractSimpleRegistry","RegistryType","FsmSource"],"mappings":"2JAIO,SAASA,oBACd,OAAOC,uBAAmCC,aAAaC,UACzD"}
@@ -1 +1 @@
1
- {"version":3,"file":"FsmInstanceService.js","sources":["../../../src/Fsm/Services/FsmInstanceService.ts"],"sourcesContent":["import type { TAbstractService } from '@Anarchy/Engine/Abstract';\nimport { AbstractService } from '@Anarchy/Engine/Abstract';\nimport type {\n TFsmConfig,\n TFsmInstanceFactory,\n TFsmInstanceRegistry,\n TFsmInstanceServiceWithCreate,\n TFsmInstanceServiceWithFactory,\n TFsmInstanceServiceWithRegistry,\n TFsmWrapper\n} from '@Anarchy/Engine/Fsm/Models';\nimport type { TFsmInstanceService } from '@Anarchy/Engine/Fsm/Models/TFsmInstanceService';\nimport type { TDisposable } from '@Anarchy/Engine/Mixins';\nimport { withCreateServiceMixin, withFactoryService, withRegistryService, withSerializableEntities } from '@Anarchy/Engine/Mixins';\nimport { mergeAll } from '@Anarchy/Engine/Utils';\nimport type { Subscription } from 'rxjs';\n\nexport function FsmInstanceService(factory: TFsmInstanceFactory, registry: TFsmInstanceRegistry): TFsmInstanceService {\n const factorySub$: Subscription = factory.entityCreated$.subscribe((fsm: TFsmWrapper): void => registry.add(fsm));\n const disposable: ReadonlyArray<TDisposable> = [registry, factory, factorySub$];\n const abstractService: TAbstractService = AbstractService(disposable);\n\n const withCreateService: TFsmInstanceServiceWithCreate = withCreateServiceMixin(factory, undefined);\n const withFactory: TFsmInstanceServiceWithFactory = withFactoryService(factory);\n const withRegistry: TFsmInstanceServiceWithRegistry = withRegistryService(registry);\n\n return mergeAll(abstractService, withCreateService, withFactory, withRegistry, withSerializableEntities<TFsmWrapper, TFsmConfig>(registry));\n}\n"],"names":["FsmInstanceService","factory","registry","factorySub$","entityCreated$","subscribe","fsm","add","abstractService","AbstractService","withCreateService","withCreateServiceMixin","withFactory","withFactoryService","withRegistry","withRegistryService","mergeAll","withSerializableEntities"],"mappings":"0bAiBO,SAASA,mBAAmBC,QAA8BC,UAC/D,MAAMC,YAA4BF,QAAQG,eAAeC,UAAWC,KAA2BJ,SAASK,IAAID,MAEtGE,gBAAoCC,gBADK,CAACP,SAAUD,QAASE,cAG7DO,kBAAmDC,uBAAuBV,gBAC1EW,YAA8CC,mBAAmBZ,SACjEa,aAAgDC,oBAAoBb,UAE1E,OAAOc,SAASR,gBAAiBE,kBAAmBE,YAAaE,aAAcG,yBAAkDf,UACnI"}
1
+ {"version":3,"file":"FsmInstanceService.js","sources":["../../../src/Fsm/Services/FsmInstanceService.ts"],"sourcesContent":["import type { TAbstractService } from '@hellpig/anarchy-engine/Abstract';\nimport { AbstractService } from '@hellpig/anarchy-engine/Abstract';\nimport type {\n TFsmConfig,\n TFsmInstanceFactory,\n TFsmInstanceRegistry,\n TFsmInstanceServiceWithCreate,\n TFsmInstanceServiceWithFactory,\n TFsmInstanceServiceWithRegistry,\n TFsmWrapper\n} from '@hellpig/anarchy-engine/Fsm/Models';\nimport type { TFsmInstanceService } from '@hellpig/anarchy-engine/Fsm/Models/TFsmInstanceService';\nimport type { TDisposable } from '@hellpig/anarchy-engine/Mixins';\nimport { withCreateServiceMixin, withFactoryService, withRegistryService, withSerializableEntities } from '@hellpig/anarchy-engine/Mixins';\nimport { mergeAll } from '@hellpig/anarchy-engine/Utils';\nimport type { Subscription } from 'rxjs';\n\nexport function FsmInstanceService(factory: TFsmInstanceFactory, registry: TFsmInstanceRegistry): TFsmInstanceService {\n const factorySub$: Subscription = factory.entityCreated$.subscribe((fsm: TFsmWrapper): void => registry.add(fsm));\n const disposable: ReadonlyArray<TDisposable> = [registry, factory, factorySub$];\n const abstractService: TAbstractService = AbstractService(disposable);\n\n const withCreateService: TFsmInstanceServiceWithCreate = withCreateServiceMixin(factory, undefined);\n const withFactory: TFsmInstanceServiceWithFactory = withFactoryService(factory);\n const withRegistry: TFsmInstanceServiceWithRegistry = withRegistryService(registry);\n\n return mergeAll(abstractService, withCreateService, withFactory, withRegistry, withSerializableEntities<TFsmWrapper, TFsmConfig>(registry));\n}\n"],"names":["FsmInstanceService","factory","registry","factorySub$","entityCreated$","subscribe","fsm","add","abstractService","AbstractService","withCreateService","withCreateServiceMixin","withFactory","withFactoryService","withRegistry","withRegistryService","mergeAll","withSerializableEntities"],"mappings":"0bAiBO,SAASA,mBAAmBC,QAA8BC,UAC/D,MAAMC,YAA4BF,QAAQG,eAAeC,UAAWC,KAA2BJ,SAASK,IAAID,MAEtGE,gBAAoCC,gBADK,CAACP,SAAUD,QAASE,cAG7DO,kBAAmDC,uBAAuBV,gBAC1EW,YAA8CC,mBAAmBZ,SACjEa,aAAgDC,oBAAoBb,UAE1E,OAAOc,SAASR,gBAAiBE,kBAAmBE,YAAaE,aAAcG,yBAAkDf,UACnI"}
@@ -1 +1 @@
1
- {"version":3,"file":"FsmService.js","sources":["../../../src/Fsm/Services/FsmService.ts"],"sourcesContent":["import type { TAbstractService } from '@Anarchy/Engine/Abstract';\nimport { AbstractService } from '@Anarchy/Engine/Abstract';\nimport type { FsmEventsStrategy } from '@Anarchy/Engine/Fsm/Constants';\nimport type {\n TFsmConfig,\n TFsmInstanceFactory,\n TFsmInstanceRegistry,\n TFsmInstanceService,\n TFsmParams,\n TFsmService,\n TFsmSource,\n TFsmSourceFactory,\n TFsmSourceRegistry,\n TFsmSourceService,\n TFsmStates,\n TFsmWrapper\n} from '@Anarchy/Engine/Fsm/Models';\nimport type { TDisposable } from '@Anarchy/Engine/Mixins';\nimport { isDefined } from '@Anarchy/Shared/Utils';\nimport { isEqual } from 'lodash-es';\n\nimport { FsmInstanceService } from './FsmInstanceService';\nimport { FsmSourceService } from './FsmSourceService';\n\nexport function FsmService(instanceFactory: TFsmInstanceFactory, sourceFactory: TFsmSourceFactory, instanceRegistry: TFsmInstanceRegistry, sourceRegistry: TFsmSourceRegistry): TFsmService {\n const sourceService: TFsmSourceService = FsmSourceService(sourceFactory, sourceRegistry);\n const instanceService: TFsmInstanceService = FsmInstanceService(instanceFactory, instanceRegistry);\n\n const disposable: ReadonlyArray<TDisposable> = [sourceFactory, instanceFactory, instanceRegistry, sourceRegistry, sourceService, instanceService];\n const abstractService: TAbstractService = AbstractService(disposable);\n\n function create(params: TFsmParams, force: boolean = false): TFsmWrapper | never {\n let source: TFsmSource | undefined = sourceService.getRegistry().findByKey(params.name);\n if (isDefined(source) && !force) {\n if (!isParamsEqualsToSource(params, source))\n throw new Error(\n `[FsmService]. Can't create a fsm instance with name ${params.name}: Source already existed, but params are different. Maybe an accident. (Params should be the same, or use \"force\" option)`\n );\n return instanceFactory.create(source, undefined);\n }\n source = sourceFactory.create(params, undefined);\n return instanceFactory.create(source, undefined);\n }\n\n function createFromList(paramsList: ReadonlyArray<TFsmParams>, force: boolean = false): ReadonlyArray<TFsmWrapper> {\n return paramsList.map((params: TFsmParams): TFsmWrapper => create(params, force));\n }\n\n function isParamsEqualsToSource(params: TFsmParams, source: TFsmSource): boolean {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const { id, tags, ...sourceParams } = source;\n return isEqual(params, sourceParams);\n }\n\n function createInstanceBySourceName(sourceName: string, currentState?: TFsmStates, strategy?: FsmEventsStrategy): TFsmWrapper {\n let source: TFsmSource | undefined = sourceService.getRegistry().getByKey(sourceName);\n if (isDefined(currentState)) source = { ...source, currentState };\n if (isDefined(strategy)) source = { ...source, strategy };\n return instanceService.create(source);\n }\n\n // eslint-disable-next-line functional/immutable-data\n return Object.assign(abstractService, {\n create,\n createFromList,\n createInstance: instanceService.create,\n createInstanceBySourceName,\n createInstanceFromList: instanceService.createFromList,\n createSource: sourceService.create,\n createSourceFromConfig: sourceService.createFromConfig,\n createSourceFromList: sourceService.createFromList,\n getFactory: (): TFsmInstanceFactory => instanceFactory,\n getInstanceRegistry: (): TFsmInstanceRegistry => instanceRegistry,\n getSourceRegistry: (): TFsmSourceRegistry => sourceRegistry,\n serializeAllEntities: (): ReadonlyArray<TFsmConfig> => instanceService.serializeAllEntities(),\n serializeAllResources: (): ReadonlyArray<TFsmConfig> => sourceService.serializeAllEntities(),\n serializeEntity: (entity: TFsmWrapper): TFsmConfig => instanceService.serializeEntity(entity)\n });\n}\n"],"names":["FsmService","instanceFactory","sourceFactory","instanceRegistry","sourceRegistry","sourceService","FsmSourceService","instanceService","FsmInstanceService","abstractService","AbstractService","create","params","force","source","getRegistry","findByKey","name","isDefined","id","tags","sourceParams","isEqual","isParamsEqualsToSource","Error","Object","assign","createFromList","paramsList","map","createInstance","createInstanceBySourceName","sourceName","currentState","strategy","getByKey","createInstanceFromList","createSource","createSourceFromConfig","createFromConfig","createSourceFromList","getFactory","getInstanceRegistry","getSourceRegistry","serializeAllEntities","serializeAllResources","serializeEntity","entity"],"mappings":"8TAwBO,SAASA,WAAWC,gBAAsCC,cAAkCC,iBAAwCC,gBACzI,MAAMC,cAAmCC,iBAAiBJ,cAAeE,gBACnEG,gBAAuCC,mBAAmBP,gBAAiBE,kBAG3EM,gBAAoCC,gBADK,CAACR,cAAeD,gBAAiBE,iBAAkBC,eAAgBC,cAAeE,kBAGjI,SAASI,OAAOC,OAAoBC,OAAiB,GACnD,IAAIC,OAAiCT,cAAcU,cAAcC,UAAUJ,OAAOK,MAClF,GAAIC,UAAUJ,UAAYD,MAAO,CAC/B,IAcJ,SAAgCD,OAAoBE,QAElD,MAAMK,GAAEA,GAAAC,KAAIA,QAASC,cAAiBP,OACtC,OAAOQ,QAAQV,OAAQS,aACzB,CAlBSE,CAAuBX,OAAQE,QAClC,MAAM,IAAIU,MACR,uDAAuDZ,OAAOK,iIAElE,OAAOhB,gBAAgBU,OAAOG,cAChC,CAEA,OADAA,OAASZ,cAAcS,OAAOC,YAAQ,GAC/BX,gBAAgBU,OAAOG,cAChC,CAoBA,OAAOW,OAAOC,OAAOjB,gBAAiB,CACpCE,cACAgB,eApBF,SAAwBC,WAAuCf,OAAiB,GAC9E,OAAOe,WAAWC,IAAKjB,QAAoCD,OAAOC,OAAQC,OAC5E,EAmBEiB,eAAgBvB,gBAAgBI,OAChCoB,2BAZF,SAAoCC,WAAoBC,aAA2BC,UACjF,IAAIpB,OAAiCT,cAAcU,cAAcoB,SAASH,YAG1E,OAFId,UAAUe,uBAAwB,IAAKnB,OAAQmB,4BAC/Cf,UAAUgB,mBAAoB,IAAKpB,OAAQoB,oBACxC3B,gBAAgBI,OAAOG,OAChC,EAQEsB,uBAAwB7B,gBAAgBoB,eACxCU,aAAchC,cAAcM,OAC5B2B,uBAAwBjC,cAAckC,iBACtCC,qBAAsBnC,cAAcsB,eACpCc,WAAY,IAA2BxC,gBACvCyC,oBAAqB,IAA4BvC,iBACjDwC,kBAAmB,IAA0BvC,eAC7CwC,qBAAsB,IAAiCrC,gBAAgBqC,uBACvEC,sBAAuB,IAAiCxC,cAAcuC,uBACtEE,gBAAkBC,QAAoCxC,gBAAgBuC,gBAAgBC,SAE1F"}
1
+ {"version":3,"file":"FsmService.js","sources":["../../../src/Fsm/Services/FsmService.ts"],"sourcesContent":["import type { TAbstractService } from '@hellpig/anarchy-engine/Abstract';\nimport { AbstractService } from '@hellpig/anarchy-engine/Abstract';\nimport type { FsmEventsStrategy } from '@hellpig/anarchy-engine/Fsm/Constants';\nimport type {\n TFsmConfig,\n TFsmInstanceFactory,\n TFsmInstanceRegistry,\n TFsmInstanceService,\n TFsmParams,\n TFsmService,\n TFsmSource,\n TFsmSourceFactory,\n TFsmSourceRegistry,\n TFsmSourceService,\n TFsmStates,\n TFsmWrapper\n} from '@hellpig/anarchy-engine/Fsm/Models';\nimport type { TDisposable } from '@hellpig/anarchy-engine/Mixins';\nimport { isDefined } from '@hellpig/anarchy-shared/Utils';\nimport { isEqual } from 'lodash-es';\n\nimport { FsmInstanceService } from './FsmInstanceService';\nimport { FsmSourceService } from './FsmSourceService';\n\nexport function FsmService(instanceFactory: TFsmInstanceFactory, sourceFactory: TFsmSourceFactory, instanceRegistry: TFsmInstanceRegistry, sourceRegistry: TFsmSourceRegistry): TFsmService {\n const sourceService: TFsmSourceService = FsmSourceService(sourceFactory, sourceRegistry);\n const instanceService: TFsmInstanceService = FsmInstanceService(instanceFactory, instanceRegistry);\n\n const disposable: ReadonlyArray<TDisposable> = [sourceFactory, instanceFactory, instanceRegistry, sourceRegistry, sourceService, instanceService];\n const abstractService: TAbstractService = AbstractService(disposable);\n\n function create(params: TFsmParams, force: boolean = false): TFsmWrapper | never {\n let source: TFsmSource | undefined = sourceService.getRegistry().findByKey(params.name);\n if (isDefined(source) && !force) {\n if (!isParamsEqualsToSource(params, source))\n throw new Error(\n `[FsmService]. Can't create a fsm instance with name ${params.name}: Source already existed, but params are different. Maybe an accident. (Params should be the same, or use \"force\" option)`\n );\n return instanceFactory.create(source, undefined);\n }\n source = sourceFactory.create(params, undefined);\n return instanceFactory.create(source, undefined);\n }\n\n function createFromList(paramsList: ReadonlyArray<TFsmParams>, force: boolean = false): ReadonlyArray<TFsmWrapper> {\n return paramsList.map((params: TFsmParams): TFsmWrapper => create(params, force));\n }\n\n function isParamsEqualsToSource(params: TFsmParams, source: TFsmSource): boolean {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const { id, tags, ...sourceParams } = source;\n return isEqual(params, sourceParams);\n }\n\n function createInstanceBySourceName(sourceName: string, currentState?: TFsmStates, strategy?: FsmEventsStrategy): TFsmWrapper {\n let source: TFsmSource | undefined = sourceService.getRegistry().getByKey(sourceName);\n if (isDefined(currentState)) source = { ...source, currentState };\n if (isDefined(strategy)) source = { ...source, strategy };\n return instanceService.create(source);\n }\n\n // eslint-disable-next-line functional/immutable-data\n return Object.assign(abstractService, {\n create,\n createFromList,\n createInstance: instanceService.create,\n createInstanceBySourceName,\n createInstanceFromList: instanceService.createFromList,\n createSource: sourceService.create,\n createSourceFromConfig: sourceService.createFromConfig,\n createSourceFromList: sourceService.createFromList,\n getFactory: (): TFsmInstanceFactory => instanceFactory,\n getInstanceRegistry: (): TFsmInstanceRegistry => instanceRegistry,\n getSourceRegistry: (): TFsmSourceRegistry => sourceRegistry,\n serializeAllEntities: (): ReadonlyArray<TFsmConfig> => instanceService.serializeAllEntities(),\n serializeAllResources: (): ReadonlyArray<TFsmConfig> => sourceService.serializeAllEntities(),\n serializeEntity: (entity: TFsmWrapper): TFsmConfig => instanceService.serializeEntity(entity)\n });\n}\n"],"names":["FsmService","instanceFactory","sourceFactory","instanceRegistry","sourceRegistry","sourceService","FsmSourceService","instanceService","FsmInstanceService","abstractService","AbstractService","create","params","force","source","getRegistry","findByKey","name","isDefined","id","tags","sourceParams","isEqual","isParamsEqualsToSource","Error","Object","assign","createFromList","paramsList","map","createInstance","createInstanceBySourceName","sourceName","currentState","strategy","getByKey","createInstanceFromList","createSource","createSourceFromConfig","createFromConfig","createSourceFromList","getFactory","getInstanceRegistry","getSourceRegistry","serializeAllEntities","serializeAllResources","serializeEntity","entity"],"mappings":"8TAwBO,SAASA,WAAWC,gBAAsCC,cAAkCC,iBAAwCC,gBACzI,MAAMC,cAAmCC,iBAAiBJ,cAAeE,gBACnEG,gBAAuCC,mBAAmBP,gBAAiBE,kBAG3EM,gBAAoCC,gBADK,CAACR,cAAeD,gBAAiBE,iBAAkBC,eAAgBC,cAAeE,kBAGjI,SAASI,OAAOC,OAAoBC,OAAiB,GACnD,IAAIC,OAAiCT,cAAcU,cAAcC,UAAUJ,OAAOK,MAClF,GAAIC,UAAUJ,UAAYD,MAAO,CAC/B,IAcJ,SAAgCD,OAAoBE,QAElD,MAAMK,GAAEA,GAAAC,KAAIA,QAASC,cAAiBP,OACtC,OAAOQ,QAAQV,OAAQS,aACzB,CAlBSE,CAAuBX,OAAQE,QAClC,MAAM,IAAIU,MACR,uDAAuDZ,OAAOK,iIAElE,OAAOhB,gBAAgBU,OAAOG,cAChC,CAEA,OADAA,OAASZ,cAAcS,OAAOC,YAAQ,GAC/BX,gBAAgBU,OAAOG,cAChC,CAoBA,OAAOW,OAAOC,OAAOjB,gBAAiB,CACpCE,cACAgB,eApBF,SAAwBC,WAAuCf,OAAiB,GAC9E,OAAOe,WAAWC,IAAKjB,QAAoCD,OAAOC,OAAQC,OAC5E,EAmBEiB,eAAgBvB,gBAAgBI,OAChCoB,2BAZF,SAAoCC,WAAoBC,aAA2BC,UACjF,IAAIpB,OAAiCT,cAAcU,cAAcoB,SAASH,YAG1E,OAFId,UAAUe,uBAAwB,IAAKnB,OAAQmB,4BAC/Cf,UAAUgB,mBAAoB,IAAKpB,OAAQoB,oBACxC3B,gBAAgBI,OAAOG,OAChC,EAQEsB,uBAAwB7B,gBAAgBoB,eACxCU,aAAchC,cAAcM,OAC5B2B,uBAAwBjC,cAAckC,iBACtCC,qBAAsBnC,cAAcsB,eACpCc,WAAY,IAA2BxC,gBACvCyC,oBAAqB,IAA4BvC,iBACjDwC,kBAAmB,IAA0BvC,eAC7CwC,qBAAsB,IAAiCrC,gBAAgBqC,uBACvEC,sBAAuB,IAAiCxC,cAAcuC,uBACtEE,gBAAkBC,QAAoCxC,gBAAgBuC,gBAAgBC,SAE1F"}
@@ -1 +1 @@
1
- {"version":3,"file":"FsmSourceService.js","sources":["../../../src/Fsm/Services/FsmSourceService.ts"],"sourcesContent":["import type { TAbstractService } from '@Anarchy/Engine/Abstract';\nimport { AbstractService } from '@Anarchy/Engine/Abstract';\nimport type {\n TFsmConfig,\n TFsmSource,\n TFsmSourceFactory,\n TFsmSourceRegistry,\n TFsmSourceService,\n TFsmSourceServiceWithCreate,\n TFsmSourceServiceWithCreateFromConfig,\n TFsmSourceServiceWithFactory,\n TFsmSourceServiceWithRegistry\n} from '@Anarchy/Engine/Fsm/Models';\nimport type { TDisposable } from '@Anarchy/Engine/Mixins';\nimport { withCreateFromConfigServiceMixin, withCreateServiceMixin, withFactoryService, withRegistryService, withSerializableEntities } from '@Anarchy/Engine/Mixins';\nimport { mergeAll } from '@Anarchy/Engine/Utils';\nimport type { Subscription } from 'rxjs';\n\nexport function FsmSourceService(factory: TFsmSourceFactory, registry: TFsmSourceRegistry): TFsmSourceService {\n const factorySub$: Subscription = factory.entityCreated$.subscribe((fsm: TFsmSource): void => registry.add(fsm.name, fsm));\n const disposable: ReadonlyArray<TDisposable> = [registry, factory, factorySub$];\n const abstractService: TAbstractService = AbstractService(disposable);\n\n const withCreateService: TFsmSourceServiceWithCreate = withCreateServiceMixin(factory, undefined);\n const withCreateFromConfigService: TFsmSourceServiceWithCreateFromConfig = withCreateFromConfigServiceMixin(withCreateService.create, factory.configToParams, undefined);\n const withFactory: TFsmSourceServiceWithFactory = withFactoryService(factory);\n const withRegistry: TFsmSourceServiceWithRegistry = withRegistryService(registry);\n\n return mergeAll(abstractService, withCreateService, withCreateFromConfigService, withFactory, withRegistry, withSerializableEntities<TFsmSource, TFsmConfig>(registry));\n}\n"],"names":["FsmSourceService","factory","registry","factorySub$","entityCreated$","subscribe","fsm","add","name","abstractService","AbstractService","withCreateService","withCreateServiceMixin","withCreateFromConfigService","withCreateFromConfigServiceMixin","create","configToParams","withFactory","withFactoryService","withRegistry","withRegistryService","mergeAll","withSerializableEntities"],"mappings":"6hBAkBO,SAASA,iBAAiBC,QAA4BC,UAC3D,MAAMC,YAA4BF,QAAQG,eAAeC,UAAWC,KAA0BJ,SAASK,IAAID,IAAIE,KAAMF,MAE/GG,gBAAoCC,gBADK,CAACR,SAAUD,QAASE,cAG7DQ,kBAAiDC,uBAAuBX,gBACxEY,4BAAqEC,iCAAiCH,kBAAkBI,OAAQd,QAAQe,uBACxIC,YAA4CC,mBAAmBjB,SAC/DkB,aAA8CC,oBAAoBlB,UAExE,OAAOmB,SAASZ,gBAAiBE,kBAAmBE,4BAA6BI,YAAaE,aAAcG,yBAAiDpB,UAC/J"}
1
+ {"version":3,"file":"FsmSourceService.js","sources":["../../../src/Fsm/Services/FsmSourceService.ts"],"sourcesContent":["import type { TAbstractService } from '@hellpig/anarchy-engine/Abstract';\nimport { AbstractService } from '@hellpig/anarchy-engine/Abstract';\nimport type {\n TFsmConfig,\n TFsmSource,\n TFsmSourceFactory,\n TFsmSourceRegistry,\n TFsmSourceService,\n TFsmSourceServiceWithCreate,\n TFsmSourceServiceWithCreateFromConfig,\n TFsmSourceServiceWithFactory,\n TFsmSourceServiceWithRegistry\n} from '@hellpig/anarchy-engine/Fsm/Models';\nimport type { TDisposable } from '@hellpig/anarchy-engine/Mixins';\nimport { withCreateFromConfigServiceMixin, withCreateServiceMixin, withFactoryService, withRegistryService, withSerializableEntities } from '@hellpig/anarchy-engine/Mixins';\nimport { mergeAll } from '@hellpig/anarchy-engine/Utils';\nimport type { Subscription } from 'rxjs';\n\nexport function FsmSourceService(factory: TFsmSourceFactory, registry: TFsmSourceRegistry): TFsmSourceService {\n const factorySub$: Subscription = factory.entityCreated$.subscribe((fsm: TFsmSource): void => registry.add(fsm.name, fsm));\n const disposable: ReadonlyArray<TDisposable> = [registry, factory, factorySub$];\n const abstractService: TAbstractService = AbstractService(disposable);\n\n const withCreateService: TFsmSourceServiceWithCreate = withCreateServiceMixin(factory, undefined);\n const withCreateFromConfigService: TFsmSourceServiceWithCreateFromConfig = withCreateFromConfigServiceMixin(withCreateService.create, factory.configToParams, undefined);\n const withFactory: TFsmSourceServiceWithFactory = withFactoryService(factory);\n const withRegistry: TFsmSourceServiceWithRegistry = withRegistryService(registry);\n\n return mergeAll(abstractService, withCreateService, withCreateFromConfigService, withFactory, withRegistry, withSerializableEntities<TFsmSource, TFsmConfig>(registry));\n}\n"],"names":["FsmSourceService","factory","registry","factorySub$","entityCreated$","subscribe","fsm","add","name","abstractService","AbstractService","withCreateService","withCreateServiceMixin","withCreateFromConfigService","withCreateFromConfigServiceMixin","create","configToParams","withFactory","withFactoryService","withRegistry","withRegistryService","mergeAll","withSerializableEntities"],"mappings":"6hBAkBO,SAASA,iBAAiBC,QAA4BC,UAC3D,MAAMC,YAA4BF,QAAQG,eAAeC,UAAWC,KAA0BJ,SAASK,IAAID,IAAIE,KAAMF,MAE/GG,gBAAoCC,gBADK,CAACR,SAAUD,QAASE,cAG7DQ,kBAAiDC,uBAAuBX,gBACxEY,4BAAqEC,iCAAiCH,kBAAkBI,OAAQd,QAAQe,uBACxIC,YAA4CC,mBAAmBjB,SAC/DkB,aAA8CC,oBAAoBlB,UAExE,OAAOmB,SAASZ,gBAAiBE,kBAAmBE,4BAA6BI,YAAaE,aAAcG,yBAAiDpB,UAC/J"}
@@ -1 +1 @@
1
- {"version":3,"file":"FsmWrapper.js","sources":["../../../src/Fsm/Wrappers/FsmWrapper.ts"],"sourcesContent":["import type { TAbstractWrapper } from '@Anarchy/Engine/Abstract';\nimport { AbstractWrapper, WrapperType } from '@Anarchy/Engine/Abstract';\nimport { fsmEntityToConfig } from '@Anarchy/Engine/Fsm/Adapters';\nimport { FsmEventsStrategy } from '@Anarchy/Engine/Fsm/Constants';\nimport type { TFsmConfig, TFsmEvents, TFsmMachine, TFsmParams, TFsmStates, TFsmWrapper } from '@Anarchy/Engine/Fsm/Models';\nimport type { Subscription } from 'rxjs';\nimport { BehaviorSubject, concatMap, exhaustMap, filter, mergeMap, switchMap, takeUntil } from 'rxjs';\nimport { StateMachine, t } from 'typescript-fsm';\n\ntype TStrategyType = typeof concatMap | typeof exhaustMap | typeof switchMap | typeof mergeMap;\n\nexport function FsmWrapper(params: TFsmParams): TFsmWrapper {\n const changed$: BehaviorSubject<TFsmStates> = new BehaviorSubject<TFsmStates>(params.currentState ?? params.initial);\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const { name, ...machineParams } = params;\n\n const onChange = (val: TFsmStates): void => changed$.next(val);\n\n const entity: TFsmMachine = new StateMachine<TFsmStates, TFsmEvents>(\n machineParams.currentState ?? machineParams.initial,\n machineParams.transitions.map(([from, to, event]) => {\n return t(from, to, event, (): void => onChange(to));\n })\n );\n\n const strategy$: BehaviorSubject<FsmEventsStrategy> = new BehaviorSubject<FsmEventsStrategy>(params.strategy ?? FsmEventsStrategy.SkipPending);\n const strategyOperator$: BehaviorSubject<TStrategyType> = new BehaviorSubject<TStrategyType>(getStrategyOperator(strategy$.value));\n\n const wrapper: TAbstractWrapper<TFsmMachine> = AbstractWrapper(entity, WrapperType.Fsm, params);\n\n strategy$.pipe(takeUntil(wrapper.destroy$)).subscribe((strategy: FsmEventsStrategy): void => strategyOperator$.next(getStrategyOperator(strategy)));\n\n function getStrategyOperator(strategy: FsmEventsStrategy): TStrategyType {\n switch (strategy) {\n case FsmEventsStrategy.StrictQueue:\n return concatMap;\n case FsmEventsStrategy.SkipPending:\n return exhaustMap;\n case FsmEventsStrategy.ReplacePending:\n return switchMap;\n case FsmEventsStrategy.RunParallel:\n return mergeMap;\n default:\n throw new Error(`Unknown strategy: ${strategy}`);\n }\n }\n\n const getState = (): TFsmStates => entity.getState();\n\n const send$: BehaviorSubject<TFsmStates> = new BehaviorSubject<TFsmStates>(entity.getState());\n const sendSub$: Subscription = strategyOperator$\n .pipe(\n switchMap((operator: TStrategyType) =>\n send$.pipe(\n filter((event: TFsmStates): boolean => event !== entity.getState()),\n (operator as any)((event: TFsmEvents): Promise<void> => entity.dispatch(event))\n )\n )\n )\n .subscribe();\n\n const destroySub$: Subscription = wrapper.destroy$.subscribe((): void => {\n destroySub$.unsubscribe();\n sendSub$.unsubscribe();\n\n changed$.complete();\n\n strategy$.complete();\n\n strategyOperator$.complete();\n\n send$.complete();\n });\n\n // eslint-disable-next-line functional/immutable-data\n const result = Object.assign(wrapper, {\n entity,\n type: params.type,\n changed$: changed$.asObservable(),\n send$,\n strategy$,\n getState,\n getInitial: (): TFsmStates => params.initial,\n serialize: (): TFsmConfig => fsmEntityToConfig(result),\n getTransitions: (): ReadonlyArray<readonly [TFsmStates, TFsmEvents, TFsmStates]> => params.transitions\n });\n\n return result;\n}\n"],"names":["FsmWrapper","params","changed$","BehaviorSubject","currentState","initial","name","machineParams","entity","StateMachine","transitions","map","from","to","event","t","next","strategy$","strategy","FsmEventsStrategy","SkipPending","strategyOperator$","getStrategyOperator","value","wrapper","AbstractWrapper","WrapperType","Fsm","StrictQueue","concatMap","exhaustMap","ReplacePending","switchMap","RunParallel","mergeMap","Error","pipe","takeUntil","destroy$","subscribe","send$","getState","sendSub$","operator","filter","dispatch","destroySub$","unsubscribe","complete","result","Object","assign","type","asObservable","getInitial","serialize","fsmEntityToConfig","getTransitions"],"mappings":"u7BAWO,SAASA,WAAWC,QACzB,MAAMC,SAAwC,IAAIC,gBAA4BF,OAAOG,cAAgBH,OAAOI,UAEtGC,KAAEA,QAASC,eAAkBN,OAI7BO,OAAsB,IAAIC,oBAAAA,aAC9BF,cAAcH,cAAgBG,cAAcF,QAC5CE,cAAcG,YAAYC,IAAI,EAAEC,KAAMC,GAAIC,SACjCC,oBAAAA,EAAEH,KAAMC,GAAIC,MAAO,IALcZ,SAASc,KAKFH,OAI7CI,UAAgD,IAAId,gBAAmCF,OAAOiB,UAAYC,kBAAkBC,aAC5HC,kBAAoD,IAAIlB,gBAA+BmB,oBAAoBL,UAAUM,QAErHC,QAAyCC,gBAAgBjB,OAAQkB,YAAYC,IAAK1B,QAIxF,SAASqB,oBAAoBJ,UAC3B,OAAQA,UACN,KAAKC,kBAAkBS,YACrB,OAAOC,UACT,KAAKV,kBAAkBC,YACrB,OAAOU,WACT,KAAKX,kBAAkBY,eACrB,OAAOC,UACT,KAAKb,kBAAkBc,YACrB,OAAOC,SACT,QACE,MAAM,IAAIC,MAAM,qBAAqBjB,YAE3C,CAfAD,UAAUmB,KAAKC,UAAUb,QAAQc,WAAWC,UAAWrB,UAAsCG,kBAAkBL,KAAKM,oBAAoBJ,YAiBxI,MAEMsB,MAAqC,IAAIrC,gBAA4BK,OAAOiC,YAC5EC,SAAyBrB,kBAC5Be,KACCJ,UAAWW,UACTH,MAAMJ,KACJQ,OAAQ9B,OAA+BA,QAAUN,OAAOiC,YACvDE,SAAkB7B,OAAqCN,OAAOqC,SAAS/B,WAI7EyB,YAEGO,YAA4BtB,QAAQc,SAASC,UAAU,KAC3DO,YAAYC,cACZL,SAASK,cAET7C,SAAS8C,WAET/B,UAAU+B,WAEV3B,kBAAkB2B,WAElBR,MAAMQ,aAIFC,OAASC,OAAOC,OAAO3B,QAAS,CACpChB,cACA4C,KAAMnD,OAAOmD,KACblD,SAAUA,SAASmD,eACnBb,YACAvB,oBACAwB,SAlCe,IAAkBjC,OAAOiC,WAmCxCa,WAAY,IAAkBrD,OAAOI,QACrCkD,UAAW,IAAkBC,kBAAkBP,QAC/CQ,eAAgB,IAAoExD,OAAOS,cAG7F,OAAOuC,MACT"}
1
+ {"version":3,"file":"FsmWrapper.js","sources":["../../../src/Fsm/Wrappers/FsmWrapper.ts"],"sourcesContent":["import type { TAbstractWrapper } from '@hellpig/anarchy-engine/Abstract';\nimport { AbstractWrapper, WrapperType } from '@hellpig/anarchy-engine/Abstract';\nimport { fsmEntityToConfig } from '@hellpig/anarchy-engine/Fsm/Adapters';\nimport { FsmEventsStrategy } from '@hellpig/anarchy-engine/Fsm/Constants';\nimport type { TFsmConfig, TFsmEvents, TFsmMachine, TFsmParams, TFsmStates, TFsmWrapper } from '@hellpig/anarchy-engine/Fsm/Models';\nimport type { Subscription } from 'rxjs';\nimport { BehaviorSubject, concatMap, exhaustMap, filter, mergeMap, switchMap, takeUntil } from 'rxjs';\nimport { StateMachine, t } from 'typescript-fsm';\n\ntype TStrategyType = typeof concatMap | typeof exhaustMap | typeof switchMap | typeof mergeMap;\n\nexport function FsmWrapper(params: TFsmParams): TFsmWrapper {\n const changed$: BehaviorSubject<TFsmStates> = new BehaviorSubject<TFsmStates>(params.currentState ?? params.initial);\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const { name, ...machineParams } = params;\n\n const onChange = (val: TFsmStates): void => changed$.next(val);\n\n const entity: TFsmMachine = new StateMachine<TFsmStates, TFsmEvents>(\n machineParams.currentState ?? machineParams.initial,\n machineParams.transitions.map(([from, to, event]) => {\n return t(from, to, event, (): void => onChange(to));\n })\n );\n\n const strategy$: BehaviorSubject<FsmEventsStrategy> = new BehaviorSubject<FsmEventsStrategy>(params.strategy ?? FsmEventsStrategy.SkipPending);\n const strategyOperator$: BehaviorSubject<TStrategyType> = new BehaviorSubject<TStrategyType>(getStrategyOperator(strategy$.value));\n\n const wrapper: TAbstractWrapper<TFsmMachine> = AbstractWrapper(entity, WrapperType.Fsm, params);\n\n strategy$.pipe(takeUntil(wrapper.destroy$)).subscribe((strategy: FsmEventsStrategy): void => strategyOperator$.next(getStrategyOperator(strategy)));\n\n function getStrategyOperator(strategy: FsmEventsStrategy): TStrategyType {\n switch (strategy) {\n case FsmEventsStrategy.StrictQueue:\n return concatMap;\n case FsmEventsStrategy.SkipPending:\n return exhaustMap;\n case FsmEventsStrategy.ReplacePending:\n return switchMap;\n case FsmEventsStrategy.RunParallel:\n return mergeMap;\n default:\n throw new Error(`Unknown strategy: ${strategy}`);\n }\n }\n\n const getState = (): TFsmStates => entity.getState();\n\n const send$: BehaviorSubject<TFsmStates> = new BehaviorSubject<TFsmStates>(entity.getState());\n const sendSub$: Subscription = strategyOperator$\n .pipe(\n switchMap((operator: TStrategyType) =>\n send$.pipe(\n filter((event: TFsmStates): boolean => event !== entity.getState()),\n (operator as any)((event: TFsmEvents): Promise<void> => entity.dispatch(event))\n )\n )\n )\n .subscribe();\n\n const destroySub$: Subscription = wrapper.destroy$.subscribe((): void => {\n destroySub$.unsubscribe();\n sendSub$.unsubscribe();\n\n changed$.complete();\n\n strategy$.complete();\n\n strategyOperator$.complete();\n\n send$.complete();\n });\n\n // eslint-disable-next-line functional/immutable-data\n const result = Object.assign(wrapper, {\n entity,\n type: params.type,\n changed$: changed$.asObservable(),\n send$,\n strategy$,\n getState,\n getInitial: (): TFsmStates => params.initial,\n serialize: (): TFsmConfig => fsmEntityToConfig(result),\n getTransitions: (): ReadonlyArray<readonly [TFsmStates, TFsmEvents, TFsmStates]> => params.transitions\n });\n\n return result;\n}\n"],"names":["FsmWrapper","params","changed$","BehaviorSubject","currentState","initial","name","machineParams","entity","StateMachine","transitions","map","from","to","event","t","next","strategy$","strategy","FsmEventsStrategy","SkipPending","strategyOperator$","getStrategyOperator","value","wrapper","AbstractWrapper","WrapperType","Fsm","StrictQueue","concatMap","exhaustMap","ReplacePending","switchMap","RunParallel","mergeMap","Error","pipe","takeUntil","destroy$","subscribe","send$","getState","sendSub$","operator","filter","dispatch","destroySub$","unsubscribe","complete","result","Object","assign","type","asObservable","getInitial","serialize","fsmEntityToConfig","getTransitions"],"mappings":"u7BAWO,SAASA,WAAWC,QACzB,MAAMC,SAAwC,IAAIC,gBAA4BF,OAAOG,cAAgBH,OAAOI,UAEtGC,KAAEA,QAASC,eAAkBN,OAI7BO,OAAsB,IAAIC,oBAAAA,aAC9BF,cAAcH,cAAgBG,cAAcF,QAC5CE,cAAcG,YAAYC,IAAI,EAAEC,KAAMC,GAAIC,SACjCC,oBAAAA,EAAEH,KAAMC,GAAIC,MAAO,IALcZ,SAASc,KAKFH,OAI7CI,UAAgD,IAAId,gBAAmCF,OAAOiB,UAAYC,kBAAkBC,aAC5HC,kBAAoD,IAAIlB,gBAA+BmB,oBAAoBL,UAAUM,QAErHC,QAAyCC,gBAAgBjB,OAAQkB,YAAYC,IAAK1B,QAIxF,SAASqB,oBAAoBJ,UAC3B,OAAQA,UACN,KAAKC,kBAAkBS,YACrB,OAAOC,UACT,KAAKV,kBAAkBC,YACrB,OAAOU,WACT,KAAKX,kBAAkBY,eACrB,OAAOC,UACT,KAAKb,kBAAkBc,YACrB,OAAOC,SACT,QACE,MAAM,IAAIC,MAAM,qBAAqBjB,YAE3C,CAfAD,UAAUmB,KAAKC,UAAUb,QAAQc,WAAWC,UAAWrB,UAAsCG,kBAAkBL,KAAKM,oBAAoBJ,YAiBxI,MAEMsB,MAAqC,IAAIrC,gBAA4BK,OAAOiC,YAC5EC,SAAyBrB,kBAC5Be,KACCJ,UAAWW,UACTH,MAAMJ,KACJQ,OAAQ9B,OAA+BA,QAAUN,OAAOiC,YACvDE,SAAkB7B,OAAqCN,OAAOqC,SAAS/B,WAI7EyB,YAEGO,YAA4BtB,QAAQc,SAASC,UAAU,KAC3DO,YAAYC,cACZL,SAASK,cAET7C,SAAS8C,WAET/B,UAAU+B,WAEV3B,kBAAkB2B,WAElBR,MAAMQ,aAIFC,OAASC,OAAOC,OAAO3B,QAAS,CACpChB,cACA4C,KAAMnD,OAAOmD,KACblD,SAAUA,SAASmD,eACnBb,YACAvB,oBACAwB,SAlCe,IAAkBjC,OAAOiC,WAmCxCa,WAAY,IAAkBrD,OAAOI,QACrCkD,UAAW,IAAkBC,kBAAkBP,QAC/CQ,eAAgB,IAAoExD,OAAOS,cAG7F,OAAOuC,MACT"}
@@ -1 +1 @@
1
- {"version":3,"file":"ContainerDecorator.js","sources":["../../../src/Global/Decorators/ContainerDecorator.ts"],"sourcesContent":["import type { TAppGlobalContainer, TContainerDecorator } from '@Anarchy/Engine/Global/Models';\nimport type { TDestroyable } from '@Anarchy/Engine/Mixins';\nimport { destroyableMixin } from '@Anarchy/Engine/Mixins';\nimport type { TSpaceCanvas } from '@Anarchy/Engine/Space';\nimport { exitFullScreen, getWindowFromDomElement, goFullScreen, isFullScreen, observeContainerRect } from '@Anarchy/Engine/Utils';\nimport { isDefined, isNotDefined } from '@Anarchy/Shared/Utils';\nimport { nanoid } from 'nanoid';\nimport type { Subscription } from 'rxjs';\nimport { BehaviorSubject, distinctUntilChanged, skip, Subject, switchMap } from 'rxjs';\n\nexport function ContainerDecorator(container: TAppGlobalContainer | HTMLElement): TContainerDecorator {\n const resize$: Subject<DOMRect> = new Subject<DOMRect>();\n const canvas$: BehaviorSubject<TSpaceCanvas | undefined> = new BehaviorSubject<TSpaceCanvas | undefined>(undefined);\n const fullScreen$: BehaviorSubject<boolean> = new BehaviorSubject<boolean>(false);\n\n //If App launched in a div (not fullscreen), we need to get relative coords for mouse position, so we need this rect.\n const viewportRect$: BehaviorSubject<DOMRect> = new BehaviorSubject<DOMRect>(getViewportRect());\n\n function getAppContainer(): TAppGlobalContainer | never {\n const globalContainer: Readonly<Window> | null = getWindowFromDomElement(container);\n if (isNotDefined(globalContainer)) throw new Error(`Cannot find global ${container}`);\n return globalContainer;\n }\n\n const observeContainerRectSub: Subscription = observeContainerRect(container).subscribe((rect: DOMRect): void => resize$.next(rect));\n\n function getViewportRect(): DOMRect {\n return isDefined((container as HTMLElement).getBoundingClientRect)\n ? (container as HTMLElement).getBoundingClientRect()\n : ({\n x: 0,\n y: 0,\n width: window.innerWidth,\n height: window.innerHeight,\n top: 0,\n left: 0,\n bottom: window.innerHeight,\n right: window.innerWidth\n } as DOMRect);\n }\n\n const screenSizeRectSub$: Subscription = resize$.subscribe((): void => viewportRect$.next(getViewportRect()));\n\n const fullScreenSub$: Subscription = fullScreen$\n .pipe(\n skip(1),\n distinctUntilChanged(),\n switchMap((isFullScreen: boolean): Promise<void> => (isFullScreen ? goFullScreen(canvas$.value) : exitFullScreen(getAppContainer())))\n )\n .subscribe({\n error: (err: any): never => {\n throw new Error('Container: Failed to toggle fullscreen', err);\n }\n });\n\n const destroyable: TDestroyable = destroyableMixin();\n\n const destroySub$: Subscription = destroyable.destroy$.subscribe((): void => {\n //Pay attention: We don't remove the DOM element here\n\n destroySub$.unsubscribe();\n screenSizeRectSub$.unsubscribe();\n observeContainerRectSub.unsubscribe();\n fullScreenSub$.unsubscribe();\n\n resize$.complete();\n canvas$.complete();\n fullScreen$.complete();\n viewportRect$.complete();\n });\n\n return Object.assign(\n {\n id: nanoid(),\n getWidth: (): number => ((container as TAppGlobalContainer).innerWidth ? (container as TAppGlobalContainer).innerWidth : (container as HTMLElement).clientWidth),\n getHeight: (): number => ((container as TAppGlobalContainer).innerHeight ? (container as TAppGlobalContainer).innerHeight : (container as HTMLElement).clientHeight),\n getRatio: (): number => getAppContainer().devicePixelRatio || 1,\n startWatch: (type: string, cb: () => void): void => container.addEventListener(type, cb),\n stopWatch: (type: string, cb: () => void): void => container.removeEventListener(type, cb),\n getAppContainer,\n canvas$,\n getElement: (): TAppGlobalContainer | HTMLElement => container,\n resize$: resize$.asObservable(),\n viewportRect$,\n fullScreen$,\n isFullScreen: (): boolean => isFullScreen(getAppContainer())\n },\n destroyable\n );\n}\n"],"names":["ContainerDecorator","container","resize$","Subject","canvas$","BehaviorSubject","fullScreen$","viewportRect$","getViewportRect","getAppContainer","globalContainer","getWindowFromDomElement","isNotDefined","Error","observeContainerRectSub","observeContainerRect","subscribe","rect","next","isDefined","getBoundingClientRect","x","y","width","window","innerWidth","height","innerHeight","top","left","bottom","right","screenSizeRectSub$","fullScreenSub$","pipe","skip","distinctUntilChanged","switchMap","isFullScreen","goFullScreen","value","exitFullScreen","error","err","destroyable","destroyableMixin","destroySub$","destroy$","unsubscribe","complete","Object","assign","id","nanoid","getWidth","clientWidth","getHeight","clientHeight","getRatio","devicePixelRatio","startWatch","type","cb","addEventListener","stopWatch","removeEventListener","getElement","asObservable"],"mappings":"y1BAUO,SAASA,mBAAmBC,WACjC,MAAMC,QAA4B,IAAIC,QAChCC,QAAqD,IAAIC,wBACzDC,YAAwC,IAAID,iBAAyB,GAGrEE,cAA0C,IAAIF,gBAAyBG,mBAE7E,SAASC,kBACP,MAAMC,gBAA2CC,wBAAwBV,WACzE,GAAIW,aAAaF,iBAAkB,MAAM,IAAIG,MAAM,sBAAsBZ,aACzE,OAAOS,eACT,CAEA,MAAMI,wBAAwCC,qBAAqBd,WAAWe,UAAWC,MAAwBf,QAAQgB,KAAKD,OAE9H,SAAST,kBACP,OAAOW,UAAWlB,UAA0BmB,uBACvCnB,UAA0BmB,wBAC1B,CACCC,EAAG,EACHC,EAAG,EACHC,MAAOC,OAAOC,WACdC,OAAQF,OAAOG,YACfC,IAAK,EACLC,KAAM,EACNC,OAAQN,OAAOG,YACfI,MAAOP,OAAOC,WAEtB,CAEA,MAAMO,mBAAmC9B,QAAQc,UAAU,IAAYT,cAAcW,KAAKV,oBAEpFyB,eAA+B3B,YAClC4B,KACCC,KAAK,GACLC,uBACAC,UAAWC,eAA0CA,cAAeC,aAAanC,QAAQoC,OAASC,eAAehC,qBAElHO,UAAU,CACT0B,MAAQC,MACN,MAAM,IAAI9B,MAAM,yCAA0C8B,QAI1DC,YAA4BC,mBAE5BC,YAA4BF,YAAYG,SAAS/B,UAAU,KAG/D8B,YAAYE,cACZhB,mBAAmBgB,cACnBlC,wBAAwBkC,cACxBf,eAAee,cAEf9C,QAAQ+C,WACR7C,QAAQ6C,WACR3C,YAAY2C,WACZ1C,cAAc0C,aAGhB,OAAOC,OAAOC,OACZ,CACEC,GAAIC,SACJC,SAAU,IAAgBrD,UAAkCwB,WAAcxB,UAAkCwB,WAAcxB,UAA0BsD,YACpJC,UAAW,IAAgBvD,UAAkC0B,YAAe1B,UAAkC0B,YAAe1B,UAA0BwD,aACvJC,SAAU,IAAcjD,kBAAkBkD,kBAAoB,EAC9DC,WAAY,CAACC,KAAcC,KAAyB7D,UAAU8D,iBAAiBF,KAAMC,IACrFE,UAAW,CAACH,KAAcC,KAAyB7D,UAAUgE,oBAAoBJ,KAAMC,IACvFrD,gCACAL,gBACA8D,WAAY,IAAyCjE,UACrDC,QAASA,QAAQiE,eACjB5D,4BACAD,wBACAgC,aAAc,IAAeA,aAAa7B,oBAE5CmC,YAEJ"}
1
+ {"version":3,"file":"ContainerDecorator.js","sources":["../../../src/Global/Decorators/ContainerDecorator.ts"],"sourcesContent":["import type { TAppGlobalContainer, TContainerDecorator } from '@hellpig/anarchy-engine/Global/Models';\nimport type { TDestroyable } from '@hellpig/anarchy-engine/Mixins';\nimport { destroyableMixin } from '@hellpig/anarchy-engine/Mixins';\nimport type { TSpaceCanvas } from '@hellpig/anarchy-engine/Space';\nimport { exitFullScreen, getWindowFromDomElement, goFullScreen, isFullScreen, observeContainerRect } from '@hellpig/anarchy-engine/Utils';\nimport { isDefined, isNotDefined } from '@hellpig/anarchy-shared/Utils';\nimport { nanoid } from 'nanoid';\nimport type { Subscription } from 'rxjs';\nimport { BehaviorSubject, distinctUntilChanged, skip, Subject, switchMap } from 'rxjs';\n\nexport function ContainerDecorator(container: TAppGlobalContainer | HTMLElement): TContainerDecorator {\n const resize$: Subject<DOMRect> = new Subject<DOMRect>();\n const canvas$: BehaviorSubject<TSpaceCanvas | undefined> = new BehaviorSubject<TSpaceCanvas | undefined>(undefined);\n const fullScreen$: BehaviorSubject<boolean> = new BehaviorSubject<boolean>(false);\n\n //If App launched in a div (not fullscreen), we need to get relative coords for mouse position, so we need this rect.\n const viewportRect$: BehaviorSubject<DOMRect> = new BehaviorSubject<DOMRect>(getViewportRect());\n\n function getAppContainer(): TAppGlobalContainer | never {\n const globalContainer: Readonly<Window> | null = getWindowFromDomElement(container);\n if (isNotDefined(globalContainer)) throw new Error(`Cannot find global ${container}`);\n return globalContainer;\n }\n\n const observeContainerRectSub: Subscription = observeContainerRect(container).subscribe((rect: DOMRect): void => resize$.next(rect));\n\n function getViewportRect(): DOMRect {\n return isDefined((container as HTMLElement).getBoundingClientRect)\n ? (container as HTMLElement).getBoundingClientRect()\n : ({\n x: 0,\n y: 0,\n width: window.innerWidth,\n height: window.innerHeight,\n top: 0,\n left: 0,\n bottom: window.innerHeight,\n right: window.innerWidth\n } as DOMRect);\n }\n\n const screenSizeRectSub$: Subscription = resize$.subscribe((): void => viewportRect$.next(getViewportRect()));\n\n const fullScreenSub$: Subscription = fullScreen$\n .pipe(\n skip(1),\n distinctUntilChanged(),\n switchMap((isFullScreen: boolean): Promise<void> => (isFullScreen ? goFullScreen(canvas$.value) : exitFullScreen(getAppContainer())))\n )\n .subscribe({\n error: (err: any): never => {\n throw new Error('Container: Failed to toggle fullscreen', err);\n }\n });\n\n const destroyable: TDestroyable = destroyableMixin();\n\n const destroySub$: Subscription = destroyable.destroy$.subscribe((): void => {\n //Pay attention: We don't remove the DOM element here\n\n destroySub$.unsubscribe();\n screenSizeRectSub$.unsubscribe();\n observeContainerRectSub.unsubscribe();\n fullScreenSub$.unsubscribe();\n\n resize$.complete();\n canvas$.complete();\n fullScreen$.complete();\n viewportRect$.complete();\n });\n\n return Object.assign(\n {\n id: nanoid(),\n getWidth: (): number => ((container as TAppGlobalContainer).innerWidth ? (container as TAppGlobalContainer).innerWidth : (container as HTMLElement).clientWidth),\n getHeight: (): number => ((container as TAppGlobalContainer).innerHeight ? (container as TAppGlobalContainer).innerHeight : (container as HTMLElement).clientHeight),\n getRatio: (): number => getAppContainer().devicePixelRatio || 1,\n startWatch: (type: string, cb: () => void): void => container.addEventListener(type, cb),\n stopWatch: (type: string, cb: () => void): void => container.removeEventListener(type, cb),\n getAppContainer,\n canvas$,\n getElement: (): TAppGlobalContainer | HTMLElement => container,\n resize$: resize$.asObservable(),\n viewportRect$,\n fullScreen$,\n isFullScreen: (): boolean => isFullScreen(getAppContainer())\n },\n destroyable\n );\n}\n"],"names":["ContainerDecorator","container","resize$","Subject","canvas$","BehaviorSubject","fullScreen$","viewportRect$","getViewportRect","getAppContainer","globalContainer","getWindowFromDomElement","isNotDefined","Error","observeContainerRectSub","observeContainerRect","subscribe","rect","next","isDefined","getBoundingClientRect","x","y","width","window","innerWidth","height","innerHeight","top","left","bottom","right","screenSizeRectSub$","fullScreenSub$","pipe","skip","distinctUntilChanged","switchMap","isFullScreen","goFullScreen","value","exitFullScreen","error","err","destroyable","destroyableMixin","destroySub$","destroy$","unsubscribe","complete","Object","assign","id","nanoid","getWidth","clientWidth","getHeight","clientHeight","getRatio","devicePixelRatio","startWatch","type","cb","addEventListener","stopWatch","removeEventListener","getElement","asObservable"],"mappings":"y1BAUO,SAASA,mBAAmBC,WACjC,MAAMC,QAA4B,IAAIC,QAChCC,QAAqD,IAAIC,wBACzDC,YAAwC,IAAID,iBAAyB,GAGrEE,cAA0C,IAAIF,gBAAyBG,mBAE7E,SAASC,kBACP,MAAMC,gBAA2CC,wBAAwBV,WACzE,GAAIW,aAAaF,iBAAkB,MAAM,IAAIG,MAAM,sBAAsBZ,aACzE,OAAOS,eACT,CAEA,MAAMI,wBAAwCC,qBAAqBd,WAAWe,UAAWC,MAAwBf,QAAQgB,KAAKD,OAE9H,SAAST,kBACP,OAAOW,UAAWlB,UAA0BmB,uBACvCnB,UAA0BmB,wBAC1B,CACCC,EAAG,EACHC,EAAG,EACHC,MAAOC,OAAOC,WACdC,OAAQF,OAAOG,YACfC,IAAK,EACLC,KAAM,EACNC,OAAQN,OAAOG,YACfI,MAAOP,OAAOC,WAEtB,CAEA,MAAMO,mBAAmC9B,QAAQc,UAAU,IAAYT,cAAcW,KAAKV,oBAEpFyB,eAA+B3B,YAClC4B,KACCC,KAAK,GACLC,uBACAC,UAAWC,eAA0CA,cAAeC,aAAanC,QAAQoC,OAASC,eAAehC,qBAElHO,UAAU,CACT0B,MAAQC,MACN,MAAM,IAAI9B,MAAM,yCAA0C8B,QAI1DC,YAA4BC,mBAE5BC,YAA4BF,YAAYG,SAAS/B,UAAU,KAG/D8B,YAAYE,cACZhB,mBAAmBgB,cACnBlC,wBAAwBkC,cACxBf,eAAee,cAEf9C,QAAQ+C,WACR7C,QAAQ6C,WACR3C,YAAY2C,WACZ1C,cAAc0C,aAGhB,OAAOC,OAAOC,OACZ,CACEC,GAAIC,SACJC,SAAU,IAAgBrD,UAAkCwB,WAAcxB,UAAkCwB,WAAcxB,UAA0BsD,YACpJC,UAAW,IAAgBvD,UAAkC0B,YAAe1B,UAAkC0B,YAAe1B,UAA0BwD,aACvJC,SAAU,IAAcjD,kBAAkBkD,kBAAoB,EAC9DC,WAAY,CAACC,KAAcC,KAAyB7D,UAAU8D,iBAAiBF,KAAMC,IACrFE,UAAW,CAACH,KAAcC,KAAyB7D,UAAUgE,oBAAoBJ,KAAMC,IACvFrD,gCACAL,gBACA8D,WAAY,IAAyCjE,UACrDC,QAASA,QAAQiE,eACjB5D,4BACAD,wBACAgC,aAAc,IAAeA,aAAa7B,oBAE5CmC,YAEJ"}
@@ -1 +1 @@
1
- {"version":3,"file":"ContainerUtils.js","sources":["../../../src/Global/Utils/ContainerUtils.ts"],"sourcesContent":["import { ContainerDecorator } from '@Anarchy/Engine/Global/Decorators';\nimport type { TContainerDecorator } from '@Anarchy/Engine/Global/Models';\nimport { isNotDefined } from '@Anarchy/Shared/Utils';\n\nexport function getCanvasContainer(canvas: HTMLCanvasElement): TContainerDecorator | never {\n const parent: HTMLElement | null = canvas.parentElement;\n if (isNotDefined(parent)) throw new Error(`Can't find canvas' parent element`);\n return ContainerDecorator(parent);\n}\n"],"names":["getCanvasContainer","canvas","parent","parentElement","isNotDefined","Error","ContainerDecorator"],"mappings":"oJAIO,SAASA,mBAAmBC,QACjC,MAAMC,OAA6BD,OAAOE,cAC1C,GAAIC,aAAaF,QAAS,MAAM,IAAIG,MAAM,qCAC1C,OAAOC,mBAAmBJ,OAC5B"}
1
+ {"version":3,"file":"ContainerUtils.js","sources":["../../../src/Global/Utils/ContainerUtils.ts"],"sourcesContent":["import { ContainerDecorator } from '@hellpig/anarchy-engine/Global/Decorators';\nimport type { TContainerDecorator } from '@hellpig/anarchy-engine/Global/Models';\nimport { isNotDefined } from '@hellpig/anarchy-shared/Utils';\n\nexport function getCanvasContainer(canvas: HTMLCanvasElement): TContainerDecorator | never {\n const parent: HTMLElement | null = canvas.parentElement;\n if (isNotDefined(parent)) throw new Error(`Can't find canvas' parent element`);\n return ContainerDecorator(parent);\n}\n"],"names":["getCanvasContainer","canvas","parent","parentElement","isNotDefined","Error","ContainerDecorator"],"mappings":"oJAIO,SAASA,mBAAmBC,QACjC,MAAMC,OAA6BD,OAAOE,cAC1C,GAAIC,aAAaF,QAAS,MAAM,IAAIG,MAAM,qCAC1C,OAAOC,mBAAmBJ,OAC5B"}
@@ -1 +1 @@
1
- {"version":3,"file":"ConfigToParams.js","sources":["../../../src/Intersections/Adapters/ConfigToParams.ts"],"sourcesContent":["import type { TActor, TActorService } from '@Anarchy/Engine/Actor';\nimport type { TAnyCameraWrapper, TCameraService } from '@Anarchy/Engine/Camera';\nimport type {\n TAbstractIntersectionsWatcherParams,\n TAnyIntersectionsWatcherConfig,\n TAnyIntersectionsWatcherParams,\n TIntersectionsCameraWatcherConfig,\n TIntersectionsCameraWatcherParams,\n TIntersectionsDirectionWatcherConfig,\n TIntersectionsDirectionWatcherParams,\n TIntersectionsLoop\n} from '@Anarchy/Engine/Intersections/Models';\nimport { isIntersectionsCameraWatcherConfig, isIntersectionsDirectionWatcherConfig } from '@Anarchy/Engine/Intersections/Utils';\nimport type { TLoopService } from '@Anarchy/Engine/Loop';\nimport type { TMouseService } from '@Anarchy/Engine/Mouse';\nimport { isNotDefined } from '@Anarchy/Shared/Utils';\nimport { Vector3 } from 'three';\n\nexport function intersectionsWatcherConfigToParams(\n config: TAnyIntersectionsWatcherConfig,\n mouseService: TMouseService,\n cameraService: TCameraService,\n actorsService: TActorService,\n loopService: TLoopService\n): TAnyIntersectionsWatcherParams | never {\n const params: TAbstractIntersectionsWatcherParams = configToParamsAbstractIntersectionsWatcher(config, actorsService, loopService);\n\n let result: TAnyIntersectionsWatcherParams;\n if (isIntersectionsDirectionWatcherConfig(config)) {\n result = { ...params, ...configToParamsIntersectionsDirectionWatcher(config) };\n } else if (isIntersectionsCameraWatcherConfig(config)) {\n result = { ...params, ...configToParamsIntersectionsCameraWatcher(config, mouseService, cameraService) };\n } else {\n throw new Error(`[Intersections] configToParams: Unknown intersections watcher config type for \"${(config as TAnyIntersectionsWatcherConfig).name}\".`);\n }\n\n return result;\n}\n\nfunction configToParamsAbstractIntersectionsWatcher(config: TAnyIntersectionsWatcherConfig, actorsService: TActorService, loopService: TLoopService): TAbstractIntersectionsWatcherParams {\n const actors: ReadonlyArray<TActor> = config.actorNames.map((name: string): TActor => actorsService.getRegistry().getByName(name));\n\n const intersectionsLoop: TIntersectionsLoop | undefined = loopService.getIntersectionsLoop(config.intersectionsLoop);\n if (isNotDefined(intersectionsLoop)) throw new Error(`configToParams: Cannot find loop \"${config.intersectionsLoop}\" for intersections watcher \"${config.name}\".`);\n\n return {\n ...config,\n actors,\n intersectionsLoop\n };\n}\n\nfunction configToParamsIntersectionsCameraWatcher(\n config: TIntersectionsCameraWatcherConfig,\n mouseService: TMouseService,\n cameraService: TCameraService\n): Omit<TIntersectionsCameraWatcherParams, keyof TAbstractIntersectionsWatcherParams> {\n const camera: TAnyCameraWrapper = cameraService.getRegistry().getByName(config.cameraName);\n\n return {\n camera,\n position$: mouseService.normalizedPosition$\n };\n}\n\nfunction configToParamsIntersectionsDirectionWatcher(config: TIntersectionsDirectionWatcherConfig): Omit<TIntersectionsDirectionWatcherParams, keyof TAbstractIntersectionsWatcherParams> {\n return {\n origin: new Vector3().copy(config.origin),\n direction: new Vector3().copy(config.direction)\n };\n}\n"],"names":["intersectionsWatcherConfigToParams","config","mouseService","cameraService","actorsService","loopService","params","actors","actorNames","map","name","getRegistry","getByName","intersectionsLoop","getIntersectionsLoop","isNotDefined","Error","configToParamsAbstractIntersectionsWatcher","result","isIntersectionsDirectionWatcherConfig","configToParamsIntersectionsDirectionWatcher","isIntersectionsCameraWatcherConfig","configToParamsIntersectionsCameraWatcher","camera","cameraName","position$","normalizedPosition$","origin","Vector3","copy","direction"],"mappings":"uOAkBO,SAASA,mCACdC,OACAC,aACAC,cACAC,cACAC,aAEA,MAAMC,OAcR,SAAoDL,OAAwCG,cAA8BC,aACxH,MAAME,OAAgCN,OAAOO,WAAWC,IAAKC,MAAyBN,cAAcO,cAAcC,UAAUF,OAEtHG,kBAAoDR,YAAYS,qBAAqBb,OAAOY,mBAClG,GAAIE,aAAaF,mBAAoB,MAAM,IAAIG,MAAM,qCAAqCf,OAAOY,iDAAiDZ,OAAOS,UAEzJ,MAAO,IACFT,OACHM,cACAM,oCAEJ,CAzBsDI,CAA2ChB,OAAQG,cAAeC,aAEtH,IAAIa,OACJ,GAAIC,sCAAsClB,QACxCiB,OAAS,IAAKZ,UAAWc,4CAA4CnB,aACvE,KAAWoB,mCAAmCpB,QAG5C,MAAM,IAAIe,MAAM,kFAAmFf,OAA0CS,UAF7IQ,OAAS,IAAKZ,UAAWgB,yCAAyCrB,OAAQC,aAAcC,eAG1F,CAEA,OAAOe,MACT,CAeA,SAASI,yCACPrB,OACAC,aACAC,eAIA,MAAO,CACLoB,OAHgCpB,cAAcQ,cAAcC,UAAUX,OAAOuB,YAI7EC,UAAWvB,aAAawB,oBAE5B,CAEA,SAASN,4CAA4CnB,QACnD,MAAO,CACL0B,QAAQ,IAAIC,SAAUC,KAAK5B,OAAO0B,QAClCG,WAAW,IAAIF,SAAUC,KAAK5B,OAAO6B,WAEzC"}
1
+ {"version":3,"file":"ConfigToParams.js","sources":["../../../src/Intersections/Adapters/ConfigToParams.ts"],"sourcesContent":["import type { TActor, TActorService } from '@hellpig/anarchy-engine/Actor';\nimport type { TAnyCameraWrapper, TCameraService } from '@hellpig/anarchy-engine/Camera';\nimport type {\n TAbstractIntersectionsWatcherParams,\n TAnyIntersectionsWatcherConfig,\n TAnyIntersectionsWatcherParams,\n TIntersectionsCameraWatcherConfig,\n TIntersectionsCameraWatcherParams,\n TIntersectionsDirectionWatcherConfig,\n TIntersectionsDirectionWatcherParams,\n TIntersectionsLoop\n} from '@hellpig/anarchy-engine/Intersections/Models';\nimport { isIntersectionsCameraWatcherConfig, isIntersectionsDirectionWatcherConfig } from '@hellpig/anarchy-engine/Intersections/Utils';\nimport type { TLoopService } from '@hellpig/anarchy-engine/Loop';\nimport type { TMouseService } from '@hellpig/anarchy-engine/Mouse';\nimport { isNotDefined } from '@hellpig/anarchy-shared/Utils';\nimport { Vector3 } from 'three';\n\nexport function intersectionsWatcherConfigToParams(\n config: TAnyIntersectionsWatcherConfig,\n mouseService: TMouseService,\n cameraService: TCameraService,\n actorsService: TActorService,\n loopService: TLoopService\n): TAnyIntersectionsWatcherParams | never {\n const params: TAbstractIntersectionsWatcherParams = configToParamsAbstractIntersectionsWatcher(config, actorsService, loopService);\n\n let result: TAnyIntersectionsWatcherParams;\n if (isIntersectionsDirectionWatcherConfig(config)) {\n result = { ...params, ...configToParamsIntersectionsDirectionWatcher(config) };\n } else if (isIntersectionsCameraWatcherConfig(config)) {\n result = { ...params, ...configToParamsIntersectionsCameraWatcher(config, mouseService, cameraService) };\n } else {\n throw new Error(`[Intersections] configToParams: Unknown intersections watcher config type for \"${(config as TAnyIntersectionsWatcherConfig).name}\".`);\n }\n\n return result;\n}\n\nfunction configToParamsAbstractIntersectionsWatcher(config: TAnyIntersectionsWatcherConfig, actorsService: TActorService, loopService: TLoopService): TAbstractIntersectionsWatcherParams {\n const actors: ReadonlyArray<TActor> = config.actorNames.map((name: string): TActor => actorsService.getRegistry().getByName(name));\n\n const intersectionsLoop: TIntersectionsLoop | undefined = loopService.getIntersectionsLoop(config.intersectionsLoop);\n if (isNotDefined(intersectionsLoop)) throw new Error(`configToParams: Cannot find loop \"${config.intersectionsLoop}\" for intersections watcher \"${config.name}\".`);\n\n return {\n ...config,\n actors,\n intersectionsLoop\n };\n}\n\nfunction configToParamsIntersectionsCameraWatcher(\n config: TIntersectionsCameraWatcherConfig,\n mouseService: TMouseService,\n cameraService: TCameraService\n): Omit<TIntersectionsCameraWatcherParams, keyof TAbstractIntersectionsWatcherParams> {\n const camera: TAnyCameraWrapper = cameraService.getRegistry().getByName(config.cameraName);\n\n return {\n camera,\n position$: mouseService.normalizedPosition$\n };\n}\n\nfunction configToParamsIntersectionsDirectionWatcher(config: TIntersectionsDirectionWatcherConfig): Omit<TIntersectionsDirectionWatcherParams, keyof TAbstractIntersectionsWatcherParams> {\n return {\n origin: new Vector3().copy(config.origin),\n direction: new Vector3().copy(config.direction)\n };\n}\n"],"names":["intersectionsWatcherConfigToParams","config","mouseService","cameraService","actorsService","loopService","params","actors","actorNames","map","name","getRegistry","getByName","intersectionsLoop","getIntersectionsLoop","isNotDefined","Error","configToParamsAbstractIntersectionsWatcher","result","isIntersectionsDirectionWatcherConfig","configToParamsIntersectionsDirectionWatcher","isIntersectionsCameraWatcherConfig","configToParamsIntersectionsCameraWatcher","camera","cameraName","position$","normalizedPosition$","origin","Vector3","copy","direction"],"mappings":"uOAkBO,SAASA,mCACdC,OACAC,aACAC,cACAC,cACAC,aAEA,MAAMC,OAcR,SAAoDL,OAAwCG,cAA8BC,aACxH,MAAME,OAAgCN,OAAOO,WAAWC,IAAKC,MAAyBN,cAAcO,cAAcC,UAAUF,OAEtHG,kBAAoDR,YAAYS,qBAAqBb,OAAOY,mBAClG,GAAIE,aAAaF,mBAAoB,MAAM,IAAIG,MAAM,qCAAqCf,OAAOY,iDAAiDZ,OAAOS,UAEzJ,MAAO,IACFT,OACHM,cACAM,oCAEJ,CAzBsDI,CAA2ChB,OAAQG,cAAeC,aAEtH,IAAIa,OACJ,GAAIC,sCAAsClB,QACxCiB,OAAS,IAAKZ,UAAWc,4CAA4CnB,aACvE,KAAWoB,mCAAmCpB,QAG5C,MAAM,IAAIe,MAAM,kFAAmFf,OAA0CS,UAF7IQ,OAAS,IAAKZ,UAAWgB,yCAAyCrB,OAAQC,aAAcC,eAG1F,CAEA,OAAOe,MACT,CAeA,SAASI,yCACPrB,OACAC,aACAC,eAIA,MAAO,CACLoB,OAHgCpB,cAAcQ,cAAcC,UAAUX,OAAOuB,YAI7EC,UAAWvB,aAAawB,oBAE5B,CAEA,SAASN,4CAA4CnB,QACnD,MAAO,CACL0B,QAAQ,IAAIC,SAAUC,KAAK5B,OAAO0B,QAClCG,WAAW,IAAIF,SAAUC,KAAK5B,OAAO6B,WAEzC"}
@@ -1 +1 @@
1
- {"version":3,"file":"EntityToConfig.js","sources":["../../../src/Intersections/Adapters/EntityToConfig.ts"],"sourcesContent":["import type { TActor } from '@Anarchy/Engine/Actor';\nimport type {\n TAbstractIntersectionsWatcherConfig,\n TAnyIntersectionsWatcher,\n TAnyIntersectionsWatcherConfig,\n TIntersectionsCameraWatcher,\n TIntersectionsCameraWatcherConfig,\n TIntersectionsDirectionWatcher,\n TIntersectionsDirectionWatcherConfig,\n TIntersectionsWatcher\n} from '@Anarchy/Engine/Intersections/Models';\nimport type { TIntersectionsWatcherConfig } from '@Anarchy/Engine/Intersections/Models/TIntersectionsWatcherConfig';\nimport { isIntersectionsCameraWatcher, isIntersectionsDirectionWatcher } from '@Anarchy/Engine/Intersections/Utils';\nimport { extractSerializableRegistrableFields } from '@Anarchy/Engine/Mixins';\nimport { vector3ToXyz } from '@Anarchy/Engine/Utils';\nimport { filterOutEmptyFields } from '@Anarchy/Shared/Utils';\n\nexport function intersectionsEntityToConfig(entity: TAnyIntersectionsWatcher): TAnyIntersectionsWatcherConfig {\n const config: TIntersectionsWatcherConfig = intersectionsAbstractToConfig(entity);\n let result: TAnyIntersectionsWatcherConfig;\n\n if (isIntersectionsDirectionWatcher(entity)) {\n result = { ...config, ...intersectionsDirectionToConfig(entity) };\n } else if (isIntersectionsCameraWatcher(entity)) {\n result = { ...config, ...intersectionsCameraToConfig(entity) };\n } else {\n throw new Error(`[Intersections]: Entity to config failed: Unknown intersections watcher type: ${(entity as TAnyIntersectionsWatcherConfig).name}`);\n }\n\n return result;\n}\n\nexport function intersectionsAbstractToConfig(entity: TIntersectionsWatcher): TIntersectionsWatcherConfig {\n return filterOutEmptyFields({\n actorNames: Array.from(entity.getActors().values(), (actor: TActor): string => actor.name),\n isAutoStart: entity.isAutoStart,\n intersectionsLoop: entity.getIntersectionsLoop()?.name,\n far: entity.raycaster?.far,\n performance: entity.getPerformanceSettings(),\n ...extractSerializableRegistrableFields(entity)\n });\n}\n\nexport function intersectionsCameraToConfig(entity: TIntersectionsCameraWatcher): Omit<TIntersectionsCameraWatcherConfig, keyof TAbstractIntersectionsWatcherConfig> {\n return filterOutEmptyFields({\n cameraName: entity.getCamera().name\n });\n}\n\nexport function intersectionsDirectionToConfig(entity: TIntersectionsDirectionWatcher): Omit<TIntersectionsDirectionWatcherConfig, keyof TAbstractIntersectionsWatcherConfig> {\n return filterOutEmptyFields({\n origin: vector3ToXyz(entity.origin$.value),\n direction: vector3ToXyz(entity.direction$.value)\n });\n}\n"],"names":["intersectionsEntityToConfig","entity","config","intersectionsAbstractToConfig","result","isIntersectionsDirectionWatcher","intersectionsDirectionToConfig","isIntersectionsCameraWatcher","Error","name","intersectionsCameraToConfig","filterOutEmptyFields","actorNames","Array","from","getActors","values","actor","isAutoStart","intersectionsLoop","getIntersectionsLoop","far","raycaster","performance","getPerformanceSettings","extractSerializableRegistrableFields","cameraName","getCamera","origin","vector3ToXyz","origin$","value","direction","direction$"],"mappings":"iXAiBO,SAASA,4BAA4BC,QAC1C,MAAMC,OAAsCC,8BAA8BF,QAC1E,IAAIG,OAEJ,GAAIC,gCAAgCJ,QAClCG,OAAS,IAAKF,UAAWI,+BAA+BL,aAC1D,KAAWM,6BAA6BN,QAGtC,MAAM,IAAIO,MAAM,iFAAkFP,OAA0CQ,QAF5IL,OAAS,IAAKF,UAAWQ,4BAA4BT,QAGvD,CAEA,OAAOG,MACT,CAEO,SAASD,8BAA8BF,QAC5C,OAAOU,qBAAqB,CAC1BC,WAAYC,MAAMC,KAAKb,OAAOc,YAAYC,SAAWC,OAA0BA,MAAMR,MACrFS,YAAajB,OAAOiB,YACpBC,kBAAmBlB,OAAOmB,wBAAwBX,KAClDY,IAAKpB,OAAOqB,WAAWD,IACvBE,YAAatB,OAAOuB,4BACjBC,qCAAqCxB,SAE5C,CAEO,SAASS,4BAA4BT,QAC1C,OAAOU,qBAAqB,CAC1Be,WAAYzB,OAAO0B,YAAYlB,MAEnC,CAEO,SAASH,+BAA+BL,QAC7C,OAAOU,qBAAqB,CAC1BiB,OAAQC,aAAa5B,OAAO6B,QAAQC,OACpCC,UAAWH,aAAa5B,OAAOgC,WAAWF,QAE9C"}
1
+ {"version":3,"file":"EntityToConfig.js","sources":["../../../src/Intersections/Adapters/EntityToConfig.ts"],"sourcesContent":["import type { TActor } from '@hellpig/anarchy-engine/Actor';\nimport type {\n TAbstractIntersectionsWatcherConfig,\n TAnyIntersectionsWatcher,\n TAnyIntersectionsWatcherConfig,\n TIntersectionsCameraWatcher,\n TIntersectionsCameraWatcherConfig,\n TIntersectionsDirectionWatcher,\n TIntersectionsDirectionWatcherConfig,\n TIntersectionsWatcher\n} from '@hellpig/anarchy-engine/Intersections/Models';\nimport type { TIntersectionsWatcherConfig } from '@hellpig/anarchy-engine/Intersections/Models/TIntersectionsWatcherConfig';\nimport { isIntersectionsCameraWatcher, isIntersectionsDirectionWatcher } from '@hellpig/anarchy-engine/Intersections/Utils';\nimport { extractSerializableRegistrableFields } from '@hellpig/anarchy-engine/Mixins';\nimport { vector3ToXyz } from '@hellpig/anarchy-engine/Utils';\nimport { filterOutEmptyFields } from '@hellpig/anarchy-shared/Utils';\n\nexport function intersectionsEntityToConfig(entity: TAnyIntersectionsWatcher): TAnyIntersectionsWatcherConfig {\n const config: TIntersectionsWatcherConfig = intersectionsAbstractToConfig(entity);\n let result: TAnyIntersectionsWatcherConfig;\n\n if (isIntersectionsDirectionWatcher(entity)) {\n result = { ...config, ...intersectionsDirectionToConfig(entity) };\n } else if (isIntersectionsCameraWatcher(entity)) {\n result = { ...config, ...intersectionsCameraToConfig(entity) };\n } else {\n throw new Error(`[Intersections]: Entity to config failed: Unknown intersections watcher type: ${(entity as TAnyIntersectionsWatcherConfig).name}`);\n }\n\n return result;\n}\n\nexport function intersectionsAbstractToConfig(entity: TIntersectionsWatcher): TIntersectionsWatcherConfig {\n return filterOutEmptyFields({\n actorNames: Array.from(entity.getActors().values(), (actor: TActor): string => actor.name),\n isAutoStart: entity.isAutoStart,\n intersectionsLoop: entity.getIntersectionsLoop()?.name,\n far: entity.raycaster?.far,\n performance: entity.getPerformanceSettings(),\n ...extractSerializableRegistrableFields(entity)\n });\n}\n\nexport function intersectionsCameraToConfig(entity: TIntersectionsCameraWatcher): Omit<TIntersectionsCameraWatcherConfig, keyof TAbstractIntersectionsWatcherConfig> {\n return filterOutEmptyFields({\n cameraName: entity.getCamera().name\n });\n}\n\nexport function intersectionsDirectionToConfig(entity: TIntersectionsDirectionWatcher): Omit<TIntersectionsDirectionWatcherConfig, keyof TAbstractIntersectionsWatcherConfig> {\n return filterOutEmptyFields({\n origin: vector3ToXyz(entity.origin$.value),\n direction: vector3ToXyz(entity.direction$.value)\n });\n}\n"],"names":["intersectionsEntityToConfig","entity","config","intersectionsAbstractToConfig","result","isIntersectionsDirectionWatcher","intersectionsDirectionToConfig","isIntersectionsCameraWatcher","Error","name","intersectionsCameraToConfig","filterOutEmptyFields","actorNames","Array","from","getActors","values","actor","isAutoStart","intersectionsLoop","getIntersectionsLoop","far","raycaster","performance","getPerformanceSettings","extractSerializableRegistrableFields","cameraName","getCamera","origin","vector3ToXyz","origin$","value","direction","direction$"],"mappings":"iXAiBO,SAASA,4BAA4BC,QAC1C,MAAMC,OAAsCC,8BAA8BF,QAC1E,IAAIG,OAEJ,GAAIC,gCAAgCJ,QAClCG,OAAS,IAAKF,UAAWI,+BAA+BL,aAC1D,KAAWM,6BAA6BN,QAGtC,MAAM,IAAIO,MAAM,iFAAkFP,OAA0CQ,QAF5IL,OAAS,IAAKF,UAAWQ,4BAA4BT,QAGvD,CAEA,OAAOG,MACT,CAEO,SAASD,8BAA8BF,QAC5C,OAAOU,qBAAqB,CAC1BC,WAAYC,MAAMC,KAAKb,OAAOc,YAAYC,SAAWC,OAA0BA,MAAMR,MACrFS,YAAajB,OAAOiB,YACpBC,kBAAmBlB,OAAOmB,wBAAwBX,KAClDY,IAAKpB,OAAOqB,WAAWD,IACvBE,YAAatB,OAAOuB,4BACjBC,qCAAqCxB,SAE5C,CAEO,SAASS,4BAA4BT,QAC1C,OAAOU,qBAAqB,CAC1Be,WAAYzB,OAAO0B,YAAYlB,MAEnC,CAEO,SAASH,+BAA+BL,QAC7C,OAAOU,qBAAqB,CAC1BiB,OAAQC,aAAa5B,OAAO6B,QAAQC,OACpCC,UAAWH,aAAa5B,OAAOgC,WAAWF,QAE9C"}
@@ -1 +1 @@
1
- {"version":3,"file":"IntersectionsWatcherFactory.js","sources":["../../../src/Intersections/Factories/IntersectionsWatcherFactory.ts"],"sourcesContent":["import type { TReactiveFactory } from '@Anarchy/Engine/Abstract';\nimport { FactoryType, ReactiveFactory } from '@Anarchy/Engine/Abstract';\nimport { intersectionsWatcherConfigToParams } from '@Anarchy/Engine/Intersections/Adapters';\nimport type { TAnyIntersectionsWatcher, TAnyIntersectionsWatcherParams, TIntersectionsWatcherFactory } from '@Anarchy/Engine/Intersections/Models';\nimport { isIntersectionsCameraWatcherParams, isIntersectionsDirectionWatcherParams } from '@Anarchy/Engine/Intersections/Utils';\nimport { IntersectionsCameraWatcher, IntersectionsDirectionWatcher } from '@Anarchy/Engine/Intersections/Watchers';\n\nfunction create(params: TAnyIntersectionsWatcherParams): TAnyIntersectionsWatcher | never {\n if (isIntersectionsCameraWatcherParams(params)) return IntersectionsCameraWatcher(params);\n else if (isIntersectionsDirectionWatcherParams(params)) return IntersectionsDirectionWatcher(params);\n else throw new Error(`[IntersectionsWatcherFactory]: Unknown params type. Name: \"${(params as TAnyIntersectionsWatcherParams).name}\"`);\n}\n\nexport function IntersectionsWatcherFactory(): TIntersectionsWatcherFactory {\n const factory: TReactiveFactory<TAnyIntersectionsWatcher, TAnyIntersectionsWatcherParams> = ReactiveFactory(FactoryType.IntersectionsWatcher, create);\n // eslint-disable-next-line functional/immutable-data\n return Object.assign(factory, { configToParams: intersectionsWatcherConfigToParams });\n}\n"],"names":["create","params","isIntersectionsCameraWatcherParams","IntersectionsCameraWatcher","isIntersectionsDirectionWatcherParams","IntersectionsDirectionWatcher","Error","name","IntersectionsWatcherFactory","factory","ReactiveFactory","FactoryType","IntersectionsWatcher","Object","assign","configToParams","intersectionsWatcherConfigToParams"],"mappings":"8fAOA,SAASA,OAAOC,QACd,GAAIC,mCAAmCD,QAAS,OAAOE,2BAA2BF,QAAM,GAC/EG,sCAAsCH,QAAS,OAAOI,8BAA8BJ,cAClF,IAAIK,MAAM,8DAA+DL,OAA0CM,QAChI,CAEO,SAASC,8BACd,MAAMC,QAAsFC,gBAAgBC,YAAYC,qBAAsBZ,QAE9I,OAAOa,OAAOC,OAAOL,QAAS,CAAEM,eAAgBC,oCAClD"}
1
+ {"version":3,"file":"IntersectionsWatcherFactory.js","sources":["../../../src/Intersections/Factories/IntersectionsWatcherFactory.ts"],"sourcesContent":["import type { TReactiveFactory } from '@hellpig/anarchy-engine/Abstract';\nimport { FactoryType, ReactiveFactory } from '@hellpig/anarchy-engine/Abstract';\nimport { intersectionsWatcherConfigToParams } from '@hellpig/anarchy-engine/Intersections/Adapters';\nimport type { TAnyIntersectionsWatcher, TAnyIntersectionsWatcherParams, TIntersectionsWatcherFactory } from '@hellpig/anarchy-engine/Intersections/Models';\nimport { isIntersectionsCameraWatcherParams, isIntersectionsDirectionWatcherParams } from '@hellpig/anarchy-engine/Intersections/Utils';\nimport { IntersectionsCameraWatcher, IntersectionsDirectionWatcher } from '@hellpig/anarchy-engine/Intersections/Watchers';\n\nfunction create(params: TAnyIntersectionsWatcherParams): TAnyIntersectionsWatcher | never {\n if (isIntersectionsCameraWatcherParams(params)) return IntersectionsCameraWatcher(params);\n else if (isIntersectionsDirectionWatcherParams(params)) return IntersectionsDirectionWatcher(params);\n else throw new Error(`[IntersectionsWatcherFactory]: Unknown params type. Name: \"${(params as TAnyIntersectionsWatcherParams).name}\"`);\n}\n\nexport function IntersectionsWatcherFactory(): TIntersectionsWatcherFactory {\n const factory: TReactiveFactory<TAnyIntersectionsWatcher, TAnyIntersectionsWatcherParams> = ReactiveFactory(FactoryType.IntersectionsWatcher, create);\n // eslint-disable-next-line functional/immutable-data\n return Object.assign(factory, { configToParams: intersectionsWatcherConfigToParams });\n}\n"],"names":["create","params","isIntersectionsCameraWatcherParams","IntersectionsCameraWatcher","isIntersectionsDirectionWatcherParams","IntersectionsDirectionWatcher","Error","name","IntersectionsWatcherFactory","factory","ReactiveFactory","FactoryType","IntersectionsWatcher","Object","assign","configToParams","intersectionsWatcherConfigToParams"],"mappings":"8fAOA,SAASA,OAAOC,QACd,GAAIC,mCAAmCD,QAAS,OAAOE,2BAA2BF,QAAM,GAC/EG,sCAAsCH,QAAS,OAAOI,8BAA8BJ,cAClF,IAAIK,MAAM,8DAA+DL,OAA0CM,QAChI,CAEO,SAASC,8BACd,MAAMC,QAAsFC,gBAAgBC,YAAYC,qBAAsBZ,QAE9I,OAAOa,OAAOC,OAAOL,QAAS,CAAEM,eAAgBC,oCAClD"}
@@ -1 +1 @@
1
- {"version":3,"file":"IntersectionsWatcherRegistry.js","sources":["../../../src/Intersections/Registries/IntersectionsWatcherRegistry.ts"],"sourcesContent":["import { RegistryType } from '@Anarchy/Engine/Abstract/Constants';\nimport { AbstractWatcherRegistry } from '@Anarchy/Engine/Abstract/Registries';\nimport type { TAnyIntersectionsWatcher, TIntersectionsWatcherRegistry } from '@Anarchy/Engine/Intersections/Models';\n\nexport function IntersectionsWatcherRegistry(): TIntersectionsWatcherRegistry {\n return AbstractWatcherRegistry<TAnyIntersectionsWatcher>(RegistryType.IntersectionsWatcher);\n}\n"],"names":["IntersectionsWatcherRegistry","AbstractWatcherRegistry","RegistryType","IntersectionsWatcher"],"mappings":"6JAIO,SAASA,+BACd,OAAOC,wBAAkDC,aAAaC,qBACxE"}
1
+ {"version":3,"file":"IntersectionsWatcherRegistry.js","sources":["../../../src/Intersections/Registries/IntersectionsWatcherRegistry.ts"],"sourcesContent":["import { RegistryType } from '@hellpig/anarchy-engine/Abstract/Constants';\nimport { AbstractWatcherRegistry } from '@hellpig/anarchy-engine/Abstract/Registries';\nimport type { TAnyIntersectionsWatcher, TIntersectionsWatcherRegistry } from '@hellpig/anarchy-engine/Intersections/Models';\n\nexport function IntersectionsWatcherRegistry(): TIntersectionsWatcherRegistry {\n return AbstractWatcherRegistry<TAnyIntersectionsWatcher>(RegistryType.IntersectionsWatcher);\n}\n"],"names":["IntersectionsWatcherRegistry","AbstractWatcherRegistry","RegistryType","IntersectionsWatcher"],"mappings":"6JAIO,SAASA,+BACd,OAAOC,wBAAkDC,aAAaC,qBACxE"}
@@ -1 +1 @@
1
- {"version":3,"file":"IntersectionsWatcherService.js","sources":["../../../src/Intersections/Services/IntersectionsWatcherService.ts"],"sourcesContent":["import type { TAbstractService } from '@Anarchy/Engine/Abstract';\nimport { AbstractService } from '@Anarchy/Engine/Abstract';\nimport type { TActorService } from '@Anarchy/Engine/Actor';\nimport type { TCameraService } from '@Anarchy/Engine/Camera';\nimport type {\n TAnyIntersectionsWatcher,\n TAnyIntersectionsWatcherConfig,\n TAnyIntersectionsWatcherParams,\n TIntersectionsCameraWatcher,\n TIntersectionsDirectionWatcher,\n TIntersectionsWatcherFactory,\n TIntersectionsWatcherRegistry,\n TIntersectionsWatcherService,\n TIntersectionsWatcherServiceWithFactory,\n TIntersectionsWatcherServiceWithRegistry\n} from '@Anarchy/Engine/Intersections/Models';\nimport { isIntersectionsCameraWatcher, isIntersectionsDirectionWatcher } from '@Anarchy/Engine/Intersections/Utils';\nimport type { TLoopService } from '@Anarchy/Engine/Loop';\nimport type { TDisposable } from '@Anarchy/Engine/Mixins';\nimport { withFactoryService, withRegistryService, withSerializableEntities } from '@Anarchy/Engine/Mixins';\nimport type { TMouseService } from '@Anarchy/Engine/Mouse';\nimport { mergeAll } from '@Anarchy/Engine/Utils';\nimport { isDefined } from '@Anarchy/Shared/Utils';\nimport type { Subscription } from 'rxjs';\n\nexport function IntersectionsWatcherService(factory: TIntersectionsWatcherFactory, registry: TIntersectionsWatcherRegistry): TIntersectionsWatcherService {\n const factorySub$: Subscription = factory.entityCreated$.subscribe((watcher: TAnyIntersectionsWatcher): void => registry.add(watcher));\n const disposable: ReadonlyArray<TDisposable> = [registry, factory, factorySub$];\n const abstractService: TAbstractService = AbstractService(disposable);\n\n const create = (params: TAnyIntersectionsWatcherParams): TAnyIntersectionsWatcher => factory.create(params, undefined);\n const createFromList = (list: ReadonlyArray<TAnyIntersectionsWatcherParams>): ReadonlyArray<TAnyIntersectionsWatcher> => list.map(create);\n const createFromConfig = (\n configs: ReadonlyArray<TAnyIntersectionsWatcherConfig>,\n mouseService: TMouseService,\n cameraService: TCameraService,\n actorService: TActorService,\n loopService: TLoopService\n ): ReadonlyArray<TAnyIntersectionsWatcher> =>\n configs.map((config: TAnyIntersectionsWatcherConfig): TAnyIntersectionsWatcher => create(factory.configToParams(config, mouseService, cameraService, actorService, loopService)));\n\n const withFactory: TIntersectionsWatcherServiceWithFactory = withFactoryService(factory);\n const withRegistry: TIntersectionsWatcherServiceWithRegistry = withRegistryService(registry);\n\n function findCameraWatcher(name: string): TIntersectionsCameraWatcher | undefined | never {\n const watcher: TAnyIntersectionsWatcher | undefined = registry.getByName(name);\n if (isDefined(watcher) && !isIntersectionsCameraWatcher(watcher)) {\n throw new Error(`[IntersectionsWatcherService]: Watcher \"${watcher.name}\" is not type of TIntersectionsCameraWatcher`);\n }\n return watcher;\n }\n\n function getCameraWatcher(name: string): TIntersectionsCameraWatcher | never {\n const watcher: TIntersectionsCameraWatcher | undefined = findCameraWatcher(name);\n if (watcher === undefined) throw new Error(`[IntersectionsWatcherService]: Cannot get camera watcher: \"${name}\" is not found`);\n return watcher;\n }\n\n function findDirectionWatcher(name: string): TIntersectionsDirectionWatcher | undefined | never {\n const watcher: TAnyIntersectionsWatcher | undefined = registry.getByName(name);\n if (isDefined(watcher) && !isIntersectionsDirectionWatcher(watcher)) {\n throw new Error(`[IntersectionsWatcherService]: Watcher \"${watcher.name}\" is not type of TIntersectionsDirectionWatcher`);\n }\n return watcher;\n }\n\n function getDirectionWatcher(name: string): TIntersectionsDirectionWatcher | never {\n const watcher: TAnyIntersectionsWatcher | undefined = findDirectionWatcher(name);\n if (watcher === undefined) throw new Error(`[IntersectionsWatcherService]: Cannot get direction watcher: \"${name}\" is not found`);\n return watcher;\n }\n\n return mergeAll(abstractService, withFactory, withRegistry, withSerializableEntities<TAnyIntersectionsWatcher, TAnyIntersectionsWatcherConfig, undefined>(registry), {\n create,\n createFromList,\n createFromConfig,\n findCameraWatcher,\n getCameraWatcher,\n findDirectionWatcher,\n getDirectionWatcher\n });\n}\n"],"names":["IntersectionsWatcherService","factory","registry","factorySub$","entityCreated$","subscribe","watcher","add","abstractService","AbstractService","create","params","withFactory","withFactoryService","withRegistry","withRegistryService","findCameraWatcher","name","getByName","isDefined","isIntersectionsCameraWatcher","Error","findDirectionWatcher","isIntersectionsDirectionWatcher","mergeAll","withSerializableEntities","createFromList","list","map","createFromConfig","configs","mouseService","cameraService","actorService","loopService","config","configToParams","getCameraWatcher","getDirectionWatcher"],"mappings":"wiBAyBO,SAASA,4BAA4BC,QAAuCC,UACjF,MAAMC,YAA4BF,QAAQG,eAAeC,UAAWC,SAA4CJ,SAASK,IAAID,UAEvHE,gBAAoCC,gBADK,CAACP,SAAUD,QAASE,cAG7DO,OAAUC,QAAqEV,QAAQS,OAAOC,eAW9FC,YAAuDC,mBAAmBZ,SAC1Ea,aAAyDC,oBAAoBb,UAEnF,SAASc,kBAAkBC,MACzB,MAAMX,QAAgDJ,SAASgB,UAAUD,MACzE,GAAIE,UAAUb,WAAac,6BAA6Bd,SACtD,MAAM,IAAIe,MAAM,2CAA2Cf,QAAQW,oDAErE,OAAOX,OACT,CAQA,SAASgB,qBAAqBL,MAC5B,MAAMX,QAAgDJ,SAASgB,UAAUD,MACzE,GAAIE,UAAUb,WAAaiB,gCAAgCjB,SACzD,MAAM,IAAIe,MAAM,2CAA2Cf,QAAQW,uDAErE,OAAOX,OACT,CAQA,OAAOkB,SAAShB,gBAAiBI,YAAaE,aAAcW,yBAA8FvB,UAAW,CACnKQ,cACAgB,eA3CsBC,MAAiGA,KAAKC,IAAIlB,QA4ChImB,iBA3CuB,CACvBC,QACAC,aACAC,cACAC,aACAC,cAEAJ,QAAQF,IAAKO,QAAqEzB,OAAOT,QAAQmC,eAAeD,OAAQJ,aAAcC,cAAeC,aAAcC,eAqCnKlB,oCACAqB,iBAzBF,SAA0BpB,MACxB,MAAMX,QAAmDU,kBAAkBC,MAC3E,QAAgB,IAAZX,QAAuB,MAAM,IAAIe,MAAM,8DAA8DJ,sBACzG,OAAOX,OACT,EAsBEgB,0CACAgB,oBAbF,SAA6BrB,MAC3B,MAAMX,QAAgDgB,qBAAqBL,MAC3E,QAAgB,IAAZX,QAAuB,MAAM,IAAIe,MAAM,iEAAiEJ,sBAC5G,OAAOX,OACT,GAWF"}
1
+ {"version":3,"file":"IntersectionsWatcherService.js","sources":["../../../src/Intersections/Services/IntersectionsWatcherService.ts"],"sourcesContent":["import type { TAbstractService } from '@hellpig/anarchy-engine/Abstract';\nimport { AbstractService } from '@hellpig/anarchy-engine/Abstract';\nimport type { TActorService } from '@hellpig/anarchy-engine/Actor';\nimport type { TCameraService } from '@hellpig/anarchy-engine/Camera';\nimport type {\n TAnyIntersectionsWatcher,\n TAnyIntersectionsWatcherConfig,\n TAnyIntersectionsWatcherParams,\n TIntersectionsCameraWatcher,\n TIntersectionsDirectionWatcher,\n TIntersectionsWatcherFactory,\n TIntersectionsWatcherRegistry,\n TIntersectionsWatcherService,\n TIntersectionsWatcherServiceWithFactory,\n TIntersectionsWatcherServiceWithRegistry\n} from '@hellpig/anarchy-engine/Intersections/Models';\nimport { isIntersectionsCameraWatcher, isIntersectionsDirectionWatcher } from '@hellpig/anarchy-engine/Intersections/Utils';\nimport type { TLoopService } from '@hellpig/anarchy-engine/Loop';\nimport type { TDisposable } from '@hellpig/anarchy-engine/Mixins';\nimport { withFactoryService, withRegistryService, withSerializableEntities } from '@hellpig/anarchy-engine/Mixins';\nimport type { TMouseService } from '@hellpig/anarchy-engine/Mouse';\nimport { mergeAll } from '@hellpig/anarchy-engine/Utils';\nimport { isDefined } from '@hellpig/anarchy-shared/Utils';\nimport type { Subscription } from 'rxjs';\n\nexport function IntersectionsWatcherService(factory: TIntersectionsWatcherFactory, registry: TIntersectionsWatcherRegistry): TIntersectionsWatcherService {\n const factorySub$: Subscription = factory.entityCreated$.subscribe((watcher: TAnyIntersectionsWatcher): void => registry.add(watcher));\n const disposable: ReadonlyArray<TDisposable> = [registry, factory, factorySub$];\n const abstractService: TAbstractService = AbstractService(disposable);\n\n const create = (params: TAnyIntersectionsWatcherParams): TAnyIntersectionsWatcher => factory.create(params, undefined);\n const createFromList = (list: ReadonlyArray<TAnyIntersectionsWatcherParams>): ReadonlyArray<TAnyIntersectionsWatcher> => list.map(create);\n const createFromConfig = (\n configs: ReadonlyArray<TAnyIntersectionsWatcherConfig>,\n mouseService: TMouseService,\n cameraService: TCameraService,\n actorService: TActorService,\n loopService: TLoopService\n ): ReadonlyArray<TAnyIntersectionsWatcher> =>\n configs.map((config: TAnyIntersectionsWatcherConfig): TAnyIntersectionsWatcher => create(factory.configToParams(config, mouseService, cameraService, actorService, loopService)));\n\n const withFactory: TIntersectionsWatcherServiceWithFactory = withFactoryService(factory);\n const withRegistry: TIntersectionsWatcherServiceWithRegistry = withRegistryService(registry);\n\n function findCameraWatcher(name: string): TIntersectionsCameraWatcher | undefined | never {\n const watcher: TAnyIntersectionsWatcher | undefined = registry.getByName(name);\n if (isDefined(watcher) && !isIntersectionsCameraWatcher(watcher)) {\n throw new Error(`[IntersectionsWatcherService]: Watcher \"${watcher.name}\" is not type of TIntersectionsCameraWatcher`);\n }\n return watcher;\n }\n\n function getCameraWatcher(name: string): TIntersectionsCameraWatcher | never {\n const watcher: TIntersectionsCameraWatcher | undefined = findCameraWatcher(name);\n if (watcher === undefined) throw new Error(`[IntersectionsWatcherService]: Cannot get camera watcher: \"${name}\" is not found`);\n return watcher;\n }\n\n function findDirectionWatcher(name: string): TIntersectionsDirectionWatcher | undefined | never {\n const watcher: TAnyIntersectionsWatcher | undefined = registry.getByName(name);\n if (isDefined(watcher) && !isIntersectionsDirectionWatcher(watcher)) {\n throw new Error(`[IntersectionsWatcherService]: Watcher \"${watcher.name}\" is not type of TIntersectionsDirectionWatcher`);\n }\n return watcher;\n }\n\n function getDirectionWatcher(name: string): TIntersectionsDirectionWatcher | never {\n const watcher: TAnyIntersectionsWatcher | undefined = findDirectionWatcher(name);\n if (watcher === undefined) throw new Error(`[IntersectionsWatcherService]: Cannot get direction watcher: \"${name}\" is not found`);\n return watcher;\n }\n\n return mergeAll(abstractService, withFactory, withRegistry, withSerializableEntities<TAnyIntersectionsWatcher, TAnyIntersectionsWatcherConfig, undefined>(registry), {\n create,\n createFromList,\n createFromConfig,\n findCameraWatcher,\n getCameraWatcher,\n findDirectionWatcher,\n getDirectionWatcher\n });\n}\n"],"names":["IntersectionsWatcherService","factory","registry","factorySub$","entityCreated$","subscribe","watcher","add","abstractService","AbstractService","create","params","withFactory","withFactoryService","withRegistry","withRegistryService","findCameraWatcher","name","getByName","isDefined","isIntersectionsCameraWatcher","Error","findDirectionWatcher","isIntersectionsDirectionWatcher","mergeAll","withSerializableEntities","createFromList","list","map","createFromConfig","configs","mouseService","cameraService","actorService","loopService","config","configToParams","getCameraWatcher","getDirectionWatcher"],"mappings":"wiBAyBO,SAASA,4BAA4BC,QAAuCC,UACjF,MAAMC,YAA4BF,QAAQG,eAAeC,UAAWC,SAA4CJ,SAASK,IAAID,UAEvHE,gBAAoCC,gBADK,CAACP,SAAUD,QAASE,cAG7DO,OAAUC,QAAqEV,QAAQS,OAAOC,eAW9FC,YAAuDC,mBAAmBZ,SAC1Ea,aAAyDC,oBAAoBb,UAEnF,SAASc,kBAAkBC,MACzB,MAAMX,QAAgDJ,SAASgB,UAAUD,MACzE,GAAIE,UAAUb,WAAac,6BAA6Bd,SACtD,MAAM,IAAIe,MAAM,2CAA2Cf,QAAQW,oDAErE,OAAOX,OACT,CAQA,SAASgB,qBAAqBL,MAC5B,MAAMX,QAAgDJ,SAASgB,UAAUD,MACzE,GAAIE,UAAUb,WAAaiB,gCAAgCjB,SACzD,MAAM,IAAIe,MAAM,2CAA2Cf,QAAQW,uDAErE,OAAOX,OACT,CAQA,OAAOkB,SAAShB,gBAAiBI,YAAaE,aAAcW,yBAA8FvB,UAAW,CACnKQ,cACAgB,eA3CsBC,MAAiGA,KAAKC,IAAIlB,QA4ChImB,iBA3CuB,CACvBC,QACAC,aACAC,cACAC,aACAC,cAEAJ,QAAQF,IAAKO,QAAqEzB,OAAOT,QAAQmC,eAAeD,OAAQJ,aAAcC,cAAeC,aAAcC,eAqCnKlB,oCACAqB,iBAzBF,SAA0BpB,MACxB,MAAMX,QAAmDU,kBAAkBC,MAC3E,QAAgB,IAAZX,QAAuB,MAAM,IAAIe,MAAM,8DAA8DJ,sBACzG,OAAOX,OACT,EAsBEgB,0CACAgB,oBAbF,SAA6BrB,MAC3B,MAAMX,QAAgDgB,qBAAqBL,MAC3E,QAAgB,IAAZX,QAAuB,MAAM,IAAIe,MAAM,iEAAiEJ,sBAC5G,OAAOX,OACT,GAWF"}