chore: Update dependency excalibur to v0.25.0 #303
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
0.24.5
->0.25.0
Release Notes
excaliburjs/Excalibur
v0.25.0
Compare Source
Breaking Changes
Actor Drawing:
ex.Actor.addDrawing
,ex.Actor.setDrawing
,onPostDraw()
, andonPreDraw()
are no longer on by default and will be removed in v0.26.0, they are available behind a flagex.Flags.useLegacyDrawing()
ex.Canvas
ex.Actor.rx
has been renamed toex.Actor.angularVelocity
Rename
ex.Edge
toex.EdgeCollider
andex.ConvexPolygon
toex.PolygonCollider
to avoid confusion and maintian consistencyex.Label
constructor now only takes the option bag constructor and the font properties have been replaced withex.Font
ex.Physics.debug
properties for Debug drawing are now moved toengine.debug.physics
,engine.debug.collider
, andengine.debug.body
.debugDraw(ctx: CanvasRenderingContext2D)
methods are removed.Collision
Pair
's are now between Collider's and not bodiesPerlinNoise
has been removed from the core repo will now be offered as a pluginLegacy drawing implementations are moved behind
ex.LegacyDrawing
new Graphics implemenations ofSprite
,SpriteSheet
,Animation
are now the default import.ex.LegacyDrawing.*
implementations you must opt-in with theex.Flags.useLegacyDrawing()
note: new graphics do not work in this egacy modeRenames
CollisionResolutionStrategy.Box
collision resolution strategy toArcade
Renames
CollisionResolutionStrategy.RigidBody
collision resolution strategy toRealistic
Collider
is now a first class type and encapsulates whatShape
used to be.Collider
is no longer a member of theBody
CollisionType
andCollisionGroup
are now a member of theBody
component, the reasoning is they define how the simulated physics body will behave in simulation.Timer
's no longer automatically start when added to aScene
, thisTimer.start()
must be called. (#1865)Timer.complete
is now read-only to prevent odd bugs, usereset()
,stop()
, andstart()
to manipulate timers.Actor.actions.repeat()
andActor.actions.repeatForever()
now require a handler that specifies the actions to repeat. This is more clear and helps prevent bugs like #1891Removes
Entity.components
as a way to access, add, and remove componentsex.Camera.z
has been renamed to propertyex.Camera.zoom
which is the zoom factorex.Camera.zoom(...)
has been renamed to functionex.Camera.zoomOverTime()
TileMap no longer needs registered SpriteSheets,
Sprite
's can be added directly toCell
's withaddGraphic
TileSprite
type is removed (Related to TileMap plugin updates https://github.com/excaliburjs/excalibur-tiled/issues/4, https://github.com/excaliburjs/excalibur-tiled/issues/23, https://github.com/excaliburjs/excalibur-tiled/issues/108)Directly changing debug drawing by
engine.isDebug = value
has been replaced byengine.showDebug(value)
andengine.toggleDebug()
(#1655)UIActor
Class instances need to be replaced toScreenElement
(This Class it's marked as Obsolete) (#1656)Switch to browser based promise, the Excalibur implementation
ex.Promise
is marked deprecated (#994)DisplayMode
's have changed (#1733) & (#1928):DisplayMode.FitContainer
fits the screen to the available width/height in the canvas parent element, while maintaining aspect ratio and resolutionDisplayMode.FillContainer
update the resolution and viewport dyanmically to fill the available space in the canvas parent element, DOES NOT preserveaspectRatio
DisplayMode.FitScreen
fits the screen to the available browser window space, while maintaining aspect ratio and resolutionDisplayMode.FillScreen
now does whatDisplayMode.FullScreen
used to do, the resolution and viewport dynamically adjust to fill the available space in the window, DOES NOT preserveaspectRatio
(#1733)DisplayMode.FullScreen
is now removed, useScreen.goFullScreen()
.SpriteSheet
now is immutable after creation to reduce chance of bugs if you modified a public field. The following properties are read-only:columns
,rows
,spWidth
,spHeight
,image
,sprites
andspacing
.Engine.pointerScope
now defaults to a more expectedex.Input.PointerScope.Canvas
instead ofex.Input.PointerScope.Document
which can cause frustrating bugs if building an HTML app with ExcaliburAdded
center
toScreen
to encapsulate screen center coordinates calculation considering zoom and device pixel ratioex.Shape.Capsule(width, height)
helper for defining capsule colliders, these are useful for ramps or jagged floor colliders.new Actor({collisionGroup: collisionGroup})
SpriteSheet.getSprite(x, y)
can retrieve a sprite from the SpriteSheet by x and y coordinate. For example,getSprite(0, 0)
returns the top left sprite in the sheet.SpriteSheet
's now have dimensionality withrows
andcolumns
optionally specified, if not there is always 1 row, andsprites.length
columnsnew Actor({radius: 10})
can now take a radius parameter to help create circular actorsExcaliburGraphicsContext
now supports drawing debug textEntity
may also now optionally have aname
, this is useful for finding entities by name or when displaying in debug mode.DebugSystem
ECS system will show debug drawing output for things toggled on/off in theengine.debug
section, this allows for a less cluttered debug experience.ex.Flags.useWebGL()
CollisionGroup
to define groups that collide with specified groupsCollisionGroup.collidesWith([groupA, groupB])
const groupAandB = CollisionGroup.combine([groupA, groupB])
const everthingButGroupA = groupA.invert()
CollisionSystem
andMotionSystem
ColliderComponent
to hold individualCollider
implementations likeCircle
,Box
, orCompositeCollider
Actor.collider.get()
will get the current colliderActor.collider.set(someCollider)
allows you to set a specific colliderCompositeCollider
type to combine multiple colliders together into one for an entity.collide
checksTransformComponent
to encapsulate Entity transform, that is to say position, rotation, and scaleMotionComponent
to encapsulate Entity transform values changing over time like velocity and accelerationText
graphics (#1866)TileMap
arbitrary graphics support with.addGraphic()
(#1862)TileMap
row and column accessorsgetRows()
andgetColumns()
(#1859)TileMap
cells withCell.data.set('key', 'value')
andCell.data.get('key')
(#1861)moveTo()
,moveBy()
,easeTo()
,scaleTo()
, andscaleBy()
now have vector overloadsAnimation.fromSpriteSheet
will now log a warning if an index into theSpriteSheet
is invalid (#1856)new ImageSource()
will now log a warning if an image type isn't fully supported. (#1855)Timer.start()
to explicitly start timers, andTimer.stop()
to stop timers and "rewind" them.Timer.timeToNextAction
will return the milliseconds until the next action callbackTimer.timeElapsedTowardNextAction
will return the milliseconds counted towards the next action callbackBoundingBox
now has a method for detecting zero dimensions in width or heighthasZeroDimensions()
BoundingBox
's can now bytransform
'd by aMatrix
new Entity(components: Component[])
constructor overload to create entities with components quickly.Entity.get(type: ComponentType)
to get strongly typed components if they exist on the entity.Entity.has(type: ComponentType)
overload to check if an entity has a component of that type.Entity.hasTag(tag: string)
,Entity.addTag(tag: string)
, andEntity.removeTag(tag: string, force: boolean)
.offscreen
is now added to entities that are offscreenEntity.componentAdded$
andEntity.componentRemoved$
for observing component changes on an entity.Entity.addChild(entity: Entity)
,Entity.removeChild(entity: Entity)
,Entity.removeAllChildren()
for managing child entitiesEntity.addTemplate(templateEntity: Entity)
for adding template entities or "prefab".Entity.parent
readonly accessor to the parent (if exists), andEntity.unparent()
to unparent an entity.Entity.getAncestors()
is a sorted list of parents starting with the topmost parent.Entity.children
readonly accessor to the list of children.DisplayMode.FitScreen
will now scale the game to fit the available space, preserving theaspectRatio
. (#1733)SpriteSheet.spacing
now accepts a structure{ top: number, left: number, margin: number }
for custom spacing dimensions (#1788)SpriteSheet.ctor
now has an overload that acceptsspacing
for consistency although the object constructor is recommended (#1788)SpriteSheet.getSpacingDimensions()
method to retrieve calculated spacing dimensions (#1788)KeyEvent.value?: string
which is the key value (or "typed" value) that the browser detected. For example, holding Shift and pressing 9 will have a value of(
which is the typed character.KeyEvent.originalEvent?: KeyboardEvent
which exposes the raw keyboard event handled from the browser.Changed
Gif
now supports new graphics componentAlgebra.ts
refactored into separate files inMath/
TileMap
now uses the built inCollider
component instead of custom collision code.ex.World
to encapsulate all things ECSex.CanvasDrawSystem
to handle all HTML Canvas 2D drawing via ECSex.Actor
to use newex.TransformComponent
andex.CanvasDrawComponent
Deprecated
Timer.unpause()
has be deprecated in favor ofTimer.resume()
(#1864)ex.SortedList
as deprecatedex.Promise
is marked deprecated (#994)ex.DisplayMode.Position
CSS can accomplish this task better than Excalibur (#1733)Removed
Fixed
ex.ColliderComponent
to not have a colliderex.CompositeCollider
ex.CompositeCollider
's individual colliders were erroneously generating pairsGraphicsOptions
width/height
could not be used to define aex.Sprite
with equivalentsourceView
anddestSize
(#1863)ex.Scene.onActivate/onDeactivate
were called with the wrong arguments (#1850)rotateTo
(#635)enterviewport
andexitviewport
eventex.Sprite
not rotating/scaling correctly around the anchor (Related to TileMap plugin updates https://github.com/excaliburjs/excalibur-tiled/issues/4, https://github.com/excaliburjs/excalibur-tiled/issues/23, https://github.com/excaliburjs/excalibur-tiled/issues/108)drawAroundAnchor
ex.Actor.easeTo
actions, they now use velocity to move Actors (#1638)Scene
constructor signature to make theEngine
argument optional (#1363)anchor
properly of single shapeActor
#1535Sound
resources would fail to load (#1848)Configuration
📅 Schedule: At any time (no schedule defined).
🚦 Automerge: Enabled.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR has been generated by WhiteSource Renovate. View repository job log here.