This was a big release! We have a ton of new features and a lot of improvements to performance especially around Firefox
See migration guide for v0.25.x -> v0.26.0
Added Features!
-
feat: Add arbitrary non-convex polygon support by @eonarheim in #2239
-
feat: Fast BoundingBox overlap and transform by @eonarheim in #2241
-
perf: Add
zIndexChanged$
+ Improve pointer system perf by @eonarheim in #2242 -
feat: Implement IsometricMap & refactor TileMap with some perf boosts by @eonarheim in #2254
-
ex.TileMap
now supports per Tile custom colliders!const tileMap = new ex.TileMap(...); const tile = tileMap.getTile(0, 0); tile.solid = true; tile.addCollider(...); // add your custom collider!
-
New
ex.IsometricMap
for drawing isometric grids! (They also support custom colliders via the same mechanism asex.TileMap
)new ex.IsometricMap({ pos: ex.vec(250, 10), tileWidth: 32, tileHeight: 16, columns: 15, rows: 15 });
ex.IsometricTile
now come with aex.IsometricEntityComponent
which can be applied to any entity that needs to be correctly sorted to preserve the isometric illusionex.IsometricEntitySystem
generates a new z-index based on theelevation
and y position of an entity withex.IsometricEntityComponent
-
-
feat: Add pixelRatio override for Text rendering by @eonarheim in #2294
-
perf(motion): Improve capture transform perf by @eonarheim in #2278
-
perf(graphics): Implement sorted draw calls by @eonarheim in #2277
- Added draw call sorting
new ex.Engine({useDrawSorting: true})
to efficiently draw render plugins in batches to avoid expensive renderer switching as much as possible. By default this is turned on, but can be opted out of.
- Added draw call sorting
-
feat(graphics): [#2288] Implement SpriteSheet builder with custom sourceViews by @eonarheim in #2302
- Added feature to build
SpriteSheet
s from a list of different sized source views usingex.SpriteSheet.fromImageSourceWithSourceViews(...)
const ss = ex.SpriteSheet.fromImageSourceWithSourceViews({ image, sourceViews: [ {x: 0, y: 0, width: 20, height: 30}, {x: 20, y: 0, width: 40, height: 50}, ] });
- Added feature to build
-
feat: FitScreenAndFill and FitContainerAndFill Display Modes by @Joshua-Beatty in #2272
-
feat: [#2272] Add Fit Screen/Container and Zoom by @eonarheim in #2312
-
feat: [#2313] Add New Line Graphics Object by @eonarheim in #2314
const lineActor = new ex.Actor({ pos: ex.vec(100, 0) }); lineActor.graphics.anchor = ex.Vector.Zero; lineActor.graphics.use(new ex.Line({ start: ex.vec(0, 0), end: ex.vec(200, 200), color: ex.Color.Green, thickness: 10 })); game.add(lineActor);
-
feat: Add Raster quality + lineCap by @eonarheim in #2315
- Added new parameter to
ex.Raster({quality: 4})
to specify the internal scaling for the bitmap, this is useful for improving the rendering quality of small rasters due to sampling error.
- Added new parameter to
-
feat(graphics): Add canvas 2d fallback mechanism by @eonarheim in #2310
- Added new performance fallback configuration to
ex.Engine
for developers to help players experiencing poor performance in non-standard browser configurations- This will fallback to the Canvas2D rendering graphics context which usually performs better on non hardware accelerated browsers, currently postprocessing effects are unavailable in this fallback.
- By default if a game is running at 20fps or lower for 100 frames or more after the game has started it will be triggered, the developer can optionally show a player message that is off by default.
var game = new ex.Engine({ ... configurePerformanceCanvas2DFallback: { allow: true, // opt-out of the fallback showPlayerMessage: true, // opt-in to a player pop-up message threshold: { fps: 20, numberOfFrames: 100 } // configure the threshold to trigger the fallback } });
- Added new performance fallback configuration to
-
feat: Implement parallax motion component and system by @eonarheim in #2303
-
Added new
ex.ParallaxComponent
for creating parallax effects on the graphics, entities with this component are drawn differently and a collider will not be where you expect. It is not recommended you use colliders with parallax entities.const actor = new ex.Actor(); // The actor will be drawn shifted based on the camera position scaled by the parallax factor actor.addComponent(new ParallaxComponent(ex.vec(0.5, 0.5)));
-
-
perf: Various performance improvements by @eonarheim in #2309
-
Added
ex.Vector.min(...)
andex.Vector.max(...)
to find the min/max of each vector component between 2 vectors. -
Added
ex.TransformComponent.zIndexChange$
observable to watch when z index changes.
Fixes
- refactor: Rename multv/multm to multiply by @eonarheim in #2240
- fix: #2263 keyboard
wasPressed
works inonPostUpdate
lifecycle by @eonarheim in #2270 - chore: Updates to improve test flakiness by @eonarheim in #2246
- fix: [#2109] Replace the features link by @SulthanNK in #2299
- fix: [#2300] CompositeColliders count as a whole for collisionstart/collisionend events by @eonarheim in #2301
- fix(graphics): Large Text segments render properly by breaking them into smaller pieces by @eonarheim in #2295
- fix: Tilemap incorrectly offscreen and update parallax to use Tiled formula by @eonarheim in #2316
- fix: Tweak browser params to fix flaky test runner disconnect by @eonarheim in #2311
What's Changed
- chore: Update dependency karma to 6.3.14 [SECURITY] by @renovate in #2237
- chore(deps): bump follow-redirects from 1.14.5 to 1.14.8 by @dependabot in #2238
- chore(deps): bump engine.io from 6.1.0 to 6.1.2 by @dependabot in #2245
- chore: Update dependency marked to 4.0.10 [SECURITY] by @renovate in #2234
- chore: Update puppeteer by @eonarheim in #2247
- chore: Update dependency karma-coverage to v2.2.0 by @renovate in #2252
- chore: Update dependency karma to v6.3.16 by @renovate in #2248
- chore: Update dependency eslint-plugin-jsdoc to v37.9.1 by @renovate in #2251
- chore: Update dependency eslint to v8.9.0 by @renovate in #2250
- chore: Update dependency puppeteer to v13.3.2 by @renovate in #2181
- chore: Update typescript-eslint monorepo to v5.12.0 by @renovate in #2253
- chore: Update Node.js to v16.14.0 by @renovate in #2249
- chore: Update dependency @babel/core to v7.17.5 by @renovate in #2265
- chore: Update dependency eslint-plugin-jsdoc to v37.9.6 by @renovate in #2258
- chore: Update dependency css-loader to v6.7.1 by @renovate in #2276
- chore: Update dependency ts-loader to v9.2.8 by @renovate in #2275
- chore: Update dependency karma-chrome-launcher to v3.1.1 by @renovate in #2274
- chore: Update dependency eslint to v8.12.0 by @renovate in #2266
- chore: Update jasmine/karma by @eonarheim in #2289
- chore: Update Node.js to v16.14.2 by @renovate in #2284
- chore: Update dependencies by @eonarheim in #2292
- chore: Update typescript/lint by @eonarheim in #2293
- chore: Remove deprecated drawing API surface by @eonarheim in #2297
- chore: Remove deprecated code by @eonarheim in #2298
New Contributors
- @SulthanNK made their first contribution in #2299
- @Joshua-Beatty made their first contribution in #2272
- @Joshua-Beatty - Big thanks for the
FitContentAndFill
,FitScreenAndFill
implementation, and the zoom discussion! - @QuentinLeCaignec - Thank you for performance improvement assistance and debugging peformance issues on different platforms!
- @airtonix - Thank you for the
Line
graphic improvement discussion! - @mephisto83 - Thank you for consulting on the performance fallback API!
- @tfkfan - Thank you Tilemap Polygon Raster quality improvement discussion!
- @SulthanNK - Thank you for the readme updates!
- @yongsooim - Thank you for proposing Spritesheet creator for mulitple sized source views!
- @Cretezy - Thank you for the Tiled collision discussion and assistance on fixes! excaliburjs/excalibur-tiled#344
- @tenpaMk2 - Thank you for lots of Excalibur demos and sample games!
- @KrzyZyb - Thank you for the running Excalibur in Angular discussion!
Full Changelog: v0.25.3...v0.26.0