Releases: excaliburjs/Excalibur
Excalibur v0.30.2 Release
Added
- New PostProcessor.onDraw() hook to handle uploading textures
Fixed
- Fixed crash on Xiaomi Redmi Phones by lazy loading the GPU particle renderer, GPU particles still do not work on these phones
- Add warning if World.add() falls through! This is caused by multiple versions of Excalibur usually
- Fixed CollidePolygonPolygon crash with some defense against invalid separation
- Fixed issue with PostProcessor where it would not run correctly if no actors present
Full Changelog: v0.30.1...v0.30.2
Excalibur v0.30.1 Release
- fix graphics tint issue
Read https://github.com/excaliburjs/Excalibur/releases/tag/v0.30.0 for more!
Full Changelog: v0.30.0...v0.30.1
Excalibur v0.30.0 Release
This is one of the biggest releases of Excalibur yet! Huge thanks to all the new contributors and everyone that assisted in the discord.
Special thanks @jyoung4242, @mattjennings, @cdelstad, @kamranayub, Drew Conley, and @jedeen for being constant support and help for the project and the entire community!
New Contributors
- @muhajirdev made their first contribution in #3026
- @aruru-weed made their first contribution in #3023
- @gavriguy made their first contribution in #3051
- @jellewijma made their first contribution in #3052
- @Autsider666 made their first contribution in #3094
- @robbertstevens made their first contribution in #3125
- @egodjuks made their first contribution in #3131
- @SamuelAsherRivello made their first contribution in #3174
- @mosesintech made their first contribution in #3214
- @blakearoberts made their first contribution in #3285
- @Adamduehansen made their first contribution in #3292
Features
- Added
ex.SpriteSheet.getTiledSprite(...)
to help pulling tiling sprites out of a sprite sheet - Alias the
engine.screen.drawWidth/drawHeight
withengine.screen.width/height
; - Added convenience types
ex.TiledSprite
andex.TiledAnimation
for Tiling Sprites and Animationsconst tiledGroundSprite = new ex.TiledSprite({ image: groundImage, width: game.screen.width, height: 200, wrapping: { x: ex.ImageWrapping.Repeat, y: ex.ImageWrapping.Clamp } }); const tilingAnimation = new ex.TiledAnimation({ animation: cardAnimation, sourceView: {x: 20, y: 20}, width: 200, height: 200, wrapping: ex.ImageWrapping.Repeat });
- Added new static builder for making images from canvases
ex.ImageSource.fromHtmlCanvasElement(image: HTMLCanvasElement, options?: ImageSourceOptions)
- Added GPU particle implementation for MANY MANY particles in the simulation, similar to the existing CPU particle implementation. Note
maxParticles
is new for GPU particles.var particles = new ex.GpuParticleEmitter({ pos: ex.vec(300, 500), maxParticles: 10_000, emitRate: 1000, radius: 100, emitterType: ex.EmitterType.Circle, particle: { beginColor: ex.Color.Orange, endColor: ex.Color.Purple, focus: ex.vec(0, -400), focusAccel: 1000, startSize: 100, endSize: 0, life: 3000, minSpeed: -100, maxSpeed: 100, angularVelocity: 2, randomRotation: true, transform: ex.ParticleTransform.Local } });
- Added
ex.assert()
that can be used to throw in development builds - Added
easing
option tomoveTo(...)
- Added new option bag style input to actions with durations in milliseconds instead of speed
player.actions.rotateTo({angleRadians: angle, duration: 1000, rotationType}); player.actions.moveTo({pos: ex.vec(100, 100), duration: 1000}); player.actions.scaleTo({scale: ex.vec(2, 2), duration: 1000}); player.actions.repeatForever(ctx => { ctx.curveTo({ controlPoints: [cp1, cp2, dest], duration: 5000, mode: 'uniform' }); ctx.curveTo({ controlPoints: [cp2, cp1, start1], duration: 5000, mode: 'uniform' }); });
- Added
ex.lerpAngle(startAngleRadians: number, endAngleRadians: number, rotationType: RotationType, time: number): number
in order to lerp angles between each other - Added
pointerenter
andpointerleave
events toex.TileMap
tiles! - Added
pointerenter
andpointerleave
events toex.IsometricMap
tiles! - Added new
ex.BezierCurve
type for drawing cubic bezier curves - Added 2 new actions
actor.actions.curveTo(...)
andactor.actions.curveBy(...)
- Added new
ex.lerp(...)
,ex.inverseLerp(...)
, andex.remap(...)
for numbers - Added new
ex.lerpVector(...)
,ex.inverseLerpVector(...)
, andex.remapVector(...)
forex.Vector
- Added new
actor.actions.flash(...)
Action
to flash a color for a period of time - Added a new
ex.NineSlice
Graphic
for creating arbitrarily resizable rectangular regions, useful for creating UI, backgrounds, and other resizable elements.var nineSlice = new ex.NineSlice({ width: 300, height: 100, source: inputTile, sourceConfig: { width: 64, height: 64, topMargin: 5, leftMargin: 7, bottomMargin: 5, rightMargin: 7 }, destinationConfig: { drawCenter: true, horizontalStretch: ex.NineSliceStretch.Stretch, verticalStretch: ex.NineSliceStretch.Stretch } }); actor.graphics.add(nineSlice);
- Added a method to force graphics on screen
ex.GraphicsComponent.forceOnScreen
- Added new
ex.Slide
scene transition, which can slide a screen shot of the current screen:up
,down
,left
, orright
. Optionally you can add anex.EasingFunction
, by defaultex.EasingFunctions.Linear
game.goToScene('otherScene', { destinationIn: new ex.Slide({ duration: 1000, easingFunction: ex.EasingFunctions.EaseInOutCubic, slideDirection: 'up' }) });
- Added inline SVG image support
ex.ImageSource.fromSvgString('<svg>...</svg>')
, note images produced this way still must be loaded. - Added ability to optionally specify sprite options in the
.toSprite(options:? SpriteOptions)
- The
ex.Engine
constructor had a newenableCanvasContextMenu
arg that can be used to enable the right click context menu, by default the context menu is disabled which is what most games seem to want. - Child
ex.Actor
inherits opacity of parents ex.Engine.timeScale
values of 0 are now supportedex.Trigger
now supports all valid actor constructor parameters fromex.ActorArgs
in addition toex.TriggerOptions
ex.Gif
can now handle default embedded GIF frame timings- New
ex.Screen.worldToPagePixelRatio
API that will return the ratio between excalibur pixels and the HTML pixels.- Additionally excalibur will now decorate the document root with this same value as a CSS variable
--ex-pixel-ratio
- Useful for scaling HTML UIs to match your game
.ui-container { pointer-events: none; position: absolute; transform-origin: 0 0; transform: scale( calc(var(--pixel-conversion)), calc(var(--pixel-conversion))); }
- Additionally excalibur will now decorate the document root with this same value as a CSS variable
- New updates to
ex.coroutine(...)
- New
ex.CoroutineInstance
is returned (still awaitable) - Control coroutine autostart with
ex.coroutine(function*(){...}, {autostart: false})
.start()
and.cancel()
coroutines- Nested coroutines!
- New
- Excalibur will now clean up WebGL textures that have not been drawn in a while, which improves stability for long game sessions
- If a graphic is drawn again it will be reloaded into the GPU seamlessly
- You can now query for colliders on the physics world
const scene = ...; const colliders = scene.physics.query(ex.BoundingBox.fromDimensions(...));
actor.oldGlobalPos
returns the globalPosition from the previous frame- create development builds of excalibur that bundlers can use in dev mode
- show warning in development when Entity hasn't been added to a scene after a few seconds
- New
RentalPool
type for sparse object pooling - New
ex.SparseHashGridCollisionProcessor
which is a simpler (and faster) implementation for broadphase pair generation. This works by bucketing colliders into uniform sized square buckets and using that to generate pairs. - CollisionContact can be biased toward a collider by using
contact.bias(collider)
. This adjusts the contact so that the given collider is colliderA, and is helpful if you
are doing mtv adjustments during precollision. angleBetween
medhod added to Vector class, to find the angle for which a vector needs to be rotated to match some given angle:const point = vec(100, 100) const destinationDirection = Math.PI / 4 const angleToRotate = point.angleBetween(destinationDirection, RotationType.ShortestPath) expect(point.rotate(angleToRotate).toAngle()).toEqual(destinationDirection)
Fixed
- Fixed issue where
ex.ParticleEmitter.clearParticles()
did not work - Fixed issue where the pointer
lastWorldPos
was not updated when the currentCamera
moved - Fixed issue where
cancel()
'd events still bubbled to the top level input handlers - Fixed issue where unexpected html HTML content from an image would silently hang the loader
- Fixed issue where Collision events ahd inconsistent targets, sometimes they were Colliders and sometimes they were Entities
- Fixed issue where
ex.Engine.screenshot()
images may not yet be loaded in time for use inex.Transition
s - Fixed issue where there would be an incorrect background color for 1 frame when transitioning to a new scene
- Fixed issue where
blockInput: true
on scene transition only blocked input events, not accessors likewasHeld(...)
etc. - Fixed issue where users could not easily define a custom
RendererPlugin
because the type was not exposed - Fixed issue where
ex.Fade
sometimes would not complete depending on the elapsed time - Fixed issue where `ex.PolygonColliders...
Excalibur v0.29.3 Release
This is a maintenance release with only bug fixes!
Fixes
- fix: ex.Vector.toAngle() returns angles between [0, 2PI)
- fix: Make Entity Constructor's
components
option optional by @muhajirdev in #3027 - fix: getSceneName use scenes #3022 by @aruru-weed in #3023
- fix: Loader suppressPlayButton is now respected (0f9e77d)
- fix: [#3047] Animation glitch cause by uninitialized state by @eonarheim in #3048
New Contributors
- @muhajirdev made their first contribution in #3026
- @aruru-weed made their first contribution in #3023
- Special thanks to @djdenuyl for spotting a critical bug in image rendering! And a very thorough bug report!
Full Changelog: v0.29.2...v0.29.3
Excalibur v0.29.2 Release
This is a medium-ish release, with a ton of community contributions especially in the bugfix realm!
Features
- Added ability to configure image wrapping on
ex.ImageSource
with the newex.ImageWrapping.Clamp
(default),ex.ImageWrapping.Repeat
, andex.ImageWrapping.Mirror
.const image = new ex.ImageSource('path/to/image.png', { filtering: ex.ImageFiltering.Pixel, wrapping: { x: ex.ImageWrapping.Repeat, y: ex.ImageWrapping.Repeat, } });
- Added pointer event support to
ex.TileMap
's and individualex.Tile
's - Added pointer event support to
ex.IsometricMap
's and individualex.IsometricTile
's - Added
useAnchor
parameter toex.GraphicsGroup
to allow users to opt out of anchor based positioning, if set to false all graphics members
will be positioned with the top left of the graphic at the actor's position.const graphicGroup = new ex.GraphicsGroup({ useAnchor: false, members: [ { graphic: heartImage.toSprite(), offset: ex.vec(0, 0), }, { graphic: heartImage.toSprite(), offset: ex.vec(0, 16), }, { graphic: heartImage.toSprite(), offset: ex.vec(16, 16), }, { graphic: heartImage.toSprite(), offset: ex.vec(16, 0), }, ], });
- Added simplified
ex.coroutine
overloads, you need not pass engine as long as you are in an Excalibur lifecycleconst result = ex.coroutine(function* () {...});
- Added way to bind 'this' to
ex.coroutine
overloads, you need not pass engine as long as you are in an Excalibur lifecycleconst result = ex.coroutine({myThis: 'cool'}, function* () {...});
- Added optional
ex.coroutine
timing parameter to schedule when they are updatedconst result = ex.coroutine(engine, function * () {...}, { timing: 'postupdate' })
- Added
GraphicsComponent.bounds
which will report the world bounds of the graphic if applicable! - Added
ex.Vector.EQUALS_EPSILON
to configure theex.Vector.equals(v)
threshold - Added way to add custom WebGL context lost/recovered handlers for your game
const game = new ex.Engine({ handleContextLost: (e) => {...}, handleContextRestored: (e) => {...} })
Fixed
- Fixed issue where
ex.TileMap
culling did not work properly when using fixed updates lower than refresh rate - Fixed incomplete types for font options in
ex.FontSource().toFont(options)
- Fixed issue with
ex.Loader
start button position when using CSS transforms - Fixed issue where adding scenes with the same name did not work when it was previously removed
- Fixed issue when WebGL context lost occurs where there was no friendly output to the user
- Fixed issue where HiDPI scaling could accidentally scale past the 4k mobile limit, if the context would scale too large it will now attempt to recover by backing off.
- Fixed issue where logo was sometimes not loaded during
ex.Loader
- Fixed issue where unbounded containers would grow infinitely when using the following display modes:
DisplayMode.FillContainer
DisplayMode.FitContainer
DisplayMode.FitContainerAndFill
DisplayMode.FitContainerAndZoom
- Fixed issue where
ex.ParticleEmitter
z-index did not propagate to particles - Fixed incongruent behavior as small scales when setting
transform.scale = v
andtransform.scale.setTo(x, y)
- Fixed
ex.coroutine
TypeScript type to include yieldingundefined
- Fixed issue where Firefox on Linux would throw an error when using custom Materials due to unused attributes caused by glsl compiler optimization.
- Fixed issue where start transition did not work properly if deferred
- Fixed issue where transitions did not cover the whole screen if camera was zoomed
- Fixed issue where
Color.toHex()
produced invalid strings if the channel values are negative or fractional, or if the alpha channel was different than 1
Changed
- Significant 2x performance improvement to image drawing in Excalibur
- Simplified
ex.Loader
viewport/resolution internal configuration
Raw Changes
What's Changed
- fix: Firefox + Linux custom shader issue with glsl compiler attribute optimization by @eonarheim in #2943
- chore: Update dependency @mdx-js/react to v3.0.1 by @renovate in #2945
- chore: Update dependency @types/react to v18.2.61 by @renovate in #2946
- chore: Update dependency @types/react-color to v3.0.12 by @renovate in #2947
- chore: Update dependency jasmine-core to v5.1.2 by @renovate in #2948
- chore: Update dependency karma to v6.4.3 by @renovate in #2949
- chore: Update dependency node to v20.11.1 by @renovate in #2950
- chore: Update babel monorepo to v7.24.0 by @renovate in #2951
- chore: Update dependency core-js to v3.36.0 by @renovate in #2952
- chore: Update dependency docusaurus-plugin-typedoc-api to v4.2.0 by @renovate in #2953
- chore: Update dependency eslint to v8.57.0 by @renovate in #2954
- chore: Update dependency eslint-plugin-storybook to v0.8.0 by @renovate in #2955
- chore: Update dependency prism-react-renderer to v2.3.1 by @renovate in #2956
- revert: "chore: Update dependency docusaurus-plugin-typedoc-api to v4.2.0" by @eonarheim in #2959
- fix: fit content resizing incorrectly by @eonarheim in #2960
- fix: Handle webgl context lost + Recover from hidpi scale too large by @eonarheim in #2958
- fix: Screen to world coord conversion when using fit container by @eonarheim in #2961
- feat: Allow coroutine lifecycles + support thisArg + remove engine requirement by @eonarheim in #2965
- fix: incomplete types for options in ex.FontSource.toFont() by @mattjennings in #2973
- chore: Correct the doc for vector.rotate by @isokissa in #2977
- Typo fix: post instead of pre. by @JustLeif in #2978
- fix: Update docs, SpriteFont by @sellmark in #2979
- change: GraphicsGroup no longer centers with anchors by @eonarheim in #2966
- feat: Add pointer events to TileMap/IsometricMap and tiles by @eonarheim in #2968
- perf: Remove allocations from image-renderer by @eonarheim in #2962
- fix: wrong hex color values by @mcavazotti in #2985
- chore: Update babel monorepo by @renovate in #2987
- chore: Update dependency @types/react to v18.2.73 by @renovate in #2988
- chore: Update dependency core-js to v3.36.1 by @renovate in #2989
- chore: Update dependency excalibur-jasmine to v0.3.4 by @renovate in #2990
- chore: Update dependency node to v20.12.0 by @renovate in #2992
- chore: Update dependency replace-in-file to v7.1.0 by @renovate in #2993
- chore: Update dependency webpack to v5.91.0 by @renovate in #2997
- chore: Update dependency semver to v7.6.0 by @renovate in #2994
- chore: Update docusaurus monorepo to v3.2.0 by @renovate in #3000
- Revert "chore: Update docusaurus monorepo to v3.2.0" by @eonarheim in #3002
- chore: Update storybook monorepo to v7.6.17 by @renovate in #3001
- chore(deps-dev): bump webpack-dev-middleware from 6.1.1 to 6.1.3 by @dependabot in #2999
- chore(deps): bump express from 4.18.2 to 4.19.2 in /site by @dependabot in #2984
- Web docs corrections by @ikudrickiy in #3004
- chore(deps-dev): bump follow-redirects from 1.14.8 to 1.15.6 by @dependabot in #2967
- chore(deps-dev): bump express from 4.18.2 to 4.19.2 by @dependabot in #2982
- chore(deps): bump axios and wait-on in /site by @dependabot in #2940
- chore(deps-dev): bump ip from 2.0.0 to 2.0.1 by @dependabot in #2939
- chore(deps): bump webpack-dev-middleware from 5.3.3 to 5.3.4 in /site by @dependabot in #2980
- chore(deps): bump follow-redirects from 1.15.3 to 1.15.6 in /site by @dependabot in https://github.com/excaliburjs/Excal...
Excalibur v0.29.1 Release
Small release to fix transition bug!
What's Changed
- fix: Transition bug when camera is zoomed by @eonarheim in #2942
Full Changelog: v0.29.0...v0.29.1
Excalibur v0.29.0 Release
This is a huge release v0.29.0, we have a lot of big features that bring us closer to v1!
Join the community on discord!
There are breaking changes in this release, please review the migration guide from v0.28.x to v0.29.0
Features
-
Added new
ex.Tilemap.getOnScreenTiles()
method to help users access onscreen tiles for logic or other concerns. -
Added
ex.FontSource
resource typeconst fontSource = new ex.FontSource('/my-font.ttf', 'My Font') loader.addResource(fontSource) game.start(loader).then(() => { const font = fontSource.toFont() // returns ex.Font })
Font options can be defined either at the source or at the
toFont()
call. If defined in both,toFont(options)
will
override the options in theFontSource
.const fontSource = new ex.FontSource('/my-font.ttf', 'My Font', { filtering: ex.ImageFiltering.Pixel, size: 16, // set a default size }) const font = fontSource.toFont({ // override just the size size: 20, })
-
Added fullscreen after load feature! You can optionally provide a
fullscreenContainer
with a string id or an instance of theHTMLElement
new ex.Loader({ fullscreenAfterLoad: true, fullscreenContainer: document.getElementById('container') });
-
Added new
ex.Debug
static for more convenient debug drawing where you might not have a graphics context accessible to you. This works by batching up all the debug draw requests and flushing them during the debug draw step.ex.Debug.drawRay(ray: Ray, options?: { distance?: number, color?: Color })
ex.Debug.drawBounds(boundingBox: BoundingBox, options?: { color?: Color })
ex.Debug.drawCircle(center: Vector, radius: number, options?: ...)
ex.Debug.drawPolygon(points: Vector[], options?: { color?: Color })
ex.Debug.drawText(text: string, pos: Vector)
ex.Debug.drawLine(start: Vector, end: Vector, options?: LineGraphicsOptions)
ex.Debug.drawLines(points: Vector[], options?: LineGraphicsOptions)
drawPoint(point: Vector, options?: PointGraphicsOptions)
-
Experimental
ex.coroutine
for running code that changes over time, useful for modeling complex animation code. Coroutines return a promise when they are complete. You can think of eachyield
as a frame.- The result of a yield is the current elapsed time
- You can yield a number in milliseconds and it will wait that long before resuming
- You can yield a promise and it will wait until it resolves before resuming
const completePromise = coroutine(engine, function * () { let elapsed = 0; elapsed = yield 200; // frame 1 wait 200 ms before resuming elapsed = yield fetch('./some/data.json'); // frame 2 elapsed = yield; // frame 3 });
-
Added additional options in rayCast options
ignoreCollisionGroupAll: boolean
will ignore testing against anything with theCollisionGroup.All
which is the default for allfilter: (hit: RayCastHit) => boolean
will allow people to do arbitrary filtering on raycast results, this runs very last after all other collision group/collision mask decisions have been made
-
Added additional data
side
andlastContact
toonCollisionEnd
andcollisionend
events -
Added configuration option to
ex.PhysicsConfig
to configure composite collider onCollisionStart/End behavior -
Added configuration option to
ex.TileMap({ meshingLookBehind: Infinity })
which allows users to configure how far the TileMap looks behind for matching colliders (default is 10). -
Added Arcade Collision Solver bias to help mitigate seams in geometry that can cause problems for certain games.
ex.ContactSolveBias.None
No bias, current default behavior collisions are solved in the default distance orderex.ContactSolveBias.VerticalFirst
Vertical collisions are solved first (useful for platformers with up/down gravity)ex.ContactSolveBias.HorizontalFirst
Horizontal collisions are solved first (useful for games with left/right predominant forces)const engine = new ex.Engine({ ... physics: { solver: ex.SolverStrategy.Realistic, arcade: { contactSolveBias: ex.ContactSolveBias.VerticalFirst }, } })
-
Added Graphics
opacity
on the Actor constructornew ex.Actor({opacity: .5})
-
Added Graphics pixel
offset
on the Actor constructornew ex.Actor({offset: ex.vec(-15, -15)})
-
Added new
new ex.Engine({uvPadding: .25})
option to allow users using texture atlases in their sprite sheets to configure this to avoid texture bleed. This can happen if you're sampling from images meant for pixel art -
Added new antialias settings for pixel art! This allows for smooth subpixel rendering of pixel art without shimmer/fat-pixel artifacts.
- Use
new ex.Engine({pixelArt: true})
to opt in to all the right defaults to make this work!
- Use
-
Added new antialias configuration options to deeply configure how Excalibur does any antialiasing, or you can provide
antialiasing: true
/antialiasing: false
to use the old defaults.- Example;
const game = new ex.Engine({ antialiasing: { pixelArtSampler: false, filtering: ex.ImageFiltering.Pixel, nativeContextAntialiasing: false, canvasImageRendering: 'pixelated' } })
-
Added new
lineHeight
property onSpriteFont
andFont
to manually adjust the line height when rendering text. -
Added missing dual of
ex.GraphicsComponent.add()
, you can nowex.GraphicsComponent.remove(name)
; -
Added additional options to
ex.Animation.fromSpriteSheetCoordinates()
you can now pass any validex.GraphicOptions
to influence the sprite per frameconst anim = ex.Animation.fromSpriteSheetCoordinates({ spriteSheet: ss, frameCoordinates: [ {x: 0, y: 0, duration: 100, options: { flipHorizontal: true }}, {x: 1, y: 0, duration: 100, options: { flipVertical: true }}, {x: 2, y: 0, duration: 100}, {x: 3, y: 0, duration: 100} ], strategy: ex.AnimationStrategy.Freeze });
-
Added additional options to
ex.SpriteSheet.getSprite(..., options)
. You can pass any validex.GraphicOptions
to modify a copy of the sprite from the spritesheet.const sprite = ss.getSprite(0, 0, { flipHorizontal: true, flipVertical: true, width: 200, height: 201, opacity: .5, scale: ex.vec(2, 2), origin: ex.vec(0, 1), tint: ex.Color.Red, rotation: 4 });
-
New simplified way to query entities
ex.World.query([MyComponentA, MyComponentB])
-
New way to query for tags on entities
ex.World.queryTags(['A', 'B'])
-
Systems can be added as a constructor to a world, if they are the world will construct and pass a world instance to them
world.add(MySystem); ... class MySystem extends System { query: Query; constructor(world: World) { super() this.query = world.query([MyComponent]); } update }
-
Added
RayCastHit
as part of every raycast not just the physics world query!- Additionally added the ray distance and the contact normal for the surface
-
Added the ability to log a message once to all log levels
debugOnce
infoOnce
warnOnce
errorOnce
fatalOnce
-
Added ability to load additional images into
ex.Material
s!const noise = new ex.ImageSource('./noise.avif'); loader.addResource(noise); var waterMaterial = game.graphicsContext.createMaterial({ name: 'water', fragmentSource: waterFrag, color: ex.Color.fromRGB(55, 0, 200, .6), images: { u_noise: noise } });
-
Scene Transition & Loader API, this gives you the ability to have first class support for individual scene resource loading and scene transitions.
-
Add or remove scenes by constructor
-
Add loaders by constructor
-
New
ex.DefaultLoader
type that allows for easier custom loader creation -
New
ex.Transition
type for building custom transitions -
New scene lifecycle to allow scene specific resource loading
onTransition(direction: "in" | "out") {...}
onPreLoad(loader: DefaultLoader) {...}
-
New async
goToScene()
API that allows overriding loaders/transitions between scenes -
Scenes now can have
async onInitialize
andasync onActivate
! -
New scenes director API that allows upfront definition of scenes/transitions/loaders
-
Example:
Defining scenes upfrontconst game = new ex.Engine({ scenes: { scene1: { scene: scene1, transitions: { out: new ex.FadeInOut({duration: 1000, direction: 'out', color: ex.Color.Black}), in: new ex.FadeInOut({duration: 1000, direction: 'in'}) } }, scene2: { scene: scene2, loader: ex.DefaultLoader, // Constructor only option! transitions: { out: new ex.FadeInOut({duration: 1000, direction: 'out'}), in: new ex.FadeInOut({duration: 1000, direction: 'in', color: ex.Color.Black }) } }, scene3: ex.Scene // Constructor only option! } }) // Specify the boot loader & first scene transition from loader game.start('scene1', { inTransition: new ex.FadeInOut({duration: 500, direction: 'in', color: ex.Color.ExcaliburBlue}) loader: boot, });
- Scene specific input API so that you can add input handlers that only fire whe...
-
Excalibur v0.28.7 Release
Bugfix release! This release is slightly different cut from the branch release/v0.28.x instead of main, this is because features that are not ready to ship are in the mainline currently and will be shipped as part of v0.29.0
- fix: Add friendly error if canvasElementId missing(#2885)
- fix: ex.Material no longer does lazy init, requires graphics context
- fix: Issue with pointer events on screen elements (#2902)
Also big thanks to @jyoung4242! This was his first contribution to Excalibur!
Full Changelog: v0.28.6...v0.28.7
Excalibur v0.28.6 Release
Another small release! A few bug fixes and some small features. Thanks @mattjennings for being MVP and testing all these bugs!
- Added arbitrary data storage in isometric tiles,
ex.IsometricTile.data
this brings it into feature parity with normalex.Tile.data
- New graphics events and hooks that allow you to hook into graphics drawing before or after any drawing transformations have been applied
Actor.graphics.onPreTransformDraw
with the corresponding event.on('pretransformdraw')
Actor.graphics.onPostTransformDraw
with the corresponding event.on('posttransformdraw')
- New property and methods overloads to
ex.Animation
ex.Animation.currentFrameTimeLeft
will return the current time in milliseconds left in the currentex.Animation.goToFrame(frameNumber: number, duration?: number)
now accepts an optional duration for the target frameex.Animation.speed
can set the speed multiplier on an animation 1 = 1x speed, 2 = 2x speed.
What's Changed
- feat: Animation current time methods by @eonarheim in #2874
- fix: Fixed update interpolation on child entities by @eonarheim in #2876
- feat: New graphics events by @eonarheim in #2877
- fix: Flatten composite colliders by @eonarheim in #2878
- feat: Add IsometricTile.data storage by @eonarheim in #2879
Full Changelog: v0.28.5...v0.28.6
Excalibur v0.28.5 Release
Another small release! A few bug fixes, QOL improvements, and fixes supporting the new Tiled plugin!
- Scenes can now have their own background color!
- Actions emit events on start and complete! Thanks @mattjennings
- Collision lifecycle methods on Actor! Thanks for the suggestion @mattjennings!
Features
- feat: Collision lifecycle convenience methods on Actor by @eonarheim in #2869
- feat: [#2856] Emit actionstart and actioncomplete events on actors by @mattjennings in #2857
- feat: Add Scene specific background color by @eonarheim in #2861
Fixes
- fix: Fixes for Tiled plugin by @eonarheim in #2858
- fix: [#2855] Remove dunder prefixed parameters by @eonarheim in #2859
- fix: [#2854] Actor pre/post draw events fixed by @eonarheim in #2860
- fix: Camera interpolation on fixed update by @eonarheim in #2868
Dependencies
- chore: Update dependency @babel/core to v7.23.7 by @renovate in #2862
- chore: Update dependency terser-webpack-plugin to v5.3.10 by @renovate in #2864
- chore: Update dependency typescript to v5.3.3 by @renovate in #2866
- chore: Update dependency @types/node to v18.19.4 by @renovate in #2863
Full Changelog: v0.28.4...v0.28.5