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
@@ -22,129 +22,129 @@
22
22
 
23
23
  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()));
24
24
  // Module
25
- ___CSS_LOADER_EXPORT___.push([module.id, `/* Buttons styles start */
26
-
27
- button#excalibur-play {
28
- display: inline-block;
29
- position: relative;
30
- z-index: 999;
31
- border-radius: 6px;
32
- border: none;
33
- /*border: 3px solid;
34
- border-color: white;
35
- box-shadow: 0 0 10px #ccc;*/
36
- padding: 1rem 1.5rem 1rem 4rem;
37
- margin: 0;
38
- text-decoration: none;
39
- background: #00b233;
40
- color: #ffffff;
41
- font-family: sans-serif;
42
- font-size: 2rem;
43
- white-space: nowrap;
44
- line-height: 1;
45
- cursor: pointer;
46
- text-align: center;
47
- transition: background 250ms ease-in-out, transform 150ms ease;
48
- -webkit-appearance: none;
49
- -moz-appearance: none;
50
-
51
- -webkit-animation: excalibur-button-fadein 200ms; /* Safari, Chrome and Opera > 12.1 */
52
- -moz-animation: excalibur-button-fadein 200ms; /* Firefox < 16 */
53
- -ms-animation: excalibur-button-fadein 200ms; /* Internet Explorer */
54
- -o-animation: excalibur-button-fadein 200ms; /* Opera < 12.1 */
55
- animation: excalibur-button-fadein 200ms;
56
- }
57
-
58
- /*
59
- button#excalibur-play {
60
- display: none;
61
- }*/
62
-
63
- button#excalibur-play:after {
64
- position: absolute;
65
- content: '';
66
- border: 8px solid;
67
- border-color: transparent transparent transparent white;
68
- left: 35px;
69
- top: 24px;
70
- width: 0;
71
- height: 0;
72
- }
73
-
74
- button#excalibur-play:before {
75
- position: absolute;
76
- content: '';
77
- border: 3px solid;
78
- left: 19px;
79
- top: 14px;
80
- border-radius: 20px;
81
- width: 30px;
82
- height: 30px;
83
- }
84
-
85
- button#excalibur-play:hover,
86
- button#excalibur-play:focus {
87
- background: #00982c;
88
- }
89
-
90
- button#excalibur-play:focus {
91
- outline: 1px solid #fff;
92
- outline-offset: -4px;
93
- }
94
-
95
- button#excalibur-play:active {
96
- transform: scale(0.99);
97
- }
98
-
99
- @keyframes excalibur-button-fadein {
100
- from {
101
- opacity: 0;
102
- }
103
- to {
104
- opacity: 1;
105
- }
106
- }
107
-
108
- /* Firefox < 16 */
109
- @-moz-keyframes excalibur-button-fadein {
110
- from {
111
- opacity: 0;
112
- }
113
- to {
114
- opacity: 1;
115
- }
116
- }
117
-
118
- /* Safari, Chrome and Opera > 12.1 */
119
- @-webkit-keyframes excalibur-button-fadein {
120
- from {
121
- opacity: 0;
122
- }
123
- to {
124
- opacity: 1;
125
- }
126
- }
127
-
128
- /* Internet Explorer */
129
- @-ms-keyframes excalibur-button-fadein {
130
- from {
131
- opacity: 0;
132
- }
133
- to {
134
- opacity: 1;
135
- }
136
- }
137
-
138
- /* Opera < 12.1 */
139
- @-o-keyframes excalibur-button-fadein {
140
- from {
141
- opacity: 0;
142
- }
143
- to {
144
- opacity: 1;
145
- }
146
- }
147
- `, "",{"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":""}]);
25
+ ___CSS_LOADER_EXPORT___.push([module.id, `/* Buttons styles start */
26
+
27
+ button#excalibur-play {
28
+ display: inline-block;
29
+ position: relative;
30
+ z-index: 999;
31
+ border-radius: 6px;
32
+ border: none;
33
+ /*border: 3px solid;
34
+ border-color: white;
35
+ box-shadow: 0 0 10px #ccc;*/
36
+ padding: 1rem 1.5rem 1rem 4rem;
37
+ margin: 0;
38
+ text-decoration: none;
39
+ background: #00b233;
40
+ color: #ffffff;
41
+ font-family: sans-serif;
42
+ font-size: 2rem;
43
+ white-space: nowrap;
44
+ line-height: 1;
45
+ cursor: pointer;
46
+ text-align: center;
47
+ transition: background 250ms ease-in-out, transform 150ms ease;
48
+ -webkit-appearance: none;
49
+ -moz-appearance: none;
50
+
51
+ -webkit-animation: excalibur-button-fadein 200ms; /* Safari, Chrome and Opera > 12.1 */
52
+ -moz-animation: excalibur-button-fadein 200ms; /* Firefox < 16 */
53
+ -ms-animation: excalibur-button-fadein 200ms; /* Internet Explorer */
54
+ -o-animation: excalibur-button-fadein 200ms; /* Opera < 12.1 */
55
+ animation: excalibur-button-fadein 200ms;
56
+ }
57
+
58
+ /*
59
+ button#excalibur-play {
60
+ display: none;
61
+ }*/
62
+
63
+ button#excalibur-play:after {
64
+ position: absolute;
65
+ content: '';
66
+ border: 8px solid;
67
+ border-color: transparent transparent transparent white;
68
+ left: 35px;
69
+ top: 24px;
70
+ width: 0;
71
+ height: 0;
72
+ }
73
+
74
+ button#excalibur-play:before {
75
+ position: absolute;
76
+ content: '';
77
+ border: 3px solid;
78
+ left: 19px;
79
+ top: 14px;
80
+ border-radius: 20px;
81
+ width: 30px;
82
+ height: 30px;
83
+ }
84
+
85
+ button#excalibur-play:hover,
86
+ button#excalibur-play:focus {
87
+ background: #00982c;
88
+ }
89
+
90
+ button#excalibur-play:focus {
91
+ outline: 1px solid #fff;
92
+ outline-offset: -4px;
93
+ }
94
+
95
+ button#excalibur-play:active {
96
+ transform: scale(0.99);
97
+ }
98
+
99
+ @keyframes excalibur-button-fadein {
100
+ from {
101
+ opacity: 0;
102
+ }
103
+ to {
104
+ opacity: 1;
105
+ }
106
+ }
107
+
108
+ /* Firefox < 16 */
109
+ @-moz-keyframes excalibur-button-fadein {
110
+ from {
111
+ opacity: 0;
112
+ }
113
+ to {
114
+ opacity: 1;
115
+ }
116
+ }
117
+
118
+ /* Safari, Chrome and Opera > 12.1 */
119
+ @-webkit-keyframes excalibur-button-fadein {
120
+ from {
121
+ opacity: 0;
122
+ }
123
+ to {
124
+ opacity: 1;
125
+ }
126
+ }
127
+
128
+ /* Internet Explorer */
129
+ @-ms-keyframes excalibur-button-fadein {
130
+ from {
131
+ opacity: 0;
132
+ }
133
+ to {
134
+ opacity: 1;
135
+ }
136
+ }
137
+
138
+ /* Opera < 12.1 */
139
+ @-o-keyframes excalibur-button-fadein {
140
+ from {
141
+ opacity: 0;
142
+ }
143
+ to {
144
+ opacity: 1;
145
+ }
146
+ }
147
+ `, "",{"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":""}]);
148
148
  // Exports
149
149
  /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);
150
150
 
@@ -166,35 +166,35 @@ button#excalibur-play:active {
166
166
 
167
167
  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()));
168
168
  // Module
169
- ___CSS_LOADER_EXPORT___.push([module.id, `
170
- #ex-toast-container {
171
- position: absolute;
172
- height: 0;
173
- min-width: 50%;
174
- left: 50%;
175
- top: 0;
176
- }
177
-
178
- .ex-toast-message {
179
- left: -50%;
180
- position: relative;
181
- display: flex;
182
- justify-content: space-between;
183
-
184
-
185
- padding: 10px;
186
- margin-top: 5px;
187
- font-size: 18px;
188
- font-family: sans-serif;
189
- border-radius: 6px;
190
- border: 3px solid #b7b779;
191
- background-color: rgb(253, 253, 192);
192
- }
193
-
194
-
195
- .ex-toast-message button {
196
- align-self: flex-start;
197
- }`, "",{"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":""}]);
169
+ ___CSS_LOADER_EXPORT___.push([module.id, `
170
+ #ex-toast-container {
171
+ position: absolute;
172
+ height: 0;
173
+ min-width: 50%;
174
+ left: 50%;
175
+ top: 0;
176
+ }
177
+
178
+ .ex-toast-message {
179
+ left: -50%;
180
+ position: relative;
181
+ display: flex;
182
+ justify-content: space-between;
183
+
184
+
185
+ padding: 10px;
186
+ margin-top: 5px;
187
+ font-size: 18px;
188
+ font-family: sans-serif;
189
+ border-radius: 6px;
190
+ border: 3px solid #b7b779;
191
+ background-color: rgb(253, 253, 192);
192
+ }
193
+
194
+
195
+ .ex-toast-message button {
196
+ align-self: flex-start;
197
+ }`, "",{"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":""}]);
198
198
  // Exports
199
199
  /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);
200
200
 
@@ -2690,6 +2690,7 @@ __webpack_require__.d(Util_Index_namespaceObject, {
2690
2690
  delay: () => (delay),
2691
2691
  fail: () => (fail),
2692
2692
  getPosition: () => (getPosition),
2693
+ omit: () => (omit),
2693
2694
  removeItemFromArray: () => (removeItemFromArray)
2694
2695
  });
2695
2696
 
@@ -6063,6 +6064,20 @@ function delay(milliseconds, clock) {
6063
6064
  }, milliseconds);
6064
6065
  return future.promise;
6065
6066
  }
6067
+ /**
6068
+ * Remove keys from object literals
6069
+ * @param object
6070
+ * @param keys
6071
+ */
6072
+ function omit(object, keys) {
6073
+ const newObj = {};
6074
+ for (const key in object) {
6075
+ if (!keys.includes(key)) {
6076
+ newObj[key] = object[key];
6077
+ }
6078
+ }
6079
+ return newObj;
6080
+ }
6066
6081
 
6067
6082
  ;// CONCATENATED MODULE: ./Math/matrix.ts
6068
6083
 
@@ -6513,11 +6528,11 @@ class Matrix {
6513
6528
  this.data[15] === 1);
6514
6529
  }
6515
6530
  toString() {
6516
- return `
6517
- [${this.data[0]} ${this.data[4]} ${this.data[8]} ${this.data[12]}]
6518
- [${this.data[1]} ${this.data[5]} ${this.data[9]} ${this.data[13]}]
6519
- [${this.data[2]} ${this.data[6]} ${this.data[10]} ${this.data[14]}]
6520
- [${this.data[3]} ${this.data[7]} ${this.data[11]} ${this.data[15]}]
6531
+ return `
6532
+ [${this.data[0]} ${this.data[4]} ${this.data[8]} ${this.data[12]}]
6533
+ [${this.data[1]} ${this.data[5]} ${this.data[9]} ${this.data[13]}]
6534
+ [${this.data[2]} ${this.data[6]} ${this.data[10]} ${this.data[14]}]
6535
+ [${this.data[3]} ${this.data[7]} ${this.data[11]} ${this.data[15]}]
6521
6536
  `;
6522
6537
  }
6523
6538
  }
@@ -6846,10 +6861,10 @@ class AffineMatrix {
6846
6861
  return mat;
6847
6862
  }
6848
6863
  toString() {
6849
- return `
6850
- [${this.data[0]} ${this.data[2]} ${this.data[4]}]
6851
- [${this.data[1]} ${this.data[3]} ${this.data[5]}]
6852
- [0 0 1]
6864
+ return `
6865
+ [${this.data[0]} ${this.data[2]} ${this.data[4]}]
6866
+ [${this.data[1]} ${this.data[3]} ${this.data[5]}]
6867
+ [0 0 1]
6853
6868
  `;
6854
6869
  }
6855
6870
  }
@@ -7145,7 +7160,7 @@ class Graphic {
7145
7160
  this._transformStale = true;
7146
7161
  }
7147
7162
  constructor(options) {
7148
- var _a, _b, _c, _d, _e, _f;
7163
+ var _a, _b, _c, _d, _e, _f, _g;
7149
7164
  this.id = Graphic._ID++;
7150
7165
  this.transform = AffineMatrix.identity();
7151
7166
  this.tint = null;
@@ -7172,16 +7187,20 @@ class Graphic {
7172
7187
  this.rotation = (_d = options.rotation) !== null && _d !== void 0 ? _d : this.rotation;
7173
7188
  this.opacity = (_e = options.opacity) !== null && _e !== void 0 ? _e : this.opacity;
7174
7189
  this.scale = (_f = options.scale) !== null && _f !== void 0 ? _f : this.scale;
7190
+ this.tint = (_g = options.tint) !== null && _g !== void 0 ? _g : this.tint;
7175
7191
  }
7176
7192
  }
7177
7193
  cloneGraphicOptions() {
7178
7194
  return {
7195
+ width: this.width / this.scale.x,
7196
+ height: this.height / this.scale.y,
7179
7197
  origin: this.origin ? this.origin.clone() : null,
7180
7198
  flipHorizontal: this.flipHorizontal,
7181
7199
  flipVertical: this.flipVertical,
7182
7200
  rotation: this.rotation,
7183
7201
  opacity: this.opacity,
7184
- scale: this.scale ? this.scale.clone() : null
7202
+ scale: this.scale ? this.scale.clone() : null,
7203
+ tint: this.tint ? this.tint.clone() : null
7185
7204
  };
7186
7205
  }
7187
7206
  /**
@@ -8005,9 +8024,9 @@ class RenderTarget {
8005
8024
  }
8006
8025
 
8007
8026
  ;// CONCATENATED MODULE: ./Graphics/Context/line-renderer/line-vertex.glsl
8008
- /* 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}");
8027
+ /* 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}");
8009
8028
  ;// CONCATENATED MODULE: ./Graphics/Context/line-renderer/line-fragment.glsl
8010
- /* 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}");
8029
+ /* 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}");
8011
8030
  ;// CONCATENATED MODULE: ./Graphics/Context/webgl-util.ts
8012
8031
  /**
8013
8032
  * Return the size of the GlType in bytes
@@ -8708,9 +8727,9 @@ class LineRenderer {
8708
8727
  }
8709
8728
 
8710
8729
  ;// CONCATENATED MODULE: ./Graphics/Context/point-renderer/point-vertex.glsl
8711
- /* 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}");
8730
+ /* 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}");
8712
8731
  ;// CONCATENATED MODULE: ./Graphics/Context/point-renderer/point-fragment.glsl
8713
- /* 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}");
8732
+ /* 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}");
8714
8733
  ;// CONCATENATED MODULE: ./Graphics/Context/point-renderer/point-renderer.ts
8715
8734
 
8716
8735
 
@@ -8804,9 +8823,9 @@ class PointRenderer {
8804
8823
  }
8805
8824
 
8806
8825
  ;// CONCATENATED MODULE: ./Graphics/Context/screen-pass-painter/screen-vertex.glsl
8807
- /* 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}");
8826
+ /* 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}");
8808
8827
  ;// CONCATENATED MODULE: ./Graphics/Context/screen-pass-painter/screen-fragment.glsl
8809
- /* 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}");
8828
+ /* 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}");
8810
8829
  ;// CONCATENATED MODULE: ./Graphics/Context/screen-pass-painter/screen-pass-painter.ts
8811
8830
 
8812
8831
 
@@ -8933,9 +8952,9 @@ class QuadIndexBuffer {
8933
8952
  }
8934
8953
 
8935
8954
  ;// CONCATENATED MODULE: ./Graphics/Context/image-renderer/image-renderer.frag.glsl
8936
- /* 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}");
8955
+ /* 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}");
8937
8956
  ;// CONCATENATED MODULE: ./Graphics/Context/image-renderer/image-renderer.vert.glsl
8938
- /* 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}");
8957
+ /* 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}");
8939
8958
  ;// CONCATENATED MODULE: ./Graphics/Context/image-renderer/image-renderer.ts
8940
8959
 
8941
8960
 
@@ -9184,9 +9203,9 @@ class ImageRenderer {
9184
9203
  }
9185
9204
 
9186
9205
  ;// CONCATENATED MODULE: ./Graphics/Context/rectangle-renderer/rectangle-renderer.frag.glsl
9187
- /* 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}");
9206
+ /* 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}");
9188
9207
  ;// CONCATENATED MODULE: ./Graphics/Context/rectangle-renderer/rectangle-renderer.vert.glsl
9189
- /* 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}");
9208
+ /* 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}");
9190
9209
  ;// CONCATENATED MODULE: ./Graphics/Context/rectangle-renderer/rectangle-renderer.ts
9191
9210
 
9192
9211
 
@@ -9494,9 +9513,9 @@ class RectangleRenderer {
9494
9513
  }
9495
9514
 
9496
9515
  ;// CONCATENATED MODULE: ./Graphics/Context/circle-renderer/circle-renderer.frag.glsl
9497
- /* 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}");
9516
+ /* 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}");
9498
9517
  ;// CONCATENATED MODULE: ./Graphics/Context/circle-renderer/circle-renderer.vert.glsl
9499
- /* 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}");
9518
+ /* 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}");
9500
9519
  ;// CONCATENATED MODULE: ./Graphics/Context/circle-renderer/circle-renderer.ts
9501
9520
 
9502
9521
 
@@ -9766,22 +9785,26 @@ class DrawCall {
9766
9785
 
9767
9786
  ;// CONCATENATED MODULE: ./Graphics/Context/material.ts
9768
9787
 
9769
- const defaultVertexSource = `#version 300 es
9770
- in vec2 a_position;
9771
-
9772
- in vec2 a_uv;
9773
- out vec2 v_uv;
9774
-
9775
- uniform mat4 u_matrix;
9776
- uniform mat4 u_transform;
9777
-
9778
- void main() {
9779
- // Set the vertex position using the ortho & transform matrix
9780
- gl_Position = u_matrix * u_transform * vec4(a_position, 0.0, 1.0);
9781
-
9782
- // Pass through the UV coord to the fragment shader
9783
- v_uv = a_uv;
9784
- }
9788
+ const defaultVertexSource = `#version 300 es
9789
+ in vec2 a_position;
9790
+
9791
+ in vec2 a_uv;
9792
+ out vec2 v_uv;
9793
+
9794
+ in vec2 a_screenuv;
9795
+ out vec2 v_screenuv;
9796
+
9797
+ uniform mat4 u_matrix;
9798
+ uniform mat4 u_transform;
9799
+
9800
+ void main() {
9801
+ // Set the vertex position using the ortho & transform matrix
9802
+ gl_Position = u_matrix * u_transform * vec4(a_position, 0.0, 1.0);
9803
+
9804
+ // Pass through the UV coord to the fragment shader
9805
+ v_uv = a_uv;
9806
+ v_screenuv = a_screenuv;
9807
+ }
9785
9808
  `;
9786
9809
  class Material {
9787
9810
  constructor(options) {
@@ -9808,6 +9831,15 @@ class Material {
9808
9831
  var _a;
9809
9832
  return (_a = this._name) !== null && _a !== void 0 ? _a : 'anonymous material';
9810
9833
  }
9834
+ get isUsingScreenTexture() {
9835
+ return this._fragmentSource.includes('u_screen_texture');
9836
+ }
9837
+ update(callback) {
9838
+ if (this._shader) {
9839
+ this._shader.use();
9840
+ callback(this._shader);
9841
+ }
9842
+ }
9811
9843
  getShader() {
9812
9844
  return this._shader;
9813
9845
  }
@@ -9843,7 +9875,7 @@ class MaterialRenderer {
9843
9875
  // Setup memory layout
9844
9876
  this._buffer = new VertexBuffer({
9845
9877
  gl,
9846
- size: 4 * 4, // 4 components * 4 verts
9878
+ size: 6 * 4, // 6 components * 4 verts
9847
9879
  type: 'dynamic'
9848
9880
  });
9849
9881
  // Setup a vertex layout/buffer to the material
@@ -9852,7 +9884,8 @@ class MaterialRenderer {
9852
9884
  vertexBuffer: this._buffer,
9853
9885
  attributes: [
9854
9886
  ['a_position', 2],
9855
- ['a_uv', 2]
9887
+ ['a_uv', 2],
9888
+ ['a_screenuv', 2]
9856
9889
  ]
9857
9890
  });
9858
9891
  // Setup index buffer
@@ -9898,26 +9931,40 @@ class MaterialRenderer {
9898
9931
  const uvy0 = (sy) / imageHeight;
9899
9932
  const uvx1 = (sx + sw - 0.01) / imageWidth;
9900
9933
  const uvy1 = (sy + sh - 0.01) / imageHeight;
9934
+ const topLeftScreen = transform.getPosition();
9935
+ const bottomRightScreen = topLeftScreen.add(bottomRight);
9936
+ const screenUVX0 = topLeftScreen.x / this._context.width;
9937
+ const screenUVY0 = topLeftScreen.y / this._context.height;
9938
+ const screenUVX1 = bottomRightScreen.x / this._context.width;
9939
+ const screenUVY1 = bottomRightScreen.y / this._context.height;
9901
9940
  // (0, 0) - 0
9902
9941
  vertexBuffer[vertexIndex++] = topLeft.x;
9903
9942
  vertexBuffer[vertexIndex++] = topLeft.y;
9904
9943
  vertexBuffer[vertexIndex++] = uvx0;
9905
9944
  vertexBuffer[vertexIndex++] = uvy0;
9945
+ vertexBuffer[vertexIndex++] = screenUVX0;
9946
+ vertexBuffer[vertexIndex++] = screenUVY0;
9906
9947
  // (0, 1) - 1
9907
9948
  vertexBuffer[vertexIndex++] = bottomLeft.x;
9908
9949
  vertexBuffer[vertexIndex++] = bottomLeft.y;
9909
9950
  vertexBuffer[vertexIndex++] = uvx0;
9910
9951
  vertexBuffer[vertexIndex++] = uvy1;
9952
+ vertexBuffer[vertexIndex++] = screenUVX0;
9953
+ vertexBuffer[vertexIndex++] = screenUVY1;
9911
9954
  // (1, 0) - 2
9912
9955
  vertexBuffer[vertexIndex++] = topRight.x;
9913
9956
  vertexBuffer[vertexIndex++] = topRight.y;
9914
9957
  vertexBuffer[vertexIndex++] = uvx1;
9915
9958
  vertexBuffer[vertexIndex++] = uvy0;
9959
+ vertexBuffer[vertexIndex++] = screenUVX1;
9960
+ vertexBuffer[vertexIndex++] = screenUVY0;
9916
9961
  // (1, 1) - 3
9917
9962
  vertexBuffer[vertexIndex++] = bottomRight.x;
9918
9963
  vertexBuffer[vertexIndex++] = bottomRight.y;
9919
9964
  vertexBuffer[vertexIndex++] = uvx1;
9920
9965
  vertexBuffer[vertexIndex++] = uvy1;
9966
+ vertexBuffer[vertexIndex++] = screenUVX1;
9967
+ vertexBuffer[vertexIndex++] = screenUVY1;
9921
9968
  // This creates and uploads the texture if not already done
9922
9969
  const texture = this._addImageAsTexture(image);
9923
9970
  // apply material
@@ -9925,6 +9972,8 @@ class MaterialRenderer {
9925
9972
  this._layout.shader = shader;
9926
9973
  // apply layout and geometry
9927
9974
  this._layout.use(true);
9975
+ // apply time in ms since the page (performance.now())
9976
+ shader.trySetUniformFloat('u_time_ms', performance.now());
9928
9977
  // apply opacity
9929
9978
  shader.trySetUniformFloat('u_opacity', opacity);
9930
9979
  // apply resolution
@@ -9941,6 +9990,10 @@ class MaterialRenderer {
9941
9990
  gl.activeTexture(gl.TEXTURE0 + 0);
9942
9991
  gl.bindTexture(gl.TEXTURE_2D, texture);
9943
9992
  shader.trySetUniformInt('u_graphic', 0);
9993
+ // bind the screen texture
9994
+ gl.activeTexture(gl.TEXTURE0 + 1);
9995
+ gl.bindTexture(gl.TEXTURE_2D, this._context.materialScreenTexture);
9996
+ shader.trySetUniformInt('u_screen_texture', 1);
9944
9997
  // bind quad index buffer
9945
9998
  this._quads.bind();
9946
9999
  // Draw a single quad
@@ -10143,6 +10196,14 @@ class ExcaliburGraphicsContextWebGL {
10143
10196
  this.register(new CircleRenderer());
10144
10197
  this.register(new PointRenderer());
10145
10198
  this.register(new LineRenderer());
10199
+ this.materialScreenTexture = gl.createTexture();
10200
+ gl.bindTexture(gl.TEXTURE_2D, this.materialScreenTexture);
10201
+ gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, this.width, this.height, 0, gl.RGBA, gl.UNSIGNED_BYTE, null);
10202
+ gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.NEAREST);
10203
+ gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.NEAREST);
10204
+ gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.REPEAT);
10205
+ gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.REPEAT);
10206
+ gl.bindTexture(gl.TEXTURE_2D, null);
10146
10207
  this._screenRenderer = new ScreenPassPainter(gl);
10147
10208
  this._renderTarget = new RenderTarget({
10148
10209
  gl,
@@ -10401,6 +10462,13 @@ class ExcaliburGraphicsContextWebGL {
10401
10462
  currentRendererName = this._drawCalls[i].renderer;
10402
10463
  currentRenderer = this._renderers.get(currentRendererName);
10403
10464
  }
10465
+ // ! hack to grab screen texture before materials run because they might want it
10466
+ if (currentRenderer instanceof MaterialRenderer && this.material.isUsingScreenTexture) {
10467
+ const gl = this.__gl;
10468
+ gl.bindTexture(gl.TEXTURE_2D, this.materialScreenTexture);
10469
+ gl.copyTexImage2D(gl.TEXTURE_2D, 0, gl.RGBA, 0, 0, this.width, this.height, 0);
10470
+ this._renderTarget.use();
10471
+ }
10404
10472
  // If we are still using the same renderer we can add to the current batch
10405
10473
  currentRenderer.draw(...this._drawCalls[i].args);
10406
10474
  }
@@ -11666,6 +11734,7 @@ var Loader_0 = __webpack_require__(1388);
11666
11734
 
11667
11735
 
11668
11736
 
11737
+
11669
11738
  /**
11670
11739
  * A Raster is a Graphic that needs to be first painted to a HTMLCanvasElement before it can be drawn to the
11671
11740
  * [[ExcaliburGraphicsContext]]. This is useful for generating custom images using the 2D canvas api.
@@ -11675,7 +11744,7 @@ var Loader_0 = __webpack_require__(1388);
11675
11744
  class Raster extends Graphic {
11676
11745
  constructor(options) {
11677
11746
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
11678
- super(options);
11747
+ super(omit(options, ['width', 'height'])); // rasters do some special sauce with width/height
11679
11748
  this.filtering = null;
11680
11749
  this.lineCap = 'butt';
11681
11750
  this.quality = 1;
@@ -14225,9 +14294,9 @@ class CollisionGroup {
14225
14294
  return CollisionGroupManager.create(combinedName, combinedMask);
14226
14295
  }
14227
14296
  toString() {
14228
- return `
14229
- category: ${this.category.toString(2).padStart(32, '0')}
14230
- mask: ${(this.mask >>> 0).toString(2).padStart(32, '0')}
14297
+ return `
14298
+ category: ${this.category.toString(2).padStart(32, '0')}
14299
+ mask: ${(this.mask >>> 0).toString(2).padStart(32, '0')}
14231
14300
  `;
14232
14301
  }
14233
14302
  }
@@ -20810,7 +20879,7 @@ class FontCache {
20810
20879
  const currentHashCodes = new Set();
20811
20880
  for (const [textInstance, time] of FontCache._TEXT_USAGE.entries()) {
20812
20881
  // if bitmap hasn't been used in 100 ms clear it
20813
- if (time + 100 < performance.now()) {
20882
+ if (time + FontCache.FONT_TIMEOUT < performance.now()) {
20814
20883
  FontCache._LOGGER.debug(`Text cache entry timed out ${textInstance.text}`);
20815
20884
  deferred.push(textInstance);
20816
20885
  textInstance.dispose();
@@ -20854,6 +20923,7 @@ class FontCache {
20854
20923
  FontCache._MEASURE_CACHE.clear();
20855
20924
  }
20856
20925
  }
20926
+ FontCache.FONT_TIMEOUT = 500;
20857
20927
  FontCache._LOGGER = Logger.getInstance();
20858
20928
  FontCache._TEXT_USAGE = new Map();
20859
20929
  FontCache._TEXT_CACHE = new Map();
@@ -22230,7 +22300,6 @@ class QuadTree {
22230
22300
 
22231
22301
 
22232
22302
 
22233
-
22234
22303
  const TileMapEvents = {
22235
22304
  PreUpdate: 'preupdate',
22236
22305
  PostUpdate: 'postupdate',
@@ -22348,7 +22417,7 @@ class TileMap extends Entity {
22348
22417
  this.addComponent(new GraphicsComponent({
22349
22418
  onPostDraw: (ctx, delta) => this.draw(ctx, delta)
22350
22419
  }));
22351
- this.addComponent(new DebugGraphicsComponent((ctx) => this.debug(ctx), false));
22420
+ this.addComponent(new DebugGraphicsComponent((ctx, debugFlags) => this.debug(ctx, debugFlags), false));
22352
22421
  this.addComponent(new ColliderComponent());
22353
22422
  this._graphics = this.get(GraphicsComponent);
22354
22423
  this._transform = this.get(TransformComponent);
@@ -22427,14 +22496,53 @@ class TileMap extends Entity {
22427
22496
  const colliders = [];
22428
22497
  this._composite = this._collider.useCompositeCollider([]);
22429
22498
  let current;
22430
- // Bad square tesselation algo
22499
+ /**
22500
+ * Returns wether or not the 2 boxes share an edge and are the same height
22501
+ * @param prev
22502
+ * @param next
22503
+ * @returns true if they share and edge, false if not
22504
+ */
22505
+ const shareEdges = (prev, next) => {
22506
+ if (prev && next) {
22507
+ // same top/bottom
22508
+ return prev.top === next.top &&
22509
+ prev.bottom === next.bottom &&
22510
+ // Shared right/left edge
22511
+ prev.right === next.left;
22512
+ }
22513
+ return false;
22514
+ };
22515
+ /**
22516
+ * Potentially merges the current collider into a list of previous ones, mutating the list
22517
+ * If checkAndCombine returns true, the collider was successfully merged and should be thrown away
22518
+ * @param current current collider to test
22519
+ * @param colliders List of colliders to consider merging with
22520
+ * @param maxLookBack The amount of colliders to look back for combindation
22521
+ * @returns false when no combination found, true when successfully combined
22522
+ */
22523
+ const checkAndCombine = (current, colliders, maxLookBack = 10) => {
22524
+ if (!current) {
22525
+ return false;
22526
+ }
22527
+ // walk backwards through the list of colliders and combine with the first that shares an edge
22528
+ for (let i = colliders.length - 1; i >= 0; i--) {
22529
+ if (maxLookBack-- < 0) {
22530
+ // blunt the O(n^2) algorithm a bit
22531
+ return false;
22532
+ }
22533
+ const prev = colliders[i];
22534
+ if (shareEdges(prev, current)) {
22535
+ colliders[i] = prev.combine(current);
22536
+ return true;
22537
+ }
22538
+ }
22539
+ return false;
22540
+ };
22541
+ // ? configurable bias perhaps, horizontal strips vs. vertical ones
22542
+ // Bad tile collider packing algorithm
22431
22543
  for (let i = 0; i < this.columns; i++) {
22432
22544
  // Scan column for colliders
22433
22545
  for (let j = 0; j < this.rows; j++) {
22434
- // Columns start with a new collider
22435
- if (j === 0) {
22436
- current = null;
22437
- }
22438
22546
  const tile = this.tiles[i + j * this.columns];
22439
22547
  // Current tile in column is solid build up current collider
22440
22548
  if (tile.solid) {
@@ -22448,7 +22556,7 @@ class TileMap extends Entity {
22448
22556
  this._composite.addCollider(collider);
22449
22557
  }
22450
22558
  //we push any current collider before nulling the current run
22451
- if (current) {
22559
+ if (current && !checkAndCombine(current, colliders)) {
22452
22560
  colliders.push(current);
22453
22561
  }
22454
22562
  current = null;
@@ -22467,24 +22575,20 @@ class TileMap extends Entity {
22467
22575
  }
22468
22576
  else {
22469
22577
  // Not solid skip and cut off the current collider
22470
- if (current) {
22578
+ // End of run check and combine
22579
+ if (current && !checkAndCombine(current, colliders)) {
22471
22580
  colliders.push(current);
22472
22581
  }
22473
22582
  current = null;
22474
22583
  }
22475
22584
  }
22476
22585
  // After a column is complete check to see if it can be merged into the last one
22477
- if (current) {
22478
- // if previous is the same combine it
22479
- const prev = colliders[colliders.length - 1];
22480
- if (prev && prev.top === current.top && prev.bottom === current.bottom) {
22481
- colliders[colliders.length - 1] = prev.combine(current);
22482
- }
22483
- else {
22484
- // else new collider
22485
- colliders.push(current);
22486
- }
22586
+ // Eno of run check and combine
22587
+ if (current && !checkAndCombine(current, colliders)) {
22588
+ // else new collider if no combination
22589
+ colliders.push(current);
22487
22590
  }
22591
+ current = null;
22488
22592
  }
22489
22593
  for (const c of colliders) {
22490
22594
  const collider = Shape.Box(c.width, c.height, Vector.Zero, vec(c.left - this.pos.x, c.top - this.pos.y));
@@ -22590,37 +22694,53 @@ class TileMap extends Entity {
22590
22694
  }
22591
22695
  this.emit('postdraw', new PostDrawEvent(ctx, delta, this));
22592
22696
  }
22593
- debug(gfx) {
22697
+ debug(gfx, debugFlags) {
22698
+ const { showAll, showGrid, gridColor, gridWidth, showSolidBounds: showColliderBounds, solidBoundsColor: colliderBoundsColor, showColliderGeometry, colliderGeometryColor, showQuadTree } = debugFlags.tilemap;
22594
22699
  const width = this.tileWidth * this.columns * this.scale.x;
22595
22700
  const height = this.tileHeight * this.rows * this.scale.y;
22596
22701
  const pos = this.pos;
22597
- for (let r = 0; r < this.rows + 1; r++) {
22598
- const yOffset = vec(0, r * this.tileHeight * this.scale.y);
22599
- gfx.drawLine(pos.add(yOffset), pos.add(vec(width, yOffset.y)), Color.Red, 2);
22600
- }
22601
- for (let c = 0; c < this.columns + 1; c++) {
22602
- const xOffset = vec(c * this.tileWidth * this.scale.x, 0);
22603
- gfx.drawLine(pos.add(xOffset), pos.add(vec(xOffset.x, height)), Color.Red, 2);
22702
+ if (showGrid || showAll) {
22703
+ for (let r = 0; r < this.rows + 1; r++) {
22704
+ const yOffset = vec(0, r * this.tileHeight * this.scale.y);
22705
+ gfx.drawLine(pos.add(yOffset), pos.add(vec(width, yOffset.y)), gridColor, gridWidth);
22706
+ }
22707
+ for (let c = 0; c < this.columns + 1; c++) {
22708
+ const xOffset = vec(c * this.tileWidth * this.scale.x, 0);
22709
+ gfx.drawLine(pos.add(xOffset), pos.add(vec(xOffset.x, height)), gridColor, gridWidth);
22710
+ }
22604
22711
  }
22605
- const colliders = this._composite.getColliders();
22606
- gfx.save();
22607
- gfx.translate(this.pos.x, this.pos.y);
22608
- gfx.scale(this.scale.x, this.scale.y);
22609
- for (const collider of colliders) {
22610
- const grayish = Color.Gray;
22611
- grayish.a = 0.5;
22612
- const bounds = collider.localBounds;
22613
- const pos = collider.worldPos.sub(this.pos);
22614
- gfx.drawRectangle(pos, bounds.width, bounds.height, grayish);
22712
+ if (showAll || showColliderBounds || showColliderGeometry) {
22713
+ const colliders = this._composite.getColliders();
22714
+ gfx.save();
22715
+ gfx.translate(this.pos.x, this.pos.y);
22716
+ gfx.scale(this.scale.x, this.scale.y);
22717
+ for (const collider of colliders) {
22718
+ const bounds = collider.localBounds;
22719
+ const pos = collider.worldPos.sub(this.pos);
22720
+ if (showColliderBounds) {
22721
+ gfx.drawRectangle(pos, bounds.width, bounds.height, colliderBoundsColor);
22722
+ }
22723
+ }
22724
+ gfx.restore();
22725
+ if (showColliderGeometry) {
22726
+ for (const collider of colliders) {
22727
+ collider.debug(gfx, colliderGeometryColor);
22728
+ }
22729
+ }
22615
22730
  }
22616
- gfx.restore();
22617
- gfx.save();
22618
- gfx.z = 999;
22619
- this._quadTree.debug(gfx);
22620
- for (let i = 0; i < this.tiles.length; i++) {
22621
- this.tiles[i].bounds.draw(gfx);
22731
+ if (showAll || showQuadTree || showColliderBounds) {
22732
+ gfx.save();
22733
+ gfx.z = 999;
22734
+ if (showQuadTree) {
22735
+ this._quadTree.debug(gfx);
22736
+ }
22737
+ if (showColliderBounds) {
22738
+ for (let i = 0; i < this.tiles.length; i++) {
22739
+ this.tiles[i].bounds.draw(gfx);
22740
+ }
22741
+ }
22742
+ gfx.restore();
22622
22743
  }
22623
- gfx.restore();
22624
22744
  }
22625
22745
  }
22626
22746
  /**
@@ -26046,7 +26166,7 @@ class DebugSystem extends System {
26046
26166
  if (!debugDraw.useTransform) {
26047
26167
  this._graphicsContext.restore();
26048
26168
  }
26049
- debugDraw.draw(this._graphicsContext);
26169
+ debugDraw.draw(this._graphicsContext, this._engine.debug);
26050
26170
  if (!debugDraw.useTransform) {
26051
26171
  this._graphicsContext.save();
26052
26172
  this._applyTransform(entity);
@@ -27047,7 +27167,7 @@ var ColorBlindnessMode;
27047
27167
  })(ColorBlindnessMode || (ColorBlindnessMode = {}));
27048
27168
 
27049
27169
  ;// CONCATENATED MODULE: ./Graphics/PostProcessor/color-blind-fragment.glsl
27050
- /* 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}");
27170
+ /* 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}");
27051
27171
  ;// CONCATENATED MODULE: ./Graphics/PostProcessor/ScreenShader.ts
27052
27172
 
27053
27173
 
@@ -27062,15 +27182,15 @@ class ScreenShader {
27062
27182
  constructor(gl, fragmentSource) {
27063
27183
  this._shader = new Shader({
27064
27184
  gl,
27065
- vertexSource: `#version 300 es
27066
- in vec2 a_position;
27067
- in vec2 a_texcoord;
27068
- out vec2 v_texcoord;
27069
-
27070
- void main() {
27071
- gl_Position = vec4(a_position, 0.0, 1.0);
27072
- // Pass the texcoord to the fragment shader.
27073
- v_texcoord = a_texcoord;
27185
+ vertexSource: `#version 300 es
27186
+ in vec2 a_position;
27187
+ in vec2 a_texcoord;
27188
+ out vec2 v_texcoord;
27189
+
27190
+ void main() {
27191
+ gl_Position = vec4(a_position, 0.0, 1.0);
27192
+ // Pass the texcoord to the fragment shader.
27193
+ v_texcoord = a_texcoord;
27074
27194
  }`,
27075
27195
  fragmentSource: fragmentSource
27076
27196
  });
@@ -27326,6 +27446,17 @@ class Debug {
27326
27446
  focusColor: Color.Red,
27327
27447
  showZoom: false
27328
27448
  };
27449
+ this.tilemap = {
27450
+ showAll: false,
27451
+ showGrid: false,
27452
+ gridColor: Color.Red,
27453
+ gridWidth: .5,
27454
+ showSolidBounds: false,
27455
+ solidBoundsColor: Color.fromHex('#8080807F'), // grayish
27456
+ showColliderGeometry: true,
27457
+ colliderGeometryColor: Color.Green,
27458
+ showQuadTree: false
27459
+ };
27329
27460
  this._engine = engine;
27330
27461
  this.colorBlindMode = new ColorBlindFlags(this._engine);
27331
27462
  }
@@ -28965,9 +29096,9 @@ class Engine {
28965
29096
  // eslint-disable-next-line no-console
28966
29097
  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;');
28967
29098
  // eslint-disable-next-line no-console
28968
- console.log('\n\
28969
- /| ________________\n\
28970
- O|===|* >________________>\n\
29099
+ console.log('\n\
29100
+ /| ________________\n\
29101
+ O|===|* >________________>\n\
28971
29102
  \\|');
28972
29103
  // eslint-disable-next-line no-console
28973
29104
  console.log('Visit', 'http://excaliburjs.com', 'for more information');
@@ -31107,7 +31238,7 @@ class Semaphore {
31107
31238
  * The current Excalibur version string
31108
31239
  * @description `process.env.__EX_VERSION` gets replaced by Webpack on build
31109
31240
  */
31110
- const EX_VERSION = "0.28.3";
31241
+ const EX_VERSION = "0.29.0-alpha.2+5c28d4e";
31111
31242
 
31112
31243
  polyfill();
31113
31244
  // This file is used as the bundle entry point and exports everything