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

chore(deps): update dependency excalibur to v0.27.0 (main) #35

Closed
wants to merge 1 commit into from

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Jan 28, 2022

Mend Renovate

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
excalibur ^0.24.0 || ^0.25.0 -> ^0.24.0 || ^0.25.0 || ^0.27.0 age adoption passing confidence
excalibur 0.25.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

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 these updates 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.

@renovate renovate bot force-pushed the renovate/main-excalibur-0.x branch from dc76831 to 101013c Compare January 29, 2022 00:53
@renovate renovate bot force-pushed the renovate/main-excalibur-0.x branch from 101013c to 9b72d19 Compare February 6, 2022 00:09
@renovate renovate bot changed the title chore(deps): update dependency excalibur to v0.25.2 (main) chore(deps): update dependency excalibur to v0.25.3 (main) Feb 6, 2022
@renovate renovate bot force-pushed the renovate/main-excalibur-0.x branch from 9b72d19 to 6ca8458 Compare February 12, 2022 03:48
@renovate renovate bot force-pushed the renovate/main-excalibur-0.x branch from 6ca8458 to ed509ad Compare February 26, 2022 03:53
@renovate renovate bot force-pushed the renovate/main-excalibur-0.x branch 2 times, most recently from 8e16ed1 to 9be5a2b Compare March 16, 2022 09:29
@renovate renovate bot force-pushed the renovate/main-excalibur-0.x branch 2 times, most recently from f6bb66d to 88e0cca Compare March 26, 2022 01:16
@renovate renovate bot force-pushed the renovate/main-excalibur-0.x branch 2 times, most recently from d123f6d to 167be1b Compare April 9, 2022 02:08
@renovate renovate bot force-pushed the renovate/main-excalibur-0.x branch from 167be1b to f767669 Compare April 23, 2022 01:34
@renovate renovate bot force-pushed the renovate/main-excalibur-0.x branch from f767669 to b0089a2 Compare May 7, 2022 02:05
@renovate renovate bot force-pushed the renovate/main-excalibur-0.x branch from b0089a2 to d73e3af Compare May 21, 2022 03:50
@renovate renovate bot changed the title chore(deps): update dependency excalibur to v0.25.3 (main) chore(deps): update dependency excalibur to v0.26.0 (main) May 21, 2022
@renovate renovate bot force-pushed the renovate/main-excalibur-0.x branch from d73e3af to 1d9dda4 Compare June 4, 2022 06:33
@renovate renovate bot force-pushed the renovate/main-excalibur-0.x branch 3 times, most recently from 47ab829 to da44dc3 Compare June 18, 2022 00:51
@renovate renovate bot force-pushed the renovate/main-excalibur-0.x branch 2 times, most recently from 3782bff to ff0823a Compare July 9, 2022 04:13
@renovate renovate bot changed the title chore(deps): update dependency excalibur to v0.26.0 (main) chore(deps): update dependency excalibur to v0.27.0 (main) Jul 9, 2022
@renovate renovate bot force-pushed the renovate/main-excalibur-0.x branch from ff0823a to f2e62c4 Compare July 17, 2022 01:56
@renovate renovate bot force-pushed the renovate/main-excalibur-0.x branch from f2e62c4 to 125baaa Compare August 1, 2022 18:31
@renovate renovate bot force-pushed the renovate/main-excalibur-0.x branch from 125baaa to e62ccce Compare August 14, 2022 05:21
@renovate renovate bot force-pushed the renovate/main-excalibur-0.x branch from e62ccce to cebd9d1 Compare August 27, 2022 03:45
@renovate renovate bot force-pushed the renovate/main-excalibur-0.x branch from cebd9d1 to f9afd27 Compare September 12, 2022 14:16
@renovate renovate bot force-pushed the renovate/main-excalibur-0.x branch from f9afd27 to 1abcd1c Compare September 24, 2022 03:45
@renovate renovate bot force-pushed the renovate/main-excalibur-0.x branch from 1abcd1c to 45f28c2 Compare October 8, 2022 01:32
@renovate renovate bot force-pushed the renovate/main-excalibur-0.x branch from 45f28c2 to 93440a1 Compare October 22, 2022 01:24
@renovate renovate bot force-pushed the renovate/main-excalibur-0.x branch from 93440a1 to 83d5b7b Compare November 6, 2022 10:35
@renovate renovate bot force-pushed the renovate/main-excalibur-0.x branch 3 times, most recently from 10adb56 to e71bd3a Compare November 21, 2022 16:04
@renovate renovate bot force-pushed the renovate/main-excalibur-0.x branch from e71bd3a to 2ba97c7 Compare November 21, 2022 16:20
@djcsdy
Copy link
Member

djcsdy commented Nov 22, 2022

This library is obsolete as of excalibur v0.26.0.

@djcsdy djcsdy closed this Nov 22, 2022
@renovate
Copy link
Contributor Author

renovate bot commented Nov 22, 2022

Renovate Ignore Notification

Because you closed this PR without merging, Renovate will ignore this update (^0.24.0 || ^0.25.0 || ^0.27.0). You will get a PR once a newer version is released. To ignore this dependency forever, add it to the ignoreDeps array of your Renovate config.

If you accidentally closed this PR, or if you changed your mind: rename this PR to get a fresh replacement PR.

@renovate renovate bot deleted the renovate/main-excalibur-0.x branch November 22, 2022 16:33
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.

1 participant