@woosh/meep-engine 2.85.3 → 2.85.4

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.
@@ -103294,7 +103294,7 @@ class Engine {
103294
103294
 
103295
103295
  if (!this.__using_external_entity_manager) {
103296
103296
  // subscribe simulator to common ticker
103297
- this.ticker.subscribe(timeDelta => {
103297
+ this.ticker.onTick.add(timeDelta => {
103298
103298
  const t0 = performance.now();
103299
103299
  this.entityManager.simulate(timeDelta);
103300
103300
 
package/package.json CHANGED
@@ -5,7 +5,7 @@
5
5
  "description": "Fully featured ECS game engine written in JavaScript",
6
6
  "type": "module",
7
7
  "author": "Alexander Goldring",
8
- "version": "2.85.3",
8
+ "version": "2.85.4",
9
9
  "main": "build/meep.module.js",
10
10
  "module": "build/meep.module.js",
11
11
  "exports": {
@@ -20,7 +20,8 @@
20
20
  "scripts": {
21
21
  "test:ci": "jest --config ./jest.conf.json --collectCoverage --coverageDirectory=\"./coverage\" --ci --reporters=default --reporters=jest-junit --watchAll=false",
22
22
  "build-module": "rollup -c rollup.config.js",
23
- "publish-npm": "npm publish"
23
+ "publish-npm": "npm publish",
24
+ "generate-types": "npx -p typescript tsc src/**/*.js --declaration --allowJs --emitDeclarationOnly --outDir dist"
24
25
  },
25
26
  "browserslist": [
26
27
  "last 2 chrome version",
@@ -61,7 +62,8 @@
61
62
  "jest": "29.6.4",
62
63
  "jest-environment-jsdom": "29.6.4",
63
64
  "jest-junit": "16.0.0",
64
- "rollup": "3.26.2"
65
+ "rollup": "3.26.2",
66
+ "typescript": "5.2.2"
65
67
  },
66
68
  "keywords": [
67
69
  "dream",
@@ -1,5 +1,15 @@
1
+ import Signal from "../../core/events/signal/Signal";
2
+
1
3
  export default class Ticker {
4
+ readonly onTick: Signal<number>
5
+
6
+ /**
7
+ * @deprecated
8
+ */
2
9
  subscribe(f: (timeDelta: number) => any, thisArg?: any): void
3
10
 
11
+ /**
12
+ * @deprecated
13
+ */
4
14
  unsubscribe(f: (timeDelta: number) => any, thisArg?: any): void
5
15
  }