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

fix(deps): update dependency excalibur to v0.27.0 (main) #45

Closed
wants to merge 1 commit into from

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Oct 4, 2021

Mend Renovate

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
excalibur 0.26.0 -> 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

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.

@renovate renovate bot force-pushed the renovate/main-excalibur-0.x branch from 82a7762 to b7104ed Compare November 6, 2021 02:45
@renovate renovate bot changed the title fix(deps): update dependency excalibur to v0.25.0 (main) fix(deps): update dependency excalibur to v0.25.1 (main) Nov 6, 2021
@renovate renovate bot force-pushed the renovate/main-excalibur-0.x branch from b7104ed to c6cbd26 Compare March 7, 2022 14:48
@renovate renovate bot changed the title fix(deps): update dependency excalibur to v0.25.1 (main) fix(deps): update dependency excalibur to v0.25.3 (main) Mar 7, 2022
@renovate renovate bot force-pushed the renovate/main-excalibur-0.x branch from c6cbd26 to a81d9da Compare April 22, 2022 04:22
@renovate renovate bot force-pushed the renovate/main-excalibur-0.x branch from a81d9da to 2b1cf1b Compare May 21, 2022 03:34
@renovate renovate bot changed the title fix(deps): update dependency excalibur to v0.25.3 (main) fix(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 2b1cf1b to a72659f Compare July 9, 2022 03:24
@renovate renovate bot changed the title fix(deps): update dependency excalibur to v0.26.0 (main) fix(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 a72659f to 312e02f Compare October 31, 2022 22:32
@renovate renovate bot force-pushed the renovate/main-excalibur-0.x branch 2 times, most recently from e76b40d to a62dbb7 Compare November 24, 2022 14:04
@renovate renovate bot force-pushed the renovate/main-excalibur-0.x branch from a62dbb7 to 3381fa8 Compare November 24, 2022 17:32
@renovate renovate bot changed the title fix(deps): update dependency excalibur to v0.27.0 (main) fix(deps): update dependency excalibur to v0.27.0 (main) - autoclosed Nov 24, 2022
@renovate renovate bot closed this Nov 24, 2022
@renovate renovate bot deleted the renovate/main-excalibur-0.x branch November 24, 2022 18:41
@renovate renovate bot changed the title fix(deps): update dependency excalibur to v0.27.0 (main) - autoclosed fix(deps): update dependency excalibur to v0.27.0 (main) Nov 25, 2022
@renovate renovate bot reopened this Nov 25, 2022
@renovate renovate bot restored the renovate/main-excalibur-0.x branch November 25, 2022 01:03
@djcsdy
Copy link
Member

djcsdy commented Nov 25, 2022

Excalibur v0.27 breaks audio looping, see excaliburjs/Excalibur#2523

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

renovate bot commented Nov 25, 2022

Renovate Ignore Notification

Because you closed this PR without merging, Renovate will ignore this update (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.

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