github excaliburjs/Excalibur v0.31.0
Excalibur v0.31.0 Release

latest releases: 0.32.0-alpha.1518+6422563, 0.32.0-alpha.1517+3b8f7c1
6 hours ago

excalibur logo

Added

  • Added new ex.Camera.setStrategies() and ex.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 optional data argument in fromSpriteSheet(...) and as an option in fromSpriteSheetCoordinates({...})
  • 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 next SceneActivationContext in the previousSceneData property!
  • Added new transitionstart and transitionend events to ex.Scenes
  • Pipe navigation* events to ex.Engine
  • Added ability to use ex.Vector to specify offset and margin in SpriteSheet.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 to MotionComponent, which clamps velocity on separated X and Y axes
  • Add Clock.clearSchedule(id) and have Clock.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 like anim.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 respect ParticleTransform.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 have ex.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 indexto disabiguate between ex.Buttons.Unknown
  • 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({...}) and clone() of ex.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

New Contributors

Full Changelog: v0.30.3...v0.31.0

Don't miss a new Excalibur release

NewReleases is sending notifications on new releases.