Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update dependency excalibur to v0.27.0 #5

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

renovate[bot]
Copy link

@renovate renovate bot commented Sep 3, 2020

Mend Renovate

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
excalibur 0.24.3 -> 0.27.0 age adoption passing confidence

Release Notes

excaliburjs/Excalibur

v0.27.0

Compare Source

Breaking Changes
  • ex.Engine.snapToPixel now defaults to false, it was unexpected to have pixel snapping on by default it has now been switched.
  • The ex.Physics.useRealisticPhysics() physics solver has been updated to fix a bug in bounciness to be more physically accurate, this does change how physics behaves. Setting ex.Body.bounciness = 0 will simulate the old behavior.
  • ex.TransformComponent.posChanged$ has been removed, it incurs a steep performance cost
  • ex.EventDispatcher meta events 'subscribe' and 'unsubscribe' were unused and undocumented and have been removed
  • ex.TileMap tlies are now drawn from the lower left by default to match with ex.IsometricMap and Tiled, but can be configured with renderFromTopOfGraphic to restore the previous behavior.
  • Scene onActivate and onDeactivate methods have been changed to receive a single parameter, an object containing the previousScene, nextScene, and optional data passed in from goToScene()
Deprecated
Added
  • Added new configurable ex.TileMap option for rendering from the bottom or the top of the graphic, this matches with ex.IsometricMap and how Tiled renders renderFromTopOfGraphic, by default false and renders from the bottom.

    const tileMap = new ex.TileMap({
      renderFromTopOfGraphic: false
    })
  • Added new ex.Future type which is a convenient way of wrapping a native browser promise and resolving/rejecting later

    const future = new ex.Future();
    const promise = future.promise; // returns promise
    promise.then(() => {
      console.log('Resolved!');
    });
    future.resolve(); // resolved promise
  • Added new ex.Semaphore type to limit the number of concurrent cans in a section of code, this is used internally to work around a chrome browser limitation, but can be useful for throttling network calls or even async game events.

    const semaphore = new ex.Semaphore(10); // Only allow 10 concurrent between enter() and exit()
    ...
    
    await semaphore.enter();
    await methodToBeLimited();
    semaphore.exit();
  • Added new ex.WatchVector type that can observe changes to x/y more efficiently than ex.watch()

  • Added performance improvements

    • ex.Vector.distance improvement
    • ex.BoundingBox.transform improvement
  • Added ability to clone ex.Vector.clone(destVector) into a destination vector

  • Added new ex.Transform type that is a light weight container for transformation data. This logic has been extracted from the ex.TransformComponent, this makes it easy to pass ex.Transforms around. Additionally the extracted ex.Transform logic has been refactored for performance.

  • Added new ex.AffineMatrix that is meant for 2D affine transformations, it uses less memory and performs less calculations than the ex.Matrix which uses a 4x4 Float32 matrix.

  • Added new fixed update step to Excalibur! This allows developers to configure a fixed FPS for the update loop. One advantage of setting a fix update is that you will have a more consistent and predictable physics simulation. Excalibur graphics will be interpolated automatically to avoid any jitter in the fixed update.

    • If the fixed update FPS is greater than the display FPS, excalibur will run multiple updates in a row (at the configured update elapsed) to catch up, for example there could be X updates and 1 draw each clock step.
    • If the fixed update FPS is less than the display FPS, excalibur will skip updates until it meets the desired FPS, for example there could be no update for 1 draw each clock step.
    const game = new ex.Engine({
      fixedUpdateFps: 20 // 20 fps fixed update, or a fixed update delta of 50 milliseconds
    });
    // turn off interpolation on a per actor basis
    const actor = new ex.Actor({...});
    actor.body.enableFixedUpdateInterpolate = false;
    game.add(game);
  • Allowed setting playback ex.Sound.duration which will limit the amount of time that a clip plays from the current playback position.

  • Added a new lightweight ex.StateMachine type for building finite state machines

    const machine = ex.StateMachine.create({
      start: 'STOPPED',
      states: {
        PLAYING: {
          onEnter: () => {
            console.log("playing");
          },
          transitions: ['STOPPED', 'PAUSED']
        },
        STOPPED: {
          onEnter: () => {
            console.log("stopped");
          },
          transitions: ['PLAYING', 'SEEK']
        },
        SEEK: {
          transitions: ['*']
        },
        PAUSED: {
          onEnter: () => {
            console.log("paused")
          },
          transitions: ['PLAYING', 'STOPPED']
        }
      }
    });
  • Added ex.Sound.seek(positionInSeconds) which will allow you to see to a place in the sound, this will implicitly pause the sound

  • Added ex.Sound.getTotalPlaybackDuration() which will return the total time in the sound in seconds.

  • Allow tinting of ex.Sprite's by setting a new tint property, renderers must support the tint property in order to function.

    const imageSource = new ex.ImageSource('./path/to/image.png');
    await imageSource.load();
    const sprite = imageSource.toSprite();
    sprite.tint = ex.Color.Red;
  • Added ex.Sound.getPlaybackPosition() which returns the current playback position in seconds of the currently playing sound.

  • Added ex.Sound.playbackRate which allows developers to get/set the current rate of playback. 1.0 is the default playback rate, 2.0 is twice the speed, and 0.5 is half speed.

  • Added missing ex.EaseBy action type, uses ex.EasingFunctions to move relative from the current entity position.

  • Added 2 new Action types to enable running parallel actions. ex.ActionSequence which allows developers to specify a sequence of actions to run in order, and ex.ParallelActions to run multiple actions at the same time.

    const actor = new ex.Actor();
    const parallel = new ex.ParallelActions([
      new ex.ActionSequence(actor, ctx => ctx.moveTo(ex.vec(100, 0), 100)),
      new ex.ActionSequence(actor, ctx => ctx.rotateTo(Math.PI/2, Math.PI/2))
    ]);
    actor.actions.runAction(parallel);
    // actor will now move to (100, 100) and rotate to Math.PI/2 at the same time!!
  • Add target element id to ex.Screen.goFullScreen('some-element-id') to influence the fullscreen element in the fullscreen browser API.

  • Added optional data parameter to goToScene, which gets passed to the target scene's onActivate method.

    class SceneA extends ex.Scene {
      /* ... */
    
      onActivate(context: ex.SceneActivationContext<{ foo: string }>) {
        console.log(context.data.foo); // bar
      }
    }
    
    engine.goToScene('sceneA', { foo: 'bar' })
    • Added the ability to select variable duration into Timer constructor.
    const random = new ex.Random(1337);
    const timer = new ex.Timer({
      random,
      interval: 500,
      randomRange: [0, 500]
    })
Fixed
  • Fixed issue with ex.Canvas and ex.Raster graphics that forced their dimensions to the next highest power of two.

  • Fixed issue with ex.Engine.snapToPixel where positions very close to pixel boundary created jarring 1 pixel oscillations.

  • Fixed bug where a deferred goToScene would preserve the incorrect scene so engine.add(someActor) would place actors in the wrong scene after transitioning to another.

  • Fixed usability issue and log warning if the ex.ImageSource is not loaded and a draw was attempted.

  • Fixed bug in ex.Physics.useRealisticPhysics() solver where ex.Body.bounciness was not being respected in the simulation

  • Fixed bug in ex.Physics.useRealisticPhysics() solver where ex.Body.limitDegreeOfFreedom was not working all the time.

  • Fixed bug in Clock.schedule where callbacks would not fire at the correct time, this was because it was scheduling using browser time and not the clock's internal time.

  • Fixed issue in Chromium browsers where Excalibur crashes if more than 256 Image.decode() calls are happening in the same frame.

  • Fixed issue where ex.EdgeCollider were not working properly in ex.CompositeCollider for ex.TileMap's

  • Fixed issue where ex.BoundingBox overlap return false due to floating point rounding error causing multiple collisions to be evaluated sometimes

  • Fixed issue with ex.EventDispatcher where removing a handler that didn't already exist would remove another handler by mistake

  • Fixed issue with ex.EventDispatcher where concurrent modifications of the handler list where handlers would or would not fire correctly and throw

  • Tweak to the ex.ArcadeSolver to produce more stable results by adjusting by an infinitesimal epsilon

    • Contacts with overlap smaller than the epsilon are ignored
    • Colliders with bounds that overlap smaller than the epsilon are ignored
  • Fixed issue with ex.ArcadeSolver based collisions where colliders were catching on seams when sliding along a floor of multiple colliders. This was by sorting contacts by distance between bodies.
    sorted-collisions

  • Fixed issue with ex.ArcadeSolver where corner contacts would zero out velocity even if the bodies were already moving away from the contact "divergent contacts".
    cancel-velocity-fix

  • Fixed issue where ex.Sound wasn't being paused when the browser window lost focus

Updates
  • Updated the collision system to improve performance
    • Cache computed values where possible
    • Avoid calculating transformations until absolutely necessary
    • Avoid calling methods in tight loops
Changed
  • ex.Engine.configurePerformanceCanvas2DFallback no longer requires threshold or showPlayerMessage
  • ex.Engine.snapToPixel now defaults to false
  • Most places where ex.Matrix was used have been switched to ex.AffineMatrix
  • Most places where ex.TransformComponent was used have been switched to ex.Transform

v0.26.0

Compare Source

Breaking Changes
  • ex.Line has be replaced with a new Graphics type, the old geometric behavior is now under the type ex.LineSegment
  • Notable deprecated types removed
    • ex.SortedList old sorted list is removed
    • ex.Collection old collection type is removed
    • ex.Util import site, exported code promoted ex.*
    • ex.DisplayMode.Position is removed, use CSS to position the canvas
    • ex.Trait interface, traits are not longer supported
    • ex.Promises old promise implementation is removed in favor of browser promises
  • Notable method & property removals
    • ex.Actor
      • .getZIndex() and .setZIndex() removed use .z
    • ex.Scene
      • .screenElements removed in favor of .entities
      • .addScreenElement(...) removed use .add(...)
      • .addTileMap(...) removed use .add(...)
      • .removeTileMap(...) removed use .remove(...)
    • ex.Timer
      • .unpause() removed use .resume()
    • ex.Camera
      • .rx removed use .angularVelocity
    • ex.BodyComponent
      • .sx removed use .scaleFactor
      • .rx removed use .angularVelocity
    • ex.ActionsComponent
      • .asPromise() removed use .toPromise()
    • ex.ActionContext
      • .asPromise() removed use .toPromise()
    • ex.Color
      • Misspellings corrected
  • The old drawing API had been removed from excalibur, this should not affect you unless you were using the ex.Flags.useLegacyDrawing() or ex.Flags.useCanvasGraphicsContext().
    • Notably all implementations of Drawable are removed, use the new Graphics API
    • Methods on actor ex.Actor.setDrawing(...), ex.Actor.addDrawing(...) are removed, use the ex.Actor.graphics.add(...), ex.Actor.graphics.show(...) and ex.Actor.graphics.use(...)
    • The ex.Actor.onPreDraw(...) and ex.Actor.onPostDraw(...) are removed, use ex.Actor.graphics.onPreDraw(...) and ex.Actor.graphics.onPostDraw(...)
    • The events predraw and postdraw are removed
    • ex.Scene.onPreDraw() and ex.Scene.onPostDraw() are now called with the ExcaliburGraphicsContext instead of an CanvasRenderingContext2D
  • ex.TileMap has several breaking changes around naming, but brings it consistent with Tiled terminology and the new ex.IsometricMap. Additionally the new names are easier to follow.
    • Constructor has been changed to the following
       new ex.TileMap({
        pos: ex.vec(100, 100),
        tileWidth: 64,
        tileHeight: 48,
        rows: 20,
        columns: 20
      });
    • ex.Cell has been renamed to ex.Tile
      • ex.Tile now uses addGraphic(...), removeGraphic(...), clearGraphics() and getGraphics() instead of having an accessible ex.Tile.graphics array.
    • ex.TileMap.data has been renamed to ex.TileMap.tiles
    • ex.TileMap.getCell(..) has been renamed to ex.TileMap.getTile(...)
    • ex.TileMap.getCellByIndex(...) has been renamed to ex.TileMap.getTileByIndex(...)
    • ex.TileMap.getCellByPoint(...) has been renamed to ex.TileMap.getTileByPoint(...)
Deprecated
Added
  • Added new parameter to ex.Raster({quality: 4}) to specify the internal scaling for the bitmap, this is useful for improving the rendering quality of small rasters due to sampling error.

  • Added new ex.Line graphics object for drawing lines!

    const lineActor = new ex.Actor({
      pos: ex.vec(100, 0)
    });
    lineActor.graphics.anchor = ex.Vector.Zero;
    lineActor.graphics.use(new ex.Line({
      start: ex.vec(0, 0),
      end: ex.vec(200, 200),
      color: ex.Color.Green,
      thickness: 10
    }));
    game.add(lineActor);
  • Added new performance fallback configuration to ex.Engine for developers to help players experiencing poor performance in non-standard browser configurations

    • This will fallback to the Canvas2D rendering graphics context which usually performs better on non hardware accelerated browsers, currently postprocessing effects are unavailable in this fallback.
    • By default if a game is running at 20fps or lower for 100 frames or more after the game has started it will be triggered, the developer can optionally show a player message that is off by default.
      var game = new ex.Engine({
        ...
        configurePerformanceCanvas2DFallback: {
          allow: true, // opt-out of the fallback
          showPlayerMessage: true, // opt-in to a player pop-up message
          threshold: { fps: 20, numberOfFrames: 100 } // configure the threshold to trigger the fallback
        }
      });
  • Added new ex.ParallaxComponent for creating parallax effects on the graphics, entities with this component are drawn differently and a collider will not be where you expect. It is not recommended you use colliders with parallax entities.

    const actor = new ex.Actor();
    // The actor will be drawn shifted based on the camera position scaled by the parallax factor
    actor.addComponent(new ParallaxComponent(ex.vec(0.5, 0.5)));
  • Added feature to build SpriteSheets from a list of different sized source views using ex.SpriteSheet.fromImageSourceWithSourceViews(...)

      const ss = ex.SpriteSheet.fromImageSourceWithSourceViews({
        image,
        sourceViews: [
          {x: 0, y: 0, width: 20, height: 30},
          {x: 20, y: 0, width: 40, height: 50},
        ]
      });
  • Added draw call sorting new ex.Engine({useDrawSorting: true}) to efficiently draw render plugins in batches to avoid expensive renderer switching as much as possible. By default this is turned on, but can be opted out of.

  • Added the ability to clone into a target Matrix this is useful to save allocations and in turn garbage collection pauses.

  • ex.Engine now support setting the pixel ratio in the constructor new ex.Engine({pixelRatio: 2}), this is useful for smooth ex.Text rendering when antialiasing: false and rendering pixel art type graphics

  • ex.TileMap now supports per Tile custom colliders!

    const tileMap = new ex.TileMap(...);
    const tile = tileMap.getTile(0, 0);
    tile.solid = true;
    tile.addCollider(...); // add your custom collider!
  • New ex.IsometricMap for drawing isometric grids! (They also support custom colliders via the same mechanism as ex.TileMap)

    new ex.IsometricMap({
        pos: ex.vec(250, 10),
        tileWidth: 32,
        tileHeight: 16,
        columns: 15,
        rows: 15
      });
    • ex.IsometricTile now come with a ex.IsometricEntityComponent which can be applied to any entity that needs to be correctly sorted to preserve the isometric illusion
    • ex.IsometricEntitySystem generates a new z-index based on the elevation and y position of an entity with ex.IsometricEntityComponent
  • Added arbitrary non-convex polygon support (only non-self intersecting) with ex.PolygonCollider(...).triangulate() which builds a new ex.CompositeCollider composed of triangles.

  • Added faster ex.BoundingBox.transform(...) implementation.

  • Added faster ex.BoundingBox.overlap(...) implementation.

  • Added ex.Vector.min(...) and ex.Vector.max(...) to find the min/max of each vector component between 2 vectors.

  • Added ex.TransformComponent.zIndexChange$ observable to watch when z index changes.

  • Added new display mode ex.DisplayMode.FitContainerAndFill.

  • Added new display mode ex.DisplayMode.FitScreenAndFill.

  • Added new display mode ex.DisplayMode.FitContainerAndZoom.

  • Added new display mode ex.DisplayMode.FitScreenAndZoom.

Fixed
  • Fixed unreleased issue where fixed update interpolation was incorrect with child actors
  • Fixed unreleased bug where CompositeCollider components would not collide appropriately because contacts did not have unique ids
  • Fixed issue where CompositeColliders treat separate constituents as separate collisionstart/collisionend which is unexpected
  • Fixed issue where resources that failed to load would silently fail making debugging challenging
  • Fixed issue where large pieces of Text were rendered as black rectangles on mobile, excalibur now internally breaks these into smaller chunks in order to render them.
  • Fixed issue #​2263 where keyboard input wasPressed was not working in the onPostUpdate lifecycle
  • Fixed issue #​2263 where there were some keys missing from the ex.Input.Keys enum, including Enter
  • Fixed issue where Rectangle line renderer did not respect z order
Updates
  • Performance improvement to the ex.Loader screen keeping frame rates higher by only updating the backing ex.Canvas when there are changes
  • Improved collision broadphase by swapping to a more efficient ex.BoundingBox.overlaps check
  • Improved collision narrowphase by improving ex.PolygonCollider calculations for localBounds, bounds, and transformed point geometry
  • Improved Text/Font performance by internally caching expensive native measureText() calls
  • Performance improvement to GraphicsSystem
  • Performance improvement to the transform capture of the previous frame transform and motion
Changed
  • Split offscreen detection into a separate system
  • Renamed ex.Matrix.multv() and ex.Matrix.multm() to ex.Matrix.multiply() which matches our naming conventions

v0.25.3

Compare Source

v0.25.2

Compare Source

Breaking Changes
  • ex.Util.extend() is removed, modern js spread operator {...someobject, ...someotherobject} handles this better.
  • Excalibur post processing is now moved to the engine.graphicsContext.addPostProcessor()
  • Breaking change to ex.PostProcessor, all post processors must now now implement this interface
    export interface PostProcessor {
      intialize(gl: WebGLRenderingContext): void;
      getShader(): Shader;
    }
Deprecated
  • The static Engine.createMainLoop is now marked deprecated and will be removed in v0.26.0, it is replaced by the Clock api
  • Mark legacy draw routines in ex.Engine, ex.Scene, and ex.Actor deprecated
Added
  • Added ability to build custom renderer plugins that are accessible to the ex.ExcaliburGraphicsContext.draw<TCustomRenderer>(...) after registering them ex.ExcaliburGraphicsContext.register(new LineRenderer())

  • Added ability to draw circles and rectangles with outlines! ex.ExcaliburGraphicsContext.drawCircle(...) and ex.ExcaliburGraphicsContext.drawRectangle(...)

  • Added ex.CoordPlane can be set in the new ex.Actor({coordPlane: CoordPlane.Screen}) constructor

  • Added convenience feature, setting the color, sets the color on default graphic if applicable

  • Added a DebugGraphicsComponent for doing direct debug draw in the DebugSystem

  • Added back TileMap debug draw

  • Added ex.Scene.timers to expose the list of timers

  • Added support for different webgl texture blending modes as ex.ImageFiltering :

    • ex.ImageFiltering.Blended - Blended is useful when you have high resolution artwork and would like it blended and smoothed
    • ex.ImageFiltering.Pixel - Pixel is useful when you do not want smoothing aka antialiasing applied to your graphics.
  • Excalibur will set a "default" blend mode based on the ex.EngineOption antialiasing property, but can be overridden per graphic

    • antialiasing: true, then the blend mode defaults to ex.ImageFiltering.Blended
    • antialiasing: false, then the blend mode defaults to ex.ImageFiltering.Pixel
  • ex.Text/ex.Font defaults to blended which improves the default look of text rendering dramatically!

  • ex.Circle and ex.Polygon also default to blended which improves the default look dramatically!

  • ex.ImageSource can now specify a blend mode before the Image is loaded, otherwise

  • Added new measureText method to the ex.SpriteFont and ex.Font to return the bounds of any particular text

  • Added new Clock api to manage the core main loop. Clocks hide the implementation detail of how the mainloop runs, users just knows that it ticks somehow. Clocks additionally encapsulate any related browser timing, like performance.now()

    1. StandardClock encapsulates the existing requestAnimationFrame api logic
    2. TestClock allows a user to manually step the mainloop, this can be useful for frame by frame debugging #​1170
    3. The base abstract clock implements the specifics of elapsed time
  • Added a new feature to Engine options to set a maximum fps new ex.Engine({...options, maxFps: 30}). This can be useful when needing to deliver a consistent experience across devices.

  • Pointers can now be configured to use the collider or the graphics bounds as the target for pointers with the ex.PointerComponent

    • useColliderShape - (default true) uses the collider component geometry for pointer events
    • useGraphicsBounds - (default false) uses the graphics bounds for pointer events
Fixed

v0.25.1

Compare Source

Added
  • Experimental: Native ES module bundle distribution in package esm/excalibur.js entrypoint (#​2064)
  • withEngine utils support an aditional options parameter to override the Engine default options.
  • Story to show a play / pause implementation.
  • ex.Animation now support totalDuration that will calculate automatically each frame duration based on how many frames have.
  • ex.Animation now supports .reverse() to reverse the direction of play in an animation, use the ex.Animation.direction to inspect if the animation is playing in the ex.AnimationDirection.Forward direction or the ex.AnimationDirection.Backward direction.
Changed
  • Pointer system refactored into 2 parts:
    • First is an ECS style system ex.PointerSystem that dispatches events to Entities/Actors
    • Second is an event receiver ex.PointerEventReceiver which is responsible for collecting the native browser events
    • The API is mostly backwards compatible breaking changes are listed in the breaking change section, event types have been simplified, and stopPropagation() and been renamed to cancel()
  • Internal Actions implementation converted to ECS system and component, this is a backwards compatible change with v0.25.0
    • ex.ActionsSystem and ex.ActionsComponent now wrap the existing ex.ActionContext
    • Actions can be shared with all entities now!
  • Dispatch the hidePlayButton on the Button Event to prevent that keep on the screen on some situations [#​1431].
  • Revert VSCode Workbench Colors
Deprecated
  • Actions asPromise() renamed to toPromise()
Fixed
  • Fixed loader button position on window resize
  • Fixed issue with setting ex.TileMap.z to a value
  • Fixed crash in debug system if there is no collider geometry
  • Fixed ImageSource loading error message [#​2049]

v0.25.0

Compare Source

Breaking Changes
  • Actor Drawing: ex.Actor.addDrawing, ex.Actor.setDrawing, onPostDraw(), and onPreDraw() are no longer on by default and will be removed in v0.26.0, they are available behind a flag ex.Flags.useLegacyDrawing()

    • For custom drawing use the ex.Canvas
  • ex.Actor.rx has been renamed to ex.Actor.angularVelocity

  • Rename ex.Edge to ex.EdgeCollider and ex.ConvexPolygon to ex.PolygonCollider to avoid confusion and maintian consistency

  • ex.Label constructor now only takes the option bag constructor and the font properties have been replaced with ex.Font

    const label = new ex.Label({
      text: 'My Text',
      x: 100,
      y: 100,
      font: new ex.Font({
        family: 'Consolas',
        size: 32
      })
    });
  • ex.Physics.debug properties for Debug drawing are now moved to engine.debug.physics, engine.debug.collider, and engine.debug.body.

    • Old debugDraw(ctx: CanvasRenderingContext2D) methods are removed.
  • Collision Pair's are now between Collider's and not bodies

  • PerlinNoise has been removed from the core repo will now be offered as a plugin

  • Legacy drawing implementations are moved behind ex.LegacyDrawing new Graphics implemenations of Sprite, SpriteSheet, Animation are now the default import.

    • To use any of the ex.LegacyDrawing.* implementations you must opt-in with the ex.Flags.useLegacyDrawing() note: new graphics do not work in this egacy mode
  • Renames CollisionResolutionStrategy.Box collision resolution strategy to Arcade

  • Renames CollisionResolutionStrategy.RigidBody collision resolution strategy to Realistic

  • Collider is now a first class type and encapsulates what Shape used to be. Collider is no longer a member of the Body

  • CollisionType and CollisionGroup are now a member of the Body component, the reasoning is they define how the simulated physics body will behave in simulation.

  • Timer's no longer automatically start when added to a Scene, this Timer.start() must be called. (#​1865)

  • Timer.complete is now read-only to prevent odd bugs, use reset(), stop(), and start() to manipulate timers.

  • Actor.actions.repeat() and Actor.actions.repeatForever() now require a handler that specifies the actions to repeat. This is more clear and helps prevent bugs like #​1891

    const actor = new ex.Actor();
    
    actor.actions
      // Move up in a zig-zag by repeating 5 times
      .repeat((ctx) => {
        ctx.moveBy(10, 0, 10);
        ctx.moveBy(0, 10, 10);
      }, 5)
      .callMethod(() => {
        console.log('Done repeating!');
      });
  • Removes Entity.components as a way to access, add, and remove components

  • ex.Camera.z has been renamed to property ex.Camera.zoom which is the zoom factor

  • ex.Camera.zoom(...) has been renamed to function ex.Camera.zoomOverTime()

  • TileMap no longer needs registered SpriteSheets, Sprite's can be added directly to Cell's with addGraphic

  • Directly changing debug drawing by engine.isDebug = value has been replaced by engine.showDebug(value) and engine.toggleDebug() (#​1655)

  • UIActor Class instances need to be replaced to ScreenElement (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 resolution
    • DisplayMode.FillContainer update the resolution and viewport dyanmically to fill the available space in the canvas parent element, DOES NOT preserve aspectRatio
    • DisplayMode.FitScreen fits the screen to the available browser window space, while maintaining aspect ratio and resolution
    • DisplayMode.FillScreen now does what DisplayMode.FullScreen used to do, the resolution and viewport dynamically adjust to fill the available space in the window, DOES NOT preserve aspectRatio (#​1733)
    • DisplayMode.FullScreen is now removed, use Screen.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 and spacing.

  • Engine.pointerScope now defaults to a more expected ex.Input.PointerScope.Canvas instead of ex.Input.PointerScope.Document which can cause frustrating bugs if building an HTML app with Excalibur

Added
  • New property center to Screen to encapsulate screen center coordinates calculation considering zoom and device pixel ratio
  • New ex.Shape.Capsule(width, height) helper for defining capsule colliders, these are useful for ramps or jagged floor colliders.
  • New collision group constructor argument added to Actornew 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 with rows and columns optionally specified, if not there is always 1 row, and sprites.length columns
  • new Actor({radius: 10}) can now take a radius parameter to help create circular actors
  • The ExcaliburGraphicsContext now supports drawing debug text
  • Entity may also now optionally have a name, this is useful for finding entities by name or when displaying in debug mode.
  • New DebugSystem ECS system will show debug drawing output for things toggled on/off in the engine.debug section, this allows for a less cluttered debug experience.
    • Each debug section now has a configurable color.
  • Turn on WebGL support with ex.Flags.useWebGL()
  • Added new helpers to CollisionGroup to define groups that collide with specified groups CollisionGroup.collidesWith([groupA, groupB])
    • Combine groups with const groupAandB = CollisionGroup.combine([groupA, groupB])
    • Invert a group instance const everthingButGroupA = groupA.invert()
  • Improved Collision Simulation
    • New ECS based CollisionSystem and MotionSystem
    • Rigid body's can now sleep for improved performance
    • Multiple contacts now supported which improves stability
    • Iterative solver for improved stability
  • Added ColliderComponent to hold individual Collider implementations like Circle, Box, or CompositeCollider
    • Actor.collider.get() will get the current collider
    • Actor.collider.set(someCollider) allows you to set a specific collider
  • New CompositeCollider type to combine multiple colliders together into one for an entity
    • Composite colliders flatten into their individual colliders in the collision system
    • Composite collider keeps it's internal colliders in a DynamicTree for fast .collide checks
  • New TransformComponent to encapsulate Entity transform, that is to say position, rotation, and scale
  • New MotionComponent to encapsulate Entity transform values changing over time like velocity and acceleration
  • Added multi-line support to Text graphics (#​1866)
  • Added TileMap arbitrary graphics support with .addGraphic() (#​1862)
  • Added TileMap row and column accessors getRows() and getColumns() (#​1859)
  • Added the ability to store arbitrary data in TileMap cells with Cell.data.set('key', 'value') and Cell.data.get('key') (#​1861)
  • Actions moveTo(), moveBy(), easeTo(), scaleTo(), and scaleBy() now have vector overloads
  • Animation.fromSpriteSheet will now log a warning if an index into the SpriteSheet 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, and Timer.stop() to stop timers and "rewind" them.
  • Timer.timeToNextAction will return the milliseconds until the next action callback
  • Timer.timeElapsedTowardNextAction will return the milliseconds counted towards the next action callback
  • BoundingBox now has a method for detecting zero dimensions in width or height hasZeroDimensions()
  • BoundingBox's can now by transform'd by a Matrix
  • Added new Entity(components: Component[]) constructor overload to create entities with components quickly.
  • Added Entity.get(type: ComponentType) to get strongly typed components if they exist on the entity.
  • Added Entity.has(type: ComponentType) overload to check if an entity has a component of that type.
  • Added Entity.hasTag(tag: string), Entity.addTag(tag: string), and Entity.removeTag(tag: string, force: boolean).
    • Tag offscreen is now added to entities that are offscreen
  • Added Entity.componentAdded$ and Entity.componentRemoved$ for observing component changes on an entity.
  • For child/parent entities:
    • Added Entity.addChild(entity: Entity), Entity.removeChild(entity: Entity), Entity.removeAllChildren() for managing child entities
    • Added Entity.addTemplate(templateEntity: Entity) for adding template entities or "prefab".
    • Added Entity.parent readonly accessor to the parent (if exists), and Entity.unparent() to unparent an entity.
    • Added Entity.getAncestors() is a sorted list of parents starting with the topmost parent.
    • Added Entity.children readonly accessor to the list of children.
  • Add the ability to press enter to start the game after loaded
  • Add Excalibur Feature Flag implementation for releasing experimental or preview features (#​1673)
  • Color now can parse RGB/A string using Color.fromRGBString('rgb(255, 255, 255)') or Color.fromRGBString('rgb(255, 255, 255, 1)')
  • DisplayMode.FitScreen will now scale the game to fit the available space, preserving the aspectRatio. (#​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 accepts spacing for consistency although the object constructor is recommended (#​1788)
  • Add SpriteSheet.getSpacingDimensions() method to retrieve calculated spacing dimensions (#​1788)
  • Add 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.
  • Add KeyEvent.originalEvent?: KeyboardEvent which exposes the raw keyboard event handled from the browser.
  • Added a new getter to GraphicsComponent.ts called currentKeys that will return the names of the graphics shown in all layers
  • Added a new getter to GraphicsLayer called currentKeys that will the names of the graphics shown in this layer
Changed
  • Gif now supports new graphics component
  • Algebra.ts refactored into separate files in Math/
  • Engine/Scene refactored to make use of the new ECS world which simplifies their logic
  • TileMap now uses the built in Collider component instead of custom collision code.
  • Updates the Excalibur ECS implementation for ease of use and Excalibur draw system integration
    • Adds "ex." namespace to built in component types like "ex.transform"
    • Adds ex.World to encapsulate all things ECS
    • Adds ex.CanvasDrawSystem to handle all HTML Canvas 2D drawing via ECS
    • Updates ex.Actor to use new ex.TransformComponent and ex.CanvasDrawComponent
Deprecated
  • Timer.unpause() has be deprecated in favor of Timer.resume() (#​1864)
  • Removed UIActor Stub in favor of ScreenElement (#​1656)
  • ex.SortedList as deprecated
  • ex.Promise is marked deprecated (#​994)
  • ex.DisplayMode.Position CSS can accomplish this task better than Excalibur (#​1733)
Fixed
  • Fixed allow ex.ColliderComponent to not have a collider
  • Fixed issue where collision events were not being forwarded from individual colliders in a ex.CompositeCollider
  • Fixed issue where ex.CompositeCollider's individual colliders were erroneously generating pairs
  • Fixed issue where GraphicsOptions width/height could not be used to define a ex.Sprite with equivalent sourceView and destSize (#​1863)
  • Fixed issue where ex.Scene.onActivate/onDeactivate were called with the wrong arguments (#​1850)
  • Fixed issue where no width/height argmunents to engine throws an error
  • Fixed issue where zero dimension image draws on the ExcaliburGraphicsContext throw an error
  • Fixed issue where the first scene onInitialize fires at Engine contructor time and before the "play button" clicked (#​1900)
  • Fixed issue where the "play button" click was being interpreted as an input event excalibur needed to handle (#​1854)
  • Fixed issue where pointer events were not firing at the ex.Engine.input.pointers level (#​1439)
  • Fixed issue where pointer events propagate in an unexpected order, now they go from high z-index to low z-index (#​1922)
  • Fixed issue with Raster padding which caused images to grow over time (#​1897)
  • Fixed N+1 repeat/repeatForever bug (#​1891)
  • Fixed repeat/repeatForever issue with rotateTo (#​635)
  • Entity update lifecycle is now called correctly
  • Fixed GraphicsSystem enterviewport and exitviewport event
  • Fixed DOM element leak when restarting games, play button elements piled up in the DOM.
  • Fixed issues with ex.Sprite not rotating/scaling correctly around the anchor (Related to TileMap plugin updates Add TMX support excaliburjs/excalibur-tiled#4, Feature Array to Object excaliburjs/excalibur-tiled#23, No warning shown when using an external tsx tileset excaliburjs/excalibur-tiled#108)
    • Optionally specify whether to draw around the anchor or not drawAroundAnchor
  • Fixed in the browser "FullScreen" api, coordinates are now correctly mapped from page space to world space (#​1734)
  • Fix audio decoding bug introduced in refactor: [#994] Switch to browser promises excaliburjs/Excalibur#1707
  • Fixed issue with promise resolve on double resource load (#​1434)
  • Fixed Firefox bug where scaled graphics with anti-aliasing turned off are not pixelated (#​1676)
  • Fixed z-index regression where actors did not respect z-index (#​1678)
  • Fixed Animation flicker bug when switching to an animation (#​1636)
  • Fixed ex.Actor.easeTo actions, they now use velocity to move Actors (#​1638)
  • Fixed Scene constructor signature to make the Engine argument optional (#​1363)
  • Fixed anchor properly of single shape Actor #​1535
  • Fixed Safari bug where Sound resources would fail to load (#​1848)

v0.24.5

Compare Source

Breaking Changes
Added
  • Adds new ECS Foundations API, which allows excalibur core behavior to be manipulated with ECS style code ([#​1361]Excalibur ECS Implementation Goals and Guide excaliburjs/Excalibur#1361)
    • Adds new ex.Entity & ex.EntityManager which represent anything that can do something in a Scene and are containers for Components
    • Adds new ex.Component type which allows encapsulation of state on entities
    • Adds new ex.Query & ex.QueryManager which allows queries over entities that match a component list
    • Adds new ex.System type which operates on matching Entities to do some behavior in Excalibur.
    • Adds new ex.Observable a small observable implementation for observing Entity component changes over time
Fixed
  • Fixed Animation flicker bug on the first frame when using animations with scale, anchors, or rotation. (#​1636)

v0.24.4

Compare Source

Added
  • Add new ex.Screen abstraction to manage viewport size and resolution independently and all other screen related logic. (#​1617)
    • New support for the browser fullscreen API
  • Add color blind mode simulation and correction in debug object.
    (#​390)
  • Add LimitCameraBoundsStrategy, which always keeps the camera locked to within the given bounds. (#​1498)
  • Add mechanisms to manipulate the Loader screen. (#​1417)
    • Logo position Loader.logoPosition
    • Play button position Loader.playButtonPosition
    • Loading bar position Loader.loadingBarPosition
    • Loading bar color Loader.loadingBarColor by default is white, but can be any excalibur ex.Color
Changed
  • Remove usage of mock.engine from the tests. Use real engine instead.
  • Upgrade Excalibur to TypeScript 3.9.2
  • Upgrade Excalibur to Node 12 LTS
Fixed
  • Fixed Loader play button markup and styles are now cleaned up after clicked (#​1431)
  • Fixed Excalibur crashing when embedded within a cross-origin IFrame (#​1151)
  • Fixed performance issue where uneccessary effect processing was occurring for opacity changes (#​1549)
  • Fixed issue when loading images from a base64 strings that would crash the loader (#​1543)
  • Fixed issue where actors that were not in scene still received pointer events (#​1555)
  • Fixed Scene initialization order when using the lifecycle overrides (#​1553)

Configuration

📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

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.


  • If you want to rebase/retry this PR, check this box

This PR has been generated by Mend Renovate. View repository job log here.

@vercel
Copy link

vercel bot commented Sep 3, 2020

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/grantsru/brick-js/6whb7qxrz
✅ Preview: https://brick-js-git-renovate-excalibur-0x.grantsru.vercel.app

@renovate renovate bot force-pushed the renovate/excalibur-0.x branch from 5bc7670 to dc5709a Compare September 8, 2020 00:18
@renovate renovate bot changed the title Update dependency excalibur to v0.24.4 Update dependency excalibur to v0.24.5 Sep 8, 2020
@renovate renovate bot force-pushed the renovate/excalibur-0.x branch from dc5709a to 5bdac25 Compare October 18, 2021 19:00
@renovate renovate bot changed the title Update dependency excalibur to v0.24.5 Update dependency excalibur to v0.25.0 Oct 18, 2021
@renovate renovate bot force-pushed the renovate/excalibur-0.x branch from 5bdac25 to 2d75eb1 Compare March 7, 2022 09:35
@renovate renovate bot changed the title Update dependency excalibur to v0.25.0 Update dependency excalibur to v0.25.3 Mar 7, 2022
@renovate renovate bot force-pushed the renovate/excalibur-0.x branch from 2d75eb1 to 9778704 Compare June 18, 2022 19:04
@renovate renovate bot changed the title Update dependency excalibur to v0.25.3 Update dependency excalibur to v0.26.0 Jun 18, 2022
@renovate renovate bot force-pushed the renovate/excalibur-0.x branch from 9778704 to c36732e Compare September 25, 2022 22:34
@renovate renovate bot changed the title Update dependency excalibur to v0.26.0 Update dependency excalibur to v0.27.0 Sep 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

0 participants