Skip to content

Commit d167a26

Browse files
refactor: simplify getNextTime
1 parent 37e5601 commit d167a26

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

CHANGELOG.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,14 @@
11
## [1.11.2](https://github.com/vault-developer/event-loop-explorer/compare/v1.11.1...v1.11.2) (2025-01-13)
22

3-
43
### Bug Fixes
54

6-
* fix animation lags ([#35](https://github.com/vault-developer/event-loop-explorer/issues/35)) ([d51f767](https://github.com/vault-developer/event-loop-explorer/commit/d51f767735d362667026af31cf825415187dd077))
5+
- fix animation lags ([#35](https://github.com/vault-developer/event-loop-explorer/issues/35)) ([d51f767](https://github.com/vault-developer/event-loop-explorer/commit/d51f767735d362667026af31cf825415187dd077))
76

87
## [1.11.1](https://github.com/vault-developer/event-loop-explorer/compare/v1.11.0...v1.11.1) (2025-01-13)
98

109
### Bug Fixes
1110

12-
* fix animation lags ([#34](https://github.com/vault-developer/event-loop-explorer/issues/34)) ([436175c](https://github.com/vault-developer/event-loop-explorer/commit/436175cccfd7698c071c80c601f0bf4c0cdb78a7))
11+
- fix animation lags ([#34](https://github.com/vault-developer/event-loop-explorer/issues/34)) ([436175c](https://github.com/vault-developer/event-loop-explorer/commit/436175cccfd7698c071c80c601f0bf4c0cdb78a7))
1312

1413
# [1.11.0](https://github.com/vault-developer/event-loop-explorer/compare/v1.10.2...v1.11.0) (2025-01-12)
1514

src/utils/simulate.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,9 @@ const getNextTime = ({
5959
groupedSteps: Record<string, ELSerialisedStep[]>;
6060
}) => {
6161
const minStep = 0.25;
62-
const minTime = time + minStep;
62+
const minTime = Math.ceil(time + minStep);
6363
const maxTime = time + speed;
64-
for (let i = minTime; i < maxTime; i += minStep) {
64+
for (let i = minTime; i < maxTime; i++) {
6565
if (groupedSteps[i]?.length > 0) return i;
6666
}
6767
return maxTime;

0 commit comments

Comments
 (0)