Added
- Added new
ex.Camera.setStrategies()
andex.Camera.strategies
for additional control of strategy order - Fixed ex.Font measureText always using 10px sans-serif on the first call on some browsers
- Added a new
ex.Sound({...})
option back constructor to set all the same props available on sound - Added a new
ex.SoundManager
type for managing groups of audio/sound effects/music volume in an easier way
const soundManager = new ex.SoundManger({
channels: ['fx', 'music', 'background'],
sounds: {
jumpSnd: { sound: jumpSnd, volume: 0.4, channels: ['fx'] },
forestSnd: { sound: forestSnd, volume: 0.2, channels: ['music', 'background'] },
challengeMusic: { sound: challengeMusic, volume: 0.2, channels: ['music'] },
guitarLoop: { sound: guitarLoop, volume: 0.2, channels: ['music'] }
}
});
// play a specific sound
soundManager.play('jumpSnd');
// mute a specific channel with all member sounds
soundManager.channel.mute('music');
// mute all sound
soundManager.mute();
// unmute all sound that was previously muted, and resume playing from the current location
soundManager.unmute();
// unmute a specific channel that was muted
soundManager.channel.unmute('music');
// play a specific channel
soundManager.channel.play('music');
// set the max volume of an entire channel
soundManager.channel.setVolume('music', 0.9);
- Added
ex.Animation.data
to store arbitrary meta data for an animation. Data can be directly added in the constructor as an option, by using the optionaldata
argument infromSpriteSheet(...)
and as an option infromSpriteSheetCoordinates({...})
- Added a new configuration option to
ex.Engine({global: ...})
where you can provide a keyboard global to override if iframe detection fails for anyway. - Added new way to output data from scenes
onDeactivate()
, returning data will be passed to the nextSceneActivationContext
in thepreviousSceneData
property! - Added new
transitionstart
andtransitionend
events toex.Scenes
- Pipe
navigation*
events toex.Engine
- Added ability to use
ex.Vector
to specify offset and margin inSpriteSheet.fromImageSource({..})
- New PostProcessor.onDraw() hook to handle uploading textures
- Adds contact solve bias to RealisticSolver, this allows customization on which direction contacts are solved first. By default there is no bias set to 'none'.
- Queries can now take additional options to filter in/out by components or tags.
const query = new Query({
// all fields are optional
components: {
all: [ComponentA, ComponentB] as const, // important for type safety!
any: [ComponentC, ComponentD] as const, // important for type safety!
not: [ComponentE]
},
tags: {
all: ['tagA', 'tagB'],
any: ['tagC', 'tagD'],
not: ['tagE']
}
})
// previous constructor type still works and is shorthand for components.all
new Query([ComponentA, ComponentB] as const)
- Queries can now match all entities by specifying no filters
const query = new Query({})
- Adds
maxVel
attribute toMotionComponent
, which clamps velocity on separated X and Y axes - Add
Clock.clearSchedule(id)
and haveClock.schedule
return an ID so you can clear a scheduled callback before it fires
Fixed
- Fixed issue where
ParticleEmitter
Particle
did not receive z index value from emitter when in World space - Fixed issue where an animation that was
anim.reset()
inside of an animation event handler likeanim.once('end', () => anim.reset())
would not work correctly - Fixed issue where
GpuParticleEmitter
did not rotate with their parents - Fixed issue where Cpu
ParticleEmitter
did not respectParticleTransform.Local
- Fixed issue where same origin iframes did not work properly with keyboard & pointer events
- Fixed issue where the initial scene onPreLoad was not being run
- Fixed unecessary coupling with
ex.ColliderComponent
/ex.BodyComponent
that prevented collider tracking on entities that haveex.TransformComponent
/ex.ColliderComponent
, this influenced users doing Entity level ECS with pointer events. - Fixed issue where passing 0 to
ex.Sound.play(0)
would not set the volume to 0, instead the previous volume would play. - Fixed issue where the Actor.color did not respect being set
- Fixed offscreen culling issue when using parallax on TileMaps
- Fixed division by 0 when timescale is 0 in actions
- Fixed
onTransition
on the initial scene transition - Fixed
ex.TriggerOptions
type to all optional parameters - Fixed issue where the ActorArgs type hint would not error when providing a color causing confusion when it didn't produce a default graphic.
- Fixed false positive warning when adding timers
- Fixed issue where gamepad buttons wouldn't progress the default loader play button
- Add defense around middling Safari fullscreen support and update documentation
- Fixed issue where non-standard gamepad buttons would not be emitted by Excalibur
- Added an additional param to the
ex.GamepadButtonEvent
index
to disabiguate betweenex.Buttons.Unknown
- Added an additional param to the
- Fixed issue where Realistic solver would not sort contacts by distance causing some artifacts on seams
- Fixed issue with CompositeCollider where large TileMaps would sometimes causes odd collision behavior in the Realistic Solver when the body & collider components are far apart in a TileMap.
- 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
- Removed warning in development for unadded entities
- Fixed memory leaks from retained entities in
Map<Entity>
Changed
- Updated
ex.Camera.addStrategy()
to accept multiple strategies - Changed the behavior of
fromSpriteSheet(...)
,fromSpriteSheetCoordinates({...})
andclone()
ofex.Animation
to return the subclass if called from there - Optimized BoundingBox.rayCast and BoundingBox.rayCastTime
- Optimized BoundingBox.intersect(otherBoundingBox)
- Change logging behavior for entities not in scenes, only log in dev builds
What's Changed
- BUG: fixed actor cloning of null collider, added test by @jyoung4242 in #3345
- docs: update Bluesky href to current by @chrisalley in #3347
- Revert "chore: Update docusaurus monorepo to v3.7.0" by @eonarheim in #3349
- fix: composite multi contact by @eonarheim in #3351
- fix: Spritesheet Spacing Options, allowing Vectors by @jyoung4242 in #3350
- fix: Add missing events for transitions + Fix onTransition for initial scene transition by @eonarheim in #3359
- docs: fix typo "n Excalibur" -> "in Excalibur" in tutorial step 03 by @npretto in #3361
- feat: Implement Uniform Buffers Object Support by @eonarheim in #3360
- docs: new years post by @eonarheim in #3344
- fix: TileMap meshes properly when transform changes by @eonarheim in #3384
- DOCS: Update screens-display-modes.mdx by @jyoung4242 in #3407
- docs: adds additional details to building up an isometric scene by @chrisk-7777 in #3411
- chore: migrate tests to vitest by @mattjennings in #3381
- fix: [#3389] TileMap culling when using parallax by @eonarheim in #3406
- #3424 feat: Add maxVel to MotionComponent by @kfalicov in #3425
- BugFix : Issue 3427, ScreenAppender blocks pointerevents by @jyoung4242 in #3428
- add EulerIntegrator tests by @mattjennings in #3429
- updated Meet action to add tolerance by @jyoung4242 in #3385
- feat(Clock): Add API to clearSchedule by @kamranayub in #3446
- Use vite for excalibur build by @mattjennings in #3434
- feat: Implement Scene deactivation data passing by @eonarheim in #3449
- fix: [#3412] collider body coupling by @eonarheim in #3451
- fix: [#3452] Initial scene respects onPreLoad by @eonarheim in #3453
- feat: support any, all and not component/tag filters on Query by @mattjennings in #3380
- Graph Module by @jyoung4242 in #3433
- refactor: Optimize BoundingBox/Raycast by @eonarheim in #3454
- Update 00-z-quick-start.mdx by @jyoung4242 in #3465
- Update 00-z-quick-start.mdx by @jyoung4242 in #3466
- Correct scene-crossfade.ts example by @eugenemed in #3467
- fix: ex.Random improve unique seeding on constructor w/o provided seed by @jyoung4242 in #3470
- fix: Keyboard events on same origin iframes by @eonarheim in #3471
- fix: [#3469] GpuParticle rotation is respected by @eonarheim in #3473
- Improved flappy bird tutorial by @Clemix37 in #3474
- added AxeNArrow to showcase by @jyoung4242 in #3476
- fix: Animation behavior when reset() from animation event by @eonarheim in #3489
- feat: Support meta data for Animation by @thplat in #3490
- removes unadded entity warning by @mattjennings in #3492
- change: return subclass for Animation factories by @thplat in #3493
- Feature: Added lerp method to vector class by @jyoung4242 in #3491
- Added 2 references to showcase by @DavDag in #3496
- feat: Add SoundManager for managing music/fx/audio in a friendly way by @eonarheim in #3472
- Add call to super.update by @SanjoSolutions in #3500
- [Bug] Collider.ts, touching(), returning always true by @jyoung4242 in #3498
- [Article-blog] Dual Grid AutoTiling by @jyoung4242 in #3504
- fix: Apply z index to particles [#3503] by @chrisk-7777 in #3505
- fix(Engine): Remove canvas only when it has been created by @SanjoSolutions in #3506
- fix: Clean up memory leaks from Entities in Maps [#3510] by @BaconSoap in #3511
- chore: split out vitest tests into visual & unit by @mattjennings in #3508
- [DOC tweak in material documentation] Update 04.2-material.mdx by @jyoung4242 in #3512
- feat: Add Camera methods to control strategy priority by @chrisk-7777 in #3509
- site: Add Excalitris Sample by @chrisk-7777 in #3518
- Site samples styles by @chrisk-7777 in #3520
New Contributors
- @chrisalley made their first contribution in #3347
- @npretto made their first contribution in #3361
- @chrisk-7777 made their first contribution in #3411
- @kfalicov made their first contribution in #3425
- @eugenemed made their first contribution in #3467
- @Clemix37 made their first contribution in #3474
- @thplat made their first contribution in #3490
- @DavDag made their first contribution in #3496
- @SanjoSolutions made their first contribution in #3500
- @BaconSoap made their first contribution in #3511
Full Changelog: v0.30.3...v0.31.0