Breaking Changes
- Triggers now have a new option bag constructor using the
ITriggerOptions
interface. (#863). update
event replaced withpostupdate
eventCollisionEvent
replaced byPreCollisionEvent
getDrawWidth()
andgetDrawHeight()
replaced with the gettersdrawWidth
anddrawHeight
PointerEvent.x
andPointerEvent.y
replaced withPointerEvent.pos
Added
- Automatic HiDPI screen detection and scaling in excalibur internals to correct blurry bitmap rendering on HiDPI screens. This feature can optionally be suppressed with
IEngineOptions.suppressHiDPIScaling
. - Added new line utility
Line.normal()
andLine.distanceToPoint
(#703) - Added new PolygonArea utility
PolygonArea.getClosestFace(point)
(#703) - Triggers now fire an
EnterTriggerEvent
when an actor enters the trigger, and anExitTriggerEvent
when an actor exits the trigger. (#863) - Actors have a new events
CollisionStart
which when 2 actors first start colliding andCollisionEnd
when 2 actors are no longer colliding. (#863) - New camera strategies implementation for following targets in a scene. Allows for custom strategies to be implemented on top of some prebuilt
LockCameraToActorStrategy
which behaves likeLockedCamera
and can be switched on withCamera.strategy.lockToActor(actor)
.LockCameraToActorAxisStrategy
which behaves likeSideCamera
and can be switched on withCamera.strategy.lockToActorAxis(actor, ex.Axis.X)
ElasticToActorStrategy
which is a new strategy that elastically moves the camera to an actor and can be switched on withCamera.strategy.elasticToActor(actor, cameraElasticity, cameraFriction)
CircleAroundActorStrategy
which is a new strategy that will follow an actor when a certain radius from the camera focus and can be switched on withCamera.strategy.circleAroundActor(actor)
Changed
- Trigger have been rebuilt to provide a better experience. The trigger
action
only fires when an actor enters the designated area instead of every frame of collision. (#863) - Triggers can now draw like other Actors, but are still not visible by default (#863)
Deprecated
Body.wasTouching
has been deprecated in favor of a new event typeCollisionEnd
(#863)SideCamera
andLockedCamera
are deprecated in favor of camera strategies
Fixed
- Fixed odd jumping behavior when polygons collided with the end of an edge (#703)