Commits
Whene reading Flappy Bird tutorial, on the 12th step, no explanation and no code are added to show the use of animation when bird is going down or up.
## Changes:
- Added new code to put everything together
- Explained and displayed where to use an animation and why resetting some is important
Closes #3469
## Changes:
- Fixed issue where `GpuParticleEmitter` did not rotate with their parents
- Fixed issue where Cpu `ParticleEmitter` did not respect `ParticleTransform.Local`
Related #1294
Related #1510
Same origin iframes were failing to respond to keyboard events
## Changes:
- Adds same origin frame detection
- Updates keyboard and pointer input hosts to handle iframes and grab focus properly
- Adds sandbox integration tests for x-origin and same-origin frames
3 files changed
- Random.ts
- 07-random.mdx
- RandomSpec.ts
# Random.ts
added static intialSeed form Date.now() and an incrementing offset.
also, this ensures that the actual seed used is available property
moved public seed to private _seed
added getter for seed
in constructor(), if no seed provided it pulls from the 'next' seed in the incrementing list
# 07-random.mdx
updated documentation to reflect new functionality
# RandomSpec.ts
-added 2 tests
- will have a seed even if not passed into constructor
- can have sequential random instances with unique seeds
# Checklist for PR
- added tests
- all tests pass locally
- created test project to exercise new logic with favorable results
- updated docs
chore: Update dependency eslint to v9
* Change game.goto to game.goToScene
* Example now compiles and runs correctly
* chore: Update dependency prettier to v3.6.2
* format files to match prettier changes
---------
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Matt Jennings <me@mattjennings.io>
Update 00-z-quick-start.mdx
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
closes: #3011
closes: #3010 as moot
closes: #3008
---------
Co-authored-by: ikudrickiy <139219793+ikudrickiy@users.noreply.github.com>
Improves `ex.Query` to support "any" and "not" filters for components, as well as all/any/not tags filters. The intention is for this to replace `ex.TagQuery`, but that is not (yet) in this PR.
With this change, this would much easily allow systems to exclude entities with tags. For example, GraphicsSystem could now exclude any Entity with an `ex.offscreen` tag instead of manually checking in its update. This could also be used for #3076 by adding a tag to an Entity while paused that excludes it from systems.
I also removed the restriction of throwing on empty component queries, as I think it could make sense to have a system that applies for every Entity. I can change this, though.
---
There's also some code quality changes here.
- I added an eslint rule to prevent `fit` tests (as I've accidentally committed those before)
- an easy way to enable console logs in karma by doing `CAPTURE_CONSOLE=true npm run test` as I'd previously have to edit the karma config file.
- fixed some ts errors in collider tests
===:clipboard: PR Checklist :clipboard:===
- [ ] :pushpin: issue exists in github for these changes
- [x] :microscope: existing tests still pass
- [x] :see_no_evil: code conforms to the [style guide](https://github.com/excaliburjs/Excalibur/blob/main/STYLEGUIDE.md)
- [x] :triangular_ruler: new tests written and passing / old tests updated with new scenario(s)
- [x] :page_facing_up: changelog entry added (or not needed)
==================
<!-- If you're closing an issue with this pull request, or contributing a significant change, please include your changes in the appropriate section of CHANGELOG.md as outlined in https://github.com/excaliburjs/Excalibur/blob/main/.github/CONTRIBUTING.md#creating-a-pull-request. -->
<!--Please format your pull request title according to our commit message styleguide: https://github.com/excaliburjs/Excalibur/blob/main/.github/CONTRIBUTING.md#commit-messages -->
<!-- Thanks again! -->
<!--------------------------------------------------------------------------------------------->
Closes #
## Changes:
- Queries can now take additional options to filter in/out by components or tags.
```ts
const query = new Query({
// all fields are optional
components: {
all: [ComponentA, ComponentB] as const, // important for type safety!
any: [ComponentC, ComponentD] as const, // important for type safety!
not: [ComponentE]
},
tags: {
all: ['tagA', 'tagB'],
any: ['tagC', 'tagD'],
not: ['tagE']
}
})
// previous constructor type still works and is shorthand for components.all
new Query([ComponentA, ComponentB] as const)
```
- Queries can now match all entities by specifying no filters
```ts
const query = new Query({})
```
closes https://github.com/excaliburjs/Excalibur/issues/3452
* fix: [#3412] Implicit coupling of Collider/Body
Fixes this coupling that prevents pointers from working on Entities that
do not have a body/motion component
* fix null refs
* add changelog + update test
Adds `onDeactivate` data to the next `SceneActivateContext` `previousSceneData` property
I've left the old build for now as reference while I work on this, but I've replaced `npm run build` with the vite build so I can see if CI passes.
## Stats for nerds
results are taken from an M1 Max Macbook Pro running Linux
### Webpack
Build time 18.31s
```
800K ./esm/excalibur.min.js
1.1M ./esm/excalibur.js
800K ./esm/excalibur.min.development.js
1.1M ./esm/excalibur.development.js
536K ./dist/excalibur.min.js
1.4M ./dist/excalibur.js
1.8M ./dist/excalibur.min.development.js
1.8M ./dist/excalibur.development.js
```
### Vite
Build time: 7.67s
```
800K ./esm/excalibur.min.js
1.1M ./esm/excalibur.js
800K ./esm/excalibur.min.development.js
1.1M ./esm/excalibur.development.js
524K ./dist/excalibur.min.js
1.1M ./dist/excalibur.js
524K ./dist/excalibur.min.development.js
1.1M ./dist/excalibur.development.js
```
Bumps [path-to-regexp](https://github.com/pillarjs/path-to-regexp), [serve-handler](https://github.com/vercel/serve-handler) and [express](https://github.com/expressjs/express). These dependencies needed to be updated together.
Updates `path-to-regexp` from 0.1.10 to 1.9.0
- [Release notes](https://github.com/pillarjs/path-to-regexp/releases)
- [Changelog](https://github.com/pillarjs/path-to-regexp/blob/master/History.md)
- [Commits](https://github.com/pillarjs/path-to-regexp/compare/v0.1.10...v1.9.0)
Updates `serve-handler` from 6.1.5 to 6.1.6
- [Release notes](https://github.com/vercel/serve-handler/releases)
- [Commits](https://github.com/vercel/serve-handler/compare/6.1.5...6.1.6)
Updates `express` from 4.21.1 to 4.21.2
- [Release notes](https://github.com/expressjs/express/releases)
- [Changelog](https://github.com/expressjs/express/blob/4.21.2/History.md)
- [Commits](https://github.com/expressjs/express/compare/4.21.1...4.21.2)
---
updated-dependencies:
- dependency-name: path-to-regexp
dependency-type: indirect
- dependency-name: serve-handler
dependency-type: indirect
- dependency-name: express
dependency-type: indirect
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [katex](https://github.com/KaTeX/KaTeX) from 0.16.11 to 0.16.21.
- [Release notes](https://github.com/KaTeX/KaTeX/releases)
- [Changelog](https://github.com/KaTeX/KaTeX/blob/main/CHANGELOG.md)
- [Commits](https://github.com/KaTeX/KaTeX/compare/v0.16.11...v0.16.21)
---
updated-dependencies:
- dependency-name: katex
dependency-type: indirect
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [@babel/helpers](https://github.com/babel/babel/tree/HEAD/packages/babel-helpers) from 7.23.9 to 7.27.0.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.27.0/packages/babel-helpers)
---
updated-dependencies:
- dependency-name: "@babel/helpers"
dependency-type: indirect
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
## Changes:
- feat(Clock): Add `clearSchedule(scheduleId: ScheduleId)` API to clear a scheduled callback
- refactor(Clock): Modify `schedule` to return a nominal type (`ScheduleId`) for an identifier
- docs(Clock): Cover new API and polish up Clock docs 🕐
Bumps [store2](https://github.com/nbubna/store) from 2.14.3 to 2.14.4.
- [Commits](https://github.com/nbubna/store/compare/2.14.3...2.14.4)
---
updated-dependencies:
- dependency-name: store2
dependency-type: indirect
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [@babel/runtime](https://github.com/babel/babel/tree/HEAD/packages/babel-runtime) from 7.23.2 to 7.27.0.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.27.0/packages/babel-runtime)
---
updated-dependencies:
- dependency-name: "@babel/runtime"
dependency-type: indirect
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [serialize-javascript](https://github.com/yahoo/serialize-javascript) from 6.0.1 to 6.0.2.
- [Release notes](https://github.com/yahoo/serialize-javascript/releases)
- [Commits](https://github.com/yahoo/serialize-javascript/compare/v6.0.1...v6.0.2)
---
updated-dependencies:
- dependency-name: serialize-javascript
dependency-type: indirect
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [http-proxy-middleware](https://github.com/chimurai/http-proxy-middleware) from 2.0.7 to 2.0.9.
- [Release notes](https://github.com/chimurai/http-proxy-middleware/releases)
- [Changelog](https://github.com/chimurai/http-proxy-middleware/blob/v2.0.9/CHANGELOG.md)
- [Commits](https://github.com/chimurai/http-proxy-middleware/compare/v2.0.7...v2.0.9)
---
updated-dependencies:
- dependency-name: http-proxy-middleware
dependency-version: 2.0.9
dependency-type: indirect
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [tar-fs](https://github.com/mafintosh/tar-fs) to 2.1.3 and updates ancestor dependency [puppeteer](https://github.com/puppeteer/puppeteer). These dependencies need to be updated together.
Updates `tar-fs` from 2.1.1 to 2.1.3
- [Commits](https://github.com/mafintosh/tar-fs/commits)
Updates `puppeteer` from 15.5.0 to 24.10.0
- [Release notes](https://github.com/puppeteer/puppeteer/releases)
- [Changelog](https://github.com/puppeteer/puppeteer/blob/main/CHANGELOG.md)
- [Commits](https://github.com/puppeteer/puppeteer/compare/v15.5.0...puppeteer-v24.10.0)
---
updated-dependencies:
- dependency-name: tar-fs
dependency-version: 2.1.3
dependency-type: indirect
- dependency-name: puppeteer
dependency-version: 24.10.0
dependency-type: direct:development
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
3 files changed
- Random.ts
- 07-random.mdx
- RandomSpec.ts
# Random.ts
added static intialSeed form Date.now() and an incrementing offset.
also, this ensures that the actual seed used is available property
moved public seed to private _seed
added getter for seed
in constructor(), if no seed provided it pulls from the 'next' seed in the incrementing list
# 07-random.mdx
updated documentation to reflect new functionality
# RandomSpec.ts
-added 2 tests
- will have a seed even if not passed into constructor
- can have sequential random instances with unique seeds
# Checklist for PR
- added tests
- all tests pass locally
- created test project to exercise new logic with favorable results
- updated docs
Improves `ex.Query` to support "any" and "not" filters for components, as well as all/any/not tags filters. The intention is for this to replace `ex.TagQuery`, but that is not (yet) in this PR.
With this change, this would much easily allow systems to exclude entities with tags. For example, GraphicsSystem could now exclude any Entity with an `ex.offscreen` tag instead of manually checking in its update. This could also be used for #3076 by adding a tag to an Entity while paused that excludes it from systems.
I also removed the restriction of throwing on empty component queries, as I think it could make sense to have a system that applies for every Entity. I can change this, though.
---
There's also some code quality changes here.
- I added an eslint rule to prevent `fit` tests (as I've accidentally committed those before)
- an easy way to enable console logs in karma by doing `CAPTURE_CONSOLE=true npm run test` as I'd previously have to edit the karma config file.
- fixed some ts errors in collider tests
===:clipboard: PR Checklist :clipboard:===
- [ ] :pushpin: issue exists in github for these changes
- [x] :microscope: existing tests still pass
- [x] :see_no_evil: code conforms to the [style guide](https://github.com/excaliburjs/Excalibur/blob/main/STYLEGUIDE.md)
- [x] :triangular_ruler: new tests written and passing / old tests updated with new scenario(s)
- [x] :page_facing_up: changelog entry added (or not needed)
==================
<!-- If you're closing an issue with this pull request, or contributing a significant change, please include your changes in the appropriate section of CHANGELOG.md as outlined in https://github.com/excaliburjs/Excalibur/blob/main/.github/CONTRIBUTING.md#creating-a-pull-request. -->
<!--Please format your pull request title according to our commit message styleguide: https://github.com/excaliburjs/Excalibur/blob/main/.github/CONTRIBUTING.md#commit-messages -->
<!-- Thanks again! -->
<!--------------------------------------------------------------------------------------------->
Closes #
## Changes:
- Queries can now take additional options to filter in/out by components or tags.
```ts
const query = new Query({
// all fields are optional
components: {
all: [ComponentA, ComponentB] as const, // important for type safety!
any: [ComponentC, ComponentD] as const, // important for type safety!
not: [ComponentE]
},
tags: {
all: ['tagA', 'tagB'],
any: ['tagC', 'tagD'],
not: ['tagE']
}
})
// previous constructor type still works and is shorthand for components.all
new Query([ComponentA, ComponentB] as const)
```
- Queries can now match all entities by specifying no filters
```ts
const query = new Query({})
```
I've left the old build for now as reference while I work on this, but I've replaced `npm run build` with the vite build so I can see if CI passes.
## Stats for nerds
results are taken from an M1 Max Macbook Pro running Linux
### Webpack
Build time 18.31s
```
800K ./esm/excalibur.min.js
1.1M ./esm/excalibur.js
800K ./esm/excalibur.min.development.js
1.1M ./esm/excalibur.development.js
536K ./dist/excalibur.min.js
1.4M ./dist/excalibur.js
1.8M ./dist/excalibur.min.development.js
1.8M ./dist/excalibur.development.js
```
### Vite
Build time: 7.67s
```
800K ./esm/excalibur.min.js
1.1M ./esm/excalibur.js
800K ./esm/excalibur.min.development.js
1.1M ./esm/excalibur.development.js
524K ./dist/excalibur.min.js
1.1M ./dist/excalibur.js
524K ./dist/excalibur.min.development.js
1.1M ./dist/excalibur.development.js
```
Bumps [path-to-regexp](https://github.com/pillarjs/path-to-regexp), [serve-handler](https://github.com/vercel/serve-handler) and [express](https://github.com/expressjs/express). These dependencies needed to be updated together.
Updates `path-to-regexp` from 0.1.10 to 1.9.0
- [Release notes](https://github.com/pillarjs/path-to-regexp/releases)
- [Changelog](https://github.com/pillarjs/path-to-regexp/blob/master/History.md)
- [Commits](https://github.com/pillarjs/path-to-regexp/compare/v0.1.10...v1.9.0)
Updates `serve-handler` from 6.1.5 to 6.1.6
- [Release notes](https://github.com/vercel/serve-handler/releases)
- [Commits](https://github.com/vercel/serve-handler/compare/6.1.5...6.1.6)
Updates `express` from 4.21.1 to 4.21.2
- [Release notes](https://github.com/expressjs/express/releases)
- [Changelog](https://github.com/expressjs/express/blob/4.21.2/History.md)
- [Commits](https://github.com/expressjs/express/compare/4.21.1...4.21.2)
---
updated-dependencies:
- dependency-name: path-to-regexp
dependency-type: indirect
- dependency-name: serve-handler
dependency-type: indirect
- dependency-name: express
dependency-type: indirect
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [katex](https://github.com/KaTeX/KaTeX) from 0.16.11 to 0.16.21.
- [Release notes](https://github.com/KaTeX/KaTeX/releases)
- [Changelog](https://github.com/KaTeX/KaTeX/blob/main/CHANGELOG.md)
- [Commits](https://github.com/KaTeX/KaTeX/compare/v0.16.11...v0.16.21)
---
updated-dependencies:
- dependency-name: katex
dependency-type: indirect
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [@babel/helpers](https://github.com/babel/babel/tree/HEAD/packages/babel-helpers) from 7.23.9 to 7.27.0.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.27.0/packages/babel-helpers)
---
updated-dependencies:
- dependency-name: "@babel/helpers"
dependency-type: indirect
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [store2](https://github.com/nbubna/store) from 2.14.3 to 2.14.4.
- [Commits](https://github.com/nbubna/store/compare/2.14.3...2.14.4)
---
updated-dependencies:
- dependency-name: store2
dependency-type: indirect
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [@babel/runtime](https://github.com/babel/babel/tree/HEAD/packages/babel-runtime) from 7.23.2 to 7.27.0.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.27.0/packages/babel-runtime)
---
updated-dependencies:
- dependency-name: "@babel/runtime"
dependency-type: indirect
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [serialize-javascript](https://github.com/yahoo/serialize-javascript) from 6.0.1 to 6.0.2.
- [Release notes](https://github.com/yahoo/serialize-javascript/releases)
- [Commits](https://github.com/yahoo/serialize-javascript/compare/v6.0.1...v6.0.2)
---
updated-dependencies:
- dependency-name: serialize-javascript
dependency-type: indirect
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [http-proxy-middleware](https://github.com/chimurai/http-proxy-middleware) from 2.0.7 to 2.0.9.
- [Release notes](https://github.com/chimurai/http-proxy-middleware/releases)
- [Changelog](https://github.com/chimurai/http-proxy-middleware/blob/v2.0.9/CHANGELOG.md)
- [Commits](https://github.com/chimurai/http-proxy-middleware/compare/v2.0.7...v2.0.9)
---
updated-dependencies:
- dependency-name: http-proxy-middleware
dependency-version: 2.0.9
dependency-type: indirect
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [tar-fs](https://github.com/mafintosh/tar-fs) to 2.1.3 and updates ancestor dependency [puppeteer](https://github.com/puppeteer/puppeteer). These dependencies need to be updated together.
Updates `tar-fs` from 2.1.1 to 2.1.3
- [Commits](https://github.com/mafintosh/tar-fs/commits)
Updates `puppeteer` from 15.5.0 to 24.10.0
- [Release notes](https://github.com/puppeteer/puppeteer/releases)
- [Changelog](https://github.com/puppeteer/puppeteer/blob/main/CHANGELOG.md)
- [Commits](https://github.com/puppeteer/puppeteer/compare/v15.5.0...puppeteer-v24.10.0)
---
updated-dependencies:
- dependency-name: tar-fs
dependency-version: 2.1.3
dependency-type: indirect
- dependency-name: puppeteer
dependency-version: 24.10.0
dependency-type: direct:development
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>