@inglorious/renderer-2d 3.0.0 → 4.0.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@inglorious/renderer-2d",
3
- "version": "3.0.0",
3
+ "version": "4.0.0",
4
4
  "description": "A renderer for the Inglorious Engine, using the Context2D of the Canvas API.",
5
5
  "author": "IceOnFire <antony.mistretta@gmail.com> (https://ingloriouscoderz.it)",
6
6
  "license": "MIT",
@@ -24,12 +24,12 @@
24
24
  "access": "public"
25
25
  },
26
26
  "dependencies": {
27
- "@inglorious/engine": "4.0.0",
28
- "@inglorious/utils": "3.6.0"
27
+ "@inglorious/engine": "5.0.0",
28
+ "@inglorious/utils": "3.6.1"
29
29
  },
30
30
  "peerDependencies": {
31
- "@inglorious/engine": "4.0.0",
32
- "@inglorious/utils": "3.6.0"
31
+ "@inglorious/engine": "5.0.0",
32
+ "@inglorious/utils": "3.6.1"
33
33
  },
34
34
  "devDependencies": {
35
35
  "eslint": "^9.34.0",
@@ -18,9 +18,9 @@ export function renderingSystem(canvas) {
18
18
  const ctx = canvas.getContext("2d")
19
19
 
20
20
  return {
21
- update(state, dt, api) {
21
+ update(entities, dt, api) {
22
22
  const types = api.getTypes()
23
- const { game, ...worldEntities } = state.entities
23
+ const { game, ...worldEntities } = entities
24
24
 
25
25
  // 1. Clear canvas
26
26
  const [gameWidth, gameHeight] = game.size
@@ -28,7 +28,7 @@ export function renderingSystem(canvas) {
28
28
  ctx.fillRect(ORIGIN, ORIGIN, gameWidth, gameHeight)
29
29
 
30
30
  // 2. Find active camera
31
- const camera = Object.values(state.entities).find(
31
+ const camera = Object.values(entities).find(
32
32
  (entity) => entity.type === "camera" && entity.isActive,
33
33
  )
34
34