extra-game-loop 0.1.3 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,9 +1,14 @@
1
+ export declare enum Mode {
2
+ UpdateFirst = 0,
3
+ FixedUpdateFirst = 1
4
+ }
1
5
  interface IGameLoopOptions<FixedDeltaTime extends number> {
6
+ mode: Mode;
2
7
  fixedDeltaTime: FixedDeltaTime;
3
8
  maximumDeltaTime: number;
4
- fixedUpdate: (deltaTime: FixedDeltaTime) => void;
5
9
  update: (deltaTime: number) => void;
6
- render: () => void;
10
+ fixedUpdate: (deltaTime: FixedDeltaTime) => void;
11
+ render: (alpha: number) => void;
7
12
  }
8
13
  export declare class GameLoop<FixedDeltaTime extends number> {
9
14
  private readonly fsm;
@@ -12,6 +17,7 @@ export declare class GameLoop<FixedDeltaTime extends number> {
12
17
  private readonly fixedUpdate;
13
18
  private readonly update;
14
19
  private readonly render;
20
+ private nextFrame;
15
21
  private requstId?;
16
22
  private lastTimestamp?;
17
23
  private deltaTimeAccumulator;
@@ -21,6 +27,7 @@ export declare class GameLoop<FixedDeltaTime extends number> {
21
27
  stop(): void;
22
28
  getFramesOfSecond(): number;
23
29
  private loop;
24
- private nextFrame;
30
+ private nextFrameUpdateFirst;
31
+ private nextFrameFixedUpdateFirst;
25
32
  }
26
33
  export {};
@@ -1,8 +1,13 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.GameLoop = void 0;
3
+ exports.GameLoop = exports.Mode = void 0;
4
4
  const structures_1 = require("@blackglory/structures");
5
5
  const prelude_1 = require("@blackglory/prelude");
6
+ var Mode;
7
+ (function (Mode) {
8
+ Mode[Mode["UpdateFirst"] = 0] = "UpdateFirst";
9
+ Mode[Mode["FixedUpdateFirst"] = 1] = "FixedUpdateFirst";
10
+ })(Mode = exports.Mode || (exports.Mode = {}));
6
11
  var State;
7
12
  (function (State) {
8
13
  State["Stopped"] = "stopped";
@@ -31,6 +36,13 @@ class GameLoop {
31
36
  this.fixedUpdate = options.fixedUpdate;
32
37
  this.update = options.update;
33
38
  this.render = options.render;
39
+ this.nextFrame = (0, prelude_1.go)(() => {
40
+ switch (options.mode) {
41
+ case Mode.UpdateFirst: return this.nextFrameUpdateFirst.bind(this);
42
+ case Mode.FixedUpdateFirst: return this.nextFrameFixedUpdateFirst.bind(this);
43
+ default: throw new Error('Unknown mode');
44
+ }
45
+ });
34
46
  }
35
47
  start() {
36
48
  this.fsm.send('start');
@@ -54,14 +66,25 @@ class GameLoop {
54
66
  return 0;
55
67
  }
56
68
  }
57
- nextFrame(deltaTime) {
69
+ nextFrameUpdateFirst(deltaTime) {
70
+ this.deltaTimeAccumulator = Math.min(this.deltaTimeAccumulator + deltaTime, this.maximumDeltaTime);
71
+ this.update(deltaTime);
72
+ while (this.deltaTimeAccumulator >= this.fixedDeltaTime) {
73
+ this.fixedUpdate(this.fixedDeltaTime);
74
+ this.deltaTimeAccumulator -= this.fixedDeltaTime;
75
+ }
76
+ const alpha = this.deltaTimeAccumulator / this.fixedDeltaTime;
77
+ this.render(alpha);
78
+ }
79
+ nextFrameFixedUpdateFirst(deltaTime) {
58
80
  this.deltaTimeAccumulator = Math.min(this.deltaTimeAccumulator + deltaTime, this.maximumDeltaTime);
59
81
  while (this.deltaTimeAccumulator >= this.fixedDeltaTime) {
60
82
  this.fixedUpdate(this.fixedDeltaTime);
61
83
  this.deltaTimeAccumulator -= this.fixedDeltaTime;
62
84
  }
63
85
  this.update(deltaTime);
64
- this.render();
86
+ const alpha = this.deltaTimeAccumulator / this.fixedDeltaTime;
87
+ this.render(alpha);
65
88
  }
66
89
  }
67
90
  exports.GameLoop = GameLoop;
@@ -1 +1 @@
1
- {"version":3,"file":"game-loop.js","sourceRoot":"","sources":["../../src/game-loop.ts"],"names":[],"mappings":";;;AAAA,uDAAsF;AACtF,iDAA4C;AAkC5C,IAAK,KAGJ;AAHD,WAAK,KAAK;IACR,4BAAmB,CAAA;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aTime extends number> {
6
+ mode: Mode;
2
7
  fixedDeltaTime: FixedDeltaTime;
3
8
  maximumDeltaTime: number;
4
- fixedUpdate: (deltaTime: FixedDeltaTime) => void;
5
9
  update: (deltaTime: number) => void;
6
- render: () => void;
10
+ fixedUpdate: (deltaTime: FixedDeltaTime) => void;
11
+ render: (alpha: number) => void;
7
12
  }
8
13
  export declare class GameLoop<FixedDeltaTime extends number> {
9
14
  private readonly fsm;
@@ -12,6 +17,7 @@ export declare class GameLoop<FixedDeltaTime extends number> {
12
17
  private readonly fixedUpdate;
13
18
  private readonly update;
14
19
  private readonly render;
20
+ private nextFrame;
15
21
  private requstId?;
16
22
  private lastTimestamp?;
17
23
  private deltaTimeAccumulator;
@@ -21,6 +27,7 @@ export declare class GameLoop<FixedDeltaTime extends number> {
21
27
  stop(): void;
22
28
  getFramesOfSecond(): number;
23
29
  private loop;
24
- private nextFrame;
30
+ private nextFrameUpdateFirst;
31
+ private nextFrameFixedUpdateFirst;
25
32
  }
26
33
  export {};
@@ -1,8 +1,13 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.GameLoop = void 0;
3
+ exports.GameLoop = exports.Mode = void 0;
4
4
  const structures_1 = require("@blackglory/structures");
5
5
  const prelude_1 = require("@blackglory/prelude");
6
+ var Mode;
7
+ (function (Mode) {
8
+ Mode[Mode["UpdateFirst"] = 0] = "UpdateFirst";
9
+ Mode[Mode["FixedUpdateFirst"] = 1] = "FixedUpdateFirst";
10
+ })(Mode = exports.Mode || (exports.Mode = {}));
6
11
  var State;
7
12
  (function (State) {
8
13
  State["Stopped"] = "stopped";
@@ -31,6 +36,13 @@ class GameLoop {
31
36
  this.fixedUpdate = options.fixedUpdate;
32
37
  this.update = options.update;
33
38
  this.render = options.render;
39
+ this.nextFrame = (0, prelude_1.go)(() => {
40
+ switch (options.mode) {
41
+ case Mode.UpdateFirst: return this.nextFrameUpdateFirst.bind(this);
42
+ case Mode.FixedUpdateFirst: return this.nextFrameFixedUpdateFirst.bind(this);
43
+ default: throw new Error('Unknown mode');
44
+ }
45
+ });
34
46
  }
35
47
  start() {
36
48
  this.fsm.send('start');
@@ -54,14 +66,25 @@ class GameLoop {
54
66
  return 0;
55
67
  }
56
68
  }
57
- nextFrame(deltaTime) {
69
+ nextFrameUpdateFirst(deltaTime) {
70
+ this.deltaTimeAccumulator = Math.min(this.deltaTimeAccumulator + deltaTime, this.maximumDeltaTime);
71
+ this.update(deltaTime);
72
+ while (this.deltaTimeAccumulator >= this.fixedDeltaTime) {
73
+ this.fixedUpdate(this.fixedDeltaTime);
74
+ this.deltaTimeAccumulator -= this.fixedDeltaTime;
75
+ }
76
+ const alpha = this.deltaTimeAccumulator / this.fixedDeltaTime;
77
+ this.render(alpha);
78
+ }
79
+ nextFrameFixedUpdateFirst(deltaTime) {
58
80
  this.deltaTimeAccumulator = Math.min(this.deltaTimeAccumulator + deltaTime, this.maximumDeltaTime);
59
81
  while (this.deltaTimeAccumulator >= this.fixedDeltaTime) {
60
82
  this.fixedUpdate(this.fixedDeltaTime);
61
83
  this.deltaTimeAccumulator -= this.fixedDeltaTime;
62
84
  }
63
85
  this.update(deltaTime);
64
- this.render();
86
+ const alpha = this.deltaTimeAccumulator / this.fixedDeltaTime;
87
+ this.render(alpha);
65
88
  }
66
89
  }
67
90
  exports.GameLoop = GameLoop;
@@ -1 +1 @@
1
- {"version":3,"file":"game-loop.js","sourceRoot":"","sources":["../../src/game-loop.ts"],"names":[],"mappings":";;;AAAA,uDAAsF;AACtF,iDAA4C;AAkC5C,IAAK,KAGJ;AAHD,WAAK,KAAK;IACR,4BAAmB,CAAA;IACnB,4BAAmB,CAAA;AACrB,CAAC,EAHI,KAAK,KAAL,KAAK,QAGT;AAMD,MAAM,MAAM,GAA4C;IACtD,CAAC,KAAK,CAAC,OAAO,CAAC,EAAE,EAAE,KAAK,EAAE,KAAK,CAAC,OAAO,EAAE;IACzC,CAAC,KAAK,CAAC,OAAO,CAAC,EAAE,EAAE,I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C,MAAM,CAAC,SAAS,CAAC,CAAA;QAEtB,OAAO,IAAI,CAAC,oBAAoB,IAAI,IAAI,CAAC,cAAc,EAAE;YACvD,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,cAAc,CAAC,CAAA;YACrC,IAAI,CAAC,oBAAoB,IAAI,IAAI,CAAC,cAAc,CAAA;SACjD;QAED,MAAM,KAAK,GAAG,IAAI,CAAC,oBAAoB,GAAG,IAAI,CAAC,cAAc,CAAA;QAC7D,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAA;IACpB,CAAC;IASO,yBAAyB,CAAC,SAAiB;QACjD,IAAI,CAAC,oBAAoB,GAAG,IAAI,CAAC,GAAG,CAClC,IAAI,CAAC,oBAAoB,GAAG,SAAS,EACrC,IAAI,CAAC,gBAAgB,CACtB,CAAA;QAED,OAAO,IAAI,CAAC,oBAAoB,IAAI,IAAI,CAAC,cAAc,EAAE;YACvD,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,cAAc,CAAC,CAAA;YACrC,IAAI,CAAC,oBAAoB,IAAI,IAAI,CAAC,cAAc,CAAA;SACjD;QAED,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,CAAA;QAEtB,MAAM,KAAK,GAAG,IAAI,CAAC,oBAAoB,GAAG,IAAI,CAAC,cAAc,CAAA;QAC7D,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAA;IACpB,CAAC;CACF;AAzHD,4BAyHC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "extra-game-loop",
3
- "version": "0.1.3",
3
+ "version": "0.2.0",
4
4
  "description": "",
5
5
  "keywords": [],
6
6
  "files": [
@@ -68,6 +68,6 @@
68
68
  },
69
69
  "dependencies": {
70
70
  "@blackglory/prelude": "^0.1.5",
71
- "@blackglory/structures": "^0.10.14"
71
+ "@blackglory/structures": "^0.10.22"
72
72
  }
73
73
  }