excalibur 0.28.3 → 0.28.4

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 (482) hide show
  1. package/.gitattributes +63 -63
  2. package/CHANGELOG.md +2003 -1955
  3. package/LICENSE.md +25 -25
  4. package/README.md +134 -134
  5. package/STYLEGUIDE.md +136 -136
  6. package/build/dist/Actions/Action/ActionSequence.js +31 -0
  7. package/build/dist/Actions/Action/ActionSequence.js.map +1 -0
  8. package/build/dist/Actions/Action/Blink.js +54 -0
  9. package/build/dist/Actions/Action/Blink.js.map +1 -0
  10. package/build/dist/Actions/Action/CallMethod.js +21 -0
  11. package/build/dist/Actions/Action/CallMethod.js.map +1 -0
  12. package/build/dist/Actions/Action/Delay.js +26 -0
  13. package/build/dist/Actions/Action/Delay.js.map +1 -0
  14. package/build/dist/Actions/Action/Die.js +22 -0
  15. package/build/dist/Actions/Action/Die.js.map +1 -0
  16. package/build/dist/Actions/Action/EaseBy.js +70 -0
  17. package/build/dist/Actions/Action/EaseBy.js.map +1 -0
  18. package/build/dist/Actions/Action/EaseTo.js +69 -0
  19. package/build/dist/Actions/Action/EaseTo.js.map +1 -0
  20. package/build/dist/Actions/Action/Fade.js +48 -0
  21. package/build/dist/Actions/Action/Fade.js.map +1 -0
  22. package/build/dist/Actions/Action/Follow.js +56 -0
  23. package/build/dist/Actions/Action/Follow.js.map +1 -0
  24. package/build/dist/Actions/Action/Meet.js +54 -0
  25. package/build/dist/Actions/Action/Meet.js.map +1 -0
  26. package/build/dist/Actions/Action/MoveBy.js +48 -0
  27. package/build/dist/Actions/Action/MoveBy.js.map +1 -0
  28. package/build/dist/Actions/Action/MoveTo.js +41 -0
  29. package/build/dist/Actions/Action/MoveTo.js.map +1 -0
  30. package/build/dist/Actions/Action/ParallelActions.js +23 -0
  31. package/build/dist/Actions/Action/ParallelActions.js.map +1 -0
  32. package/build/dist/Actions/Action/Repeat.js +31 -0
  33. package/build/dist/Actions/Action/Repeat.js.map +1 -0
  34. package/build/dist/Actions/Action/RepeatForever.js +37 -0
  35. package/build/dist/Actions/Action/RepeatForever.js.map +1 -0
  36. package/build/dist/Actions/Action/RotateBy.js +95 -0
  37. package/build/dist/Actions/Action/RotateBy.js.map +1 -0
  38. package/build/dist/Actions/Action/RotateTo.js +91 -0
  39. package/build/dist/Actions/Action/RotateTo.js.map +1 -0
  40. package/build/dist/Actions/Action/ScaleBy.js +46 -0
  41. package/build/dist/Actions/Action/ScaleBy.js.map +1 -0
  42. package/build/dist/Actions/Action/ScaleTo.js +58 -0
  43. package/build/dist/Actions/Action/ScaleTo.js.map +1 -0
  44. package/build/dist/Actions/Action.js +2 -0
  45. package/build/dist/Actions/Action.js.map +1 -0
  46. package/build/dist/Actions/ActionContext.js +322 -0
  47. package/build/dist/Actions/ActionContext.js.map +1 -0
  48. package/build/dist/Actions/ActionQueue.js +87 -0
  49. package/build/dist/Actions/ActionQueue.js.map +1 -0
  50. package/build/dist/Actions/Actionable.js +2 -0
  51. package/build/dist/Actions/Actionable.js.map +1 -0
  52. package/build/dist/Actions/ActionsComponent.js +195 -0
  53. package/build/dist/Actions/ActionsComponent.js.map +1 -0
  54. package/build/dist/Actions/ActionsSystem.js +30 -0
  55. package/build/dist/Actions/ActionsSystem.js.map +1 -0
  56. package/build/dist/Actions/Index.js +26 -0
  57. package/build/dist/Actions/Index.js.map +1 -0
  58. package/build/dist/Actions/RotationType.js +27 -0
  59. package/build/dist/Actions/RotationType.js.map +1 -0
  60. package/build/dist/Actor.js +629 -0
  61. package/build/dist/Actor.js.map +1 -0
  62. package/build/dist/Camera.js +660 -0
  63. package/build/dist/Camera.js.map +1 -0
  64. package/build/dist/Collision/BoundingBox.js +415 -0
  65. package/build/dist/Collision/BoundingBox.js.map +1 -0
  66. package/build/dist/Collision/ColliderComponent.js +202 -0
  67. package/build/dist/Collision/ColliderComponent.js.map +1 -0
  68. package/build/dist/Collision/Colliders/CircleCollider.js +226 -0
  69. package/build/dist/Collision/Colliders/CircleCollider.js.map +1 -0
  70. package/build/dist/Collision/Colliders/ClosestLineJumpTable.js +211 -0
  71. package/build/dist/Collision/Colliders/ClosestLineJumpTable.js.map +1 -0
  72. package/build/dist/Collision/Colliders/Collider.js +32 -0
  73. package/build/dist/Collision/Colliders/Collider.js.map +1 -0
  74. package/build/dist/Collision/Colliders/CollisionJumpTable.js +300 -0
  75. package/build/dist/Collision/Colliders/CollisionJumpTable.js.map +1 -0
  76. package/build/dist/Collision/Colliders/EdgeCollider.js +229 -0
  77. package/build/dist/Collision/Colliders/EdgeCollider.js.map +1 -0
  78. package/build/dist/Collision/Colliders/PolygonCollider.js +556 -0
  79. package/build/dist/Collision/Colliders/PolygonCollider.js.map +1 -0
  80. package/build/dist/Collision/Colliders/SeparatingAxis.js +67 -0
  81. package/build/dist/Collision/Colliders/SeparatingAxis.js.map +1 -0
  82. package/build/dist/Collision/Colliders/Shape.js +99 -0
  83. package/build/dist/Collision/Colliders/Shape.js.map +1 -0
  84. package/build/dist/Collision/CollisionType.js +33 -0
  85. package/build/dist/Collision/CollisionType.js.map +1 -0
  86. package/build/dist/Collision/Detection/CollisionContact.js +51 -0
  87. package/build/dist/Collision/Detection/CollisionContact.js.map +1 -0
  88. package/build/dist/Collision/Detection/CollisionProcessor.js +2 -0
  89. package/build/dist/Collision/Detection/CollisionProcessor.js.map +1 -0
  90. package/build/dist/Collision/Detection/DynamicTree.js +442 -0
  91. package/build/dist/Collision/Detection/DynamicTree.js.map +1 -0
  92. package/build/dist/Collision/Detection/Pair.js +92 -0
  93. package/build/dist/Collision/Detection/Pair.js.map +1 -0
  94. package/build/dist/Collision/Detection/QuadTree.js +193 -0
  95. package/build/dist/Collision/Detection/QuadTree.js.map +1 -0
  96. package/build/dist/Collision/Group/CollisionGroup.js +3 -3
  97. package/build/dist/Collision/Integrator.js +25 -0
  98. package/build/dist/Collision/Integrator.js.map +1 -0
  99. package/build/dist/Collision/MotionSystem.js +35 -0
  100. package/build/dist/Collision/MotionSystem.js.map +1 -0
  101. package/build/dist/Collision/Physics.js +163 -0
  102. package/build/dist/Collision/Physics.js.map +1 -0
  103. package/build/dist/Collision/PhysicsWorld.js +10 -0
  104. package/build/dist/Collision/PhysicsWorld.js.map +1 -0
  105. package/build/dist/Collision/Side.js +51 -0
  106. package/build/dist/Collision/Side.js.map +1 -0
  107. package/build/dist/Collision/Solver/ArcadeSolver.js +154 -0
  108. package/build/dist/Collision/Solver/ArcadeSolver.js.map +1 -0
  109. package/build/dist/Collision/Solver/ContactConstraintPoint.js +87 -0
  110. package/build/dist/Collision/Solver/ContactConstraintPoint.js.map +1 -0
  111. package/build/dist/Collision/Solver/RealisticSolver.js +293 -0
  112. package/build/dist/Collision/Solver/RealisticSolver.js.map +1 -0
  113. package/build/dist/Collision/Solver/Solver.js +2 -0
  114. package/build/dist/Collision/Solver/Solver.js.map +1 -0
  115. package/build/dist/Color.js +417 -0
  116. package/build/dist/Color.js.map +1 -0
  117. package/build/dist/Configurable.js +32 -0
  118. package/build/dist/Configurable.js.map +1 -0
  119. package/build/dist/Debug/Debug.d.ts +11 -0
  120. package/build/dist/Debug/Debug.js +385 -0
  121. package/build/dist/Debug/Debug.js.map +1 -0
  122. package/build/dist/Debug/DebugFlags.js +40 -0
  123. package/build/dist/Debug/DebugFlags.js.map +1 -0
  124. package/build/dist/Debug/DebugSystem.js +263 -0
  125. package/build/dist/Debug/DebugSystem.js.map +1 -0
  126. package/build/dist/Debug/index.js +4 -0
  127. package/build/dist/Debug/index.js.map +1 -0
  128. package/build/dist/Deprecated.js +2 -0
  129. package/build/dist/Deprecated.js.map +1 -0
  130. package/build/dist/Engine.js +986 -0
  131. package/build/dist/Engine.js.map +1 -0
  132. package/build/dist/EntityComponentSystem/Component.js +65 -0
  133. package/build/dist/EntityComponentSystem/Component.js.map +1 -0
  134. package/build/dist/EntityComponentSystem/Components/MotionComponent.js +33 -0
  135. package/build/dist/EntityComponentSystem/Components/MotionComponent.js.map +1 -0
  136. package/build/dist/EntityComponentSystem/Components/TransformComponent.js +107 -0
  137. package/build/dist/EntityComponentSystem/Components/TransformComponent.js.map +1 -0
  138. package/build/dist/EntityComponentSystem/Entity.js +487 -0
  139. package/build/dist/EntityComponentSystem/Entity.js.map +1 -0
  140. package/build/dist/EntityComponentSystem/EntityManager.js +137 -0
  141. package/build/dist/EntityComponentSystem/EntityManager.js.map +1 -0
  142. package/build/dist/EntityComponentSystem/Query.js +90 -0
  143. package/build/dist/EntityComponentSystem/Query.js.map +1 -0
  144. package/build/dist/EntityComponentSystem/QueryManager.js +90 -0
  145. package/build/dist/EntityComponentSystem/QueryManager.js.map +1 -0
  146. package/build/dist/EntityComponentSystem/System.js +76 -0
  147. package/build/dist/EntityComponentSystem/System.js.map +1 -0
  148. package/build/dist/EntityComponentSystem/SystemManager.js +104 -0
  149. package/build/dist/EntityComponentSystem/SystemManager.js.map +1 -0
  150. package/build/dist/EntityComponentSystem/Util.js +5 -0
  151. package/build/dist/EntityComponentSystem/Util.js.map +1 -0
  152. package/build/dist/EntityComponentSystem/World.js +55 -0
  153. package/build/dist/EntityComponentSystem/World.js.map +1 -0
  154. package/build/dist/EntityComponentSystem/index.js +11 -0
  155. package/build/dist/EntityComponentSystem/index.js.map +1 -0
  156. package/build/dist/EventDispatcher.js +122 -0
  157. package/build/dist/EventDispatcher.js.map +1 -0
  158. package/build/dist/EventEmitter.js +86 -0
  159. package/build/dist/EventEmitter.js.map +1 -0
  160. package/build/dist/Events/ExEvent.js +12 -0
  161. package/build/dist/Events/ExEvent.js.map +1 -0
  162. package/build/dist/Events/MediaEvents.js +75 -0
  163. package/build/dist/Events/MediaEvents.js.map +1 -0
  164. package/build/dist/Events/PointerEvents.js +52 -0
  165. package/build/dist/Events/PointerEvents.js.map +1 -0
  166. package/build/dist/Events.js +473 -0
  167. package/build/dist/Events.js.map +1 -0
  168. package/build/dist/Flags.js +67 -0
  169. package/build/dist/Flags.js.map +1 -0
  170. package/build/dist/Graphics/Animation.js +344 -0
  171. package/build/dist/Graphics/Animation.js.map +1 -0
  172. package/build/dist/Graphics/Canvas.js +38 -0
  173. package/build/dist/Graphics/Canvas.js.map +1 -0
  174. package/build/dist/Graphics/Circle.js +48 -0
  175. package/build/dist/Graphics/Circle.js.map +1 -0
  176. package/build/dist/Graphics/Context/ExcaliburGraphicsContext.js +2 -0
  177. package/build/dist/Graphics/Context/ExcaliburGraphicsContext.js.map +1 -0
  178. package/build/dist/Graphics/Context/ExcaliburGraphicsContext2DCanvas.js +237 -0
  179. package/build/dist/Graphics/Context/ExcaliburGraphicsContext2DCanvas.js.map +1 -0
  180. package/build/dist/Graphics/Context/ExcaliburGraphicsContextWebGL.d.ts +1 -0
  181. package/build/dist/Graphics/Context/ExcaliburGraphicsContextWebGL.js +481 -0
  182. package/build/dist/Graphics/Context/ExcaliburGraphicsContextWebGL.js.map +1 -0
  183. package/build/dist/Graphics/Context/circle-renderer/circle-renderer.frag.glsl +52 -52
  184. package/build/dist/Graphics/Context/circle-renderer/circle-renderer.js +174 -0
  185. package/build/dist/Graphics/Context/circle-renderer/circle-renderer.js.map +1 -0
  186. package/build/dist/Graphics/Context/circle-renderer/circle-renderer.vert.glsl +37 -37
  187. package/build/dist/Graphics/Context/debug-text.js +47 -0
  188. package/build/dist/Graphics/Context/debug-text.js.map +1 -0
  189. package/build/dist/Graphics/Context/draw-call.js +16 -0
  190. package/build/dist/Graphics/Context/draw-call.js.map +1 -0
  191. package/build/dist/Graphics/Context/image-renderer/image-renderer.frag.glsl +32 -32
  192. package/build/dist/Graphics/Context/image-renderer/image-renderer.js +246 -0
  193. package/build/dist/Graphics/Context/image-renderer/image-renderer.js.map +1 -0
  194. package/build/dist/Graphics/Context/image-renderer/image-renderer.vert.glsl +32 -32
  195. package/build/dist/Graphics/Context/line-renderer/line-fragment.glsl +10 -10
  196. package/build/dist/Graphics/Context/line-renderer/line-renderer.js +90 -0
  197. package/build/dist/Graphics/Context/line-renderer/line-renderer.js.map +1 -0
  198. package/build/dist/Graphics/Context/line-renderer/line-vertex.glsl +14 -14
  199. package/build/dist/Graphics/Context/material-renderer/material-renderer.js +23 -2
  200. package/build/dist/Graphics/Context/material-renderer/material-renderer.js.map +1 -1
  201. package/build/dist/Graphics/Context/material.d.ts +2 -0
  202. package/build/dist/Graphics/Context/material.js +72 -0
  203. package/build/dist/Graphics/Context/material.js.map +1 -0
  204. package/build/dist/Graphics/Context/point-renderer/point-fragment.glsl +19 -19
  205. package/build/dist/Graphics/Context/point-renderer/point-renderer.js +91 -0
  206. package/build/dist/Graphics/Context/point-renderer/point-renderer.js.map +1 -0
  207. package/build/dist/Graphics/Context/point-renderer/point-vertex.glsl +11 -11
  208. package/build/dist/Graphics/Context/quad-index-buffer.js +67 -0
  209. package/build/dist/Graphics/Context/quad-index-buffer.js.map +1 -0
  210. package/build/dist/Graphics/Context/rectangle-renderer/rectangle-renderer.frag.glsl +85 -85
  211. package/build/dist/Graphics/Context/rectangle-renderer/rectangle-renderer.js +305 -0
  212. package/build/dist/Graphics/Context/rectangle-renderer/rectangle-renderer.js.map +1 -0
  213. package/build/dist/Graphics/Context/rectangle-renderer/rectangle-renderer.vert.glsl +42 -42
  214. package/build/dist/Graphics/Context/render-source.js +16 -0
  215. package/build/dist/Graphics/Context/render-source.js.map +1 -0
  216. package/build/dist/Graphics/Context/render-target.js +65 -0
  217. package/build/dist/Graphics/Context/render-target.js.map +1 -0
  218. package/build/dist/Graphics/Context/renderer.js +2 -0
  219. package/build/dist/Graphics/Context/renderer.js.map +1 -0
  220. package/build/dist/Graphics/Context/screen-pass-painter/screen-fragment.glsl +13 -13
  221. package/build/dist/Graphics/Context/screen-pass-painter/screen-pass-painter.js +56 -0
  222. package/build/dist/Graphics/Context/screen-pass-painter/screen-pass-painter.js.map +1 -0
  223. package/build/dist/Graphics/Context/screen-pass-painter/screen-vertex.glsl +11 -11
  224. package/build/dist/Graphics/Context/state-stack.js +37 -0
  225. package/build/dist/Graphics/Context/state-stack.js.map +1 -0
  226. package/build/dist/Graphics/Context/texture-loader.js +109 -0
  227. package/build/dist/Graphics/Context/texture-loader.js.map +1 -0
  228. package/build/dist/Graphics/Context/transform-stack.js +30 -0
  229. package/build/dist/Graphics/Context/transform-stack.js.map +1 -0
  230. package/build/dist/Graphics/Context/vertex-buffer.js +53 -0
  231. package/build/dist/Graphics/Context/vertex-buffer.js.map +1 -0
  232. package/build/dist/Graphics/Context/webgl-util.js +79 -0
  233. package/build/dist/Graphics/Context/webgl-util.js.map +1 -0
  234. package/build/dist/Graphics/DebugGraphicsComponent.d.ts +3 -2
  235. package/build/dist/Graphics/DebugGraphicsComponent.js +16 -0
  236. package/build/dist/Graphics/DebugGraphicsComponent.js.map +1 -0
  237. package/build/dist/Graphics/Filtering.js +17 -0
  238. package/build/dist/Graphics/Filtering.js.map +1 -0
  239. package/build/dist/Graphics/Font.js +148 -0
  240. package/build/dist/Graphics/Font.js.map +1 -0
  241. package/build/dist/Graphics/FontCache.d.ts +1 -0
  242. package/build/dist/Graphics/FontCache.js +80 -0
  243. package/build/dist/Graphics/FontCache.js.map +1 -0
  244. package/build/dist/Graphics/FontCommon.js +109 -0
  245. package/build/dist/Graphics/FontCommon.js.map +1 -0
  246. package/build/dist/Graphics/FontTextInstance.js +230 -0
  247. package/build/dist/Graphics/FontTextInstance.js.map +1 -0
  248. package/build/dist/Graphics/Graphic.js +208 -0
  249. package/build/dist/Graphics/Graphic.js.map +1 -0
  250. package/build/dist/Graphics/GraphicsComponent.js +336 -0
  251. package/build/dist/Graphics/GraphicsComponent.js.map +1 -0
  252. package/build/dist/Graphics/GraphicsDiagnostics.js +9 -0
  253. package/build/dist/Graphics/GraphicsDiagnostics.js.map +1 -0
  254. package/build/dist/Graphics/GraphicsGroup.js +69 -0
  255. package/build/dist/Graphics/GraphicsGroup.js.map +1 -0
  256. package/build/dist/Graphics/GraphicsSystem.js +210 -0
  257. package/build/dist/Graphics/GraphicsSystem.js.map +1 -0
  258. package/build/dist/Graphics/ImageSource.js +124 -0
  259. package/build/dist/Graphics/ImageSource.js.map +1 -0
  260. package/build/dist/Graphics/Line.js +45 -0
  261. package/build/dist/Graphics/Line.js.map +1 -0
  262. package/build/dist/Graphics/OffscreenSystem.js +64 -0
  263. package/build/dist/Graphics/OffscreenSystem.js.map +1 -0
  264. package/build/dist/Graphics/ParallaxComponent.js +11 -0
  265. package/build/dist/Graphics/ParallaxComponent.js.map +1 -0
  266. package/build/dist/Graphics/Polygon.js +59 -0
  267. package/build/dist/Graphics/Polygon.js.map +1 -0
  268. package/build/dist/Graphics/PostProcessor/ColorBlindnessMode.js +7 -0
  269. package/build/dist/Graphics/PostProcessor/ColorBlindnessMode.js.map +1 -0
  270. package/build/dist/Graphics/PostProcessor/ColorBlindnessPostProcessor.js +52 -0
  271. package/build/dist/Graphics/PostProcessor/ColorBlindnessPostProcessor.js.map +1 -0
  272. package/build/dist/Graphics/PostProcessor/PostProcessor.js +2 -0
  273. package/build/dist/Graphics/PostProcessor/PostProcessor.js.map +1 -0
  274. package/build/dist/Graphics/PostProcessor/ScreenShader.js +59 -0
  275. package/build/dist/Graphics/PostProcessor/ScreenShader.js.map +1 -0
  276. package/build/dist/Graphics/PostProcessor/color-blind-fragment.glsl +64 -64
  277. package/build/dist/Graphics/Raster.js +215 -0
  278. package/build/dist/Graphics/Raster.js.map +1 -0
  279. package/build/dist/Graphics/Rectangle.js +29 -0
  280. package/build/dist/Graphics/Rectangle.js.map +1 -0
  281. package/build/dist/Graphics/Sprite.js +82 -0
  282. package/build/dist/Graphics/Sprite.js.map +1 -0
  283. package/build/dist/Graphics/SpriteFont.js +139 -0
  284. package/build/dist/Graphics/SpriteFont.js.map +1 -0
  285. package/build/dist/Graphics/SpriteSheet.js +116 -0
  286. package/build/dist/Graphics/SpriteSheet.js.map +1 -0
  287. package/build/dist/Graphics/Text.js +103 -0
  288. package/build/dist/Graphics/Text.js.map +1 -0
  289. package/build/dist/Graphics/index.js +46 -0
  290. package/build/dist/Graphics/index.js.map +1 -0
  291. package/build/dist/Id.js +8 -0
  292. package/build/dist/Id.js.map +1 -0
  293. package/build/dist/Input/CapturePointerConfig.js +5 -0
  294. package/build/dist/Input/CapturePointerConfig.js.map +1 -0
  295. package/build/dist/Input/EngineInput.js +2 -0
  296. package/build/dist/Input/EngineInput.js.map +1 -0
  297. package/build/dist/Input/Gamepad.js +422 -0
  298. package/build/dist/Input/Gamepad.js.map +1 -0
  299. package/build/dist/Input/Index.js +88 -0
  300. package/build/dist/Input/Index.js.map +1 -0
  301. package/build/dist/Input/InputMapper.js +45 -0
  302. package/build/dist/Input/InputMapper.js.map +1 -0
  303. package/build/dist/Input/Keyboard.js +348 -0
  304. package/build/dist/Input/Keyboard.js.map +1 -0
  305. package/build/dist/Input/NativePointerButton.js +12 -0
  306. package/build/dist/Input/NativePointerButton.js.map +1 -0
  307. package/build/dist/Input/PointerAbstraction.js +44 -0
  308. package/build/dist/Input/PointerAbstraction.js.map +1 -0
  309. package/build/dist/Input/PointerButton.js +12 -0
  310. package/build/dist/Input/PointerButton.js.map +1 -0
  311. package/build/dist/Input/PointerComponent.js +28 -0
  312. package/build/dist/Input/PointerComponent.js.map +1 -0
  313. package/build/dist/Input/PointerEvent.js +25 -0
  314. package/build/dist/Input/PointerEvent.js.map +1 -0
  315. package/build/dist/Input/PointerEventReceiver.js +456 -0
  316. package/build/dist/Input/PointerEventReceiver.js.map +1 -0
  317. package/build/dist/Input/PointerScope.js +16 -0
  318. package/build/dist/Input/PointerScope.js.map +1 -0
  319. package/build/dist/Input/PointerSystem.js +249 -0
  320. package/build/dist/Input/PointerSystem.js.map +1 -0
  321. package/build/dist/Input/PointerType.js +11 -0
  322. package/build/dist/Input/PointerType.js.map +1 -0
  323. package/build/dist/Input/WheelDeltaMode.js +7 -0
  324. package/build/dist/Input/WheelDeltaMode.js.map +1 -0
  325. package/build/dist/Input/WheelEvent.js +21 -0
  326. package/build/dist/Input/WheelEvent.js.map +1 -0
  327. package/build/dist/Interfaces/Audio.js +2 -0
  328. package/build/dist/Interfaces/Audio.js.map +1 -0
  329. package/build/dist/Interfaces/AudioImplementation.js +11 -0
  330. package/build/dist/Interfaces/AudioImplementation.js.map +1 -0
  331. package/build/dist/Interfaces/Clonable.js +2 -0
  332. package/build/dist/Interfaces/Clonable.js.map +1 -0
  333. package/build/dist/Interfaces/Evented.js +2 -0
  334. package/build/dist/Interfaces/Evented.js.map +1 -0
  335. package/build/dist/Interfaces/Index.js +8 -0
  336. package/build/dist/Interfaces/Index.js.map +1 -0
  337. package/build/dist/Interfaces/LifecycleEvents.js +51 -0
  338. package/build/dist/Interfaces/LifecycleEvents.js.map +1 -0
  339. package/build/dist/Interfaces/Loadable.js +2 -0
  340. package/build/dist/Interfaces/Loadable.js.map +1 -0
  341. package/build/dist/Interfaces/PointerEventHandlers.js +2 -0
  342. package/build/dist/Interfaces/PointerEventHandlers.js.map +1 -0
  343. package/build/dist/Label.js +81 -0
  344. package/build/dist/Label.js.map +1 -0
  345. package/build/dist/Loader.js +416 -0
  346. package/build/dist/Loader.js.map +1 -0
  347. package/build/dist/Math/Index.js +13 -0
  348. package/build/dist/Math/Index.js.map +1 -0
  349. package/build/dist/Math/Random.js +239 -0
  350. package/build/dist/Math/Random.js.map +1 -0
  351. package/build/dist/Math/affine-matrix.js +331 -0
  352. package/build/dist/Math/affine-matrix.js.map +1 -0
  353. package/build/dist/Math/coord-plane.js +17 -0
  354. package/build/dist/Math/coord-plane.js.map +1 -0
  355. package/build/dist/Math/global-coordinates.js +30 -0
  356. package/build/dist/Math/global-coordinates.js.map +1 -0
  357. package/build/dist/Math/line-segment.js +205 -0
  358. package/build/dist/Math/line-segment.js.map +1 -0
  359. package/build/dist/Math/matrix.js +457 -0
  360. package/build/dist/Math/matrix.js.map +1 -0
  361. package/build/dist/Math/projection.js +24 -0
  362. package/build/dist/Math/projection.js.map +1 -0
  363. package/build/dist/Math/ray.js +52 -0
  364. package/build/dist/Math/ray.js.map +1 -0
  365. package/build/dist/Math/transform.js +219 -0
  366. package/build/dist/Math/transform.js.map +1 -0
  367. package/build/dist/Math/util.js +82 -0
  368. package/build/dist/Math/util.js.map +1 -0
  369. package/build/dist/Math/vector-view.js +25 -0
  370. package/build/dist/Math/vector-view.js.map +1 -0
  371. package/build/dist/Math/vector.js +340 -0
  372. package/build/dist/Math/vector.js.map +1 -0
  373. package/build/dist/Math/watch-vector.js +26 -0
  374. package/build/dist/Math/watch-vector.js.map +1 -0
  375. package/build/dist/Particles.js +430 -0
  376. package/build/dist/Particles.js.map +1 -0
  377. package/build/dist/Polyfill.js +56 -0
  378. package/build/dist/Polyfill.js.map +1 -0
  379. package/build/dist/Resources/Gif.js +464 -0
  380. package/build/dist/Resources/Gif.js.map +1 -0
  381. package/build/dist/Resources/Index.js +4 -0
  382. package/build/dist/Resources/Index.js.map +1 -0
  383. package/build/dist/Resources/Resource.js +81 -0
  384. package/build/dist/Resources/Resource.js.map +1 -0
  385. package/build/dist/Resources/Sound/AudioContext.js +16 -0
  386. package/build/dist/Resources/Sound/AudioContext.js.map +1 -0
  387. package/build/dist/Resources/Sound/Index.js +4 -0
  388. package/build/dist/Resources/Sound/Index.js.map +1 -0
  389. package/build/dist/Resources/Sound/Sound.js +326 -0
  390. package/build/dist/Resources/Sound/Sound.js.map +1 -0
  391. package/build/dist/Resources/Sound/WebAudioInstance.js +190 -0
  392. package/build/dist/Resources/Sound/WebAudioInstance.js.map +1 -0
  393. package/build/dist/Scene.js +444 -0
  394. package/build/dist/Scene.js.map +1 -0
  395. package/build/dist/Screen.js +782 -0
  396. package/build/dist/Screen.js.map +1 -0
  397. package/build/dist/ScreenElement.js +43 -0
  398. package/build/dist/ScreenElement.js.map +1 -0
  399. package/build/dist/TileMap/IsometricEntityComponent.js +17 -0
  400. package/build/dist/TileMap/IsometricEntityComponent.js.map +1 -0
  401. package/build/dist/TileMap/IsometricEntitySystem.js +23 -0
  402. package/build/dist/TileMap/IsometricEntitySystem.js.map +1 -0
  403. package/build/dist/TileMap/IsometricMap.js +311 -0
  404. package/build/dist/TileMap/IsometricMap.js.map +1 -0
  405. package/build/dist/TileMap/TileMap.d.ts +2 -1
  406. package/build/dist/TileMap/TileMap.js +630 -0
  407. package/build/dist/TileMap/TileMap.js.map +1 -0
  408. package/build/dist/TileMap/index.js +5 -0
  409. package/build/dist/TileMap/index.js.map +1 -0
  410. package/build/dist/Timer.js +202 -0
  411. package/build/dist/Timer.js.map +1 -0
  412. package/build/dist/Trigger.js +94 -0
  413. package/build/dist/Trigger.js.map +1 -0
  414. package/build/dist/Util/Browser.js +66 -0
  415. package/build/dist/Util/Browser.js.map +1 -0
  416. package/build/dist/Util/Clock.js +219 -0
  417. package/build/dist/Util/Clock.js.map +1 -0
  418. package/build/dist/Util/Decorators.js +78 -0
  419. package/build/dist/Util/Decorators.js.map +1 -0
  420. package/build/dist/Util/Detector.js +167 -0
  421. package/build/dist/Util/Detector.js.map +1 -0
  422. package/build/dist/Util/DrawUtil.js +115 -0
  423. package/build/dist/Util/DrawUtil.js.map +1 -0
  424. package/build/dist/Util/EasingFunctions.js +102 -0
  425. package/build/dist/Util/EasingFunctions.js.map +1 -0
  426. package/build/dist/Util/Fps.js +47 -0
  427. package/build/dist/Util/Fps.js.map +1 -0
  428. package/build/dist/Util/Future.js +30 -0
  429. package/build/dist/Util/Future.js.map +1 -0
  430. package/build/dist/Util/IFrame.js +23 -0
  431. package/build/dist/Util/IFrame.js.map +1 -0
  432. package/build/dist/Util/Index.js +7 -0
  433. package/build/dist/Util/Index.js.map +1 -0
  434. package/build/dist/Util/Log.js +195 -0
  435. package/build/dist/Util/Log.js.map +1 -0
  436. package/build/dist/Util/Observable.js +66 -0
  437. package/build/dist/Util/Observable.js.map +1 -0
  438. package/build/dist/Util/Pool.js +74 -0
  439. package/build/dist/Util/Pool.js.map +1 -0
  440. package/build/dist/Util/Semaphore.js +55 -0
  441. package/build/dist/Util/Semaphore.js.map +1 -0
  442. package/build/dist/Util/Sound.js +22 -0
  443. package/build/dist/Util/Sound.js.map +1 -0
  444. package/build/dist/Util/StateMachine.js +79 -0
  445. package/build/dist/Util/StateMachine.js.map +1 -0
  446. package/build/dist/Util/Toaster.css +28 -28
  447. package/build/dist/Util/Toaster.js +84 -0
  448. package/build/dist/Util/Toaster.js.map +1 -0
  449. package/build/dist/Util/Util.d.ts +6 -0
  450. package/build/dist/Util/Util.js +95 -0
  451. package/build/dist/Util/Util.js.map +1 -0
  452. package/build/dist/Util/Watch.js +67 -0
  453. package/build/dist/Util/Watch.js.map +1 -0
  454. package/build/dist/Util/WebAudio.js +62 -0
  455. package/build/dist/Util/WebAudio.js.map +1 -0
  456. package/build/dist/excalibur.d.ts +2 -2
  457. package/build/dist/excalibur.js +389 -258
  458. package/build/dist/excalibur.js.map +1 -1
  459. package/build/dist/excalibur.min.js +1 -1
  460. package/build/dist/excalibur.min.js.LICENSE.txt +1 -1
  461. package/build/dist/excalibur.min.js.map +1 -1
  462. package/build/dist/index.js +81 -0
  463. package/build/dist/index.js.map +1 -0
  464. package/build/esm/Debug/Debug.d.ts +11 -0
  465. package/build/esm/Graphics/Context/ExcaliburGraphicsContextWebGL.d.ts +1 -0
  466. package/build/esm/Graphics/Context/material.d.ts +2 -0
  467. package/build/esm/Graphics/DebugGraphicsComponent.d.ts +3 -2
  468. package/build/esm/Graphics/FontCache.d.ts +1 -0
  469. package/build/esm/TileMap/TileMap.d.ts +2 -1
  470. package/build/esm/Util/Util.d.ts +6 -0
  471. package/build/esm/excalibur.d.ts +2 -2
  472. package/build/esm/excalibur.js +389 -258
  473. package/build/esm/excalibur.js.map +1 -1
  474. package/build/esm/excalibur.min.js +1 -1
  475. package/build/esm/excalibur.min.js.LICENSE.txt +1 -1
  476. package/build/esm/excalibur.min.js.map +1 -1
  477. package/docker-compose.yml +11 -11
  478. package/package.json +131 -131
  479. package/build/dist/Loader.css +0 -122
  480. package/build/nuget/Excalibur.0.28.3.nupkg +0 -0
  481. package/build/v0.28.3.zip +0 -0
  482. package/excalibur-0.28.3.tgz +0 -0
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * excalibur - 0.28.3 - 2023-12-12
2
+ * excalibur - 0.29.0-alpha.2+5c28d4e - 2023-12-22
3
3
  * https://github.com/excaliburjs/Excalibur
4
4
  * Copyright (c) 2023 Excalibur.js <https://github.com/excaliburjs/Excalibur/graphs/contributors>
5
5
  * Licensed BSD-2-Clause
@@ -34,129 +34,129 @@ return /******/ (() => { // webpackBootstrap
34
34
 
35
35
  var ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()((_node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default()));
36
36
  // Module
37
- ___CSS_LOADER_EXPORT___.push([module.id, `/* Buttons styles start */
38
-
39
- button#excalibur-play {
40
- display: inline-block;
41
- position: relative;
42
- z-index: 999;
43
- border-radius: 6px;
44
- border: none;
45
- /*border: 3px solid;
46
- border-color: white;
47
- box-shadow: 0 0 10px #ccc;*/
48
- padding: 1rem 1.5rem 1rem 4rem;
49
- margin: 0;
50
- text-decoration: none;
51
- background: #00b233;
52
- color: #ffffff;
53
- font-family: sans-serif;
54
- font-size: 2rem;
55
- white-space: nowrap;
56
- line-height: 1;
57
- cursor: pointer;
58
- text-align: center;
59
- transition: background 250ms ease-in-out, transform 150ms ease;
60
- -webkit-appearance: none;
61
- -moz-appearance: none;
62
-
63
- -webkit-animation: excalibur-button-fadein 200ms; /* Safari, Chrome and Opera > 12.1 */
64
- -moz-animation: excalibur-button-fadein 200ms; /* Firefox < 16 */
65
- -ms-animation: excalibur-button-fadein 200ms; /* Internet Explorer */
66
- -o-animation: excalibur-button-fadein 200ms; /* Opera < 12.1 */
67
- animation: excalibur-button-fadein 200ms;
68
- }
69
-
70
- /*
71
- button#excalibur-play {
72
- display: none;
73
- }*/
74
-
75
- button#excalibur-play:after {
76
- position: absolute;
77
- content: '';
78
- border: 8px solid;
79
- border-color: transparent transparent transparent white;
80
- left: 35px;
81
- top: 24px;
82
- width: 0;
83
- height: 0;
84
- }
85
-
86
- button#excalibur-play:before {
87
- position: absolute;
88
- content: '';
89
- border: 3px solid;
90
- left: 19px;
91
- top: 14px;
92
- border-radius: 20px;
93
- width: 30px;
94
- height: 30px;
95
- }
96
-
97
- button#excalibur-play:hover,
98
- button#excalibur-play:focus {
99
- background: #00982c;
100
- }
101
-
102
- button#excalibur-play:focus {
103
- outline: 1px solid #fff;
104
- outline-offset: -4px;
105
- }
106
-
107
- button#excalibur-play:active {
108
- transform: scale(0.99);
109
- }
110
-
111
- @keyframes excalibur-button-fadein {
112
- from {
113
- opacity: 0;
114
- }
115
- to {
116
- opacity: 1;
117
- }
118
- }
119
-
120
- /* Firefox < 16 */
121
- @-moz-keyframes excalibur-button-fadein {
122
- from {
123
- opacity: 0;
124
- }
125
- to {
126
- opacity: 1;
127
- }
128
- }
129
-
130
- /* Safari, Chrome and Opera > 12.1 */
131
- @-webkit-keyframes excalibur-button-fadein {
132
- from {
133
- opacity: 0;
134
- }
135
- to {
136
- opacity: 1;
137
- }
138
- }
139
-
140
- /* Internet Explorer */
141
- @-ms-keyframes excalibur-button-fadein {
142
- from {
143
- opacity: 0;
144
- }
145
- to {
146
- opacity: 1;
147
- }
148
- }
149
-
150
- /* Opera < 12.1 */
151
- @-o-keyframes excalibur-button-fadein {
152
- from {
153
- opacity: 0;
154
- }
155
- to {
156
- opacity: 1;
157
- }
158
- }
159
- `, "",{"version":3,"sources":["webpack://./Loader.css"],"names":[],"mappings":"AAAA,yBAAyB;;AAEzB;EACE,qBAAqB;EACrB,kBAAkB;EAClB,YAAY;EACZ,kBAAkB;EAClB,YAAY;EACZ;;+BAE6B;EAC7B,8BAA8B;EAC9B,SAAS;EACT,qBAAqB;EACrB,mBAAmB;EACnB,cAAc;EACd,uBAAuB;EACvB,eAAe;EACf,mBAAmB;EACnB,cAAc;EACd,eAAe;EACf,kBAAkB;EAClB,8DAA8D;EAC9D,wBAAwB;EACxB,qBAAqB;;EAErB,gDAAgD,EAAE,oCAAoC;EACtF,6CAA6C,EAAE,iBAAiB;EAChE,4CAA4C,EAAE,sBAAsB;EACpE,2CAA2C,EAAE,iBAAiB;EAC9D,wCAAwC;AAC1C;;AAEA;;;EAGE;;AAEF;EACE,kBAAkB;EAClB,WAAW;EACX,iBAAiB;EACjB,uDAAuD;EACvD,UAAU;EACV,SAAS;EACT,QAAQ;EACR,SAAS;AACX;;AAEA;EACE,kBAAkB;EAClB,WAAW;EACX,iBAAiB;EACjB,UAAU;EACV,SAAS;EACT,mBAAmB;EACnB,WAAW;EACX,YAAY;AACd;;AAEA;;EAEE,mBAAmB;AACrB;;AAEA;EACE,uBAAuB;EACvB,oBAAoB;AACtB;;AAEA;EACE,sBAAsB;AACxB;;AAEA;EACE;IACE,UAAU;EACZ;EACA;IACE,UAAU;EACZ;AACF;;AAEA,iBAAiB;AACjB;EACE;IACE,UAAU;EACZ;EACA;IACE,UAAU;EACZ;AACF;;AAEA,oCAAoC;AACpC;EACE;IACE,UAAU;EACZ;EACA;IACE,UAAU;EACZ;AACF;;AAEA,sBAAsB;AACtB;EACE;IACE,UAAU;EACZ;EACA;IACE,UAAU;EACZ;AACF;;AAEA,iBAAiB;AACjB;EACE;IACE,UAAU;EACZ;EACA;IACE,UAAU;EACZ;AACF","sourcesContent":["/* Buttons styles start */\r\n\r\nbutton#excalibur-play {\r\n display: inline-block;\r\n position: relative;\r\n z-index: 999;\r\n border-radius: 6px;\r\n border: none;\r\n /*border: 3px solid;\r\n border-color: white;\r\n box-shadow: 0 0 10px #ccc;*/\r\n padding: 1rem 1.5rem 1rem 4rem;\r\n margin: 0;\r\n text-decoration: none;\r\n background: #00b233;\r\n color: #ffffff;\r\n font-family: sans-serif;\r\n font-size: 2rem;\r\n white-space: nowrap;\r\n line-height: 1;\r\n cursor: pointer;\r\n text-align: center;\r\n transition: background 250ms ease-in-out, transform 150ms ease;\r\n -webkit-appearance: none;\r\n -moz-appearance: none;\r\n\r\n -webkit-animation: excalibur-button-fadein 200ms; /* Safari, Chrome and Opera > 12.1 */\r\n -moz-animation: excalibur-button-fadein 200ms; /* Firefox < 16 */\r\n -ms-animation: excalibur-button-fadein 200ms; /* Internet Explorer */\r\n -o-animation: excalibur-button-fadein 200ms; /* Opera < 12.1 */\r\n animation: excalibur-button-fadein 200ms;\r\n}\r\n\r\n/*\r\nbutton#excalibur-play {\r\n display: none;\r\n}*/\r\n\r\nbutton#excalibur-play:after {\r\n position: absolute;\r\n content: '';\r\n border: 8px solid;\r\n border-color: transparent transparent transparent white;\r\n left: 35px;\r\n top: 24px;\r\n width: 0;\r\n height: 0;\r\n}\r\n\r\nbutton#excalibur-play:before {\r\n position: absolute;\r\n content: '';\r\n border: 3px solid;\r\n left: 19px;\r\n top: 14px;\r\n border-radius: 20px;\r\n width: 30px;\r\n height: 30px;\r\n}\r\n\r\nbutton#excalibur-play:hover,\r\nbutton#excalibur-play:focus {\r\n background: #00982c;\r\n}\r\n\r\nbutton#excalibur-play:focus {\r\n outline: 1px solid #fff;\r\n outline-offset: -4px;\r\n}\r\n\r\nbutton#excalibur-play:active {\r\n transform: scale(0.99);\r\n}\r\n\r\n@keyframes excalibur-button-fadein {\r\n from {\r\n opacity: 0;\r\n }\r\n to {\r\n opacity: 1;\r\n }\r\n}\r\n\r\n/* Firefox < 16 */\r\n@-moz-keyframes excalibur-button-fadein {\r\n from {\r\n opacity: 0;\r\n }\r\n to {\r\n opacity: 1;\r\n }\r\n}\r\n\r\n/* Safari, Chrome and Opera > 12.1 */\r\n@-webkit-keyframes excalibur-button-fadein {\r\n from {\r\n opacity: 0;\r\n }\r\n to {\r\n opacity: 1;\r\n }\r\n}\r\n\r\n/* Internet Explorer */\r\n@-ms-keyframes excalibur-button-fadein {\r\n from {\r\n opacity: 0;\r\n }\r\n to {\r\n opacity: 1;\r\n }\r\n}\r\n\r\n/* Opera < 12.1 */\r\n@-o-keyframes excalibur-button-fadein {\r\n from {\r\n opacity: 0;\r\n }\r\n to {\r\n opacity: 1;\r\n }\r\n}\r\n"],"sourceRoot":""}]);
37
+ ___CSS_LOADER_EXPORT___.push([module.id, `/* Buttons styles start */
38
+
39
+ button#excalibur-play {
40
+ display: inline-block;
41
+ position: relative;
42
+ z-index: 999;
43
+ border-radius: 6px;
44
+ border: none;
45
+ /*border: 3px solid;
46
+ border-color: white;
47
+ box-shadow: 0 0 10px #ccc;*/
48
+ padding: 1rem 1.5rem 1rem 4rem;
49
+ margin: 0;
50
+ text-decoration: none;
51
+ background: #00b233;
52
+ color: #ffffff;
53
+ font-family: sans-serif;
54
+ font-size: 2rem;
55
+ white-space: nowrap;
56
+ line-height: 1;
57
+ cursor: pointer;
58
+ text-align: center;
59
+ transition: background 250ms ease-in-out, transform 150ms ease;
60
+ -webkit-appearance: none;
61
+ -moz-appearance: none;
62
+
63
+ -webkit-animation: excalibur-button-fadein 200ms; /* Safari, Chrome and Opera > 12.1 */
64
+ -moz-animation: excalibur-button-fadein 200ms; /* Firefox < 16 */
65
+ -ms-animation: excalibur-button-fadein 200ms; /* Internet Explorer */
66
+ -o-animation: excalibur-button-fadein 200ms; /* Opera < 12.1 */
67
+ animation: excalibur-button-fadein 200ms;
68
+ }
69
+
70
+ /*
71
+ button#excalibur-play {
72
+ display: none;
73
+ }*/
74
+
75
+ button#excalibur-play:after {
76
+ position: absolute;
77
+ content: '';
78
+ border: 8px solid;
79
+ border-color: transparent transparent transparent white;
80
+ left: 35px;
81
+ top: 24px;
82
+ width: 0;
83
+ height: 0;
84
+ }
85
+
86
+ button#excalibur-play:before {
87
+ position: absolute;
88
+ content: '';
89
+ border: 3px solid;
90
+ left: 19px;
91
+ top: 14px;
92
+ border-radius: 20px;
93
+ width: 30px;
94
+ height: 30px;
95
+ }
96
+
97
+ button#excalibur-play:hover,
98
+ button#excalibur-play:focus {
99
+ background: #00982c;
100
+ }
101
+
102
+ button#excalibur-play:focus {
103
+ outline: 1px solid #fff;
104
+ outline-offset: -4px;
105
+ }
106
+
107
+ button#excalibur-play:active {
108
+ transform: scale(0.99);
109
+ }
110
+
111
+ @keyframes excalibur-button-fadein {
112
+ from {
113
+ opacity: 0;
114
+ }
115
+ to {
116
+ opacity: 1;
117
+ }
118
+ }
119
+
120
+ /* Firefox < 16 */
121
+ @-moz-keyframes excalibur-button-fadein {
122
+ from {
123
+ opacity: 0;
124
+ }
125
+ to {
126
+ opacity: 1;
127
+ }
128
+ }
129
+
130
+ /* Safari, Chrome and Opera > 12.1 */
131
+ @-webkit-keyframes excalibur-button-fadein {
132
+ from {
133
+ opacity: 0;
134
+ }
135
+ to {
136
+ opacity: 1;
137
+ }
138
+ }
139
+
140
+ /* Internet Explorer */
141
+ @-ms-keyframes excalibur-button-fadein {
142
+ from {
143
+ opacity: 0;
144
+ }
145
+ to {
146
+ opacity: 1;
147
+ }
148
+ }
149
+
150
+ /* Opera < 12.1 */
151
+ @-o-keyframes excalibur-button-fadein {
152
+ from {
153
+ opacity: 0;
154
+ }
155
+ to {
156
+ opacity: 1;
157
+ }
158
+ }
159
+ `, "",{"version":3,"sources":["webpack://./Loader.css"],"names":[],"mappings":"AAAA,yBAAyB;;AAEzB;EACE,qBAAqB;EACrB,kBAAkB;EAClB,YAAY;EACZ,kBAAkB;EAClB,YAAY;EACZ;;+BAE6B;EAC7B,8BAA8B;EAC9B,SAAS;EACT,qBAAqB;EACrB,mBAAmB;EACnB,cAAc;EACd,uBAAuB;EACvB,eAAe;EACf,mBAAmB;EACnB,cAAc;EACd,eAAe;EACf,kBAAkB;EAClB,8DAA8D;EAC9D,wBAAwB;EACxB,qBAAqB;;EAErB,gDAAgD,EAAE,oCAAoC;EACtF,6CAA6C,EAAE,iBAAiB;EAChE,4CAA4C,EAAE,sBAAsB;EACpE,2CAA2C,EAAE,iBAAiB;EAC9D,wCAAwC;AAC1C;;AAEA;;;EAGE;;AAEF;EACE,kBAAkB;EAClB,WAAW;EACX,iBAAiB;EACjB,uDAAuD;EACvD,UAAU;EACV,SAAS;EACT,QAAQ;EACR,SAAS;AACX;;AAEA;EACE,kBAAkB;EAClB,WAAW;EACX,iBAAiB;EACjB,UAAU;EACV,SAAS;EACT,mBAAmB;EACnB,WAAW;EACX,YAAY;AACd;;AAEA;;EAEE,mBAAmB;AACrB;;AAEA;EACE,uBAAuB;EACvB,oBAAoB;AACtB;;AAEA;EACE,sBAAsB;AACxB;;AAEA;EACE;IACE,UAAU;EACZ;EACA;IACE,UAAU;EACZ;AACF;;AAEA,iBAAiB;AACjB;EACE;IACE,UAAU;EACZ;EACA;IACE,UAAU;EACZ;AACF;;AAEA,oCAAoC;AACpC;EACE;IACE,UAAU;EACZ;EACA;IACE,UAAU;EACZ;AACF;;AAEA,sBAAsB;AACtB;EACE;IACE,UAAU;EACZ;EACA;IACE,UAAU;EACZ;AACF;;AAEA,iBAAiB;AACjB;EACE;IACE,UAAU;EACZ;EACA;IACE,UAAU;EACZ;AACF","sourcesContent":["/* Buttons styles start */\n\nbutton#excalibur-play {\n display: inline-block;\n position: relative;\n z-index: 999;\n border-radius: 6px;\n border: none;\n /*border: 3px solid;\n border-color: white;\n box-shadow: 0 0 10px #ccc;*/\n padding: 1rem 1.5rem 1rem 4rem;\n margin: 0;\n text-decoration: none;\n background: #00b233;\n color: #ffffff;\n font-family: sans-serif;\n font-size: 2rem;\n white-space: nowrap;\n line-height: 1;\n cursor: pointer;\n text-align: center;\n transition: background 250ms ease-in-out, transform 150ms ease;\n -webkit-appearance: none;\n -moz-appearance: none;\n\n -webkit-animation: excalibur-button-fadein 200ms; /* Safari, Chrome and Opera > 12.1 */\n -moz-animation: excalibur-button-fadein 200ms; /* Firefox < 16 */\n -ms-animation: excalibur-button-fadein 200ms; /* Internet Explorer */\n -o-animation: excalibur-button-fadein 200ms; /* Opera < 12.1 */\n animation: excalibur-button-fadein 200ms;\n}\n\n/*\nbutton#excalibur-play {\n display: none;\n}*/\n\nbutton#excalibur-play:after {\n position: absolute;\n content: '';\n border: 8px solid;\n border-color: transparent transparent transparent white;\n left: 35px;\n top: 24px;\n width: 0;\n height: 0;\n}\n\nbutton#excalibur-play:before {\n position: absolute;\n content: '';\n border: 3px solid;\n left: 19px;\n top: 14px;\n border-radius: 20px;\n width: 30px;\n height: 30px;\n}\n\nbutton#excalibur-play:hover,\nbutton#excalibur-play:focus {\n background: #00982c;\n}\n\nbutton#excalibur-play:focus {\n outline: 1px solid #fff;\n outline-offset: -4px;\n}\n\nbutton#excalibur-play:active {\n transform: scale(0.99);\n}\n\n@keyframes excalibur-button-fadein {\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n}\n\n/* Firefox < 16 */\n@-moz-keyframes excalibur-button-fadein {\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n}\n\n/* Safari, Chrome and Opera > 12.1 */\n@-webkit-keyframes excalibur-button-fadein {\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n}\n\n/* Internet Explorer */\n@-ms-keyframes excalibur-button-fadein {\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n}\n\n/* Opera < 12.1 */\n@-o-keyframes excalibur-button-fadein {\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n}\n"],"sourceRoot":""}]);
160
160
  // Exports
161
161
  /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);
162
162
 
@@ -178,35 +178,35 @@ button#excalibur-play:active {
178
178
 
179
179
  var ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()((_node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default()));
180
180
  // Module
181
- ___CSS_LOADER_EXPORT___.push([module.id, `
182
- #ex-toast-container {
183
- position: absolute;
184
- height: 0;
185
- min-width: 50%;
186
- left: 50%;
187
- top: 0;
188
- }
189
-
190
- .ex-toast-message {
191
- left: -50%;
192
- position: relative;
193
- display: flex;
194
- justify-content: space-between;
195
-
196
-
197
- padding: 10px;
198
- margin-top: 5px;
199
- font-size: 18px;
200
- font-family: sans-serif;
201
- border-radius: 6px;
202
- border: 3px solid #b7b779;
203
- background-color: rgb(253, 253, 192);
204
- }
205
-
206
-
207
- .ex-toast-message button {
208
- align-self: flex-start;
209
- }`, "",{"version":3,"sources":["webpack://./Util/Toaster.css"],"names":[],"mappings":";AACA;EACE,kBAAkB;EAClB,SAAS;EACT,cAAc;EACd,SAAS;EACT,MAAM;AACR;;AAEA;EACE,UAAU;EACV,kBAAkB;EAClB,aAAa;EACb,8BAA8B;;;EAG9B,aAAa;EACb,eAAe;EACf,eAAe;EACf,uBAAuB;EACvB,kBAAkB;EAClB,yBAAyB;EACzB,oCAAoC;AACtC;;;AAGA;EACE,sBAAsB;AACxB","sourcesContent":["\r\n#ex-toast-container {\r\n position: absolute;\r\n height: 0;\r\n min-width: 50%;\r\n left: 50%;\r\n top: 0;\r\n}\r\n\r\n.ex-toast-message {\r\n left: -50%;\r\n position: relative;\r\n display: flex;\r\n justify-content: space-between;\r\n\r\n\r\n padding: 10px;\r\n margin-top: 5px;\r\n font-size: 18px;\r\n font-family: sans-serif;\r\n border-radius: 6px;\r\n border: 3px solid #b7b779;\r\n background-color: rgb(253, 253, 192);\r\n}\r\n\r\n\r\n.ex-toast-message button {\r\n align-self: flex-start;\r\n}"],"sourceRoot":""}]);
181
+ ___CSS_LOADER_EXPORT___.push([module.id, `
182
+ #ex-toast-container {
183
+ position: absolute;
184
+ height: 0;
185
+ min-width: 50%;
186
+ left: 50%;
187
+ top: 0;
188
+ }
189
+
190
+ .ex-toast-message {
191
+ left: -50%;
192
+ position: relative;
193
+ display: flex;
194
+ justify-content: space-between;
195
+
196
+
197
+ padding: 10px;
198
+ margin-top: 5px;
199
+ font-size: 18px;
200
+ font-family: sans-serif;
201
+ border-radius: 6px;
202
+ border: 3px solid #b7b779;
203
+ background-color: rgb(253, 253, 192);
204
+ }
205
+
206
+
207
+ .ex-toast-message button {
208
+ align-self: flex-start;
209
+ }`, "",{"version":3,"sources":["webpack://./Util/Toaster.css"],"names":[],"mappings":";AACA;EACE,kBAAkB;EAClB,SAAS;EACT,cAAc;EACd,SAAS;EACT,MAAM;AACR;;AAEA;EACE,UAAU;EACV,kBAAkB;EAClB,aAAa;EACb,8BAA8B;;;EAG9B,aAAa;EACb,eAAe;EACf,eAAe;EACf,uBAAuB;EACvB,kBAAkB;EAClB,yBAAyB;EACzB,oCAAoC;AACtC;;;AAGA;EACE,sBAAsB;AACxB","sourcesContent":["\n#ex-toast-container {\n position: absolute;\n height: 0;\n min-width: 50%;\n left: 50%;\n top: 0;\n}\n\n.ex-toast-message {\n left: -50%;\n position: relative;\n display: flex;\n justify-content: space-between;\n\n\n padding: 10px;\n margin-top: 5px;\n font-size: 18px;\n font-family: sans-serif;\n border-radius: 6px;\n border: 3px solid #b7b779;\n background-color: rgb(253, 253, 192);\n}\n\n\n.ex-toast-message button {\n align-self: flex-start;\n}"],"sourceRoot":""}]);
210
210
  // Exports
211
211
  /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);
212
212
 
@@ -2704,6 +2704,7 @@ __webpack_require__.d(Util_Index_namespaceObject, {
2704
2704
  delay: () => (delay),
2705
2705
  fail: () => (fail),
2706
2706
  getPosition: () => (getPosition),
2707
+ omit: () => (omit),
2707
2708
  removeItemFromArray: () => (removeItemFromArray)
2708
2709
  });
2709
2710
 
@@ -6077,6 +6078,20 @@ function delay(milliseconds, clock) {
6077
6078
  }, milliseconds);
6078
6079
  return future.promise;
6079
6080
  }
6081
+ /**
6082
+ * Remove keys from object literals
6083
+ * @param object
6084
+ * @param keys
6085
+ */
6086
+ function omit(object, keys) {
6087
+ const newObj = {};
6088
+ for (const key in object) {
6089
+ if (!keys.includes(key)) {
6090
+ newObj[key] = object[key];
6091
+ }
6092
+ }
6093
+ return newObj;
6094
+ }
6080
6095
 
6081
6096
  ;// CONCATENATED MODULE: ./Math/matrix.ts
6082
6097
 
@@ -6527,11 +6542,11 @@ class Matrix {
6527
6542
  this.data[15] === 1);
6528
6543
  }
6529
6544
  toString() {
6530
- return `
6531
- [${this.data[0]} ${this.data[4]} ${this.data[8]} ${this.data[12]}]
6532
- [${this.data[1]} ${this.data[5]} ${this.data[9]} ${this.data[13]}]
6533
- [${this.data[2]} ${this.data[6]} ${this.data[10]} ${this.data[14]}]
6534
- [${this.data[3]} ${this.data[7]} ${this.data[11]} ${this.data[15]}]
6545
+ return `
6546
+ [${this.data[0]} ${this.data[4]} ${this.data[8]} ${this.data[12]}]
6547
+ [${this.data[1]} ${this.data[5]} ${this.data[9]} ${this.data[13]}]
6548
+ [${this.data[2]} ${this.data[6]} ${this.data[10]} ${this.data[14]}]
6549
+ [${this.data[3]} ${this.data[7]} ${this.data[11]} ${this.data[15]}]
6535
6550
  `;
6536
6551
  }
6537
6552
  }
@@ -6860,10 +6875,10 @@ class AffineMatrix {
6860
6875
  return mat;
6861
6876
  }
6862
6877
  toString() {
6863
- return `
6864
- [${this.data[0]} ${this.data[2]} ${this.data[4]}]
6865
- [${this.data[1]} ${this.data[3]} ${this.data[5]}]
6866
- [0 0 1]
6878
+ return `
6879
+ [${this.data[0]} ${this.data[2]} ${this.data[4]}]
6880
+ [${this.data[1]} ${this.data[3]} ${this.data[5]}]
6881
+ [0 0 1]
6867
6882
  `;
6868
6883
  }
6869
6884
  }
@@ -7159,7 +7174,7 @@ class Graphic {
7159
7174
  this._transformStale = true;
7160
7175
  }
7161
7176
  constructor(options) {
7162
- var _a, _b, _c, _d, _e, _f;
7177
+ var _a, _b, _c, _d, _e, _f, _g;
7163
7178
  this.id = Graphic._ID++;
7164
7179
  this.transform = AffineMatrix.identity();
7165
7180
  this.tint = null;
@@ -7186,16 +7201,20 @@ class Graphic {
7186
7201
  this.rotation = (_d = options.rotation) !== null && _d !== void 0 ? _d : this.rotation;
7187
7202
  this.opacity = (_e = options.opacity) !== null && _e !== void 0 ? _e : this.opacity;
7188
7203
  this.scale = (_f = options.scale) !== null && _f !== void 0 ? _f : this.scale;
7204
+ this.tint = (_g = options.tint) !== null && _g !== void 0 ? _g : this.tint;
7189
7205
  }
7190
7206
  }
7191
7207
  cloneGraphicOptions() {
7192
7208
  return {
7209
+ width: this.width / this.scale.x,
7210
+ height: this.height / this.scale.y,
7193
7211
  origin: this.origin ? this.origin.clone() : null,
7194
7212
  flipHorizontal: this.flipHorizontal,
7195
7213
  flipVertical: this.flipVertical,
7196
7214
  rotation: this.rotation,
7197
7215
  opacity: this.opacity,
7198
- scale: this.scale ? this.scale.clone() : null
7216
+ scale: this.scale ? this.scale.clone() : null,
7217
+ tint: this.tint ? this.tint.clone() : null
7199
7218
  };
7200
7219
  }
7201
7220
  /**
@@ -8019,9 +8038,9 @@ class RenderTarget {
8019
8038
  }
8020
8039
 
8021
8040
  ;// CONCATENATED MODULE: ./Graphics/Context/line-renderer/line-vertex.glsl
8022
- /* harmony default export */ const line_vertex = ("#version 300 es\r\nin vec2 a_position;\r\nin vec4 a_color;\r\n\r\nout lowp vec4 v_color;\r\n\r\nuniform mat4 u_matrix;\r\n\r\nvoid main() {\r\n // Set the vertex position using the ortho transform matrix\r\n gl_Position = u_matrix * vec4(a_position, 0.0, 1.0);\r\n\r\n // Passthrough the color\r\n v_color = a_color;\r\n}");
8041
+ /* harmony default export */ const line_vertex = ("#version 300 es\nin vec2 a_position;\nin vec4 a_color;\n\nout lowp vec4 v_color;\n\nuniform mat4 u_matrix;\n\nvoid main() {\n // Set the vertex position using the ortho transform matrix\n gl_Position = u_matrix * vec4(a_position, 0.0, 1.0);\n\n // Passthrough the color\n v_color = a_color;\n}");
8023
8042
  ;// CONCATENATED MODULE: ./Graphics/Context/line-renderer/line-fragment.glsl
8024
- /* harmony default export */ const line_fragment = ("#version 300 es\r\nprecision mediump float;\r\n\r\n// Color\r\nin lowp vec4 v_color;\r\n\r\nout vec4 fragColor;\r\n\r\nvoid main() {\r\n fragColor = v_color;\r\n}");
8043
+ /* harmony default export */ const line_fragment = ("#version 300 es\nprecision mediump float;\n\n// Color\nin lowp vec4 v_color;\n\nout vec4 fragColor;\n\nvoid main() {\n fragColor = v_color;\n}");
8025
8044
  ;// CONCATENATED MODULE: ./Graphics/Context/webgl-util.ts
8026
8045
  /**
8027
8046
  * Return the size of the GlType in bytes
@@ -8722,9 +8741,9 @@ class LineRenderer {
8722
8741
  }
8723
8742
 
8724
8743
  ;// CONCATENATED MODULE: ./Graphics/Context/point-renderer/point-vertex.glsl
8725
- /* harmony default export */ const point_vertex = ("#version 300 es\r\nin vec2 a_position;\r\nin vec4 a_color;\r\nin float a_size;\r\nout lowp vec4 v_color;\r\nuniform mat4 u_matrix;\r\n\r\nvoid main() {\r\n gl_Position = u_matrix * vec4(a_position, 0.0, 1.0);\r\n gl_PointSize = a_size * 2.0;\r\n v_color = a_color;\r\n}");
8744
+ /* harmony default export */ const point_vertex = ("#version 300 es\nin vec2 a_position;\nin vec4 a_color;\nin float a_size;\nout lowp vec4 v_color;\nuniform mat4 u_matrix;\n\nvoid main() {\n gl_Position = u_matrix * vec4(a_position, 0.0, 1.0);\n gl_PointSize = a_size * 2.0;\n v_color = a_color;\n}");
8726
8745
  ;// CONCATENATED MODULE: ./Graphics/Context/point-renderer/point-fragment.glsl
8727
- /* harmony default export */ const point_fragment = ("#version 300 es\r\n\r\nprecision mediump float;\r\nin lowp vec4 v_color;\r\n\r\nout vec4 fragColor;\r\n\r\nvoid main() {\r\n float r = 0.0, delta = 0.0, alpha = 1.0;\r\n vec2 cxy = 2.0 * gl_PointCoord - 1.0;\r\n r = dot(cxy, cxy);\r\n\r\n delta = fwidth(r);\r\n alpha = 1.0 - smoothstep(1.0 - delta, 1.0 + delta, r);\r\n // \"premultiply\" the color by alpha\r\n vec4 color = v_color;\r\n color.a = color.a * alpha;\r\n color.rgb = color.rgb * color.a;\r\n fragColor = color;\r\n}");
8746
+ /* harmony default export */ const point_fragment = ("#version 300 es\n\nprecision mediump float;\nin lowp vec4 v_color;\n\nout vec4 fragColor;\n\nvoid main() {\n float r = 0.0, delta = 0.0, alpha = 1.0;\n vec2 cxy = 2.0 * gl_PointCoord - 1.0;\n r = dot(cxy, cxy);\n\n delta = fwidth(r);\n alpha = 1.0 - smoothstep(1.0 - delta, 1.0 + delta, r);\n // \"premultiply\" the color by alpha\n vec4 color = v_color;\n color.a = color.a * alpha;\n color.rgb = color.rgb * color.a;\n fragColor = color;\n}");
8728
8747
  ;// CONCATENATED MODULE: ./Graphics/Context/point-renderer/point-renderer.ts
8729
8748
 
8730
8749
 
@@ -8818,9 +8837,9 @@ class PointRenderer {
8818
8837
  }
8819
8838
 
8820
8839
  ;// CONCATENATED MODULE: ./Graphics/Context/screen-pass-painter/screen-vertex.glsl
8821
- /* harmony default export */ const screen_vertex = ("#version 300 es\r\nin vec2 a_position;\r\n\r\nin vec2 a_texcoord;\r\nout vec2 v_texcoord;\r\n\r\nvoid main() {\r\n gl_Position = vec4(a_position, 0.0, 1.0);\r\n\r\n // Pass the texcoord to the fragment shader.\r\n v_texcoord = a_texcoord;\r\n}");
8840
+ /* harmony default export */ const screen_vertex = ("#version 300 es\nin vec2 a_position;\n\nin vec2 a_texcoord;\nout vec2 v_texcoord;\n\nvoid main() {\n gl_Position = vec4(a_position, 0.0, 1.0);\n\n // Pass the texcoord to the fragment shader.\n v_texcoord = a_texcoord;\n}");
8822
8841
  ;// CONCATENATED MODULE: ./Graphics/Context/screen-pass-painter/screen-fragment.glsl
8823
- /* harmony default export */ const screen_fragment = ("#version 300 es\r\nprecision mediump float;\r\n\r\n// Passed in from the vertex shader.\r\nin vec2 v_texcoord;\r\n\r\n// The texture.\r\nuniform sampler2D u_texture;\r\n\r\nout vec4 fragColor;\r\n\r\nvoid main() {\r\n fragColor = texture(u_texture, v_texcoord);\r\n}");
8842
+ /* harmony default export */ const screen_fragment = ("#version 300 es\nprecision mediump float;\n\n// Passed in from the vertex shader.\nin vec2 v_texcoord;\n\n// The texture.\nuniform sampler2D u_texture;\n\nout vec4 fragColor;\n\nvoid main() {\n fragColor = texture(u_texture, v_texcoord);\n}");
8824
8843
  ;// CONCATENATED MODULE: ./Graphics/Context/screen-pass-painter/screen-pass-painter.ts
8825
8844
 
8826
8845
 
@@ -8947,9 +8966,9 @@ class QuadIndexBuffer {
8947
8966
  }
8948
8967
 
8949
8968
  ;// CONCATENATED MODULE: ./Graphics/Context/image-renderer/image-renderer.frag.glsl
8950
- /* harmony default export */ const image_renderer_frag = ("#version 300 es\r\nprecision mediump float;\r\n\r\n// UV coord\r\nin vec2 v_texcoord;\r\n\r\n// Texture index\r\nin lowp float v_textureIndex;\r\n\r\n// Textures in the current draw\r\nuniform sampler2D u_textures[%%count%%];\r\n\r\n// Opacity\r\nin float v_opacity;\r\n\r\nin vec4 v_tint;\r\n\r\nout vec4 fragColor;\r\n\r\nvoid main() {\r\n // In order to support the most efficient sprite batching, we have multiple\r\n // textures loaded into the gpu (usually 8) this picker logic skips over textures\r\n // that do not apply to a particular sprite.\r\n\r\n vec4 color = vec4(1.0, 0, 0, 1.0);\r\n\r\n // GLSL is templated out to pick the right texture and set the vec4 color\r\n %%texture_picker%%\r\n\r\n color.rgb = color.rgb * v_opacity;\r\n color.a = color.a * v_opacity;\r\n fragColor = color * v_tint;\r\n}");
8969
+ /* harmony default export */ const image_renderer_frag = ("#version 300 es\nprecision mediump float;\n\n// UV coord\nin vec2 v_texcoord;\n\n// Texture index\nin lowp float v_textureIndex;\n\n// Textures in the current draw\nuniform sampler2D u_textures[%%count%%];\n\n// Opacity\nin float v_opacity;\n\nin vec4 v_tint;\n\nout vec4 fragColor;\n\nvoid main() {\n // In order to support the most efficient sprite batching, we have multiple\n // textures loaded into the gpu (usually 8) this picker logic skips over textures\n // that do not apply to a particular sprite.\n\n vec4 color = vec4(1.0, 0, 0, 1.0);\n\n // GLSL is templated out to pick the right texture and set the vec4 color\n %%texture_picker%%\n\n color.rgb = color.rgb * v_opacity;\n color.a = color.a * v_opacity;\n fragColor = color * v_tint;\n}");
8951
8970
  ;// CONCATENATED MODULE: ./Graphics/Context/image-renderer/image-renderer.vert.glsl
8952
- /* harmony default export */ const image_renderer_vert = ("#version 300 es\r\nin vec2 a_position;\r\n\r\n// Opacity \r\nin float a_opacity;\r\nout float v_opacity;\r\n\r\n// UV coordinate\r\nin vec2 a_texcoord;\r\nout vec2 v_texcoord;\r\n\r\n// Texture number\r\nin lowp float a_textureIndex;\r\nout lowp float v_textureIndex;\r\n\r\nin vec4 a_tint;\r\nout vec4 v_tint;\r\n\r\nuniform mat4 u_matrix;\r\n\r\nvoid main() {\r\n // Set the vertex position using the ortho transform matrix\r\n gl_Position = u_matrix * vec4(a_position, 0.0, 1.0);\r\n\r\n // Pass through the Opacity to the fragment shader\r\n v_opacity = a_opacity;\r\n // Pass through the UV coord to the fragment shader\r\n v_texcoord = a_texcoord;\r\n // Pass through the texture number to the fragment shader\r\n v_textureIndex = a_textureIndex;\r\n // Pass through the tint\r\n v_tint = a_tint;\r\n}");
8971
+ /* harmony default export */ const image_renderer_vert = ("#version 300 es\nin vec2 a_position;\n\n// Opacity \nin float a_opacity;\nout float v_opacity;\n\n// UV coordinate\nin vec2 a_texcoord;\nout vec2 v_texcoord;\n\n// Texture number\nin lowp float a_textureIndex;\nout lowp float v_textureIndex;\n\nin vec4 a_tint;\nout vec4 v_tint;\n\nuniform mat4 u_matrix;\n\nvoid main() {\n // Set the vertex position using the ortho transform matrix\n gl_Position = u_matrix * vec4(a_position, 0.0, 1.0);\n\n // Pass through the Opacity to the fragment shader\n v_opacity = a_opacity;\n // Pass through the UV coord to the fragment shader\n v_texcoord = a_texcoord;\n // Pass through the texture number to the fragment shader\n v_textureIndex = a_textureIndex;\n // Pass through the tint\n v_tint = a_tint;\n}");
8953
8972
  ;// CONCATENATED MODULE: ./Graphics/Context/image-renderer/image-renderer.ts
8954
8973
 
8955
8974
 
@@ -9198,9 +9217,9 @@ class ImageRenderer {
9198
9217
  }
9199
9218
 
9200
9219
  ;// CONCATENATED MODULE: ./Graphics/Context/rectangle-renderer/rectangle-renderer.frag.glsl
9201
- /* harmony default export */ const rectangle_renderer_frag = ("#version 300 es\r\n\r\nprecision mediump float;\r\n\r\n// UV coord\r\nin vec2 v_uv;\r\n\r\nin vec2 v_size; // in pixels\r\n\r\n// Color coord to blend with image\r\nin lowp vec4 v_color;\r\n\r\n// Stroke color if used\r\nin lowp vec4 v_strokeColor;\r\n\r\n// Stroke thickness if used\r\nin lowp float v_strokeThickness; // in pixels\r\n\r\n// Opacity\r\nin float v_opacity;\r\n\r\nout vec4 fragColor;\r\n\r\nvoid main() {\r\n // modified from https://stackoverflow.com/questions/59197671/glsl-rounded-rectangle-with-variable-border\r\n vec2 uv = v_uv;\r\n vec2 fragCoord = uv * v_size;\r\n float maxX = v_size.x - v_strokeThickness;\r\n float minX = v_strokeThickness;\r\n float maxY = v_size.y - v_strokeThickness;\r\n float minY = v_strokeThickness;\r\n\r\n if (fragCoord.x < maxX && fragCoord.x > minX &&\r\n fragCoord.y < maxY && fragCoord.y > minY) {\r\n fragColor = v_color;\r\n } else {\r\n fragColor = v_strokeColor;\r\n }\r\n fragColor.a *= v_opacity;\r\n fragColor.rgb *= fragColor.a;\r\n\r\n // vec2 v2CenteredPos = abs(fragCoord - v_size.xy / 2.0);\r\n // vec2 v2HalfShapeSizePx = v_size.xy/2.0 - v_strokeThickness/2.0;\r\n\r\n // float fHalfBorderDist = 0.0;\r\n // float fHalfBorderThickness = 0.0;\r\n\r\n // if (fragCoord.x > max(v_radius, v_strokeThickness) && \r\n // fragCoord.x < v_size.x - max(v_radius, v_strokeThickness))\r\n // {\r\n // fHalfBorderDist = v2CenteredPos.y - v2HalfShapeSizePx.y;\r\n // fHalfBorderThickness = v_strokeThickness / 2.0;\r\n // }\r\n // else if (fragCoord.y > max(v_radius, v_strokeThickness) && \r\n // fragCoord.y < v_size.y - max(v_radius, v_strokeThickness))\r\n // {\r\n // fHalfBorderDist = v2CenteredPos.x - v2HalfShapeSizePx.x;\r\n // fHalfBorderThickness = v_strokeThickness / 2.0;\r\n // }\r\n // else\r\n // {\r\n // vec2 edgeVec = max(vec2(0.0), v_radius - vec2(\r\n // uv.x > 0.5 ? v_size.x - fragCoord.x : fragCoord.x,\r\n // uv.y > 0.5 ? v_size.y - fragCoord.y : fragCoord.y));\r\n \r\n // float ellipse_ab = v_radius-v_strokeThickness;\r\n // vec2 ellipse_isect = (v_strokeThickness > v_radius || v_strokeThickness > v_radius) ? vec2(0.0) :\r\n // edgeVec.xy * ellipse_ab*ellipse_ab / length(ellipse_ab*edgeVec.yx); \r\n \r\n // fHalfBorderThickness = (v_radius - length(ellipse_isect)) / 2.0;\r\n // fHalfBorderDist = length(edgeVec) - (v_radius - fHalfBorderThickness);\r\n // }\r\n\r\n // vec4 v4FromColor = v_strokeColor;\r\n // v4FromColor.rgb *= v4FromColor.a;\r\n // vec4 v4ToColor = vec4(0.0); // background color is transparent\r\n // if (fHalfBorderDist < 0.0) {\r\n // v4ToColor = v_color;\r\n // v4ToColor.rgb *= v4ToColor.a;\r\n // }\r\n\r\n // float mixPct = abs(fHalfBorderDist) - fHalfBorderThickness;\r\n\r\n // vec4 finalColor = mix(v4FromColor, v4ToColor, mixPct);\r\n // gl_FragColor = finalColor;\r\n}");
9220
+ /* harmony default export */ const rectangle_renderer_frag = ("#version 300 es\n\nprecision mediump float;\n\n// UV coord\nin vec2 v_uv;\n\nin vec2 v_size; // in pixels\n\n// Color coord to blend with image\nin lowp vec4 v_color;\n\n// Stroke color if used\nin lowp vec4 v_strokeColor;\n\n// Stroke thickness if used\nin lowp float v_strokeThickness; // in pixels\n\n// Opacity\nin float v_opacity;\n\nout vec4 fragColor;\n\nvoid main() {\n // modified from https://stackoverflow.com/questions/59197671/glsl-rounded-rectangle-with-variable-border\n vec2 uv = v_uv;\n vec2 fragCoord = uv * v_size;\n float maxX = v_size.x - v_strokeThickness;\n float minX = v_strokeThickness;\n float maxY = v_size.y - v_strokeThickness;\n float minY = v_strokeThickness;\n\n if (fragCoord.x < maxX && fragCoord.x > minX &&\n fragCoord.y < maxY && fragCoord.y > minY) {\n fragColor = v_color;\n } else {\n fragColor = v_strokeColor;\n }\n fragColor.a *= v_opacity;\n fragColor.rgb *= fragColor.a;\n\n // vec2 v2CenteredPos = abs(fragCoord - v_size.xy / 2.0);\n // vec2 v2HalfShapeSizePx = v_size.xy/2.0 - v_strokeThickness/2.0;\n\n // float fHalfBorderDist = 0.0;\n // float fHalfBorderThickness = 0.0;\n\n // if (fragCoord.x > max(v_radius, v_strokeThickness) && \n // fragCoord.x < v_size.x - max(v_radius, v_strokeThickness))\n // {\n // fHalfBorderDist = v2CenteredPos.y - v2HalfShapeSizePx.y;\n // fHalfBorderThickness = v_strokeThickness / 2.0;\n // }\n // else if (fragCoord.y > max(v_radius, v_strokeThickness) && \n // fragCoord.y < v_size.y - max(v_radius, v_strokeThickness))\n // {\n // fHalfBorderDist = v2CenteredPos.x - v2HalfShapeSizePx.x;\n // fHalfBorderThickness = v_strokeThickness / 2.0;\n // }\n // else\n // {\n // vec2 edgeVec = max(vec2(0.0), v_radius - vec2(\n // uv.x > 0.5 ? v_size.x - fragCoord.x : fragCoord.x,\n // uv.y > 0.5 ? v_size.y - fragCoord.y : fragCoord.y));\n \n // float ellipse_ab = v_radius-v_strokeThickness;\n // vec2 ellipse_isect = (v_strokeThickness > v_radius || v_strokeThickness > v_radius) ? vec2(0.0) :\n // edgeVec.xy * ellipse_ab*ellipse_ab / length(ellipse_ab*edgeVec.yx); \n \n // fHalfBorderThickness = (v_radius - length(ellipse_isect)) / 2.0;\n // fHalfBorderDist = length(edgeVec) - (v_radius - fHalfBorderThickness);\n // }\n\n // vec4 v4FromColor = v_strokeColor;\n // v4FromColor.rgb *= v4FromColor.a;\n // vec4 v4ToColor = vec4(0.0); // background color is transparent\n // if (fHalfBorderDist < 0.0) {\n // v4ToColor = v_color;\n // v4ToColor.rgb *= v4ToColor.a;\n // }\n\n // float mixPct = abs(fHalfBorderDist) - fHalfBorderThickness;\n\n // vec4 finalColor = mix(v4FromColor, v4ToColor, mixPct);\n // gl_FragColor = finalColor;\n}");
9202
9221
  ;// CONCATENATED MODULE: ./Graphics/Context/rectangle-renderer/rectangle-renderer.vert.glsl
9203
- /* harmony default export */ const rectangle_renderer_vert = ("#version 300 es\r\nin vec2 a_position;\r\n\r\n// UV coordinate\r\nin vec2 a_uv;\r\nout vec2 v_uv;\r\n\r\nin vec2 a_size;\r\nout vec2 v_size;\r\n\r\n// Opacity \r\nin float a_opacity;\r\nout float v_opacity;\r\n\r\nin vec4 a_color;\r\nout vec4 v_color;\r\n\r\nin vec4 a_strokeColor;\r\nout vec4 v_strokeColor;\r\n\r\nin float a_strokeThickness;\r\nout float v_strokeThickness;\r\n\r\nuniform mat4 u_matrix;\r\n\r\n\r\nvoid main() {\r\n // Set the vertex position using the ortho transform matrix\r\n gl_Position = u_matrix * vec4(a_position, 0.0, 1.0);\r\n\r\n // Pass through UV coords\r\n v_uv = a_uv;\r\n // Pass through size\r\n v_size = a_size;\r\n // Pass through the Opacity to the fragment shader\r\n v_opacity = a_opacity;\r\n // Pass through the color to the fragment shader\r\n v_color = a_color;\r\n // Pass through the stroke color to the fragment shader\r\n v_strokeColor = a_strokeColor;\r\n // Pass through the stroke thickenss to the fragment shader\r\n v_strokeThickness = a_strokeThickness;\r\n}");
9222
+ /* harmony default export */ const rectangle_renderer_vert = ("#version 300 es\nin vec2 a_position;\n\n// UV coordinate\nin vec2 a_uv;\nout vec2 v_uv;\n\nin vec2 a_size;\nout vec2 v_size;\n\n// Opacity \nin float a_opacity;\nout float v_opacity;\n\nin vec4 a_color;\nout vec4 v_color;\n\nin vec4 a_strokeColor;\nout vec4 v_strokeColor;\n\nin float a_strokeThickness;\nout float v_strokeThickness;\n\nuniform mat4 u_matrix;\n\n\nvoid main() {\n // Set the vertex position using the ortho transform matrix\n gl_Position = u_matrix * vec4(a_position, 0.0, 1.0);\n\n // Pass through UV coords\n v_uv = a_uv;\n // Pass through size\n v_size = a_size;\n // Pass through the Opacity to the fragment shader\n v_opacity = a_opacity;\n // Pass through the color to the fragment shader\n v_color = a_color;\n // Pass through the stroke color to the fragment shader\n v_strokeColor = a_strokeColor;\n // Pass through the stroke thickenss to the fragment shader\n v_strokeThickness = a_strokeThickness;\n}");
9204
9223
  ;// CONCATENATED MODULE: ./Graphics/Context/rectangle-renderer/rectangle-renderer.ts
9205
9224
 
9206
9225
 
@@ -9508,9 +9527,9 @@ class RectangleRenderer {
9508
9527
  }
9509
9528
 
9510
9529
  ;// CONCATENATED MODULE: ./Graphics/Context/circle-renderer/circle-renderer.frag.glsl
9511
- /* harmony default export */ const circle_renderer_frag = ("#version 300 es\r\nprecision highp float;\r\n\r\n// UV coord\r\nin vec2 v_uv;\r\n\r\n// Color coord to blend with image\r\nin lowp vec4 v_color;\r\n\r\n// Stroke color if used\r\nin lowp vec4 v_strokeColor;\r\n\r\n// Stroke thickness if used\r\nin lowp float v_strokeThickness;\r\n\r\n// Opacity\r\nin float v_opacity;\r\n\r\nout vec4 fragColor;\r\n\r\nvoid main() {\r\n // make (0, 0) the center the uv \r\n vec2 uv = v_uv * 2.0 - 1.0;\r\n\r\n vec4 color = v_color;\r\n vec4 strokeColor = v_strokeColor;\r\n\r\n // circle border is at radius 1.0 \r\n // dist is > 0 when inside the circle \r\n float d = length(uv);\r\n float dist = 1.0 - length(uv);\r\n\r\n // Fade based on fwidth\r\n float fade = fwidth(dot(uv, uv));\r\n\r\n // if dist is greater than 0 step to 1;\r\n // when we cross this 0 threshold add a smooth fade\r\n float fill = smoothstep(-fade/2.0, fade/2.0, dist);\r\n\r\n // if dist is greater than the stroke thickness step to 1\r\n float stroke = 1.0 - smoothstep(v_strokeThickness, v_strokeThickness + fade, dist);\r\n\r\n strokeColor.a *= fill * stroke;\r\n strokeColor.rgb *= strokeColor.a;\r\n\r\n color.a *= fill * (1.0 - stroke);\r\n color.rgb *= color.a;\r\n\r\n vec4 finalColor = mix(vec4(0.0), (color + strokeColor), fill);\r\n finalColor.rgb = finalColor.rgb * v_opacity;\r\n finalColor.a = finalColor.a * v_opacity;\r\n fragColor = finalColor;\r\n}");
9530
+ /* harmony default export */ const circle_renderer_frag = ("#version 300 es\nprecision highp float;\n\n// UV coord\nin vec2 v_uv;\n\n// Color coord to blend with image\nin lowp vec4 v_color;\n\n// Stroke color if used\nin lowp vec4 v_strokeColor;\n\n// Stroke thickness if used\nin lowp float v_strokeThickness;\n\n// Opacity\nin float v_opacity;\n\nout vec4 fragColor;\n\nvoid main() {\n // make (0, 0) the center the uv \n vec2 uv = v_uv * 2.0 - 1.0;\n\n vec4 color = v_color;\n vec4 strokeColor = v_strokeColor;\n\n // circle border is at radius 1.0 \n // dist is > 0 when inside the circle \n float d = length(uv);\n float dist = 1.0 - length(uv);\n\n // Fade based on fwidth\n float fade = fwidth(dot(uv, uv));\n\n // if dist is greater than 0 step to 1;\n // when we cross this 0 threshold add a smooth fade\n float fill = smoothstep(-fade/2.0, fade/2.0, dist);\n\n // if dist is greater than the stroke thickness step to 1\n float stroke = 1.0 - smoothstep(v_strokeThickness, v_strokeThickness + fade, dist);\n\n strokeColor.a *= fill * stroke;\n strokeColor.rgb *= strokeColor.a;\n\n color.a *= fill * (1.0 - stroke);\n color.rgb *= color.a;\n\n vec4 finalColor = mix(vec4(0.0), (color + strokeColor), fill);\n finalColor.rgb = finalColor.rgb * v_opacity;\n finalColor.a = finalColor.a * v_opacity;\n fragColor = finalColor;\n}");
9512
9531
  ;// CONCATENATED MODULE: ./Graphics/Context/circle-renderer/circle-renderer.vert.glsl
9513
- /* harmony default export */ const circle_renderer_vert = ("#version 300 es\r\nin vec2 a_position;\r\n\r\n// UV coordinate\r\nin vec2 a_uv;\r\nout vec2 v_uv;\r\n\r\n// Opacity \r\nin float a_opacity;\r\nout float v_opacity;\r\n\r\nin vec4 a_color;\r\nout vec4 v_color;\r\n\r\nin vec4 a_strokeColor;\r\nout vec4 v_strokeColor;\r\n\r\nin float a_strokeThickness;\r\nout float v_strokeThickness;\r\n\r\nuniform mat4 u_matrix;\r\n\r\n\r\nvoid main() {\r\n // Set the vertex position using the ortho transform matrix\r\n gl_Position = u_matrix * vec4(a_position, 0.0, 1.0);\r\n\r\n // Pass through UV coords\r\n v_uv = a_uv;\r\n // Pass through the Opacity to the fragment shader\r\n v_opacity = a_opacity;\r\n // Pass through the color to the fragment shader\r\n v_color = a_color;\r\n // Pass through the stroke color to the fragment shader\r\n v_strokeColor = a_strokeColor;\r\n // Pass through the stroke thickenss to the fragment shader\r\n v_strokeThickness = a_strokeThickness;\r\n}");
9532
+ /* harmony default export */ const circle_renderer_vert = ("#version 300 es\nin vec2 a_position;\n\n// UV coordinate\nin vec2 a_uv;\nout vec2 v_uv;\n\n// Opacity \nin float a_opacity;\nout float v_opacity;\n\nin vec4 a_color;\nout vec4 v_color;\n\nin vec4 a_strokeColor;\nout vec4 v_strokeColor;\n\nin float a_strokeThickness;\nout float v_strokeThickness;\n\nuniform mat4 u_matrix;\n\n\nvoid main() {\n // Set the vertex position using the ortho transform matrix\n gl_Position = u_matrix * vec4(a_position, 0.0, 1.0);\n\n // Pass through UV coords\n v_uv = a_uv;\n // Pass through the Opacity to the fragment shader\n v_opacity = a_opacity;\n // Pass through the color to the fragment shader\n v_color = a_color;\n // Pass through the stroke color to the fragment shader\n v_strokeColor = a_strokeColor;\n // Pass through the stroke thickenss to the fragment shader\n v_strokeThickness = a_strokeThickness;\n}");
9514
9533
  ;// CONCATENATED MODULE: ./Graphics/Context/circle-renderer/circle-renderer.ts
9515
9534
 
9516
9535
 
@@ -9780,22 +9799,26 @@ class DrawCall {
9780
9799
 
9781
9800
  ;// CONCATENATED MODULE: ./Graphics/Context/material.ts
9782
9801
 
9783
- const defaultVertexSource = `#version 300 es
9784
- in vec2 a_position;
9785
-
9786
- in vec2 a_uv;
9787
- out vec2 v_uv;
9788
-
9789
- uniform mat4 u_matrix;
9790
- uniform mat4 u_transform;
9791
-
9792
- void main() {
9793
- // Set the vertex position using the ortho & transform matrix
9794
- gl_Position = u_matrix * u_transform * vec4(a_position, 0.0, 1.0);
9795
-
9796
- // Pass through the UV coord to the fragment shader
9797
- v_uv = a_uv;
9798
- }
9802
+ const defaultVertexSource = `#version 300 es
9803
+ in vec2 a_position;
9804
+
9805
+ in vec2 a_uv;
9806
+ out vec2 v_uv;
9807
+
9808
+ in vec2 a_screenuv;
9809
+ out vec2 v_screenuv;
9810
+
9811
+ uniform mat4 u_matrix;
9812
+ uniform mat4 u_transform;
9813
+
9814
+ void main() {
9815
+ // Set the vertex position using the ortho & transform matrix
9816
+ gl_Position = u_matrix * u_transform * vec4(a_position, 0.0, 1.0);
9817
+
9818
+ // Pass through the UV coord to the fragment shader
9819
+ v_uv = a_uv;
9820
+ v_screenuv = a_screenuv;
9821
+ }
9799
9822
  `;
9800
9823
  class Material {
9801
9824
  constructor(options) {
@@ -9822,6 +9845,15 @@ class Material {
9822
9845
  var _a;
9823
9846
  return (_a = this._name) !== null && _a !== void 0 ? _a : 'anonymous material';
9824
9847
  }
9848
+ get isUsingScreenTexture() {
9849
+ return this._fragmentSource.includes('u_screen_texture');
9850
+ }
9851
+ update(callback) {
9852
+ if (this._shader) {
9853
+ this._shader.use();
9854
+ callback(this._shader);
9855
+ }
9856
+ }
9825
9857
  getShader() {
9826
9858
  return this._shader;
9827
9859
  }
@@ -9857,7 +9889,7 @@ class MaterialRenderer {
9857
9889
  // Setup memory layout
9858
9890
  this._buffer = new VertexBuffer({
9859
9891
  gl,
9860
- size: 4 * 4, // 4 components * 4 verts
9892
+ size: 6 * 4, // 6 components * 4 verts
9861
9893
  type: 'dynamic'
9862
9894
  });
9863
9895
  // Setup a vertex layout/buffer to the material
@@ -9866,7 +9898,8 @@ class MaterialRenderer {
9866
9898
  vertexBuffer: this._buffer,
9867
9899
  attributes: [
9868
9900
  ['a_position', 2],
9869
- ['a_uv', 2]
9901
+ ['a_uv', 2],
9902
+ ['a_screenuv', 2]
9870
9903
  ]
9871
9904
  });
9872
9905
  // Setup index buffer
@@ -9912,26 +9945,40 @@ class MaterialRenderer {
9912
9945
  const uvy0 = (sy) / imageHeight;
9913
9946
  const uvx1 = (sx + sw - 0.01) / imageWidth;
9914
9947
  const uvy1 = (sy + sh - 0.01) / imageHeight;
9948
+ const topLeftScreen = transform.getPosition();
9949
+ const bottomRightScreen = topLeftScreen.add(bottomRight);
9950
+ const screenUVX0 = topLeftScreen.x / this._context.width;
9951
+ const screenUVY0 = topLeftScreen.y / this._context.height;
9952
+ const screenUVX1 = bottomRightScreen.x / this._context.width;
9953
+ const screenUVY1 = bottomRightScreen.y / this._context.height;
9915
9954
  // (0, 0) - 0
9916
9955
  vertexBuffer[vertexIndex++] = topLeft.x;
9917
9956
  vertexBuffer[vertexIndex++] = topLeft.y;
9918
9957
  vertexBuffer[vertexIndex++] = uvx0;
9919
9958
  vertexBuffer[vertexIndex++] = uvy0;
9959
+ vertexBuffer[vertexIndex++] = screenUVX0;
9960
+ vertexBuffer[vertexIndex++] = screenUVY0;
9920
9961
  // (0, 1) - 1
9921
9962
  vertexBuffer[vertexIndex++] = bottomLeft.x;
9922
9963
  vertexBuffer[vertexIndex++] = bottomLeft.y;
9923
9964
  vertexBuffer[vertexIndex++] = uvx0;
9924
9965
  vertexBuffer[vertexIndex++] = uvy1;
9966
+ vertexBuffer[vertexIndex++] = screenUVX0;
9967
+ vertexBuffer[vertexIndex++] = screenUVY1;
9925
9968
  // (1, 0) - 2
9926
9969
  vertexBuffer[vertexIndex++] = topRight.x;
9927
9970
  vertexBuffer[vertexIndex++] = topRight.y;
9928
9971
  vertexBuffer[vertexIndex++] = uvx1;
9929
9972
  vertexBuffer[vertexIndex++] = uvy0;
9973
+ vertexBuffer[vertexIndex++] = screenUVX1;
9974
+ vertexBuffer[vertexIndex++] = screenUVY0;
9930
9975
  // (1, 1) - 3
9931
9976
  vertexBuffer[vertexIndex++] = bottomRight.x;
9932
9977
  vertexBuffer[vertexIndex++] = bottomRight.y;
9933
9978
  vertexBuffer[vertexIndex++] = uvx1;
9934
9979
  vertexBuffer[vertexIndex++] = uvy1;
9980
+ vertexBuffer[vertexIndex++] = screenUVX1;
9981
+ vertexBuffer[vertexIndex++] = screenUVY1;
9935
9982
  // This creates and uploads the texture if not already done
9936
9983
  const texture = this._addImageAsTexture(image);
9937
9984
  // apply material
@@ -9939,6 +9986,8 @@ class MaterialRenderer {
9939
9986
  this._layout.shader = shader;
9940
9987
  // apply layout and geometry
9941
9988
  this._layout.use(true);
9989
+ // apply time in ms since the page (performance.now())
9990
+ shader.trySetUniformFloat('u_time_ms', performance.now());
9942
9991
  // apply opacity
9943
9992
  shader.trySetUniformFloat('u_opacity', opacity);
9944
9993
  // apply resolution
@@ -9955,6 +10004,10 @@ class MaterialRenderer {
9955
10004
  gl.activeTexture(gl.TEXTURE0 + 0);
9956
10005
  gl.bindTexture(gl.TEXTURE_2D, texture);
9957
10006
  shader.trySetUniformInt('u_graphic', 0);
10007
+ // bind the screen texture
10008
+ gl.activeTexture(gl.TEXTURE0 + 1);
10009
+ gl.bindTexture(gl.TEXTURE_2D, this._context.materialScreenTexture);
10010
+ shader.trySetUniformInt('u_screen_texture', 1);
9958
10011
  // bind quad index buffer
9959
10012
  this._quads.bind();
9960
10013
  // Draw a single quad
@@ -10157,6 +10210,14 @@ class ExcaliburGraphicsContextWebGL {
10157
10210
  this.register(new CircleRenderer());
10158
10211
  this.register(new PointRenderer());
10159
10212
  this.register(new LineRenderer());
10213
+ this.materialScreenTexture = gl.createTexture();
10214
+ gl.bindTexture(gl.TEXTURE_2D, this.materialScreenTexture);
10215
+ gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, this.width, this.height, 0, gl.RGBA, gl.UNSIGNED_BYTE, null);
10216
+ gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.NEAREST);
10217
+ gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.NEAREST);
10218
+ gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.REPEAT);
10219
+ gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.REPEAT);
10220
+ gl.bindTexture(gl.TEXTURE_2D, null);
10160
10221
  this._screenRenderer = new ScreenPassPainter(gl);
10161
10222
  this._renderTarget = new RenderTarget({
10162
10223
  gl,
@@ -10415,6 +10476,13 @@ class ExcaliburGraphicsContextWebGL {
10415
10476
  currentRendererName = this._drawCalls[i].renderer;
10416
10477
  currentRenderer = this._renderers.get(currentRendererName);
10417
10478
  }
10479
+ // ! hack to grab screen texture before materials run because they might want it
10480
+ if (currentRenderer instanceof MaterialRenderer && this.material.isUsingScreenTexture) {
10481
+ const gl = this.__gl;
10482
+ gl.bindTexture(gl.TEXTURE_2D, this.materialScreenTexture);
10483
+ gl.copyTexImage2D(gl.TEXTURE_2D, 0, gl.RGBA, 0, 0, this.width, this.height, 0);
10484
+ this._renderTarget.use();
10485
+ }
10418
10486
  // If we are still using the same renderer we can add to the current batch
10419
10487
  currentRenderer.draw(...this._drawCalls[i].args);
10420
10488
  }
@@ -11680,6 +11748,7 @@ var Loader_0 = __webpack_require__(1388);
11680
11748
 
11681
11749
 
11682
11750
 
11751
+
11683
11752
  /**
11684
11753
  * A Raster is a Graphic that needs to be first painted to a HTMLCanvasElement before it can be drawn to the
11685
11754
  * [[ExcaliburGraphicsContext]]. This is useful for generating custom images using the 2D canvas api.
@@ -11689,7 +11758,7 @@ var Loader_0 = __webpack_require__(1388);
11689
11758
  class Raster extends Graphic {
11690
11759
  constructor(options) {
11691
11760
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
11692
- super(options);
11761
+ super(omit(options, ['width', 'height'])); // rasters do some special sauce with width/height
11693
11762
  this.filtering = null;
11694
11763
  this.lineCap = 'butt';
11695
11764
  this.quality = 1;
@@ -14239,9 +14308,9 @@ class CollisionGroup {
14239
14308
  return CollisionGroupManager.create(combinedName, combinedMask);
14240
14309
  }
14241
14310
  toString() {
14242
- return `
14243
- category: ${this.category.toString(2).padStart(32, '0')}
14244
- mask: ${(this.mask >>> 0).toString(2).padStart(32, '0')}
14311
+ return `
14312
+ category: ${this.category.toString(2).padStart(32, '0')}
14313
+ mask: ${(this.mask >>> 0).toString(2).padStart(32, '0')}
14245
14314
  `;
14246
14315
  }
14247
14316
  }
@@ -20824,7 +20893,7 @@ class FontCache {
20824
20893
  const currentHashCodes = new Set();
20825
20894
  for (const [textInstance, time] of FontCache._TEXT_USAGE.entries()) {
20826
20895
  // if bitmap hasn't been used in 100 ms clear it
20827
- if (time + 100 < performance.now()) {
20896
+ if (time + FontCache.FONT_TIMEOUT < performance.now()) {
20828
20897
  FontCache._LOGGER.debug(`Text cache entry timed out ${textInstance.text}`);
20829
20898
  deferred.push(textInstance);
20830
20899
  textInstance.dispose();
@@ -20868,6 +20937,7 @@ class FontCache {
20868
20937
  FontCache._MEASURE_CACHE.clear();
20869
20938
  }
20870
20939
  }
20940
+ FontCache.FONT_TIMEOUT = 500;
20871
20941
  FontCache._LOGGER = Logger.getInstance();
20872
20942
  FontCache._TEXT_USAGE = new Map();
20873
20943
  FontCache._TEXT_CACHE = new Map();
@@ -22244,7 +22314,6 @@ class QuadTree {
22244
22314
 
22245
22315
 
22246
22316
 
22247
-
22248
22317
  const TileMapEvents = {
22249
22318
  PreUpdate: 'preupdate',
22250
22319
  PostUpdate: 'postupdate',
@@ -22362,7 +22431,7 @@ class TileMap extends Entity {
22362
22431
  this.addComponent(new GraphicsComponent({
22363
22432
  onPostDraw: (ctx, delta) => this.draw(ctx, delta)
22364
22433
  }));
22365
- this.addComponent(new DebugGraphicsComponent((ctx) => this.debug(ctx), false));
22434
+ this.addComponent(new DebugGraphicsComponent((ctx, debugFlags) => this.debug(ctx, debugFlags), false));
22366
22435
  this.addComponent(new ColliderComponent());
22367
22436
  this._graphics = this.get(GraphicsComponent);
22368
22437
  this._transform = this.get(TransformComponent);
@@ -22441,14 +22510,53 @@ class TileMap extends Entity {
22441
22510
  const colliders = [];
22442
22511
  this._composite = this._collider.useCompositeCollider([]);
22443
22512
  let current;
22444
- // Bad square tesselation algo
22513
+ /**
22514
+ * Returns wether or not the 2 boxes share an edge and are the same height
22515
+ * @param prev
22516
+ * @param next
22517
+ * @returns true if they share and edge, false if not
22518
+ */
22519
+ const shareEdges = (prev, next) => {
22520
+ if (prev && next) {
22521
+ // same top/bottom
22522
+ return prev.top === next.top &&
22523
+ prev.bottom === next.bottom &&
22524
+ // Shared right/left edge
22525
+ prev.right === next.left;
22526
+ }
22527
+ return false;
22528
+ };
22529
+ /**
22530
+ * Potentially merges the current collider into a list of previous ones, mutating the list
22531
+ * If checkAndCombine returns true, the collider was successfully merged and should be thrown away
22532
+ * @param current current collider to test
22533
+ * @param colliders List of colliders to consider merging with
22534
+ * @param maxLookBack The amount of colliders to look back for combindation
22535
+ * @returns false when no combination found, true when successfully combined
22536
+ */
22537
+ const checkAndCombine = (current, colliders, maxLookBack = 10) => {
22538
+ if (!current) {
22539
+ return false;
22540
+ }
22541
+ // walk backwards through the list of colliders and combine with the first that shares an edge
22542
+ for (let i = colliders.length - 1; i >= 0; i--) {
22543
+ if (maxLookBack-- < 0) {
22544
+ // blunt the O(n^2) algorithm a bit
22545
+ return false;
22546
+ }
22547
+ const prev = colliders[i];
22548
+ if (shareEdges(prev, current)) {
22549
+ colliders[i] = prev.combine(current);
22550
+ return true;
22551
+ }
22552
+ }
22553
+ return false;
22554
+ };
22555
+ // ? configurable bias perhaps, horizontal strips vs. vertical ones
22556
+ // Bad tile collider packing algorithm
22445
22557
  for (let i = 0; i < this.columns; i++) {
22446
22558
  // Scan column for colliders
22447
22559
  for (let j = 0; j < this.rows; j++) {
22448
- // Columns start with a new collider
22449
- if (j === 0) {
22450
- current = null;
22451
- }
22452
22560
  const tile = this.tiles[i + j * this.columns];
22453
22561
  // Current tile in column is solid build up current collider
22454
22562
  if (tile.solid) {
@@ -22462,7 +22570,7 @@ class TileMap extends Entity {
22462
22570
  this._composite.addCollider(collider);
22463
22571
  }
22464
22572
  //we push any current collider before nulling the current run
22465
- if (current) {
22573
+ if (current && !checkAndCombine(current, colliders)) {
22466
22574
  colliders.push(current);
22467
22575
  }
22468
22576
  current = null;
@@ -22481,24 +22589,20 @@ class TileMap extends Entity {
22481
22589
  }
22482
22590
  else {
22483
22591
  // Not solid skip and cut off the current collider
22484
- if (current) {
22592
+ // End of run check and combine
22593
+ if (current && !checkAndCombine(current, colliders)) {
22485
22594
  colliders.push(current);
22486
22595
  }
22487
22596
  current = null;
22488
22597
  }
22489
22598
  }
22490
22599
  // After a column is complete check to see if it can be merged into the last one
22491
- if (current) {
22492
- // if previous is the same combine it
22493
- const prev = colliders[colliders.length - 1];
22494
- if (prev && prev.top === current.top && prev.bottom === current.bottom) {
22495
- colliders[colliders.length - 1] = prev.combine(current);
22496
- }
22497
- else {
22498
- // else new collider
22499
- colliders.push(current);
22500
- }
22600
+ // Eno of run check and combine
22601
+ if (current && !checkAndCombine(current, colliders)) {
22602
+ // else new collider if no combination
22603
+ colliders.push(current);
22501
22604
  }
22605
+ current = null;
22502
22606
  }
22503
22607
  for (const c of colliders) {
22504
22608
  const collider = Shape.Box(c.width, c.height, Vector.Zero, vec(c.left - this.pos.x, c.top - this.pos.y));
@@ -22604,37 +22708,53 @@ class TileMap extends Entity {
22604
22708
  }
22605
22709
  this.emit('postdraw', new PostDrawEvent(ctx, delta, this));
22606
22710
  }
22607
- debug(gfx) {
22711
+ debug(gfx, debugFlags) {
22712
+ const { showAll, showGrid, gridColor, gridWidth, showSolidBounds: showColliderBounds, solidBoundsColor: colliderBoundsColor, showColliderGeometry, colliderGeometryColor, showQuadTree } = debugFlags.tilemap;
22608
22713
  const width = this.tileWidth * this.columns * this.scale.x;
22609
22714
  const height = this.tileHeight * this.rows * this.scale.y;
22610
22715
  const pos = this.pos;
22611
- for (let r = 0; r < this.rows + 1; r++) {
22612
- const yOffset = vec(0, r * this.tileHeight * this.scale.y);
22613
- gfx.drawLine(pos.add(yOffset), pos.add(vec(width, yOffset.y)), Color.Red, 2);
22614
- }
22615
- for (let c = 0; c < this.columns + 1; c++) {
22616
- const xOffset = vec(c * this.tileWidth * this.scale.x, 0);
22617
- gfx.drawLine(pos.add(xOffset), pos.add(vec(xOffset.x, height)), Color.Red, 2);
22716
+ if (showGrid || showAll) {
22717
+ for (let r = 0; r < this.rows + 1; r++) {
22718
+ const yOffset = vec(0, r * this.tileHeight * this.scale.y);
22719
+ gfx.drawLine(pos.add(yOffset), pos.add(vec(width, yOffset.y)), gridColor, gridWidth);
22720
+ }
22721
+ for (let c = 0; c < this.columns + 1; c++) {
22722
+ const xOffset = vec(c * this.tileWidth * this.scale.x, 0);
22723
+ gfx.drawLine(pos.add(xOffset), pos.add(vec(xOffset.x, height)), gridColor, gridWidth);
22724
+ }
22618
22725
  }
22619
- const colliders = this._composite.getColliders();
22620
- gfx.save();
22621
- gfx.translate(this.pos.x, this.pos.y);
22622
- gfx.scale(this.scale.x, this.scale.y);
22623
- for (const collider of colliders) {
22624
- const grayish = Color.Gray;
22625
- grayish.a = 0.5;
22626
- const bounds = collider.localBounds;
22627
- const pos = collider.worldPos.sub(this.pos);
22628
- gfx.drawRectangle(pos, bounds.width, bounds.height, grayish);
22726
+ if (showAll || showColliderBounds || showColliderGeometry) {
22727
+ const colliders = this._composite.getColliders();
22728
+ gfx.save();
22729
+ gfx.translate(this.pos.x, this.pos.y);
22730
+ gfx.scale(this.scale.x, this.scale.y);
22731
+ for (const collider of colliders) {
22732
+ const bounds = collider.localBounds;
22733
+ const pos = collider.worldPos.sub(this.pos);
22734
+ if (showColliderBounds) {
22735
+ gfx.drawRectangle(pos, bounds.width, bounds.height, colliderBoundsColor);
22736
+ }
22737
+ }
22738
+ gfx.restore();
22739
+ if (showColliderGeometry) {
22740
+ for (const collider of colliders) {
22741
+ collider.debug(gfx, colliderGeometryColor);
22742
+ }
22743
+ }
22629
22744
  }
22630
- gfx.restore();
22631
- gfx.save();
22632
- gfx.z = 999;
22633
- this._quadTree.debug(gfx);
22634
- for (let i = 0; i < this.tiles.length; i++) {
22635
- this.tiles[i].bounds.draw(gfx);
22745
+ if (showAll || showQuadTree || showColliderBounds) {
22746
+ gfx.save();
22747
+ gfx.z = 999;
22748
+ if (showQuadTree) {
22749
+ this._quadTree.debug(gfx);
22750
+ }
22751
+ if (showColliderBounds) {
22752
+ for (let i = 0; i < this.tiles.length; i++) {
22753
+ this.tiles[i].bounds.draw(gfx);
22754
+ }
22755
+ }
22756
+ gfx.restore();
22636
22757
  }
22637
- gfx.restore();
22638
22758
  }
22639
22759
  }
22640
22760
  /**
@@ -26060,7 +26180,7 @@ class DebugSystem extends System {
26060
26180
  if (!debugDraw.useTransform) {
26061
26181
  this._graphicsContext.restore();
26062
26182
  }
26063
- debugDraw.draw(this._graphicsContext);
26183
+ debugDraw.draw(this._graphicsContext, this._engine.debug);
26064
26184
  if (!debugDraw.useTransform) {
26065
26185
  this._graphicsContext.save();
26066
26186
  this._applyTransform(entity);
@@ -27061,7 +27181,7 @@ var ColorBlindnessMode;
27061
27181
  })(ColorBlindnessMode || (ColorBlindnessMode = {}));
27062
27182
 
27063
27183
  ;// CONCATENATED MODULE: ./Graphics/PostProcessor/color-blind-fragment.glsl
27064
- /* harmony default export */ const color_blind_fragment = ("#version 300 es\r\nprecision mediump float;\r\n// our texture\r\nuniform sampler2D u_image;\r\n// the texCoords passed in from the vertex shader.\r\nin vec2 v_texcoord;\r\n\r\n// color blind type\r\nuniform int u_type;\r\n\r\n// simulation?\r\nuniform bool u_simulate;\r\n\r\nout vec4 fragColor;\r\n\r\nvoid main() {\r\n vec4 o = texture(u_image, v_texcoord);\r\n // RGB to LMS matrix conversion\r\n float L = (17.8824 * o.r) + (43.5161 * o.g) + (4.11935 * o.b);\r\n float M = (3.45565 * o.r) + (27.1554 * o.g) + (3.86714 * o.b);\r\n float S = (0.0299566 * o.r) + (0.184309 * o.g) + (1.46709 * o.b);\r\n // Simulate color blindness\r\n float l;\r\n float m;\r\n float s;\r\n //MODE CODE//\r\n if (u_type == 0) {\r\n // Protanope\r\n l = 0.0 * L + 2.02344 * M + -2.52581 * S;\r\n m = 0.0 * L + 1.0 * M + 0.0 * S;\r\n s = 0.0 * L + 0.0 * M + 1.0 * S;;\r\n } else if (u_type == 1) {\r\n // Deuteranope\r\n l = 1.0 * L + 0.0 * M + 0.0 * S;\r\n m = 0.494207 * L + 0.0 * M + 1.24827 * S;\r\n s = 0.0 * L + 0.0 * M + 1.0 * S;\r\n } else if (u_type == 2) {\r\n // Tritanope\r\n l = 1.0 * L + 0.0 * M + 0.0 * S;\r\n m = 0.0 * L + 1.0 * M + 0.0 * S;\r\n s = -0.395913 * L + 0.801109 * M + 0.0 * S;\r\n }\r\n\r\n // LMS to RGB matrix conversion\r\n vec4 error; // simulate the colors\r\n error.r = (0.0809444479 * l) + (-0.130504409 * m) + (0.116721066 * s);\r\n error.g = (-0.0102485335 * l) + (0.0540193266 * m) + (-0.113614708 * s);\r\n error.b = (-0.000365296938 * l) + (-0.00412161469 * m) + (0.693511405 * s);\r\n error.a = 1.0;\r\n vec4 diff = o - error;\r\n vec4 correction; // correct the colors\r\n correction.r = 0.0;\r\n correction.g = (diff.r * 0.7) + (diff.g * 1.0);\r\n correction.b = (diff.r * 0.7) + (diff.b * 1.0);\r\n correction = o + correction;\r\n correction.a = o.a;\r\n //SIMULATE//\r\n\r\n // sim \r\n if (u_simulate) {\r\n fragColor = error.rgba;\r\n } else {\r\n fragColor = correction.rgba;\r\n }\r\n}");
27184
+ /* harmony default export */ const color_blind_fragment = ("#version 300 es\nprecision mediump float;\n// our texture\nuniform sampler2D u_image;\n// the texCoords passed in from the vertex shader.\nin vec2 v_texcoord;\n\n// color blind type\nuniform int u_type;\n\n// simulation?\nuniform bool u_simulate;\n\nout vec4 fragColor;\n\nvoid main() {\n vec4 o = texture(u_image, v_texcoord);\n // RGB to LMS matrix conversion\n float L = (17.8824 * o.r) + (43.5161 * o.g) + (4.11935 * o.b);\n float M = (3.45565 * o.r) + (27.1554 * o.g) + (3.86714 * o.b);\n float S = (0.0299566 * o.r) + (0.184309 * o.g) + (1.46709 * o.b);\n // Simulate color blindness\n float l;\n float m;\n float s;\n //MODE CODE//\n if (u_type == 0) {\n // Protanope\n l = 0.0 * L + 2.02344 * M + -2.52581 * S;\n m = 0.0 * L + 1.0 * M + 0.0 * S;\n s = 0.0 * L + 0.0 * M + 1.0 * S;;\n } else if (u_type == 1) {\n // Deuteranope\n l = 1.0 * L + 0.0 * M + 0.0 * S;\n m = 0.494207 * L + 0.0 * M + 1.24827 * S;\n s = 0.0 * L + 0.0 * M + 1.0 * S;\n } else if (u_type == 2) {\n // Tritanope\n l = 1.0 * L + 0.0 * M + 0.0 * S;\n m = 0.0 * L + 1.0 * M + 0.0 * S;\n s = -0.395913 * L + 0.801109 * M + 0.0 * S;\n }\n\n // LMS to RGB matrix conversion\n vec4 error; // simulate the colors\n error.r = (0.0809444479 * l) + (-0.130504409 * m) + (0.116721066 * s);\n error.g = (-0.0102485335 * l) + (0.0540193266 * m) + (-0.113614708 * s);\n error.b = (-0.000365296938 * l) + (-0.00412161469 * m) + (0.693511405 * s);\n error.a = 1.0;\n vec4 diff = o - error;\n vec4 correction; // correct the colors\n correction.r = 0.0;\n correction.g = (diff.r * 0.7) + (diff.g * 1.0);\n correction.b = (diff.r * 0.7) + (diff.b * 1.0);\n correction = o + correction;\n correction.a = o.a;\n //SIMULATE//\n\n // sim \n if (u_simulate) {\n fragColor = error.rgba;\n } else {\n fragColor = correction.rgba;\n }\n}");
27065
27185
  ;// CONCATENATED MODULE: ./Graphics/PostProcessor/ScreenShader.ts
27066
27186
 
27067
27187
 
@@ -27076,15 +27196,15 @@ class ScreenShader {
27076
27196
  constructor(gl, fragmentSource) {
27077
27197
  this._shader = new Shader({
27078
27198
  gl,
27079
- vertexSource: `#version 300 es
27080
- in vec2 a_position;
27081
- in vec2 a_texcoord;
27082
- out vec2 v_texcoord;
27083
-
27084
- void main() {
27085
- gl_Position = vec4(a_position, 0.0, 1.0);
27086
- // Pass the texcoord to the fragment shader.
27087
- v_texcoord = a_texcoord;
27199
+ vertexSource: `#version 300 es
27200
+ in vec2 a_position;
27201
+ in vec2 a_texcoord;
27202
+ out vec2 v_texcoord;
27203
+
27204
+ void main() {
27205
+ gl_Position = vec4(a_position, 0.0, 1.0);
27206
+ // Pass the texcoord to the fragment shader.
27207
+ v_texcoord = a_texcoord;
27088
27208
  }`,
27089
27209
  fragmentSource: fragmentSource
27090
27210
  });
@@ -27340,6 +27460,17 @@ class Debug {
27340
27460
  focusColor: Color.Red,
27341
27461
  showZoom: false
27342
27462
  };
27463
+ this.tilemap = {
27464
+ showAll: false,
27465
+ showGrid: false,
27466
+ gridColor: Color.Red,
27467
+ gridWidth: .5,
27468
+ showSolidBounds: false,
27469
+ solidBoundsColor: Color.fromHex('#8080807F'), // grayish
27470
+ showColliderGeometry: true,
27471
+ colliderGeometryColor: Color.Green,
27472
+ showQuadTree: false
27473
+ };
27343
27474
  this._engine = engine;
27344
27475
  this.colorBlindMode = new ColorBlindFlags(this._engine);
27345
27476
  }
@@ -28979,9 +29110,9 @@ class Engine {
28979
29110
  // eslint-disable-next-line no-console
28980
29111
  console.log(`%cPowered by Excalibur.js (v${EX_VERSION})`, 'background: #176BAA; color: white; border-radius: 5px; padding: 15px; font-size: 1.5em; line-height: 80px;');
28981
29112
  // eslint-disable-next-line no-console
28982
- console.log('\n\
28983
- /| ________________\n\
28984
- O|===|* >________________>\n\
29113
+ console.log('\n\
29114
+ /| ________________\n\
29115
+ O|===|* >________________>\n\
28985
29116
  \\|');
28986
29117
  // eslint-disable-next-line no-console
28987
29118
  console.log('Visit', 'http://excaliburjs.com', 'for more information');
@@ -31121,7 +31252,7 @@ class Semaphore {
31121
31252
  * The current Excalibur version string
31122
31253
  * @description `process.env.__EX_VERSION` gets replaced by Webpack on build
31123
31254
  */
31124
- const EX_VERSION = "0.28.3";
31255
+ const EX_VERSION = "0.29.0-alpha.2+5c28d4e";
31125
31256
 
31126
31257
  polyfill();
31127
31258
  // This file is used as the bundle entry point and exports everything