[READ-ONLY] Mirror of https://github.com/excaliburjs/Excalibur. 🎮 Your friendly TypeScript 2D game engine for the web 🗡️ excaliburjs.com
excalibur excaliburjs game-development game-engine game-framework gamedev games html5-canvas typescript

feat: New Graphics API + Flagged WebGL Support (#1730) master

Related to v0.25.0 Roadmap #1161 Closes #136 #580 #589 #652 #1529 #420 #172 #276 #384 #387 #481 ## TODO before ~~merge~~ next release (team spoke offline) * [ ] Docs PR * [ ] New Benchmarks ## Changes: - Flagged Support for WebGL implementation behind `ex.Flags.enable('use-webgl')` - Batched draw calls by default - New Graphics API - `ExcaliburGraphicsContext` as drawing abstraction - ECS Style `GraphicsComponent` & `GraphicsSystem` - `ImageSource` replaces `Texture` - New `Text` Graphics type for easy text drawing - New `SpriteFont` and `Font` for manipulating fonts - New `Rectangle`, `Circle`, and `Polygon` Graphics - New `GraphicsGroup` for grouping Graphics together into one - Improved `Animation` Graphic with events on `frame`, `loop`, and `end` - New `Canvas` Graphic to act as a `CanvasRenderingContext2D` shim * Update to debug prefix for debug drawing apis * Switch pooling implementations * Add docs * Ensure compatibility between old canvas and new graphics, remove z-index from ex ctx, add diagnostics * Remove un-used import * Fix lint * SpriteText WIP * Refactor Text and Fonts to be more coherent * Fix sprite flicker * Simplify interface * Rename to GraphicsDiagnostics * Add timescale to animation * First pass deprecate legacy Drawing * Basic spritefont shadow * Clean up + deprecate * Pool and Context tests, Partial Animation tests * Finish animation tests * WIP Lots of tests * Fix text rasterizer perf issues * Fix screen pixel ratio change * Change flag name * Fix particle tests * Rename RawImage -> ImageSource * Update refs RawImage -> ImageSource * Fix actor scale test * Test webfont in Travis * Test platform detection * Fix lint * Push tests * Switch to beforeAll * Add linux text snapshots * Fix windows images * Fix linux images * Teak particles fix tests * Fix sandbox build * Add Font watch * Fix iteration * Fix lint * Switch from iterable, remove xtra text * Skip appveyor for Text graphics * Really skip appveyor * Up appveyor timeout * Avoid deadlocking tests * Update timeout * Fix client syntax * Another strategy * More tests! * More tests * Fix tests * Bump for appveyor * Rect -> Rectangle * Bump appveyor build * Discover timing out test in appveyor * Remove new tests round 1 to discover appveyor issue * Bisect 1 * Bisect 2 * Bisect 3 * Self host fonts * Simplify font definitions * Add tests back * Revert appveyor exclusion * Update image diff matcher * Switch graphics to new matcher * Refactor texture loader * Move graphics component draw to system * Fix lint * Change whenLoaded to checkLoaded * Change to ready * Fix tests * Fill out obsolete and deprecated * Fix some doc links * Fix all doc links * Switch flag around * Tests default to legacy draw * fix ImageSource after merge * Fix after merge, small refactor * Fix tests * Add default graphic * Back port sprite sheet spacing * Fix lint * Update per PR feedback * More PR feedback * Back port some tiled updates to new graphics * Adjust text and label to match previous behavior and quality * Fix lint * Fix text quality tests


+8827 -598
166 changed files