Commits
This PR allows users to configure the ImageSource wrapping mode: Clamp, Repeat, or Mirror.
Example of using the Repeat mode to repeat noise textures over time
https://github.com/excaliburjs/Excalibur/assets/612071/ca199c17-569e-4f38-9810-72227e2ebb52
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>
Bumps [follow-redirects](https://github.com/follow-redirects/follow-redirects) from 1.15.3 to 1.15.6.
- [Release notes](https://github.com/follow-redirects/follow-redirects/releases)
- [Commits](https://github.com/follow-redirects/follow-redirects/compare/v1.15.3...v1.15.6)
---
updated-dependencies:
- dependency-name: follow-redirects
dependency-type: indirect
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [webpack-dev-middleware](https://github.com/webpack/webpack-dev-middleware) from 5.3.3 to 5.3.4.
- [Release notes](https://github.com/webpack/webpack-dev-middleware/releases)
- [Changelog](https://github.com/webpack/webpack-dev-middleware/blob/v5.3.4/CHANGELOG.md)
- [Commits](https://github.com/webpack/webpack-dev-middleware/compare/v5.3.3...v5.3.4)
---
updated-dependencies:
- dependency-name: webpack-dev-middleware
dependency-type: indirect
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [ip](https://github.com/indutny/node-ip) from 2.0.0 to 2.0.1.
- [Commits](https://github.com/indutny/node-ip/compare/v2.0.0...v2.0.1)
---
updated-dependencies:
- dependency-name: ip
dependency-type: indirect
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [axios](https://github.com/axios/axios) and [wait-on](https://github.com/jeffbski/wait-on). These dependencies needed to be updated together.
Updates `axios` from 0.27.2 to 1.6.7
- [Release notes](https://github.com/axios/axios/releases)
- [Changelog](https://github.com/axios/axios/blob/v1.x/CHANGELOG.md)
- [Commits](https://github.com/axios/axios/compare/v0.27.2...v1.6.7)
Updates `wait-on` from 7.0.1 to 7.2.0
- [Release notes](https://github.com/jeffbski/wait-on/releases)
- [Commits](https://github.com/jeffbski/wait-on/compare/v7.0.1...v7.2.0)
---
updated-dependencies:
- dependency-name: axios
dependency-type: indirect
- dependency-name: wait-on
dependency-type: indirect
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [express](https://github.com/expressjs/express) from 4.18.2 to 4.19.2.
- [Release notes](https://github.com/expressjs/express/releases)
- [Changelog](https://github.com/expressjs/express/blob/master/History.md)
- [Commits](https://github.com/expressjs/express/compare/4.18.2...4.19.2)
---
updated-dependencies:
- 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 [follow-redirects](https://github.com/follow-redirects/follow-redirects) from 1.14.8 to 1.15.6.
- [Release notes](https://github.com/follow-redirects/follow-redirects/releases)
- [Commits](https://github.com/follow-redirects/follow-redirects/compare/v1.14.8...v1.15.6)
---
updated-dependencies:
- dependency-name: follow-redirects
dependency-type: indirect
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
- 03-bundlers.mdx corrections:
- `npm install parcel-bundler` must be called with `--save-dev`
- `<script src="./src/index.ts">` must be closed with `</script>`
- `npx` should be infront of `parcel index.html --no-autoinstall` for better compatibility
- added proposed file structure for clearer understanding
- changed file structure to the common one
- 02-conventions.mdx minor correction:
- fixed typo
Bumps [express](https://github.com/expressjs/express) from 4.18.2 to 4.19.2.
- [Release notes](https://github.com/expressjs/express/releases)
- [Changelog](https://github.com/expressjs/express/blob/master/History.md)
- [Commits](https://github.com/expressjs/express/compare/4.18.2...4.19.2)
---
updated-dependencies:
- 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 [webpack-dev-middleware](https://github.com/webpack/webpack-dev-middleware) from 6.1.1 to 6.1.3.
- [Release notes](https://github.com/webpack/webpack-dev-middleware/releases)
- [Changelog](https://github.com/webpack/webpack-dev-middleware/blob/v6.1.3/CHANGELOG.md)
- [Commits](https://github.com/webpack/webpack-dev-middleware/compare/v6.1.1...v6.1.3)
---
updated-dependencies:
- dependency-name: webpack-dev-middleware
dependency-type: indirect
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
This reverts commit dfbdf9831c83a7564fdc374af09da4664ede7f6e.
Closes #2983
## Changes:
- fix `Color.toHex()` and `Color._componentToHex()` to handle fractional numbers, negative numbers and colors with transparency
- add tests for `Color.toHex()`
See excalibur bunnymark https://github.com/excaliburjs/excalibur-bunnymark
This PR removes allocations and makes several perf improvements that DOUBLES our performance on the bunnymark
* Removes all allocations from the draw image hot path
* Removes allocations from object pool
* Removes unecessary getters
* Speed up AffineMatrix clone
* Switches webgl to VAOs
* Speed up texture id lookup
* Caches native thunks to width/height
## New Perf Results
~50fps @ 20,000 sprites.

~30fps @ 35000 sprites

## Previous Perf Results on Excalibur main
~25fps @ 20000 sprites

~15fps @ 35000 sprites

This PR adds:
- Pointer event support to `ex.TileMap`'s and individual `ex.Tile`'s
- Pointer event support to `ex.IsometricMap`'s and individual `ex.IsometricTile`'s
```typescript
// Tilemap
const tileMap = new TileMap({...});
for (const tile of tileMap.tiles) {
tile.on('pointerdown', (evt: ex.PointerEvent) => {
console.log(tile.x, tile.y);
});
}
// Isometric
const isoMap = new IsometricMap({...});
for (const tile of isoMap.tiles) {
tile.on('pointerdown', (evt: ex.PointerEvent) => {
console.log(tile.x, tile.y);
});
}
```
`useAnchor: false` The graphics members are positioned from the top left
```typescript
const graphicGroup = new ex.GraphicsGroup({
useAnchor: false,
members: [
{
graphic: heartImage.toSprite(),
offset: ex.vec(0, 0),
},
{
graphic: heartImage.toSprite(),
offset: ex.vec(0, 16),
},
{
graphic: heartImage.toSprite(),
offset: ex.vec(16, 16),
},
{
graphic: heartImage.toSprite(),
offset: ex.vec(16, 0),
},
],
});
```

`useAnchor: true` The graphics members' total combined bounds are centered by the actor's anchor (.5, .5) by default
```typescript
const graphicGroup = new ex.GraphicsGroup({
useAnchor: true,
members: [
{
graphic: heartImage.toSprite(),
offset: ex.vec(0, 0),
},
{
graphic: heartImage.toSprite(),
offset: ex.vec(0, 16),
},
{
graphic: heartImage.toSprite(),
offset: ex.vec(16, 16),
},
{
graphic: heartImage.toSprite(),
offset: ex.vec(16, 0),
},
],
});
```

Closes #2975
## Changes:
- Comment for Vector.rotate()
- Fixed incomplete types for font options in `ex.FontSource().toFont(options)`
This PR adds an optional `ex.coroutine` timing parameter as an option bag to schedule when they are updated
```typescript
const result = ex.coroutine(engine, function * () {...}, { timing: 'postupdate' })
```
This PR also adds a way to set the `this` parameter for a generator
```typescript
const result = ex.coroutine({myThis: 'value'}, engine, function * () {...})
```
Additionally this PR removes the requirement to pass engine if done so under an Excalibur lifecycle
```typescript
const result = ex.coroutine(function * () {...});
```
---------
Co-authored-by: Matt Jennings <me@mattjennings.io>
Fix issue caused by recent change to FitContainer where percent units were not accounted for when transforming coordinates
This PR addresses some issues with webgl contexts
- Fixed issue when WebGL context lost occurs where there was no friendly output to the user
- Fixed issue where HiDPI scaling could accidentally scale past the 4k mobile limit, if the context would scale too large it will now attempt to recover by backing off.
- Added way to add custom WebGL context lost/recovered handlers for your game
```typescript
const game = new ex.Engine({
handleContextLost: (e) => {...},
handleContextRestored: (e) => {...}
})
```
Default context lost screen

Fixed issue where unbounded containers would grow infinitely when using the following display modes:
* `DisplayMode.FillContainer`
* `DisplayMode.FitContainer`
* `DisplayMode.FitContainerAndFill`
* `DisplayMode.FitContainerAndZoom`
This works by using CSS percent to fill the container instead of calculating the size which would cause n+1 resizing when setting the size. Viewport screen dimensions will now support percent based sizes
Bumps [follow-redirects](https://github.com/follow-redirects/follow-redirects) from 1.15.3 to 1.15.6.
- [Release notes](https://github.com/follow-redirects/follow-redirects/releases)
- [Commits](https://github.com/follow-redirects/follow-redirects/compare/v1.15.3...v1.15.6)
---
updated-dependencies:
- dependency-name: follow-redirects
dependency-type: indirect
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [webpack-dev-middleware](https://github.com/webpack/webpack-dev-middleware) from 5.3.3 to 5.3.4.
- [Release notes](https://github.com/webpack/webpack-dev-middleware/releases)
- [Changelog](https://github.com/webpack/webpack-dev-middleware/blob/v5.3.4/CHANGELOG.md)
- [Commits](https://github.com/webpack/webpack-dev-middleware/compare/v5.3.3...v5.3.4)
---
updated-dependencies:
- dependency-name: webpack-dev-middleware
dependency-type: indirect
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [ip](https://github.com/indutny/node-ip) from 2.0.0 to 2.0.1.
- [Commits](https://github.com/indutny/node-ip/compare/v2.0.0...v2.0.1)
---
updated-dependencies:
- dependency-name: ip
dependency-type: indirect
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [axios](https://github.com/axios/axios) and [wait-on](https://github.com/jeffbski/wait-on). These dependencies needed to be updated together.
Updates `axios` from 0.27.2 to 1.6.7
- [Release notes](https://github.com/axios/axios/releases)
- [Changelog](https://github.com/axios/axios/blob/v1.x/CHANGELOG.md)
- [Commits](https://github.com/axios/axios/compare/v0.27.2...v1.6.7)
Updates `wait-on` from 7.0.1 to 7.2.0
- [Release notes](https://github.com/jeffbski/wait-on/releases)
- [Commits](https://github.com/jeffbski/wait-on/compare/v7.0.1...v7.2.0)
---
updated-dependencies:
- dependency-name: axios
dependency-type: indirect
- dependency-name: wait-on
dependency-type: indirect
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [express](https://github.com/expressjs/express) from 4.18.2 to 4.19.2.
- [Release notes](https://github.com/expressjs/express/releases)
- [Changelog](https://github.com/expressjs/express/blob/master/History.md)
- [Commits](https://github.com/expressjs/express/compare/4.18.2...4.19.2)
---
updated-dependencies:
- 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 [follow-redirects](https://github.com/follow-redirects/follow-redirects) from 1.14.8 to 1.15.6.
- [Release notes](https://github.com/follow-redirects/follow-redirects/releases)
- [Commits](https://github.com/follow-redirects/follow-redirects/compare/v1.14.8...v1.15.6)
---
updated-dependencies:
- dependency-name: follow-redirects
dependency-type: indirect
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
- 03-bundlers.mdx corrections:
- `npm install parcel-bundler` must be called with `--save-dev`
- `<script src="./src/index.ts">` must be closed with `</script>`
- `npx` should be infront of `parcel index.html --no-autoinstall` for better compatibility
- added proposed file structure for clearer understanding
- changed file structure to the common one
- 02-conventions.mdx minor correction:
- fixed typo
Bumps [express](https://github.com/expressjs/express) from 4.18.2 to 4.19.2.
- [Release notes](https://github.com/expressjs/express/releases)
- [Changelog](https://github.com/expressjs/express/blob/master/History.md)
- [Commits](https://github.com/expressjs/express/compare/4.18.2...4.19.2)
---
updated-dependencies:
- 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 [webpack-dev-middleware](https://github.com/webpack/webpack-dev-middleware) from 6.1.1 to 6.1.3.
- [Release notes](https://github.com/webpack/webpack-dev-middleware/releases)
- [Changelog](https://github.com/webpack/webpack-dev-middleware/blob/v6.1.3/CHANGELOG.md)
- [Commits](https://github.com/webpack/webpack-dev-middleware/compare/v6.1.1...v6.1.3)
---
updated-dependencies:
- dependency-name: webpack-dev-middleware
dependency-type: indirect
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
See excalibur bunnymark https://github.com/excaliburjs/excalibur-bunnymark
This PR removes allocations and makes several perf improvements that DOUBLES our performance on the bunnymark
* Removes all allocations from the draw image hot path
* Removes allocations from object pool
* Removes unecessary getters
* Speed up AffineMatrix clone
* Switches webgl to VAOs
* Speed up texture id lookup
* Caches native thunks to width/height
## New Perf Results
~50fps @ 20,000 sprites.

~30fps @ 35000 sprites

## Previous Perf Results on Excalibur main
~25fps @ 20000 sprites

~15fps @ 35000 sprites

This PR adds:
- Pointer event support to `ex.TileMap`'s and individual `ex.Tile`'s
- Pointer event support to `ex.IsometricMap`'s and individual `ex.IsometricTile`'s
```typescript
// Tilemap
const tileMap = new TileMap({...});
for (const tile of tileMap.tiles) {
tile.on('pointerdown', (evt: ex.PointerEvent) => {
console.log(tile.x, tile.y);
});
}
// Isometric
const isoMap = new IsometricMap({...});
for (const tile of isoMap.tiles) {
tile.on('pointerdown', (evt: ex.PointerEvent) => {
console.log(tile.x, tile.y);
});
}
```
`useAnchor: false` The graphics members are positioned from the top left
```typescript
const graphicGroup = new ex.GraphicsGroup({
useAnchor: false,
members: [
{
graphic: heartImage.toSprite(),
offset: ex.vec(0, 0),
},
{
graphic: heartImage.toSprite(),
offset: ex.vec(0, 16),
},
{
graphic: heartImage.toSprite(),
offset: ex.vec(16, 16),
},
{
graphic: heartImage.toSprite(),
offset: ex.vec(16, 0),
},
],
});
```

`useAnchor: true` The graphics members' total combined bounds are centered by the actor's anchor (.5, .5) by default
```typescript
const graphicGroup = new ex.GraphicsGroup({
useAnchor: true,
members: [
{
graphic: heartImage.toSprite(),
offset: ex.vec(0, 0),
},
{
graphic: heartImage.toSprite(),
offset: ex.vec(0, 16),
},
{
graphic: heartImage.toSprite(),
offset: ex.vec(16, 16),
},
{
graphic: heartImage.toSprite(),
offset: ex.vec(16, 0),
},
],
});
```

This PR adds an optional `ex.coroutine` timing parameter as an option bag to schedule when they are updated
```typescript
const result = ex.coroutine(engine, function * () {...}, { timing: 'postupdate' })
```
This PR also adds a way to set the `this` parameter for a generator
```typescript
const result = ex.coroutine({myThis: 'value'}, engine, function * () {...})
```
Additionally this PR removes the requirement to pass engine if done so under an Excalibur lifecycle
```typescript
const result = ex.coroutine(function * () {...});
```
---------
Co-authored-by: Matt Jennings <me@mattjennings.io>
This PR addresses some issues with webgl contexts
- Fixed issue when WebGL context lost occurs where there was no friendly output to the user
- Fixed issue where HiDPI scaling could accidentally scale past the 4k mobile limit, if the context would scale too large it will now attempt to recover by backing off.
- Added way to add custom WebGL context lost/recovered handlers for your game
```typescript
const game = new ex.Engine({
handleContextLost: (e) => {...},
handleContextRestored: (e) => {...}
})
```
Default context lost screen

Fixed issue where unbounded containers would grow infinitely when using the following display modes:
* `DisplayMode.FillContainer`
* `DisplayMode.FitContainer`
* `DisplayMode.FitContainerAndFill`
* `DisplayMode.FitContainerAndZoom`
This works by using CSS percent to fill the container instead of calculating the size which would cause n+1 resizing when setting the size. Viewport screen dimensions will now support percent based sizes