excalibur 0.29.1 → 0.29.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 (551) hide show
  1. package/.nvmrc +1 -1
  2. package/CHANGELOG.md +105 -4
  3. package/README.md +5 -1
  4. package/SECURITY.md +16 -0
  5. package/build/dist/Actions/Action/ActionSequence.js +31 -0
  6. package/build/dist/Actions/Action/ActionSequence.js.map +1 -0
  7. package/build/dist/Actions/Action/Blink.js +54 -0
  8. package/build/dist/Actions/Action/Blink.js.map +1 -0
  9. package/build/dist/Actions/Action/CallMethod.js +21 -0
  10. package/build/dist/Actions/Action/CallMethod.js.map +1 -0
  11. package/build/dist/Actions/Action/Delay.js +26 -0
  12. package/build/dist/Actions/Action/Delay.js.map +1 -0
  13. package/build/dist/Actions/Action/Die.js +22 -0
  14. package/build/dist/Actions/Action/Die.js.map +1 -0
  15. package/build/dist/Actions/Action/EaseBy.js +70 -0
  16. package/build/dist/Actions/Action/EaseBy.js.map +1 -0
  17. package/build/dist/Actions/Action/EaseTo.js +69 -0
  18. package/build/dist/Actions/Action/EaseTo.js.map +1 -0
  19. package/build/dist/Actions/Action/Fade.js +48 -0
  20. package/build/dist/Actions/Action/Fade.js.map +1 -0
  21. package/build/dist/Actions/Action/Follow.js +56 -0
  22. package/build/dist/Actions/Action/Follow.js.map +1 -0
  23. package/build/dist/Actions/Action/Meet.js +54 -0
  24. package/build/dist/Actions/Action/Meet.js.map +1 -0
  25. package/build/dist/Actions/Action/MoveBy.js +48 -0
  26. package/build/dist/Actions/Action/MoveBy.js.map +1 -0
  27. package/build/dist/Actions/Action/MoveTo.js +41 -0
  28. package/build/dist/Actions/Action/MoveTo.js.map +1 -0
  29. package/build/dist/Actions/Action/ParallelActions.js +23 -0
  30. package/build/dist/Actions/Action/ParallelActions.js.map +1 -0
  31. package/build/dist/Actions/Action/Repeat.js +31 -0
  32. package/build/dist/Actions/Action/Repeat.js.map +1 -0
  33. package/build/dist/Actions/Action/RepeatForever.js +37 -0
  34. package/build/dist/Actions/Action/RepeatForever.js.map +1 -0
  35. package/build/dist/Actions/Action/RotateBy.js +95 -0
  36. package/build/dist/Actions/Action/RotateBy.js.map +1 -0
  37. package/build/dist/Actions/Action/RotateTo.js +91 -0
  38. package/build/dist/Actions/Action/RotateTo.js.map +1 -0
  39. package/build/dist/Actions/Action/ScaleBy.js +46 -0
  40. package/build/dist/Actions/Action/ScaleBy.js.map +1 -0
  41. package/build/dist/Actions/Action/ScaleTo.js +58 -0
  42. package/build/dist/Actions/Action/ScaleTo.js.map +1 -0
  43. package/build/dist/Actions/Action.js +2 -0
  44. package/build/dist/Actions/Action.js.map +1 -0
  45. package/build/dist/Actions/ActionContext.js +322 -0
  46. package/build/dist/Actions/ActionContext.js.map +1 -0
  47. package/build/dist/Actions/ActionQueue.js +96 -0
  48. package/build/dist/Actions/ActionQueue.js.map +1 -0
  49. package/build/dist/Actions/Actionable.js +2 -0
  50. package/build/dist/Actions/Actionable.js.map +1 -0
  51. package/build/dist/Actions/ActionsComponent.js +205 -0
  52. package/build/dist/Actions/ActionsComponent.js.map +1 -0
  53. package/build/dist/Actions/ActionsSystem.js +27 -0
  54. package/build/dist/Actions/ActionsSystem.js.map +1 -0
  55. package/build/dist/Actions/Index.js +26 -0
  56. package/build/dist/Actions/Index.js.map +1 -0
  57. package/build/dist/Actions/RotationType.js +27 -0
  58. package/build/dist/Actions/RotationType.js.map +1 -0
  59. package/build/dist/Actor.js +676 -0
  60. package/build/dist/Actor.js.map +1 -0
  61. package/build/dist/Collision/BodyComponent.js +398 -0
  62. package/build/dist/Collision/BodyComponent.js.map +1 -0
  63. package/build/dist/Collision/BoundingBox.js +441 -0
  64. package/build/dist/Collision/BoundingBox.js.map +1 -0
  65. package/build/dist/Collision/ColliderComponent.js +220 -0
  66. package/build/dist/Collision/ColliderComponent.js.map +1 -0
  67. package/build/dist/Collision/Colliders/CircleCollider.js +244 -0
  68. package/build/dist/Collision/Colliders/CircleCollider.js.map +1 -0
  69. package/build/dist/Collision/Colliders/ClosestLineJumpTable.js +211 -0
  70. package/build/dist/Collision/Colliders/ClosestLineJumpTable.js.map +1 -0
  71. package/build/dist/Collision/Colliders/Collider.js +38 -0
  72. package/build/dist/Collision/Colliders/Collider.js.map +1 -0
  73. package/build/dist/Collision/Colliders/CollisionJumpTable.js +300 -0
  74. package/build/dist/Collision/Colliders/CollisionJumpTable.js.map +1 -0
  75. package/build/dist/Collision/Colliders/CompositeCollider.js +256 -0
  76. package/build/dist/Collision/Colliders/CompositeCollider.js.map +1 -0
  77. package/build/dist/Collision/Colliders/EdgeCollider.js +237 -0
  78. package/build/dist/Collision/Colliders/EdgeCollider.js.map +1 -0
  79. package/build/dist/Collision/Colliders/PolygonCollider.js +616 -0
  80. package/build/dist/Collision/Colliders/PolygonCollider.js.map +1 -0
  81. package/build/dist/Collision/Colliders/SeparatingAxis.js +67 -0
  82. package/build/dist/Collision/Colliders/SeparatingAxis.js.map +1 -0
  83. package/build/dist/Collision/Colliders/Shape.js +100 -0
  84. package/build/dist/Collision/Colliders/Shape.js.map +1 -0
  85. package/build/dist/Collision/CollisionSystem.js +157 -0
  86. package/build/dist/Collision/CollisionSystem.js.map +1 -0
  87. package/build/dist/Collision/CollisionType.js +33 -0
  88. package/build/dist/Collision/CollisionType.js.map +1 -0
  89. package/build/dist/Collision/Detection/CollisionContact.js +52 -0
  90. package/build/dist/Collision/Detection/CollisionContact.js.map +1 -0
  91. package/build/dist/Collision/Detection/CollisionProcessor.js +2 -0
  92. package/build/dist/Collision/Detection/CollisionProcessor.js.map +1 -0
  93. package/build/dist/Collision/Detection/DynamicTree.js +442 -0
  94. package/build/dist/Collision/Detection/DynamicTree.js.map +1 -0
  95. package/build/dist/Collision/Detection/DynamicTreeCollisionProcessor.js +253 -0
  96. package/build/dist/Collision/Detection/DynamicTreeCollisionProcessor.js.map +1 -0
  97. package/build/dist/Collision/Detection/Pair.js +92 -0
  98. package/build/dist/Collision/Detection/Pair.js.map +1 -0
  99. package/build/dist/Collision/Detection/QuadTree.js +193 -0
  100. package/build/dist/Collision/Detection/QuadTree.js.map +1 -0
  101. package/build/dist/Collision/Detection/RayCastHit.js +2 -0
  102. package/build/dist/Collision/Detection/RayCastHit.js.map +1 -0
  103. package/build/dist/Collision/Group/CollisionGroup.js +128 -0
  104. package/build/dist/Collision/Group/CollisionGroup.js.map +1 -0
  105. package/build/dist/Collision/Group/CollisionGroupManager.js +56 -0
  106. package/build/dist/Collision/Group/CollisionGroupManager.js.map +1 -0
  107. package/build/dist/Collision/Index.js +35 -0
  108. package/build/dist/Collision/Index.js.map +1 -0
  109. package/build/dist/Collision/Integrator.js +25 -0
  110. package/build/dist/Collision/Integrator.js.map +1 -0
  111. package/build/dist/Collision/MotionSystem.js +44 -0
  112. package/build/dist/Collision/MotionSystem.js.map +1 -0
  113. package/build/dist/Collision/Physics.js +165 -0
  114. package/build/dist/Collision/Physics.js.map +1 -0
  115. package/build/dist/Collision/PhysicsConfig.js +78 -0
  116. package/build/dist/Collision/PhysicsConfig.js.map +1 -0
  117. package/build/dist/Collision/PhysicsWorld.js +49 -0
  118. package/build/dist/Collision/PhysicsWorld.js.map +1 -0
  119. package/build/dist/Collision/Side.js +51 -0
  120. package/build/dist/Collision/Side.js.map +1 -0
  121. package/build/dist/Collision/Solver/ArcadeSolver.js +175 -0
  122. package/build/dist/Collision/Solver/ArcadeSolver.js.map +1 -0
  123. package/build/dist/Collision/Solver/ContactBias.js +31 -0
  124. package/build/dist/Collision/Solver/ContactBias.js.map +1 -0
  125. package/build/dist/Collision/Solver/ContactConstraintPoint.js +87 -0
  126. package/build/dist/Collision/Solver/ContactConstraintPoint.js.map +1 -0
  127. package/build/dist/Collision/Solver/RealisticSolver.js +293 -0
  128. package/build/dist/Collision/Solver/RealisticSolver.js.map +1 -0
  129. package/build/dist/Collision/Solver/Solver.js +2 -0
  130. package/build/dist/Collision/Solver/Solver.js.map +1 -0
  131. package/build/dist/Collision/SolverStrategy.js +15 -0
  132. package/build/dist/Collision/SolverStrategy.js.map +1 -0
  133. package/build/dist/Color.js +422 -0
  134. package/build/dist/Color.js.map +1 -0
  135. package/build/dist/Configurable.js +32 -0
  136. package/build/dist/Configurable.js.map +1 -0
  137. package/build/dist/Context.d.ts +27 -0
  138. package/build/dist/Context.js +30 -0
  139. package/build/dist/Context.js.map +1 -0
  140. package/build/dist/Debug/DebugConfig.js +397 -0
  141. package/build/dist/Debug/DebugConfig.js.map +1 -0
  142. package/build/dist/Debug/DebugFlags.js +40 -0
  143. package/build/dist/Debug/DebugFlags.js.map +1 -0
  144. package/build/dist/Debug/DebugSystem.js +296 -0
  145. package/build/dist/Debug/DebugSystem.js.map +1 -0
  146. package/build/dist/Debug/index.js +4 -0
  147. package/build/dist/Debug/index.js.map +1 -0
  148. package/build/dist/Deprecated.js +2 -0
  149. package/build/dist/Deprecated.js.map +1 -0
  150. package/build/dist/Director/Director.d.ts +5 -1
  151. package/build/dist/Director/Director.js +29 -4
  152. package/build/dist/Director/Director.js.map +1 -1
  153. package/build/dist/Director/Loader.d.ts +2 -0
  154. package/build/dist/Director/Loader.js +11 -15
  155. package/build/dist/Director/Loader.js.map +1 -1
  156. package/build/dist/Engine.d.ts +22 -3
  157. package/build/dist/Engine.js +164 -85
  158. package/build/dist/Engine.js.map +1 -1
  159. package/build/dist/EntityComponentSystem/Component.js +53 -0
  160. package/build/dist/EntityComponentSystem/Component.js.map +1 -0
  161. package/build/dist/EntityComponentSystem/Components/MotionComponent.js +32 -0
  162. package/build/dist/EntityComponentSystem/Components/MotionComponent.js.map +1 -0
  163. package/build/dist/EntityComponentSystem/Components/TagsComponent.js +8 -0
  164. package/build/dist/EntityComponentSystem/Components/TagsComponent.js.map +1 -0
  165. package/build/dist/EntityComponentSystem/Components/TransformComponent.js +127 -0
  166. package/build/dist/EntityComponentSystem/Components/TransformComponent.js.map +1 -0
  167. package/build/dist/EntityComponentSystem/Entity.d.ts +3 -3
  168. package/build/dist/EntityComponentSystem/Entity.js +518 -0
  169. package/build/dist/EntityComponentSystem/Entity.js.map +1 -0
  170. package/build/dist/EntityComponentSystem/EntityManager.js +120 -0
  171. package/build/dist/EntityComponentSystem/EntityManager.js.map +1 -0
  172. package/build/dist/EntityComponentSystem/Priority.js +11 -0
  173. package/build/dist/EntityComponentSystem/Priority.js.map +1 -0
  174. package/build/dist/EntityComponentSystem/Query.js +67 -0
  175. package/build/dist/EntityComponentSystem/Query.js.map +1 -0
  176. package/build/dist/EntityComponentSystem/QueryManager.js +183 -0
  177. package/build/dist/EntityComponentSystem/QueryManager.js.map +1 -0
  178. package/build/dist/EntityComponentSystem/System.js +41 -0
  179. package/build/dist/EntityComponentSystem/System.js.map +1 -0
  180. package/build/dist/EntityComponentSystem/SystemManager.js +100 -0
  181. package/build/dist/EntityComponentSystem/SystemManager.js.map +1 -0
  182. package/build/dist/EntityComponentSystem/TagQuery.js +52 -0
  183. package/build/dist/EntityComponentSystem/TagQuery.js.map +1 -0
  184. package/build/dist/EntityComponentSystem/Types.js +2 -0
  185. package/build/dist/EntityComponentSystem/Types.js.map +1 -0
  186. package/build/dist/EntityComponentSystem/World.js +74 -0
  187. package/build/dist/EntityComponentSystem/World.js.map +1 -0
  188. package/build/dist/EntityComponentSystem/index.js +14 -0
  189. package/build/dist/EntityComponentSystem/index.js.map +1 -0
  190. package/build/dist/EventDispatcher.js +122 -0
  191. package/build/dist/EventDispatcher.js.map +1 -0
  192. package/build/dist/EventEmitter.js +86 -0
  193. package/build/dist/EventEmitter.js.map +1 -0
  194. package/build/dist/Events/ExEvent.js +12 -0
  195. package/build/dist/Events/ExEvent.js.map +1 -0
  196. package/build/dist/Events/MediaEvents.js +75 -0
  197. package/build/dist/Events/MediaEvents.js.map +1 -0
  198. package/build/dist/Events/PointerEvents.js +52 -0
  199. package/build/dist/Events/PointerEvents.js.map +1 -0
  200. package/build/dist/Events.js +531 -0
  201. package/build/dist/Events.js.map +1 -0
  202. package/build/dist/Flags.js +67 -0
  203. package/build/dist/Flags.js.map +1 -0
  204. package/build/dist/Graphics/Animation.js +380 -0
  205. package/build/dist/Graphics/Animation.js.map +1 -0
  206. package/build/dist/Graphics/Canvas.js +38 -0
  207. package/build/dist/Graphics/Canvas.js.map +1 -0
  208. package/build/dist/Graphics/Circle.js +48 -0
  209. package/build/dist/Graphics/Circle.js.map +1 -0
  210. package/build/dist/Graphics/Context/ExcaliburGraphicsContext.d.ts +2 -2
  211. package/build/dist/Graphics/Context/ExcaliburGraphicsContext2DCanvas.d.ts +2 -2
  212. package/build/dist/Graphics/Context/ExcaliburGraphicsContext2DCanvas.js.map +1 -1
  213. package/build/dist/Graphics/Context/ExcaliburGraphicsContextWebGL.d.ts +11 -3
  214. package/build/dist/Graphics/Context/ExcaliburGraphicsContextWebGL.js +62 -8
  215. package/build/dist/Graphics/Context/ExcaliburGraphicsContextWebGL.js.map +1 -1
  216. package/build/dist/Graphics/Context/circle-renderer/circle-renderer.js +181 -0
  217. package/build/dist/Graphics/Context/circle-renderer/circle-renderer.js.map +1 -0
  218. package/build/dist/Graphics/Context/debug-text.js +51 -0
  219. package/build/dist/Graphics/Context/debug-text.js.map +1 -0
  220. package/build/dist/Graphics/Context/draw-call.js +16 -0
  221. package/build/dist/Graphics/Context/draw-call.js.map +1 -0
  222. package/build/dist/Graphics/Context/image-renderer/image-renderer.d.ts +10 -0
  223. package/build/dist/Graphics/Context/image-renderer/image-renderer.js +323 -0
  224. package/build/dist/Graphics/Context/image-renderer/image-renderer.js.map +1 -0
  225. package/build/dist/Graphics/Context/line-renderer/line-renderer.js +96 -0
  226. package/build/dist/Graphics/Context/line-renderer/line-renderer.js.map +1 -0
  227. package/build/dist/Graphics/Context/material-renderer/material-renderer.js +180 -0
  228. package/build/dist/Graphics/Context/material-renderer/material-renderer.js.map +1 -0
  229. package/build/dist/Graphics/Context/material.d.ts +1 -0
  230. package/build/dist/Graphics/Context/material.js +145 -0
  231. package/build/dist/Graphics/Context/material.js.map +1 -0
  232. package/build/dist/Graphics/Context/point-renderer/point-renderer.js +97 -0
  233. package/build/dist/Graphics/Context/point-renderer/point-renderer.js.map +1 -0
  234. package/build/dist/Graphics/Context/quad-index-buffer.js +72 -0
  235. package/build/dist/Graphics/Context/quad-index-buffer.js.map +1 -0
  236. package/build/dist/Graphics/Context/rectangle-renderer/rectangle-renderer.js +312 -0
  237. package/build/dist/Graphics/Context/rectangle-renderer/rectangle-renderer.js.map +1 -0
  238. package/build/dist/Graphics/Context/render-source.js +16 -0
  239. package/build/dist/Graphics/Context/render-source.js.map +1 -0
  240. package/build/dist/Graphics/Context/render-target.js +153 -0
  241. package/build/dist/Graphics/Context/render-target.js.map +1 -0
  242. package/build/dist/Graphics/Context/renderer.js +2 -0
  243. package/build/dist/Graphics/Context/renderer.js.map +1 -0
  244. package/build/dist/Graphics/Context/screen-pass-painter/screen-pass-painter.js +56 -0
  245. package/build/dist/Graphics/Context/screen-pass-painter/screen-pass-painter.js.map +1 -0
  246. package/build/dist/Graphics/Context/shader.js +358 -0
  247. package/build/dist/Graphics/Context/shader.js.map +1 -0
  248. package/build/dist/Graphics/Context/state-stack.d.ts +1 -3
  249. package/build/dist/Graphics/Context/state-stack.js +31 -0
  250. package/build/dist/Graphics/Context/state-stack.js.map +1 -0
  251. package/build/dist/Graphics/Context/texture-loader.d.ts +4 -2
  252. package/build/dist/Graphics/Context/texture-loader.js +160 -0
  253. package/build/dist/Graphics/Context/texture-loader.js.map +1 -0
  254. package/build/dist/Graphics/Context/transform-stack.js +30 -0
  255. package/build/dist/Graphics/Context/transform-stack.js.map +1 -0
  256. package/build/dist/Graphics/Context/vertex-buffer.d.ts +1 -0
  257. package/build/dist/Graphics/Context/vertex-buffer.js +62 -0
  258. package/build/dist/Graphics/Context/vertex-buffer.js.map +1 -0
  259. package/build/dist/Graphics/Context/vertex-layout.d.ts +9 -0
  260. package/build/dist/Graphics/Context/vertex-layout.js +146 -0
  261. package/build/dist/Graphics/Context/vertex-layout.js.map +1 -0
  262. package/build/dist/Graphics/Context/webgl-util.d.ts +12 -1
  263. package/build/dist/Graphics/Context/webgl-util.js +133 -0
  264. package/build/dist/Graphics/Context/webgl-util.js.map +1 -0
  265. package/build/dist/Graphics/Debug.js +87 -0
  266. package/build/dist/Graphics/Debug.js.map +1 -0
  267. package/build/dist/Graphics/DebugGraphicsComponent.js +15 -0
  268. package/build/dist/Graphics/DebugGraphicsComponent.js.map +1 -0
  269. package/build/dist/Graphics/Filtering.d.ts +4 -0
  270. package/build/dist/Graphics/Filtering.js +27 -0
  271. package/build/dist/Graphics/Filtering.js.map +1 -0
  272. package/build/dist/Graphics/Font.js +153 -0
  273. package/build/dist/Graphics/Font.js.map +1 -0
  274. package/build/dist/Graphics/FontCache.js +80 -0
  275. package/build/dist/Graphics/FontCache.js.map +1 -0
  276. package/build/dist/Graphics/FontCommon.js +109 -0
  277. package/build/dist/Graphics/FontCommon.js.map +1 -0
  278. package/build/dist/Graphics/FontTextInstance.js +236 -0
  279. package/build/dist/Graphics/FontTextInstance.js.map +1 -0
  280. package/build/dist/Graphics/Graphic.js +208 -0
  281. package/build/dist/Graphics/Graphic.js.map +1 -0
  282. package/build/dist/Graphics/GraphicsComponent.d.ts +7 -0
  283. package/build/dist/Graphics/GraphicsComponent.js +293 -0
  284. package/build/dist/Graphics/GraphicsComponent.js.map +1 -0
  285. package/build/dist/Graphics/GraphicsDiagnostics.js +9 -0
  286. package/build/dist/Graphics/GraphicsDiagnostics.js.map +1 -0
  287. package/build/dist/Graphics/GraphicsGroup.d.ts +8 -0
  288. package/build/dist/Graphics/GraphicsGroup.js +110 -0
  289. package/build/dist/Graphics/GraphicsGroup.js.map +1 -0
  290. package/build/dist/Graphics/GraphicsSystem.js +240 -0
  291. package/build/dist/Graphics/GraphicsSystem.js.map +1 -0
  292. package/build/dist/Graphics/ImageSource.d.ts +20 -2
  293. package/build/dist/Graphics/ImageSource.js +185 -0
  294. package/build/dist/Graphics/ImageSource.js.map +1 -0
  295. package/build/dist/Graphics/Line.js +45 -0
  296. package/build/dist/Graphics/Line.js.map +1 -0
  297. package/build/dist/Graphics/ParallaxComponent.js +10 -0
  298. package/build/dist/Graphics/ParallaxComponent.js.map +1 -0
  299. package/build/dist/Graphics/Polygon.js +59 -0
  300. package/build/dist/Graphics/Polygon.js.map +1 -0
  301. package/build/dist/Graphics/PostProcessor/ColorBlindnessMode.js +7 -0
  302. package/build/dist/Graphics/PostProcessor/ColorBlindnessMode.js.map +1 -0
  303. package/build/dist/Graphics/PostProcessor/ColorBlindnessPostProcessor.js +52 -0
  304. package/build/dist/Graphics/PostProcessor/ColorBlindnessPostProcessor.js.map +1 -0
  305. package/build/dist/Graphics/PostProcessor/PostProcessor.js +2 -0
  306. package/build/dist/Graphics/PostProcessor/PostProcessor.js.map +1 -0
  307. package/build/dist/Graphics/PostProcessor/ScreenShader.js +59 -0
  308. package/build/dist/Graphics/PostProcessor/ScreenShader.js.map +1 -0
  309. package/build/dist/Graphics/Raster.js +215 -0
  310. package/build/dist/Graphics/Raster.js.map +1 -0
  311. package/build/dist/Graphics/Rectangle.js +29 -0
  312. package/build/dist/Graphics/Rectangle.js.map +1 -0
  313. package/build/dist/Graphics/Sprite.js +80 -0
  314. package/build/dist/Graphics/Sprite.js.map +1 -0
  315. package/build/dist/Graphics/SpriteFont.js +134 -0
  316. package/build/dist/Graphics/SpriteFont.js.map +1 -0
  317. package/build/dist/Graphics/SpriteSheet.js +131 -0
  318. package/build/dist/Graphics/SpriteSheet.js.map +1 -0
  319. package/build/dist/Graphics/Text.js +103 -0
  320. package/build/dist/Graphics/Text.js.map +1 -0
  321. package/build/dist/Graphics/TransformInterpolation.js +49 -0
  322. package/build/dist/Graphics/TransformInterpolation.js.map +1 -0
  323. package/build/dist/Graphics/Wrapping.d.ts +12 -0
  324. package/build/dist/Graphics/Wrapping.js +21 -0
  325. package/build/dist/Graphics/Wrapping.js.map +1 -0
  326. package/build/dist/Graphics/index.d.ts +1 -0
  327. package/build/dist/Graphics/index.js +49 -0
  328. package/build/dist/Graphics/index.js.map +1 -0
  329. package/build/dist/Id.js +8 -0
  330. package/build/dist/Id.js.map +1 -0
  331. package/build/dist/Input/CapturePointerConfig.js +5 -0
  332. package/build/dist/Input/CapturePointerConfig.js.map +1 -0
  333. package/build/dist/Input/Gamepad.js +429 -0
  334. package/build/dist/Input/Gamepad.js.map +1 -0
  335. package/build/dist/Input/Index.js +84 -0
  336. package/build/dist/Input/Index.js.map +1 -0
  337. package/build/dist/Input/InputHost.js +38 -0
  338. package/build/dist/Input/InputHost.js.map +1 -0
  339. package/build/dist/Input/InputMapper.js +45 -0
  340. package/build/dist/Input/InputMapper.js.map +1 -0
  341. package/build/dist/Input/Keyboard.js +358 -0
  342. package/build/dist/Input/Keyboard.js.map +1 -0
  343. package/build/dist/Input/NativePointerButton.js +12 -0
  344. package/build/dist/Input/NativePointerButton.js.map +1 -0
  345. package/build/dist/Input/PointerAbstraction.js +44 -0
  346. package/build/dist/Input/PointerAbstraction.js.map +1 -0
  347. package/build/dist/Input/PointerButton.js +12 -0
  348. package/build/dist/Input/PointerButton.js.map +1 -0
  349. package/build/dist/Input/PointerComponent.d.ts +11 -0
  350. package/build/dist/Input/PointerComponent.js +31 -0
  351. package/build/dist/Input/PointerComponent.js.map +1 -0
  352. package/build/dist/Input/PointerEvent.js +25 -0
  353. package/build/dist/Input/PointerEvent.js.map +1 -0
  354. package/build/dist/Input/PointerEventReceiver.js +468 -0
  355. package/build/dist/Input/PointerEventReceiver.js.map +1 -0
  356. package/build/dist/Input/PointerScope.js +16 -0
  357. package/build/dist/Input/PointerScope.js.map +1 -0
  358. package/build/dist/Input/PointerSystem.js +266 -0
  359. package/build/dist/Input/PointerSystem.js.map +1 -0
  360. package/build/dist/Input/PointerType.js +11 -0
  361. package/build/dist/Input/PointerType.js.map +1 -0
  362. package/build/dist/Input/WheelDeltaMode.js +7 -0
  363. package/build/dist/Input/WheelDeltaMode.js.map +1 -0
  364. package/build/dist/Input/WheelEvent.js +21 -0
  365. package/build/dist/Input/WheelEvent.js.map +1 -0
  366. package/build/dist/Interfaces/Audio.js +2 -0
  367. package/build/dist/Interfaces/Audio.js.map +1 -0
  368. package/build/dist/Interfaces/AudioImplementation.js +11 -0
  369. package/build/dist/Interfaces/AudioImplementation.js.map +1 -0
  370. package/build/dist/Interfaces/Clonable.js +2 -0
  371. package/build/dist/Interfaces/Clonable.js.map +1 -0
  372. package/build/dist/Interfaces/Evented.js +2 -0
  373. package/build/dist/Interfaces/Evented.js.map +1 -0
  374. package/build/dist/Interfaces/Index.js +8 -0
  375. package/build/dist/Interfaces/Index.js.map +1 -0
  376. package/build/dist/Interfaces/LifecycleEvents.js +51 -0
  377. package/build/dist/Interfaces/LifecycleEvents.js.map +1 -0
  378. package/build/dist/Interfaces/Loadable.js +2 -0
  379. package/build/dist/Interfaces/Loadable.js.map +1 -0
  380. package/build/dist/Interfaces/PointerEventHandlers.js +2 -0
  381. package/build/dist/Interfaces/PointerEventHandlers.js.map +1 -0
  382. package/build/dist/Label.js +81 -0
  383. package/build/dist/Label.js.map +1 -0
  384. package/build/dist/Math/Index.js +13 -0
  385. package/build/dist/Math/Index.js.map +1 -0
  386. package/build/dist/Math/Random.js +239 -0
  387. package/build/dist/Math/Random.js.map +1 -0
  388. package/build/dist/Math/affine-matrix.d.ts +7 -1
  389. package/build/dist/Math/affine-matrix.js +349 -0
  390. package/build/dist/Math/affine-matrix.js.map +1 -0
  391. package/build/dist/Math/coord-plane.js +17 -0
  392. package/build/dist/Math/coord-plane.js.map +1 -0
  393. package/build/dist/Math/global-coordinates.js +30 -0
  394. package/build/dist/Math/global-coordinates.js.map +1 -0
  395. package/build/dist/Math/line-segment.js +205 -0
  396. package/build/dist/Math/line-segment.js.map +1 -0
  397. package/build/dist/Math/matrix.js +457 -0
  398. package/build/dist/Math/matrix.js.map +1 -0
  399. package/build/dist/Math/projection.js +24 -0
  400. package/build/dist/Math/projection.js.map +1 -0
  401. package/build/dist/Math/ray.js +52 -0
  402. package/build/dist/Math/ray.js.map +1 -0
  403. package/build/dist/Math/transform.js +224 -0
  404. package/build/dist/Math/transform.js.map +1 -0
  405. package/build/dist/Math/util.js +82 -0
  406. package/build/dist/Math/util.js.map +1 -0
  407. package/build/dist/Math/vector-view.js +25 -0
  408. package/build/dist/Math/vector-view.js.map +1 -0
  409. package/build/dist/Math/vector.d.ts +5 -2
  410. package/build/dist/Math/vector.js +343 -0
  411. package/build/dist/Math/vector.js.map +1 -0
  412. package/build/dist/Math/watch-vector.js +26 -0
  413. package/build/dist/Math/watch-vector.js.map +1 -0
  414. package/build/dist/Particles.d.ts +1 -0
  415. package/build/dist/Particles.js +429 -0
  416. package/build/dist/Particles.js.map +1 -0
  417. package/build/dist/Polyfill.js +56 -0
  418. package/build/dist/Polyfill.js.map +1 -0
  419. package/build/dist/Resources/Font.d.ts +1 -1
  420. package/build/dist/Resources/Font.js +49 -0
  421. package/build/dist/Resources/Font.js.map +1 -0
  422. package/build/dist/Resources/Gif.js +464 -0
  423. package/build/dist/Resources/Gif.js.map +1 -0
  424. package/build/dist/Resources/Index.js +5 -0
  425. package/build/dist/Resources/Index.js.map +1 -0
  426. package/build/dist/Resources/Resource.js +81 -0
  427. package/build/dist/Resources/Resource.js.map +1 -0
  428. package/build/dist/Resources/Sound/AudioContext.js +16 -0
  429. package/build/dist/Resources/Sound/AudioContext.js.map +1 -0
  430. package/build/dist/Resources/Sound/Index.js +4 -0
  431. package/build/dist/Resources/Sound/Index.js.map +1 -0
  432. package/build/dist/Resources/Sound/Sound.js +331 -0
  433. package/build/dist/Resources/Sound/Sound.js.map +1 -0
  434. package/build/dist/Resources/Sound/WebAudioInstance.js +190 -0
  435. package/build/dist/Resources/Sound/WebAudioInstance.js.map +1 -0
  436. package/build/dist/Scene.js +515 -0
  437. package/build/dist/Scene.js.map +1 -0
  438. package/build/dist/Screen.d.ts +30 -19
  439. package/build/dist/Screen.js +110 -42
  440. package/build/dist/Screen.js.map +1 -1
  441. package/build/dist/ScreenElement.js +43 -0
  442. package/build/dist/ScreenElement.js.map +1 -0
  443. package/build/dist/TileMap/IsometricEntityComponent.js +19 -0
  444. package/build/dist/TileMap/IsometricEntityComponent.js.map +1 -0
  445. package/build/dist/TileMap/IsometricEntitySystem.js +25 -0
  446. package/build/dist/TileMap/IsometricEntitySystem.js.map +1 -0
  447. package/build/dist/TileMap/IsometricMap.d.ts +14 -1
  448. package/build/dist/TileMap/IsometricMap.js +369 -0
  449. package/build/dist/TileMap/IsometricMap.js.map +1 -0
  450. package/build/dist/TileMap/TileMap.d.ts +27 -2
  451. package/build/dist/TileMap/TileMap.js +708 -0
  452. package/build/dist/TileMap/TileMap.js.map +1 -0
  453. package/build/dist/TileMap/index.js +5 -0
  454. package/build/dist/TileMap/index.js.map +1 -0
  455. package/build/dist/Timer.js +202 -0
  456. package/build/dist/Timer.js.map +1 -0
  457. package/build/dist/Trigger.js +94 -0
  458. package/build/dist/Trigger.js.map +1 -0
  459. package/build/dist/Util/Browser.js +66 -0
  460. package/build/dist/Util/Browser.js.map +1 -0
  461. package/build/dist/Util/Clock.d.ts +9 -2
  462. package/build/dist/Util/Clock.js +227 -0
  463. package/build/dist/Util/Clock.js.map +1 -0
  464. package/build/dist/Util/Coroutine.d.ts +48 -4
  465. package/build/dist/Util/Coroutine.js +92 -0
  466. package/build/dist/Util/Coroutine.js.map +1 -0
  467. package/build/dist/Util/Decorators.js +78 -0
  468. package/build/dist/Util/Decorators.js.map +1 -0
  469. package/build/dist/Util/Detector.js +167 -0
  470. package/build/dist/Util/Detector.js.map +1 -0
  471. package/build/dist/Util/DrawUtil.js +115 -0
  472. package/build/dist/Util/DrawUtil.js.map +1 -0
  473. package/build/dist/Util/EasingFunctions.js +102 -0
  474. package/build/dist/Util/EasingFunctions.js.map +1 -0
  475. package/build/dist/Util/Fps.js +47 -0
  476. package/build/dist/Util/Fps.js.map +1 -0
  477. package/build/dist/Util/Future.js +30 -0
  478. package/build/dist/Util/Future.js.map +1 -0
  479. package/build/dist/Util/IFrame.js +23 -0
  480. package/build/dist/Util/IFrame.js.map +1 -0
  481. package/build/dist/Util/Index.js +7 -0
  482. package/build/dist/Util/Index.js.map +1 -0
  483. package/build/dist/Util/Log.js +255 -0
  484. package/build/dist/Util/Log.js.map +1 -0
  485. package/build/dist/Util/Observable.js +66 -0
  486. package/build/dist/Util/Observable.js.map +1 -0
  487. package/build/dist/Util/Pool.d.ts +4 -5
  488. package/build/dist/Util/Pool.js +76 -0
  489. package/build/dist/Util/Pool.js.map +1 -0
  490. package/build/dist/Util/Required.js +2 -0
  491. package/build/dist/Util/Required.js.map +1 -0
  492. package/build/dist/Util/Semaphore.js +56 -0
  493. package/build/dist/Util/Semaphore.js.map +1 -0
  494. package/build/dist/Util/Sound.js +22 -0
  495. package/build/dist/Util/Sound.js.map +1 -0
  496. package/build/dist/Util/StateMachine.js +79 -0
  497. package/build/dist/Util/StateMachine.js.map +1 -0
  498. package/build/dist/Util/Toaster.js +84 -0
  499. package/build/dist/Util/Toaster.js.map +1 -0
  500. package/build/dist/Util/Util.js +85 -0
  501. package/build/dist/Util/Util.js.map +1 -0
  502. package/build/dist/Util/Watch.js +100 -0
  503. package/build/dist/Util/Watch.js.map +1 -0
  504. package/build/dist/Util/WebAudio.js +62 -0
  505. package/build/dist/Util/WebAudio.js.map +1 -0
  506. package/build/dist/excalibur.d.ts +2 -2
  507. package/build/dist/excalibur.js +1913 -1196
  508. package/build/dist/excalibur.js.map +1 -1
  509. package/build/dist/excalibur.min.js +1 -1
  510. package/build/dist/excalibur.min.js.LICENSE.txt +1 -1
  511. package/build/dist/excalibur.min.js.map +1 -1
  512. package/build/dist/index.js +2 -2
  513. package/build/esm/Context.d.ts +27 -0
  514. package/build/esm/Director/Director.d.ts +5 -1
  515. package/build/esm/Director/Loader.d.ts +2 -0
  516. package/build/esm/Engine.d.ts +22 -3
  517. package/build/esm/EntityComponentSystem/Entity.d.ts +3 -3
  518. package/build/esm/Graphics/Context/ExcaliburGraphicsContext.d.ts +2 -2
  519. package/build/esm/Graphics/Context/ExcaliburGraphicsContext2DCanvas.d.ts +2 -2
  520. package/build/esm/Graphics/Context/ExcaliburGraphicsContextWebGL.d.ts +11 -3
  521. package/build/esm/Graphics/Context/image-renderer/image-renderer.d.ts +10 -0
  522. package/build/esm/Graphics/Context/material.d.ts +1 -0
  523. package/build/esm/Graphics/Context/state-stack.d.ts +1 -3
  524. package/build/esm/Graphics/Context/texture-loader.d.ts +4 -2
  525. package/build/esm/Graphics/Context/vertex-buffer.d.ts +1 -0
  526. package/build/esm/Graphics/Context/vertex-layout.d.ts +9 -0
  527. package/build/esm/Graphics/Context/webgl-util.d.ts +11 -0
  528. package/build/esm/Graphics/Filtering.d.ts +4 -0
  529. package/build/esm/Graphics/GraphicsComponent.d.ts +7 -0
  530. package/build/esm/Graphics/GraphicsGroup.d.ts +8 -0
  531. package/build/esm/Graphics/ImageSource.d.ts +20 -2
  532. package/build/esm/Graphics/Wrapping.d.ts +12 -0
  533. package/build/esm/Graphics/index.d.ts +1 -0
  534. package/build/esm/Input/PointerComponent.d.ts +11 -0
  535. package/build/esm/Math/affine-matrix.d.ts +7 -1
  536. package/build/esm/Math/vector.d.ts +5 -2
  537. package/build/esm/Particles.d.ts +1 -0
  538. package/build/esm/Resources/Font.d.ts +1 -1
  539. package/build/esm/Screen.d.ts +30 -19
  540. package/build/esm/TileMap/IsometricMap.d.ts +14 -1
  541. package/build/esm/TileMap/TileMap.d.ts +27 -2
  542. package/build/esm/Util/Clock.d.ts +9 -2
  543. package/build/esm/Util/Coroutine.d.ts +48 -4
  544. package/build/esm/Util/Pool.d.ts +4 -5
  545. package/build/esm/excalibur.d.ts +2 -2
  546. package/build/esm/excalibur.js +2558 -1837
  547. package/build/esm/excalibur.js.map +1 -1
  548. package/build/esm/excalibur.min.js +1 -1
  549. package/build/esm/excalibur.min.js.LICENSE.txt +1 -1
  550. package/build/esm/excalibur.min.js.map +1 -1
  551. package/package.json +29 -28
package/.nvmrc CHANGED
@@ -1 +1 @@
1
- 20.11.0
1
+ 20.12.0
package/CHANGELOG.md CHANGED
@@ -7,7 +7,6 @@ This project adheres to [Semantic Versioning](http://semver.org/).
7
7
 
8
8
  ### Breaking Changes
9
9
 
10
- =======
11
10
  -
12
11
 
13
12
  ### Deprecated
@@ -20,8 +19,8 @@ This project adheres to [Semantic Versioning](http://semver.org/).
20
19
 
21
20
  ### Fixed
22
21
 
23
- - Fixed issue where start transition did not work properly if deferred
24
- - Fixed issue where transitions did not cover the whole screen if camera was zoomed
22
+ - Fixed animation glitch caused by uninitialized state in `ImageRenderer`
23
+ - Fixed issue where `ex.Loader.suppressPlayButton = true` did not work. Only using the `ex.Engine({suppressPlayButton: true})` worked
25
24
 
26
25
  ### Updates
27
26
 
@@ -29,12 +28,114 @@ This project adheres to [Semantic Versioning](http://semver.org/).
29
28
 
30
29
  ### Changed
31
30
 
32
- -
31
+ - `ex.Vector.toAngle()` now returns angles from [0 - 2 PI)
33
32
 
34
33
  <!--------------------------------- DO NOT EDIT BELOW THIS LINE --------------------------------->
35
34
  <!--------------------------------- DO NOT EDIT BELOW THIS LINE --------------------------------->
36
35
  <!--------------------------------- DO NOT EDIT BELOW THIS LINE --------------------------------->
37
36
 
37
+ ## [v0.29.2]
38
+
39
+ ### Breaking Changes
40
+
41
+ -
42
+
43
+ ### Deprecated
44
+
45
+ -
46
+
47
+ ### Added
48
+
49
+ - Added ability to configure image wrapping on `ex.ImageSource` with the new `ex.ImageWrapping.Clamp` (default), `ex.ImageWrapping.Repeat`, and `ex.ImageWrapping.Mirror`.
50
+ ```typescript
51
+ const image = new ex.ImageSource('path/to/image.png', {
52
+ filtering: ex.ImageFiltering.Pixel,
53
+ wrapping: {
54
+ x: ex.ImageWrapping.Repeat,
55
+ y: ex.ImageWrapping.Repeat,
56
+ }
57
+ });
58
+ ```
59
+ - Added pointer event support to `ex.TileMap`'s and individual `ex.Tile`'s
60
+ - Added pointer event support to `ex.IsometricMap`'s and individual `ex.IsometricTile`'s
61
+ - Added `useAnchor` parameter to `ex.GraphicsGroup` to allow users to opt out of anchor based positioning, if set to false all graphics members
62
+ will be positioned with the top left of the graphic at the actor's position.
63
+ ```typescript
64
+ const graphicGroup = new ex.GraphicsGroup({
65
+ useAnchor: false,
66
+ members: [
67
+ {
68
+ graphic: heartImage.toSprite(),
69
+ offset: ex.vec(0, 0),
70
+ },
71
+ {
72
+ graphic: heartImage.toSprite(),
73
+ offset: ex.vec(0, 16),
74
+ },
75
+ {
76
+ graphic: heartImage.toSprite(),
77
+ offset: ex.vec(16, 16),
78
+ },
79
+ {
80
+ graphic: heartImage.toSprite(),
81
+ offset: ex.vec(16, 0),
82
+ },
83
+ ],
84
+ });
85
+ ```
86
+ - Added simplified `ex.coroutine` overloads, you need not pass engine as long as you are in an Excalibur lifecycle
87
+ ```typescript
88
+ const result = ex.coroutine(function* () {...});
89
+ ```
90
+ - Added way to bind 'this' to `ex.coroutine` overloads, you need not pass engine as long as you are in an Excalibur lifecycle
91
+ ```typescript
92
+ const result = ex.coroutine({myThis: 'cool'}, function* () {...});
93
+ ```
94
+ - Added optional `ex.coroutine` timing parameter to schedule when they are updated
95
+ ```typescript
96
+ const result = ex.coroutine(engine, function * () {...}, { timing: 'postupdate' })
97
+ ```
98
+ - Added `GraphicsComponent.bounds` which will report the world bounds of the graphic if applicable!
99
+ - Added `ex.Vector.EQUALS_EPSILON` to configure the `ex.Vector.equals(v)` threshold
100
+ - Added way to add custom WebGL context lost/recovered handlers for your game
101
+ ```typescript
102
+ const game = new ex.Engine({
103
+ handleContextLost: (e) => {...},
104
+ handleContextRestored: (e) => {...}
105
+ })
106
+ ```
107
+
108
+ ### Fixed
109
+
110
+ - Fixed issue where `ex.TileMap` culling did not work properly when using fixed updates lower than refresh rate
111
+ - Fixed incomplete types for font options in `ex.FontSource().toFont(options)`
112
+ - Fixed issue with `ex.Loader` start button position when using CSS transforms
113
+ - Fixed issue where adding scenes with the same name did not work when it was previously removed
114
+ - Fixed issue when WebGL context lost occurs where there was no friendly output to the user
115
+ - Fixed issue where HiDPI scaling could accidentally scale past the 4k mobile limit, if the context would scale too large it will now attempt to recover by backing off.
116
+ - Fixed issue where logo was sometimes not loaded during `ex.Loader`
117
+ - Fixed issue where unbounded containers would grow infinitely when using the following display modes:
118
+ * `DisplayMode.FillContainer`
119
+ * `DisplayMode.FitContainer`
120
+ * `DisplayMode.FitContainerAndFill`
121
+ * `DisplayMode.FitContainerAndZoom`
122
+ - Fixed issue where `ex.ParticleEmitter` z-index did not propagate to particles
123
+ - Fixed incongruent behavior as small scales when setting `transform.scale = v` and `transform.scale.setTo(x, y)`
124
+ - Fixed `ex.coroutine` TypeScript type to include yielding `undefined`
125
+ - Fixed issue where Firefox on Linux would throw an error when using custom Materials due to unused attributes caused by glsl compiler optimization.
126
+ - Fixed issue where start transition did not work properly if deferred
127
+ - Fixed issue where transitions did not cover the whole screen if camera was zoomed
128
+ - Fixed issue where `Color.toHex()` produced invalid strings if the channel values are negative or fractional, or if the alpha channel was different than 1
129
+
130
+ ### Updates
131
+
132
+ -
133
+
134
+ ### Changed
135
+
136
+ - Significant 2x performance improvement to image drawing in Excalibur
137
+ - Simplified `ex.Loader` viewport/resolution internal configuration
138
+
38
139
  ## [v0.29.0]
39
140
 
40
141
  ### Breaking Changes
package/README.md CHANGED
@@ -5,6 +5,10 @@
5
5
  [![npm version](https://img.shields.io/npm/v/excalibur.svg)](https://www.npmjs.com/package/excalibur)
6
6
  [![npm downloads](https://img.shields.io/npm/dt/excalibur.svg)](https://www.npmjs.com/package/excalibur)
7
7
  [![NuGet version](https://img.shields.io/nuget/v/Excalibur.svg)](https://www.nuget.org/packages/Excalibur/)
8
+ [![Discord][discord-badge]][discord-url]
9
+
10
+ [discord-badge]: https://img.shields.io/discord/1195771303215513671?logo=discord&logoColor=white&label=Discord&color=blue
11
+ [discord-url]: https://discord.gg/W6zUd4tTY3
8
12
 
9
13
  ![Sweep Stacks](assets/homepage-xp.png)
10
14
 
@@ -14,7 +18,7 @@ Excalibur is an open source project licensed under the 2-clause BSD license (thi
14
18
 
15
19
  # Get Started
16
20
 
17
- Our user documentation is at https://excaliburjs.com/docs (and you can contribute to the docs at https://github.com/excaliburjs/excaliburjs.github.io)
21
+ Our user documentation is at https://excaliburjs.com/docs (and you can contribute to the docs at https://github.com/excaliburjs/Excalibur/tree/main/site)
18
22
 
19
23
  - Follow our [Installation](https://excaliburjs.com/docs/installation) guide to learn how to install Excalibur.
20
24
  - Follow our [Getting Started](https://excaliburjs.com/docs/getting-started) guide if you're looking to get started.
package/SECURITY.md ADDED
@@ -0,0 +1,16 @@
1
+ # Security Policy
2
+
3
+ ## Supported Versions
4
+
5
+ Before v1.0 only the latest version of Excalibur.js is supported.
6
+
7
+ ## Reporting Security Issues
8
+
9
+ The Excalibur.js team and its community take security bugs seriously. We appreciate your efforts to responsibly disclose your findings, and will make every effort to acknowledge your contributions.
10
+
11
+ To report a security issue, please use the GitHub Security Advisory ["Report a Vulnerability"][create-new-report] button.
12
+
13
+ The Excalibur.js team will send a response indicating the next steps in handling your report. After the initial reply to your report, the security team will keep you informed of the progress towards a fix and full announcement, and may ask for additional information or guidance.
14
+
15
+
16
+ [create-new-report]: https://github.com/excaliburjs/Excalibur/security/advisories/new
@@ -0,0 +1,31 @@
1
+ import { ActionContext } from '../ActionContext';
2
+ /**
3
+ * Action that can represent a sequence of actions, this can be useful in conjunction with
4
+ * [[ParallelActions]] to run multiple sequences in parallel.
5
+ */
6
+ export class ActionSequence {
7
+ constructor(entity, actionBuilder) {
8
+ this._stopped = false;
9
+ this._sequenceBuilder = actionBuilder;
10
+ this._sequenceContext = new ActionContext(entity);
11
+ this._actionQueue = this._sequenceContext.getQueue();
12
+ this._sequenceBuilder(this._sequenceContext);
13
+ }
14
+ update(delta) {
15
+ this._actionQueue.update(delta);
16
+ }
17
+ isComplete() {
18
+ return this._stopped || this._actionQueue.isComplete();
19
+ }
20
+ stop() {
21
+ this._stopped = true;
22
+ }
23
+ reset() {
24
+ this._stopped = false;
25
+ this._actionQueue.reset();
26
+ }
27
+ clone(entity) {
28
+ return new ActionSequence(entity, this._sequenceBuilder);
29
+ }
30
+ }
31
+ //# sourceMappingURL=ActionSequence.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ActionSequence.js","sourceRoot":"","sources":["../../../../src/engine/Actions/Action/ActionSequence.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAGjD;;;GAGG;AACH,MAAM,OAAO,cAAc;IAKzB,YAAY,MAAc,EAAE,aAAoD;QAHxE,aAAQ,GAAY,KAAK,CAAC;QAIhC,IAAI,CAAC,gBAAgB,GAAG,aAAa,CAAC;QACtC,IAAI,CAAC,gBAAgB,GAAG,IAAI,aAAa,CAAC,MAAM,CAAC,CAAC;QAClD,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC,gBAAgB,CAAC,QAAQ,EAAE,CAAC;QACrD,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC;IAC/C,CAAC;IAEM,MAAM,CAAC,KAAa;QACzB,IAAI,CAAC,YAAY,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;IAClC,CAAC;IAEM,UAAU;QACf,OAAO,IAAI,CAAC,QAAQ,IAAI,IAAI,CAAC,YAAY,CAAC,UAAU,EAAE,CAAC;IACzD,CAAC;IAEM,IAAI;QACT,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC;IACvB,CAAC;IAEM,KAAK;QACV,IAAI,CAAC,QAAQ,GAAG,KAAK,CAAC;QACtB,IAAI,CAAC,YAAY,CAAC,KAAK,EAAE,CAAC;IAC5B,CAAC;IAEM,KAAK,CAAC,MAAc;QACzB,OAAO,IAAI,cAAc,CAAC,MAAM,EAAE,IAAI,CAAC,gBAAgB,CAAC,CAAC;IAC3D,CAAC;CACF"}
@@ -0,0 +1,54 @@
1
+ import { GraphicsComponent } from '../../Graphics/GraphicsComponent';
2
+ export class Blink {
3
+ constructor(entity, timeVisible, timeNotVisible, numBlinks = 1) {
4
+ this._timeVisible = 0;
5
+ this._timeNotVisible = 0;
6
+ this._elapsedTime = 0;
7
+ this._totalTime = 0;
8
+ this._stopped = false;
9
+ this._started = false;
10
+ this._graphics = entity.get(GraphicsComponent);
11
+ this._timeVisible = timeVisible;
12
+ this._timeNotVisible = timeNotVisible;
13
+ this._duration = (timeVisible + timeNotVisible) * numBlinks;
14
+ }
15
+ update(delta) {
16
+ if (!this._started) {
17
+ this._started = true;
18
+ this._elapsedTime = 0;
19
+ this._totalTime = 0;
20
+ }
21
+ if (!this._graphics) {
22
+ return;
23
+ }
24
+ this._elapsedTime += delta;
25
+ this._totalTime += delta;
26
+ if (this._graphics.visible && this._elapsedTime >= this._timeVisible) {
27
+ this._graphics.visible = false;
28
+ this._elapsedTime = 0;
29
+ }
30
+ if (!this._graphics.visible && this._elapsedTime >= this._timeNotVisible) {
31
+ this._graphics.visible = true;
32
+ this._elapsedTime = 0;
33
+ }
34
+ if (this.isComplete()) {
35
+ this._graphics.visible = true;
36
+ }
37
+ }
38
+ isComplete() {
39
+ return this._stopped || this._totalTime >= this._duration;
40
+ }
41
+ stop() {
42
+ if (this._graphics) {
43
+ this._graphics.visible = true;
44
+ }
45
+ this._stopped = true;
46
+ }
47
+ reset() {
48
+ this._started = false;
49
+ this._stopped = false;
50
+ this._elapsedTime = 0;
51
+ this._totalTime = 0;
52
+ }
53
+ }
54
+ //# sourceMappingURL=Blink.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Blink.js","sourceRoot":"","sources":["../../../../src/engine/Actions/Action/Blink.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,kCAAkC,CAAC;AAIrE,MAAM,OAAO,KAAK;IAShB,YAAY,MAAc,EAAE,WAAmB,EAAE,cAAsB,EAAE,YAAoB,CAAC;QAPtF,iBAAY,GAAW,CAAC,CAAC;QACzB,oBAAe,GAAW,CAAC,CAAC;QAC5B,iBAAY,GAAW,CAAC,CAAC;QACzB,eAAU,GAAW,CAAC,CAAC;QAEvB,aA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,UAAU;QACf,OAAO,IAAI,CAAC,QAAQ,IAAI,IAAI,CAAC,UAAU,IAAI,IAAI,CAAC,SAAS,CAAC;IAC5D,CAAC;IAEM,IAAI;QACT,IAAI,IAAI,CAAC,SAAS,EAAE,CAAC;YACnB,IAAI,CAAC,SAAS,CAAC,OAAO,GAAG,IAAI,CAAC;QAChC,CAAC;QACD,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC;IACvB,CAAC;IAEM,KAAK;QACV,IAAI,CAAC,QAAQ,GAAG,KAAK,CAAC;QACtB,IAAI,CAAC,QAAQ,GAAG,KAAK,CAAC;QACtB,IAAI,CAAC,YAAY,GAAG,CAAC,CAAC;QACtB,IAAI,CAAC,UAAU,GAAG,CAAC,CAAC;IACtB,CAAC;CACF"}
@@ -0,0 +1,21 @@
1
+ export class CallMethod {
2
+ constructor(method) {
3
+ this._method = null;
4
+ this._hasBeenCalled = false;
5
+ this._method = method;
6
+ }
7
+ update(_delta) {
8
+ this._method();
9
+ this._hasBeenCalled = true;
10
+ }
11
+ isComplete() {
12
+ return this._hasBeenCalled;
13
+ }
14
+ reset() {
15
+ this._hasBeenCalled = false;
16
+ }
17
+ stop() {
18
+ this._hasBeenCalled = true;
19
+ }
20
+ }
21
+ //# sourceMappingURL=CallMethod.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CallMethod.js","sourceRoot":"","sources":["../../../../src/engine/Actions/Action/CallMethod.ts"],"names":[],"mappings":"AAEA,MAAM,OAAO,UAAU;IAGrB,YAAY,MAAiB;QAFrB,YAAO,GAAc,IAAI,CAAC;QAC1B,mBAAc,GAAY,KAAK,CAAC;QAEtC,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC;IACxB,CAAC;IAEM,MAAM,CAAC,MAAc;QAC1B,IAAI,CAAC,OAAO,EAAE,CAAC;QACf,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC;IAC7B,CAAC;IACM,UAAU;QACf,OAAO,IAAI,CAAC,cAAc,CAAC;IAC7B,CAAC;IACM,KAAK;QACV,IAAI,CAAC,cAAc,GAAG,KAAK,CAAC;IAC9B,CAAC;IACM,IAAI;QACT,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC;IAC7B,CAAC;CACF"}
@@ -0,0 +1,26 @@
1
+ export class Delay {
2
+ constructor(delay) {
3
+ this._elapsedTime = 0;
4
+ this._started = false;
5
+ this._stopped = false;
6
+ this._delay = delay;
7
+ }
8
+ update(delta) {
9
+ if (!this._started) {
10
+ this._started = true;
11
+ }
12
+ this._elapsedTime += delta;
13
+ }
14
+ isComplete() {
15
+ return this._stopped || this._elapsedTime >= this._delay;
16
+ }
17
+ stop() {
18
+ this._stopped = true;
19
+ }
20
+ reset() {
21
+ this._elapsedTime = 0;
22
+ this._started = false;
23
+ this._stopped = false;
24
+ }
25
+ }
26
+ //# sourceMappingURL=Delay.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Delay.js","sourceRoot":"","sources":["../../../../src/engine/Actions/Action/Delay.ts"],"names":[],"mappings":"AAEA,MAAM,OAAO,KAAK;IAKhB,YAAY,KAAa;QAJjB,iBAAY,GAAW,CAAC,CAAC;QAEzB,aAAQ,GAAY,KAAK,CAAC;QAC1B,aAAQ,GAAG,KAAK,CAAC;QAEvB,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC;IACtB,CAAC;IAEM,MAAM,CAAC,KAAa;QACzB,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,CAAC;YACnB,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC;QACvB,CAAC;QAED,IAAI,CAAC,YAAY,IAAI,KAAK,CAAC;IAC7B,CAAC;IAED,UAAU;QACR,OAAO,IAAI,CAAC,QAAQ,IAAI,IAAI,CAAC,YAAY,IAAI,IAAI,CAAC,MAAM,CAAC;IAC3D,CAAC;IAEM,IAAI;QACT,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC;IACvB,CAAC;IAED,KAAK;QACH,IAAI,CAAC,YAAY,GAAG,CAAC,CAAC;QACtB,IAAI,CAAC,QAAQ,GAAG,KAAK,CAAC;QACtB,IAAI,CAAC,QAAQ,GAAG,KAAK,CAAC;IACxB,CAAC;CACF"}
@@ -0,0 +1,22 @@
1
+ import { ActionsComponent } from '../ActionsComponent';
2
+ export class Die {
3
+ constructor(entity) {
4
+ this._stopped = false;
5
+ this._entity = entity;
6
+ }
7
+ update(_delta) {
8
+ this._entity.get(ActionsComponent).clearActions();
9
+ this._entity.kill();
10
+ this._stopped = true;
11
+ }
12
+ isComplete() {
13
+ return this._stopped;
14
+ }
15
+ stop() {
16
+ return;
17
+ }
18
+ reset() {
19
+ return;
20
+ }
21
+ }
22
+ //# sourceMappingURL=Die.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Die.js","sourceRoot":"","sources":["../../../../src/engine/Actions/Action/Die.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAEvD,MAAM,OAAO,GAAG;IAId,YAAY,MAAc;QAFlB,aAAQ,GAAG,KAAK,CAAC;QAGvB,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC;IACxB,CAAC;IAEM,MAAM,CAAC,MAAc;QAC1B,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,gBAAgB,CAAC,CAAC,YAAY,EAAE,CAAC;QAClD,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC;QACpB,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC;IACvB,CAAC;IAEM,UAAU;QACf,OAAO,IAAI,CAAC,QAAQ,CAAC;IACvB,CAAC;IAEM,IAAI;QACT,OAAO;IACT,CAAC;IAEM,KAAK;QACV,OAAO;IACT,CAAC;CACF"}
@@ -0,0 +1,70 @@
1
+ import { MotionComponent } from '../../EntityComponentSystem/Components/MotionComponent';
2
+ import { TransformComponent } from '../../EntityComponentSystem/Components/TransformComponent';
3
+ import { vec, Vector } from '../../Math/vector';
4
+ export class EaseBy {
5
+ constructor(entity, offsetX, offsetY, duration, easingFcn) {
6
+ this.easingFcn = easingFcn;
7
+ this._currentLerpTime = 0;
8
+ this._lerpDuration = 1 * 1000; // 1 second
9
+ this._lerpStart = new Vector(0, 0);
10
+ this._lerpEnd = new Vector(0, 0);
11
+ this._initialized = false;
12
+ this._stopped = false;
13
+ this._tx = entity.get(TransformComponent);
14
+ this._motion = entity.get(MotionComponent);
15
+ this._lerpDuration = duration;
16
+ this._offset = new Vector(offsetX, offsetY);
17
+ }
18
+ _initialize() {
19
+ this._lerpStart = new Vector(this._tx.pos.x, this._tx.pos.y);
20
+ this._currentLerpTime = 0;
21
+ this._lerpEnd = this._lerpStart.add(this._offset);
22
+ }
23
+ update(delta) {
24
+ if (!this._initialized) {
25
+ this._initialize();
26
+ this._initialized = true;
27
+ }
28
+ // Need to update lerp time first, otherwise the first update will always be zero
29
+ this._currentLerpTime += delta;
30
+ let newX = this._tx.pos.x;
31
+ let newY = this._tx.pos.y;
32
+ if (this._currentLerpTime < this._lerpDuration) {
33
+ if (this._lerpEnd.x < this._lerpStart.x) {
34
+ newX =
35
+ this._lerpStart.x -
36
+ (this.easingFcn(this._currentLerpTime, this._lerpEnd.x, this._lerpStart.x, this._lerpDuration) - this._lerpEnd.x);
37
+ }
38
+ else {
39
+ newX = this.easingFcn(this._currentLerpTime, this._lerpStart.x, this._lerpEnd.x, this._lerpDuration);
40
+ }
41
+ if (this._lerpEnd.y < this._lerpStart.y) {
42
+ newY =
43
+ this._lerpStart.y -
44
+ (this.easingFcn(this._currentLerpTime, this._lerpEnd.y, this._lerpStart.y, this._lerpDuration) - this._lerpEnd.y);
45
+ }
46
+ else {
47
+ newY = this.easingFcn(this._currentLerpTime, this._lerpStart.y, this._lerpEnd.y, this._lerpDuration);
48
+ }
49
+ // Given the lerp position figure out the velocity in pixels per second
50
+ this._motion.vel = vec((newX - this._tx.pos.x) / (delta / 1000), (newY - this._tx.pos.y) / (delta / 1000));
51
+ }
52
+ else {
53
+ this._tx.pos = vec(this._lerpEnd.x, this._lerpEnd.y);
54
+ this._motion.vel = Vector.Zero;
55
+ }
56
+ }
57
+ isComplete() {
58
+ return this._stopped || this._currentLerpTime >= this._lerpDuration;
59
+ }
60
+ reset() {
61
+ this._initialized = false;
62
+ this._stopped = false;
63
+ this._currentLerpTime = 0;
64
+ }
65
+ stop() {
66
+ this._motion.vel = vec(0, 0);
67
+ this._stopped = true;
68
+ }
69
+ }
70
+ //# sourceMappingURL=EaseBy.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"EaseBy.js","sourceRoot":"","sources":["../../../../src/engine/Actions/Action/EaseBy.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,wDAAwD,CAAC;AACzF,OAAO,EAAE,kBAAkB,EAAE,MAAM,2DAA2D,CAAC;AAE/F,OAAO,EAAE,GAAG,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAGhD,MAAM,OAAO,MAAM;IAUjB,YACE,MAAc,EACd,OAAe,EACf,OAAe,EACf,QAAgB,EACT,SAAkG;QAAlG,cAAS,GAAT,SAAS,CAAyF;QAZnG,qBAAgB,GAAW,CAAC,CAAC;QAC7B,kBAAa,GAAW,CAAC,GAAG,IAAI,CAAC,CAAC,WAAW;QAC7C,eAAU,GAAW,IAAI,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;QACtC,aAAQ,GAAW,IAAI,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;QAEpC,iBAAY,GAAY,KAAK,CAAC;QAC9B,aAAQ,GAAY,KAAK,CAAC;QAQhC,IAAI,CAAC,GAAG,GAAG,MAAM,CAAC,GAAG,CAAC,kBAAkB,CAAC,CAAC;QAC1C,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC,GAAG,CAAC,eAAe,CAAC,CAAC;QAC3C,IAAI,CAAC,aAAa,GAAG,QAAQ,CAAC;QAC9B,IAAI,CAAC,OAAO,GAAG,IAAI,MAAM,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;I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Q,IAAI,IAAI,CAAC,gBAAgB,IAAI,IAAI,CAAC,aAAa,CAAC;IACtE,CAAC;IAEM,KAAK;QACV,IAAI,CAAC,YAAY,GAAG,KAAK,CAAC;QAC1B,IAAI,CAAC,QAAQ,GAAG,KAAK,CAAC;QACtB,IAAI,CAAC,gBAAgB,GAAG,CAAC,CAAC;IAC5B,CAAC;IACM,IAAI;QACT,IAAI,CAAC,OAAO,CAAC,GAAG,GAAG,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;QAC7B,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC;IACvB,CAAC;CACF"}
@@ -0,0 +1,69 @@
1
+ import { TransformComponent } from '../../EntityComponentSystem/Components/TransformComponent';
2
+ import { MotionComponent } from '../../EntityComponentSystem/Components/MotionComponent';
3
+ import { vec, Vector } from '../../Math/vector';
4
+ export class EaseTo {
5
+ constructor(entity, x, y, duration, easingFcn) {
6
+ this.easingFcn = easingFcn;
7
+ this._currentLerpTime = 0;
8
+ this._lerpDuration = 1 * 1000; // 1 second
9
+ this._lerpStart = new Vector(0, 0);
10
+ this._lerpEnd = new Vector(0, 0);
11
+ this._initialized = false;
12
+ this._stopped = false;
13
+ this._tx = entity.get(TransformComponent);
14
+ this._motion = entity.get(MotionComponent);
15
+ this._lerpDuration = duration;
16
+ this._lerpEnd = new Vector(x, y);
17
+ }
18
+ _initialize() {
19
+ this._lerpStart = new Vector(this._tx.pos.x, this._tx.pos.y);
20
+ this._currentLerpTime = 0;
21
+ }
22
+ update(delta) {
23
+ if (!this._initialized) {
24
+ this._initialize();
25
+ this._initialized = true;
26
+ }
27
+ // Need to update lerp time first, otherwise the first update will always be zero
28
+ this._currentLerpTime += delta;
29
+ let newX = this._tx.pos.x;
30
+ let newY = this._tx.pos.y;
31
+ if (this._currentLerpTime < this._lerpDuration) {
32
+ if (this._lerpEnd.x < this._lerpStart.x) {
33
+ newX =
34
+ this._lerpStart.x -
35
+ (this.easingFcn(this._currentLerpTime, this._lerpEnd.x, this._lerpStart.x, this._lerpDuration) - this._lerpEnd.x);
36
+ }
37
+ else {
38
+ newX = this.easingFcn(this._currentLerpTime, this._lerpStart.x, this._lerpEnd.x, this._lerpDuration);
39
+ }
40
+ if (this._lerpEnd.y < this._lerpStart.y) {
41
+ newY =
42
+ this._lerpStart.y -
43
+ (this.easingFcn(this._currentLerpTime, this._lerpEnd.y, this._lerpStart.y, this._lerpDuration) - this._lerpEnd.y);
44
+ }
45
+ else {
46
+ newY = this.easingFcn(this._currentLerpTime, this._lerpStart.y, this._lerpEnd.y, this._lerpDuration);
47
+ }
48
+ // Given the lerp position figure out the velocity in pixels per second
49
+ this._motion.vel = vec((newX - this._tx.pos.x) / (delta / 1000), (newY - this._tx.pos.y) / (delta / 1000));
50
+ }
51
+ else {
52
+ this._tx.pos = vec(this._lerpEnd.x, this._lerpEnd.y);
53
+ this._motion.vel = Vector.Zero;
54
+ }
55
+ }
56
+ isComplete() {
57
+ return this._stopped || this._currentLerpTime >= this._lerpDuration;
58
+ }
59
+ reset() {
60
+ this._initialized = false;
61
+ this._stopped = false;
62
+ this._currentLerpTime = 0;
63
+ }
64
+ stop() {
65
+ this._motion.vel = vec(0, 0);
66
+ this._stopped = true;
67
+ }
68
+ }
69
+ //# sourceMappingURL=EaseTo.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"EaseTo.js","sourceRoot":"","sources":["../../../../src/engine/Actions/Action/EaseTo.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,kBAAkB,EAAE,MAAM,2DAA2D,CAAC;AAC/F,OAAO,EAAE,eAAe,EAAE,MAAM,wDAAwD,CAAC;AACzF,OAAO,EAAE,GAAG,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAGhD,MAAM,OAAO,MAAM;IASjB,YACE,MAAc,EACd,CAAS,EACT,CAAS,EACT,QAAgB,EACT,SAAkG;QAAlG,cAAS,GAAT,SAAS,CAAyF;QAXnG,qBAAgB,GAAW,CAAC,CAAC;QAC7B,kBA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AG,IAAI,CAAC,EAAE,CAAC,IAAI,GAAG,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,KAAK,GAAG,IAAI,CAAC,CAAC,CAAC;QAC7G,CAAC;aAAM,CAAC;YACN,IAAI,CAAC,GAAG,CAAC,GAAG,GAAG,GAAG,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;YACrD,IAAI,CAAC,OAAO,CAAC,GAAG,GAAG,MAAM,CAAC,IAAI,CAAC;QACjC,CAAC;IACH,CAAC;IACM,UAAU;QACf,OAAO,IAAI,CAAC,QAAQ,IAAI,IAAI,CAAC,gBAAgB,IAAI,IAAI,CAAC,aAAa,CAAC;IACtE,CAAC;IAEM,KAAK;QACV,IAAI,CAAC,YAAY,GAAG,KAAK,CAAC;QAC1B,IAAI,CAAC,QAAQ,GAAG,KAAK,CAAC;QACtB,IAAI,CAAC,gBAAgB,GAAG,CAAC,CAAC;IAC5B,CAAC;IACM,IAAI;QACT,IAAI,CAAC,OAAO,CAAC,GAAG,GAAG,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;QAC7B,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC;IACvB,CAAC;CACF"}
@@ -0,0 +1,48 @@
1
+ import { GraphicsComponent } from '../../Graphics/GraphicsComponent';
2
+ import { Logger } from '../../Util/Log';
3
+ export class Fade {
4
+ constructor(entity, endOpacity, speed) {
5
+ this._multiplier = 1;
6
+ this._started = false;
7
+ this._stopped = false;
8
+ this._graphics = entity.get(GraphicsComponent);
9
+ this._endOpacity = endOpacity;
10
+ this._speed = this._ogspeed = speed;
11
+ }
12
+ update(delta) {
13
+ if (!this._graphics) {
14
+ return;
15
+ }
16
+ if (!this._started) {
17
+ this._started = true;
18
+ this._speed = this._ogspeed;
19
+ // determine direction when we start
20
+ if (this._endOpacity < this._graphics.opacity) {
21
+ this._multiplier = -1;
22
+ }
23
+ else {
24
+ this._multiplier = 1;
25
+ }
26
+ }
27
+ if (this._speed > 0) {
28
+ this._graphics.opacity += (this._multiplier *
29
+ (Math.abs(this._graphics.opacity - this._endOpacity) * delta)) / this._speed;
30
+ }
31
+ this._speed -= delta;
32
+ if (this.isComplete()) {
33
+ this._graphics.opacity = this._endOpacity;
34
+ }
35
+ Logger.getInstance().debug('[Action fade] Actor opacity:', this._graphics.opacity);
36
+ }
37
+ isComplete() {
38
+ return this._stopped || Math.abs(this._graphics.opacity - this._endOpacity) < 0.05;
39
+ }
40
+ stop() {
41
+ this._stopped = true;
42
+ }
43
+ reset() {
44
+ this._started = false;
45
+ this._stopped = false;
46
+ }
47
+ }
48
+ //# sourceMappingURL=Fade.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Fade.js","sourceRoot":"","sources":["../../../../src/engine/Actions/Action/Fade.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,MAAM,kCAAkC,CAAC;AACrE,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAGxC,MAAM,OAAO,IAAI;IAYf,YAAY,MAAc,EAAE,UAAkB,EAAE,KAAa;QAJrD,gBAAW,GAAW,CAAC,CAAC;QACxB,aAAQ,GAAG,KAAK,CAAC;QACjB,aAAQ,GAAG,KAAK,CAAC;QAGvB,IAAI,CAAC,SAAS,GAAG,MAAM,CAAC,GAAG,CAAC,iBAAiB,CAAC,CAAC;QAC/C,IAAI,CAAC,WAAW,GAAG,UAAU,CAAC;QAC9B,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,QAAQ,GAAG,KAAK,CAAC;IACtC,CAAC;IAEM,MAAM,CAAC,KAAa;QACzB,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,CAAC;YACpB,OAAO;QACT,CAAC;QAED,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,CAAC;YACnB,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC;YACrB,IAAI,CAAC,MAA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Components/MotionComponent';
2
+ import { TransformComponent } from '../../EntityComponentSystem/Components/TransformComponent';
3
+ import { vec, Vector } from '../../Math/vector';
4
+ export class Follow {
5
+ constructor(entity, entityToFollow, followDistance) {
6
+ this._started = false;
7
+ this._stopped = false;
8
+ this._tx = entity.get(TransformComponent);
9
+ this._motion = entity.get(MotionComponent);
10
+ this._followTx = entityToFollow.get(TransformComponent);
11
+ this._followMotion = entityToFollow.get(MotionComponent);
12
+ this._current = new Vector(this._tx.pos.x, this._tx.pos.y);
13
+ this._end = new Vector(this._followTx.pos.x, this._followTx.pos.y);
14
+ this._maximumDistance = followDistance !== undefined ? followDistance : this._current.distance(this._end);
15
+ this._speed = 0;
16
+ }
17
+ update(_delta) {
18
+ if (!this._started) {
19
+ this._started = true;
20
+ this._distanceBetween = this._current.distance(this._end);
21
+ this._dir = this._end.sub(this._current).normalize();
22
+ }
23
+ const actorToFollowSpeed = Math.sqrt(Math.pow(this._followMotion.vel.x, 2) + Math.pow(this._followMotion.vel.y, 2));
24
+ if (actorToFollowSpeed !== 0) {
25
+ this._speed = actorToFollowSpeed;
26
+ }
27
+ this._current = vec(this._tx.pos.x, this._tx.pos.y);
28
+ this._end = vec(this._followTx.pos.x, this._followTx.pos.y);
29
+ this._distanceBetween = this._current.distance(this._end);
30
+ this._dir = this._end.sub(this._current).normalize();
31
+ if (this._distanceBetween >= this._maximumDistance) {
32
+ const m = this._dir.scale(this._speed);
33
+ this._motion.vel = vec(m.x, m.y);
34
+ }
35
+ else {
36
+ this._motion.vel = vec(0, 0);
37
+ }
38
+ if (this.isComplete()) {
39
+ this._tx.pos = vec(this._end.x, this._end.y);
40
+ this._motion.vel = vec(0, 0);
41
+ }
42
+ }
43
+ stop() {
44
+ this._motion.vel = vec(0, 0);
45
+ this._stopped = true;
46
+ }
47
+ isComplete() {
48
+ // the actor following should never stop unless specified to do so
49
+ return this._stopped;
50
+ }
51
+ reset() {
52
+ this._started = false;
53
+ this._stopped = false;
54
+ }
55
+ }
56
+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