Skip to content

Commit

Permalink
feat: timescale = 0 now supported
Browse files Browse the repository at this point in the history
  • Loading branch information
eonarheim committed Sep 12, 2024
1 parent a99f25f commit 588d0c1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ This project adheres to [Semantic Versioning](http://semver.org/).

### Added

- `ex.Engine.timeScale` values of 0 are now supported
- `ex.Trigger` now supports all valid actor constructor parameters from `ex.ActorArgs` in addition to `ex.TriggerOptions`
- `ex.Gif` can now handle default embedded GIF frame timings
- New `ex.Screen.worldToPagePixelRatio` API that will return the ratio between excalibur pixels and the HTML pixels.
Expand Down
4 changes: 2 additions & 2 deletions src/engine/Engine.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1198,8 +1198,8 @@ O|===|* >________________>\n\
* when using time-based movement.
*/
public set timescale(value: number) {
if (value <= 0) {
Logger.getInstance().error('Cannot set engine.timescale to a value of 0 or less than 0.');
if (value < 0) {
Logger.getInstance().warnOnce('engine.timescale to a value less than 0 are ignored');
return;
}

Expand Down

0 comments on commit 588d0c1

Please sign in to comment.