Commits
Closes #3522
## Changes:
- Changes pointer event strategy on tilemaps to improve performance dramatically
* Color.Lerp
* removed direct api callout, added twoslash content
* ran npm format:fix
* fixed twoslash
* try again with twoslash
* adjusted reference path
* try again, based on Actor.mdx instead of Events.mds
* trying again
* added ex.Color reference in lerp call
* removed referenced types
* tried from engine fundamentals mdx
* test, removed all twoslash
* fixed twoslash
Adding tint docs page per the Documentation Updates Project
Closes #3528
## Changes:
- Cleans up particle documentation to reflect current particle emitter
- nested particle structure
- replace vel for speed
- additional comments explaining more of the properties
- adds embedded examples
- Playground emebed
- More notes [here](https://github.com/excaliburjs/Excalibur/issues/3528#issuecomment-3368702814)
- It could be useful to have an "?embed" version of the playground where it hides the header, specifically for the docs
- Open to _not_ having this
- Added initial docs style guide
- Open to change, its more a reference for myself - nearly every time I modify the docs I do a quick search for "now, do we refer to it as Excalibur or Excalibur.js?"
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>
Dev Containers are a VS Code feature that make it easier for contributors to set up a project in a dedicated environment using Docker.
## Changes
- Deps: Update to `playwright@1.55.1`
- Deps: Added Vitest UI
- Add `devcontainer.json` configuration
- Update README for contributors
- Remove crufty old Dockerfile/compose
Closes #3519
## Changes:
- Adds an aspect ratio to the sample images, based off the tallest image so far, so we get consistent heights
- Adds the option to overwrite the color on a sample by sample basis, but defaults to the Excalibur blue
- Adds some additional webpack configuration to reflect the recent changes [here](https://github.com/excaliburjs/sample-tiled-webpack/pull/5)
<img width="2614" height="1584" alt="image" src="https://github.com/user-attachments/assets/54e3c721-45c6-4a21-be9e-4b18a5b329e1" />
No ticket. Relates to [this discussion](https://github.com/excaliburjs/Excalibur/discussions/3517)
## Changes:
- Add details for the Excalitris sample
## Questions:
I couldn't figure out how the other samples redirect to their corresponding demo.
Assuming there is some nginx config or similar happening behind the scenes?
For example: https://excaliburjs.com/sample-jelly-jumper/
If its via GH Pages, can Pages be enabled on https://github.com/excaliburjs/excalitris/settings ? The [actions file](https://github.com/excaliburjs/excalitris/blob/main/.github/workflows/pages.yml) should already be ready to go.
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Closes https://github.com/excaliburjs/excalibur-tiled/issues/725 (excalibur-tiled)
## Changes:
- Added two methods to Camera: `addStrategies` and `setStrategies`.
- Added getter property, `strategies`, to expose current Camera strategies (so they can be merged via `setStrategies` like `camera.setStrategies([new CustomStrat(), ...camera.strategies])`
- Added additional documentation on custom camera strategies and multiple camera strategies
Bumps [tmp](https://github.com/raszi/node-tmp) from 0.2.3 to 0.2.4.
- [Changelog](https://github.com/raszi/node-tmp/blob/master/CHANGELOG.md)
- [Commits](https://github.com/raszi/node-tmp/compare/v0.2.3...v0.2.4)
---
updated-dependencies:
- dependency-name: tmp
dependency-version: 0.2.4
dependency-type: indirect
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
This splits out our vitest test suite into `unit` and `visual` tests. `unit` will run on chromium, while `visual` will run on chrome. I've removed firefox/webkit browsers as we were not running these in CI, and there's a discussion to be had about whether they even make sense to use in unit tests, or are they actually only valuable for visual tests. If the latter, we need to figure out how to not rely on Chrome for consistent screenshotting.
Tests that are visual simply need to contain `@visual` somewhere in it's test name or `describe` name. Unit tests will run for all tests without `@visual`, while visual tests will run all that contain `@visual`. I had considered splitting them out into different files under different folders, but it's nice to re-use the same setup/teardown logic. Otherwise I had to copy & paste all of that in both places.
I also made some other tweaks to our vitest config:
- I've removed the conditional exemption of `--disable-gpu` flag for Chromium on macOS, which although slower it ensures the visual tests pass. I suppose this is because it uses a software renderer.
- Changed the test pooling from `thread` to the default. I never saw a difference in speed but in theory the default (`fork`) is supposed to be faster
- Enabled fileParallelism for tests. I had run into WebGL context issues before, but now they seem to be gone, so this should lead to faster tests
- I've switched from Chrome to actual Chromium for the visual tests, and then lowered the tolerance on the TextSpec so that it could pass both in Windows/Ubuntu CI as well as macOS locally. I'm fine to undo this, but a lower tolerance on font tests might make sense to do anyway and this frees us from relying on Windows+Chrome to run these tests.
Excalibur makes use of `Map<Entity, TData>` for functionality (event dispatch) and performance, using the entity as a key to event subscriptions or other data. This stores the Entity by reference as a key, making both lookup and storage fairly efficient. Thanks to Excalibur's event system, it's easy for engine developers to maintain these lists in a safe manner (paired entity added and removed event handlers); here we are patching up a few that slipped through.
Fixes open memory leaks I was experiencing in my game (which churns Actors); it now maintains a stable ~80-100mb memory usage, vs climbing to ~2gb before my poor browser gives up. Previously, these maps would grow without bounds as Actors were created and removed.
I did a quick search for more, but wanted to focus on what I could verify.
Tests passed, but I wasn't able to find a place to add new tests to automate verification and left that unchecked for now - if you have a place to start I'd be happy to look!
Thanks for the great engine ⚔️
Closes #3510
## Changes:
- removes entities from internal `Map<Entity>` and `Map<object>` lists when on entity removal
I have noticed this when I have embedded the game inside React with React strict mode on and using the canvasElement option.
Closes #3503
Bug raised in Discord:
https://discord.com/channels/1195771303215513671/1408751467808034936
## Changes
- The ParticleEmitter passes its z value down to particles when configured for Global space
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 #590
Related #1161
## Changes:
- Added a new `ex.Sound({...})` option back constructor to set all the props you could set on sound at constructor time
- Added new `ex.SoundManager({...}` api to manage volume and muting on large groups of sounds at once
```typescript
var soundManager = new ex.SoundManger({
channels: ['fx', 'music', 'background'],
sounds: {
jumpSnd: { sound: jumpSnd, volume: 0.4, channels: ['fx'] },
forestSnd: { sound: forestSnd, volume: 0.2, channels: ['music', 'background'] },
challengeMusic: { sound: challengeMusic, volume: 0.2, channels: ['music'] },
guitarLoop: { sound: guitarLoop, volume: 0.2, channels: ['music'] }
}
});
toggleMusic.on('pointerdown', () => {
soundManager.channel.toggle('music');
});
game.add(toggleMusic);
game.input.keyboard.on('press', (evt) => {
if (evt.key === ex.Keys.J) {
soundManager.play('jumpSnd');
}
if (evt.key === ex.Keys.M) {
soundManager.channel.mute('music');
}
if (evt.key === ex.Keys.A) {
soundManager.mute();
}
if (evt.key === ex.Keys.S) {
soundManager.unmute();
}
if (evt.key === ex.Keys.U) {
soundManager.channel.unmute('music');
}
if (evt.key === ex.Keys.P) {
soundManager.channel.play('music');
}
if (evt.key === ex.Keys.V) {
soundManager.channel.setVolume('music', 0.9);
}
});
```
Added references to my 2 games developed using Excalibur for 2 different game jams:
- SpookyTruth: GBJAM 12 (https://daviderisaliti.itch.io/spookytruth)
- QuadRush: ScoreJam 31 (https://daviderisaliti.itch.io/quadrush)
Feature: Added lerp method to vector class
* Color.Lerp
* removed direct api callout, added twoslash content
* ran npm format:fix
* fixed twoslash
* try again with twoslash
* adjusted reference path
* try again, based on Actor.mdx instead of Events.mds
* trying again
* added ex.Color reference in lerp call
* removed referenced types
* tried from engine fundamentals mdx
* test, removed all twoslash
* fixed twoslash
Closes #3528
## Changes:
- Cleans up particle documentation to reflect current particle emitter
- nested particle structure
- replace vel for speed
- additional comments explaining more of the properties
- adds embedded examples
- Playground emebed
- More notes [here](https://github.com/excaliburjs/Excalibur/issues/3528#issuecomment-3368702814)
- It could be useful to have an "?embed" version of the playground where it hides the header, specifically for the docs
- Open to _not_ having this
- Added initial docs style guide
- Open to change, its more a reference for myself - nearly every time I modify the docs I do a quick search for "now, do we refer to it as Excalibur or Excalibur.js?"
Dev Containers are a VS Code feature that make it easier for contributors to set up a project in a dedicated environment using Docker.
## Changes
- Deps: Update to `playwright@1.55.1`
- Deps: Added Vitest UI
- Add `devcontainer.json` configuration
- Update README for contributors
- Remove crufty old Dockerfile/compose
Closes #3519
## Changes:
- Adds an aspect ratio to the sample images, based off the tallest image so far, so we get consistent heights
- Adds the option to overwrite the color on a sample by sample basis, but defaults to the Excalibur blue
- Adds some additional webpack configuration to reflect the recent changes [here](https://github.com/excaliburjs/sample-tiled-webpack/pull/5)
<img width="2614" height="1584" alt="image" src="https://github.com/user-attachments/assets/54e3c721-45c6-4a21-be9e-4b18a5b329e1" />
No ticket. Relates to [this discussion](https://github.com/excaliburjs/Excalibur/discussions/3517)
## Changes:
- Add details for the Excalitris sample
## Questions:
I couldn't figure out how the other samples redirect to their corresponding demo.
Assuming there is some nginx config or similar happening behind the scenes?
For example: https://excaliburjs.com/sample-jelly-jumper/
If its via GH Pages, can Pages be enabled on https://github.com/excaliburjs/excalitris/settings ? The [actions file](https://github.com/excaliburjs/excalitris/blob/main/.github/workflows/pages.yml) should already be ready to go.
Closes https://github.com/excaliburjs/excalibur-tiled/issues/725 (excalibur-tiled)
## Changes:
- Added two methods to Camera: `addStrategies` and `setStrategies`.
- Added getter property, `strategies`, to expose current Camera strategies (so they can be merged via `setStrategies` like `camera.setStrategies([new CustomStrat(), ...camera.strategies])`
- Added additional documentation on custom camera strategies and multiple camera strategies
Bumps [tmp](https://github.com/raszi/node-tmp) from 0.2.3 to 0.2.4.
- [Changelog](https://github.com/raszi/node-tmp/blob/master/CHANGELOG.md)
- [Commits](https://github.com/raszi/node-tmp/compare/v0.2.3...v0.2.4)
---
updated-dependencies:
- dependency-name: tmp
dependency-version: 0.2.4
dependency-type: indirect
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
This splits out our vitest test suite into `unit` and `visual` tests. `unit` will run on chromium, while `visual` will run on chrome. I've removed firefox/webkit browsers as we were not running these in CI, and there's a discussion to be had about whether they even make sense to use in unit tests, or are they actually only valuable for visual tests. If the latter, we need to figure out how to not rely on Chrome for consistent screenshotting.
Tests that are visual simply need to contain `@visual` somewhere in it's test name or `describe` name. Unit tests will run for all tests without `@visual`, while visual tests will run all that contain `@visual`. I had considered splitting them out into different files under different folders, but it's nice to re-use the same setup/teardown logic. Otherwise I had to copy & paste all of that in both places.
I also made some other tweaks to our vitest config:
- I've removed the conditional exemption of `--disable-gpu` flag for Chromium on macOS, which although slower it ensures the visual tests pass. I suppose this is because it uses a software renderer.
- Changed the test pooling from `thread` to the default. I never saw a difference in speed but in theory the default (`fork`) is supposed to be faster
- Enabled fileParallelism for tests. I had run into WebGL context issues before, but now they seem to be gone, so this should lead to faster tests
- I've switched from Chrome to actual Chromium for the visual tests, and then lowered the tolerance on the TextSpec so that it could pass both in Windows/Ubuntu CI as well as macOS locally. I'm fine to undo this, but a lower tolerance on font tests might make sense to do anyway and this frees us from relying on Windows+Chrome to run these tests.
Excalibur makes use of `Map<Entity, TData>` for functionality (event dispatch) and performance, using the entity as a key to event subscriptions or other data. This stores the Entity by reference as a key, making both lookup and storage fairly efficient. Thanks to Excalibur's event system, it's easy for engine developers to maintain these lists in a safe manner (paired entity added and removed event handlers); here we are patching up a few that slipped through.
Fixes open memory leaks I was experiencing in my game (which churns Actors); it now maintains a stable ~80-100mb memory usage, vs climbing to ~2gb before my poor browser gives up. Previously, these maps would grow without bounds as Actors were created and removed.
I did a quick search for more, but wanted to focus on what I could verify.
Tests passed, but I wasn't able to find a place to add new tests to automate verification and left that unchecked for now - if you have a place to start I'd be happy to look!
Thanks for the great engine ⚔️
Closes #3510
## Changes:
- removes entities from internal `Map<Entity>` and `Map<object>` lists when on entity removal
Closes #590
Related #1161
## Changes:
- Added a new `ex.Sound({...})` option back constructor to set all the props you could set on sound at constructor time
- Added new `ex.SoundManager({...}` api to manage volume and muting on large groups of sounds at once
```typescript
var soundManager = new ex.SoundManger({
channels: ['fx', 'music', 'background'],
sounds: {
jumpSnd: { sound: jumpSnd, volume: 0.4, channels: ['fx'] },
forestSnd: { sound: forestSnd, volume: 0.2, channels: ['music', 'background'] },
challengeMusic: { sound: challengeMusic, volume: 0.2, channels: ['music'] },
guitarLoop: { sound: guitarLoop, volume: 0.2, channels: ['music'] }
}
});
toggleMusic.on('pointerdown', () => {
soundManager.channel.toggle('music');
});
game.add(toggleMusic);
game.input.keyboard.on('press', (evt) => {
if (evt.key === ex.Keys.J) {
soundManager.play('jumpSnd');
}
if (evt.key === ex.Keys.M) {
soundManager.channel.mute('music');
}
if (evt.key === ex.Keys.A) {
soundManager.mute();
}
if (evt.key === ex.Keys.S) {
soundManager.unmute();
}
if (evt.key === ex.Keys.U) {
soundManager.channel.unmute('music');
}
if (evt.key === ex.Keys.P) {
soundManager.channel.play('music');
}
if (evt.key === ex.Keys.V) {
soundManager.channel.setVolume('music', 0.9);
}
});
```