Excalibur 0.23.0

Excalibur.js is a simple JavaScript game engine with TypeScript bindings for making 2D games in HTML5 Canvas. Our mission is to make web game development as simple as possible.

There is a newer version of this package available.
See the version list below for details.
Install-Package Excalibur -Version 0.23.0
dotnet add package Excalibur --version 0.23.0
<PackageReference Include="Excalibur" Version="0.23.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Excalibur --version 0.23.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

image

Thanks to @DavidLi119, @radist2s, @magnusandy, @djcsdy, and @ZuzuZain for their contributions!

Breaking Changes

  • ex.Actor.scale, ex.Actor.sx/sy, ex.Actor.actions.scaleTo/scaleBy will not work as expected with new collider implementation, set width and height directly. These features will be completely removed in v0.24.0.

Added

  • Add new collision group implementation (#1091, #862)
  • New ex.Collider type which is the container for all collision related behavior and state. Actor is now extracted from collision.
  • Added interface Clonable&lt;T&gt; to indicate if an object contains a clone method
  • Added interface Eventable&lt;T&gt; to indicated if an object can emit and receive events
  • ex.Vector.scale now also works with vector input
  • ex.BoundingBox.fromDimension(width: number, height: number) can generate a bounding box from a width and height
  • ex.BoundingBox.translate(pos: Vector) will create a new bounding box shifted by pos
  • ex.BoundingBox.scale(scale: Vector) will create a new bounding box scaled by scale
  • Added isActor() and isCollider() type guards
  • Added ex.CollisionShape.draw collision shapes can now be drawn, actor's will use these shapes if no other drawing is specified
  • Added a getClosestLineBetween method to CollisionShape's for returning the closest line between 2 shapes (#1071)

Changed

  • Change ex.Actor.within to use surface of object geometry instead of the center to make judgements (#1071)

  • Changed moveBy, rotateBy, and scaleBy to operate relative to the current actor position at a speed, instead of moving to an absolute by a certain time.

  • Changed event handlers in excalibur to expect non-null event objects, before hander: (event?: GameEvent) =&gt; void implied that event could be null. This change addresses (#1147) making strict null/function checks compatible with new typescript.

  • Changed collision system to remove actor coupling, in addition ex.Collider is a new type that encapsulates all collision behavior. Use ex.Actor.body.collider to interact with collisions in Excalibur (#1119)

    • Add new ex.Collider type that is the housing for all collision related code
      • The source of truth for ex.CollisionType is now on collider, with a convenience getter on actor
      • The collision system now operates on ex.Collider's not ex.Actor's
    • ex.CollisionType has been moved to a separate file outside of Actor
      • CollisionType is switched to a string enum, style guide also updated
    • ex.CollisionPair now operates on a pair of ex.Colliders's instead of ex.Actors's
    • ex.CollisionContact now operates on a pair of ex.Collider's instead of ex.Actors's
    • ex.Body has been modified to house all the physical position/transform information
      • Integration has been moved from actor to Body as a physical concern
      • useBoxCollision has been renamed to useBoxCollider
      • useCircleCollision has been renamed to useCircleCollider
      • usePolygonCollision has been renamed to usePolygonCollider
      • useEdgeCollision has been renamed to useEdgeCollider
    • Renamed ex.CollisionArea to ex.CollisionShape
      • ex.CircleArea has been renamed to ex.Circle
      • ex.PolygonArea has been renamed to ex.ConvexPolygon
      • ex.EdgeArea has been renamed to ex.Edge
    • Renamed getWidth() & setWidth() to property width
      • Actor and BoundingBox are affected
    • Renamed getHeight() & setHeight() to property height
      • Actor and BoundingBox are affected
    • Renamed getCenter() to the property center
      • Actor, BoundingBox, and Cell are affected
    • Renamed getBounds() to the property bounds
      • Actor, Collider, and Shapes are affected
    • Renamed getRelativeBounds() to the property localBounds
      • Actor, Collider, and Shapes are affected
    • Renamed moi() to the property inertia standing for moment of inertia
    • Renamed restition to the property bounciness
    • Moved collisionType to Actor.body.collider.type
    • Moved Actor.integrate to Actor.body.integrate

Deprecated

  • Legacy groups ex.Group will be removed in v0.24.0, use collision groups as a replacement (#1091)

  • Legacy collision groups off Actor will be removed in v0.24.0, use Actor.body.collider.collisionGroup (#1091)

  • Removed NaiveCollisionBroadphase as it was no longer used

  • Renamed methods and properties will be available until v0.24.0

  • Deprecated collision attributes on actor, use Actor.body.collider

    • Actor.x & Actor.y will be removed in v0.24.0 use Actor.pos.x & Actor.pos.y
    • Actor.collisionArea will be removed in v0.24.0 use Actor.body.collider.shape
    • Actor.getLeft(), Actor.getRight(), Actor.getTop(), and Actor.getBottom are deprecated
      • Use Actor.body.collider.bounds.(left|right|top|bottom)
    • Actor.getGeometry() and Actor.getRelativeGeometry() are removed, use Collider
    • Collision related properties on Actor moved to Collider, useActor.body.collider
      • Actor.torque
      • Actor.mass
      • Actor.moi
      • Actor.friction
      • Actor.restition
    • Collision related methods on Actor moved to Collider, useActor.body.collider or Actor.body.collider.bounds
      • Actor.getSideFromIntersect(intersect) -> BoundingBox.sideFromIntersection
      • Actor.collidesWithSide(actor) -> Actor.body.collider.bounds.intersectWithSide
      • Actor.collides(actor) -> Actor.body.collider.bounds.intersect

Fixed

  • Fixed issue where leaking window/document handlers was possible when calling ex.Engine.stop() and ex.Engine.start(). (#1063)
  • Fixed wrong Camera and Loader scaling on HiDPI screens when option suppressHiDPIScaling is set. (#1120)
  • Fixed polyfill application by exporting a polyfill() function that can be called. (#1132)
  • Fixed Color.lighten() (#1084)

image

Thanks to @DavidLi119, @radist2s, @magnusandy, @djcsdy, and @ZuzuZain for their contributions!

Breaking Changes

  • ex.Actor.scale, ex.Actor.sx/sy, ex.Actor.actions.scaleTo/scaleBy will not work as expected with new collider implementation, set width and height directly. These features will be completely removed in v0.24.0.

Added

  • Add new collision group implementation (#1091, #862)
  • New ex.Collider type which is the container for all collision related behavior and state. Actor is now extracted from collision.
  • Added interface Clonable&lt;T&gt; to indicate if an object contains a clone method
  • Added interface Eventable&lt;T&gt; to indicated if an object can emit and receive events
  • ex.Vector.scale now also works with vector input
  • ex.BoundingBox.fromDimension(width: number, height: number) can generate a bounding box from a width and height
  • ex.BoundingBox.translate(pos: Vector) will create a new bounding box shifted by pos
  • ex.BoundingBox.scale(scale: Vector) will create a new bounding box scaled by scale
  • Added isActor() and isCollider() type guards
  • Added ex.CollisionShape.draw collision shapes can now be drawn, actor's will use these shapes if no other drawing is specified
  • Added a getClosestLineBetween method to CollisionShape's for returning the closest line between 2 shapes (#1071)

Changed

  • Change ex.Actor.within to use surface of object geometry instead of the center to make judgements (#1071)

  • Changed moveBy, rotateBy, and scaleBy to operate relative to the current actor position at a speed, instead of moving to an absolute by a certain time.

  • Changed event handlers in excalibur to expect non-null event objects, before hander: (event?: GameEvent) =&gt; void implied that event could be null. This change addresses (#1147) making strict null/function checks compatible with new typescript.

  • Changed collision system to remove actor coupling, in addition ex.Collider is a new type that encapsulates all collision behavior. Use ex.Actor.body.collider to interact with collisions in Excalibur (#1119)

    • Add new ex.Collider type that is the housing for all collision related code
      • The source of truth for ex.CollisionType is now on collider, with a convenience getter on actor
      • The collision system now operates on ex.Collider's not ex.Actor's
    • ex.CollisionType has been moved to a separate file outside of Actor
      • CollisionType is switched to a string enum, style guide also updated
    • ex.CollisionPair now operates on a pair of ex.Colliders's instead of ex.Actors's
    • ex.CollisionContact now operates on a pair of ex.Collider's instead of ex.Actors's
    • ex.Body has been modified to house all the physical position/transform information
      • Integration has been moved from actor to Body as a physical concern
      • useBoxCollision has been renamed to useBoxCollider
      • useCircleCollision has been renamed to useCircleCollider
      • usePolygonCollision has been renamed to usePolygonCollider
      • useEdgeCollision has been renamed to useEdgeCollider
    • Renamed ex.CollisionArea to ex.CollisionShape
      • ex.CircleArea has been renamed to ex.Circle
      • ex.PolygonArea has been renamed to ex.ConvexPolygon
      • ex.EdgeArea has been renamed to ex.Edge
    • Renamed getWidth() & setWidth() to property width
      • Actor and BoundingBox are affected
    • Renamed getHeight() & setHeight() to property height
      • Actor and BoundingBox are affected
    • Renamed getCenter() to the property center
      • Actor, BoundingBox, and Cell are affected
    • Renamed getBounds() to the property bounds
      • Actor, Collider, and Shapes are affected
    • Renamed getRelativeBounds() to the property localBounds
      • Actor, Collider, and Shapes are affected
    • Renamed moi() to the property inertia standing for moment of inertia
    • Renamed restition to the property bounciness
    • Moved collisionType to Actor.body.collider.type
    • Moved Actor.integrate to Actor.body.integrate

Deprecated

  • Legacy groups ex.Group will be removed in v0.24.0, use collision groups as a replacement (#1091)

  • Legacy collision groups off Actor will be removed in v0.24.0, use Actor.body.collider.collisionGroup (#1091)

  • Removed NaiveCollisionBroadphase as it was no longer used

  • Renamed methods and properties will be available until v0.24.0

  • Deprecated collision attributes on actor, use Actor.body.collider

    • Actor.x & Actor.y will be removed in v0.24.0 use Actor.pos.x & Actor.pos.y
    • Actor.collisionArea will be removed in v0.24.0 use Actor.body.collider.shape
    • Actor.getLeft(), Actor.getRight(), Actor.getTop(), and Actor.getBottom are deprecated
      • Use Actor.body.collider.bounds.(left|right|top|bottom)
    • Actor.getGeometry() and Actor.getRelativeGeometry() are removed, use Collider
    • Collision related properties on Actor moved to Collider, useActor.body.collider
      • Actor.torque
      • Actor.mass
      • Actor.moi
      • Actor.friction
      • Actor.restition
    • Collision related methods on Actor moved to Collider, useActor.body.collider or Actor.body.collider.bounds
      • Actor.getSideFromIntersect(intersect) -> BoundingBox.sideFromIntersection
      • Actor.collidesWithSide(actor) -> Actor.body.collider.bounds.intersectWithSide
      • Actor.collides(actor) -> Actor.body.collider.bounds.intersect

Fixed

  • Fixed issue where leaking window/document handlers was possible when calling ex.Engine.stop() and ex.Engine.start(). (#1063)
  • Fixed wrong Camera and Loader scaling on HiDPI screens when option suppressHiDPIScaling is set. (#1120)
  • Fixed polyfill application by exporting a polyfill() function that can be called. (#1132)
  • Fixed Color.lighten() (#1084)

Dependencies

This package has no dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version History

Version Downloads Last updated
0.24.3 61 5/10/2020
0.24.1 67 4/24/2020
0.24.0 65 4/24/2020
0.23.0 203 6/8/2019
0.22.0 200 4/6/2019
0.21.0 206 2/2/2019
0.20.0 262 12/23/2018
0.19.1 246 10/23/2018
0.19.0 276 10/13/2018
0.18.0 315 8/4/2018
0.17.0 336 6/16/2018
0.16.0 397 4/6/2018
0.15.0 324 2/17/2018
0.14.0 394 12/2/2017
0.13.0 392 10/7/2017
0.12.0 439 8/12/2017
0.11.0 518 6/10/2017
0.10.0 473 4/8/2017
0.9.0 473 2/10/2017
0.8.0 429 12/4/2016
0.7.1 555 10/4/2016
0.7.0 549 8/30/2016
0.6.0 769 1/20/2016
0.5.1 603 6/26/2015
0.5.0 563 6/4/2015
0.2.2 686 4/16/2014
0.2.1 599 4/16/2014
0.2.0 613 4/10/2014
0.1.1-alpha 533 12/19/2013
0.1.0-alpha 577 12/12/2013