@daneren2005/shared-memory-physics 1.9.1 → 1.9.2

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/dist/world.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import SharedSpatialMap from '@daneren2005/shared-memory-objects/spatial/shared-spatial-map';
2
2
  import type { SharedSpatialMapConfig, SharedSpatialMapMemory } from '@daneren2005/shared-memory-objects/spatial/shared-spatial-map';
3
3
  import { BaseWorld } from '@daneren2005/shared-memory-ecs';
4
- import type { BaseEntity, ComponentDefinitionMap, ComponentsOf, EntityWorkerSystemWorld, EntityConfigOf, WorldOptions } from '@daneren2005/shared-memory-ecs';
4
+ import type { BaseEntity, ComponentDefinitionMap, ComponentsOf, CompressedWorldConfig, EntityWorkerSystemWorld, EntityConfigOf, WorldConfig, WorldLoadOptions, WorldOptions } from '@daneren2005/shared-memory-ecs';
5
5
  export interface PhysicalWorldData {
6
6
  spatialMapMemory?: SharedSpatialMapMemory;
7
7
  }
@@ -19,8 +19,11 @@ export type PhysicalWorldFilter<R extends ComponentDefinitionMap, E extends Base
19
19
  export default class PhysicalWorld<R extends ComponentDefinitionMap, E extends BaseEntity<ComponentsOf<R>, EntityConfigOf<R>> = BaseEntity<ComponentsOf<R>, EntityConfigOf<R>>> extends BaseWorld<R, ComponentsOf<R>, EntityConfigOf<R>, E> implements PhysicalWorldSource {
20
20
  readonly spatialMap: SharedSpatialMap;
21
21
  private spatialIds;
22
+ private pendingSpatial;
22
23
  constructor(registry: R, options?: PhysicalWorldOptions<R, E>);
24
+ load(config: WorldConfig<EntityConfigOf<R>> | CompressedWorldConfig<EntityConfigOf<R>>, options?: WorldLoadOptions): Promise<void>;
23
25
  updateSpatialEntity(entityOrId: PhysicalWorldEntity<R, E> | number): void;
26
+ private flushPendingSpatial;
24
27
  searchSpatial(minX: number, minY: number, maxX: number, maxY: number, filter?: PhysicalWorldFilter<R, E>): Array<PhysicalWorldEntity<R, E>>;
25
28
  searchSpatialAround(x: number, y: number, reachX: number, reachY: number, filter?: PhysicalWorldFilter<R, E>): Array<PhysicalWorldEntity<R, E>>;
26
29
  findNearestSpatial(x: number, y: number, maxDistance?: number, filter?: PhysicalWorldFilter<R, E>): PhysicalWorldEntity<R, E> | undefined;
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@daneren2005/shared-memory-physics",
3
3
  "description": "2D physics components and systems built on the shared-memory ECS.",
4
4
  "author": "Scott Jackson",
5
- "version": "1.9.1",
5
+ "version": "1.9.2",
6
6
  "type": "module",
7
7
  "sideEffects": false,
8
8
  "license": "MIT",
@@ -42,28 +42,28 @@
42
42
  "prepare": "husky"
43
43
  },
44
44
  "devDependencies": {
45
- "@daneren2005/shared-memory-ecs": "^1.10.2",
46
- "@daneren2005/shared-memory-objects": "^1.6.0",
47
- "@semantic-release/git": "^10.0.1",
45
+ "@daneren2005/shared-memory-ecs": "^1.10.4",
46
+ "@daneren2005/shared-memory-objects": "^1.6.2",
47
+ "@semantic-release/git": "^11.0.1",
48
48
  "@stylistic/eslint-plugin": "^5.10.0",
49
- "@types/node": "^26.6.2",
50
- "@vitest/web-worker": "^5.0.1",
49
+ "@types/node": "^26.6.6",
50
+ "@vitest/web-worker": "^5.0.5",
51
51
  "cross-env": "^10.1.0",
52
52
  "husky": "^9.1.7",
53
- "lint-staged": "^17.5.1",
54
- "oxlint": "^1.85.0",
55
- "oxlint-tsgolint": "^7.0.2002",
53
+ "lint-staged": "^17.6.0",
54
+ "oxlint": "^1.90.0",
55
+ "oxlint-tsgolint": "^7.0.2005",
56
56
  "phaser": "^4.2.1",
57
57
  "semantic-release": "^25.0.9",
58
58
  "typescript": "^7.0.2",
59
- "vite": "^8.3.0",
60
- "vitest": "^5.0.1"
59
+ "vite": "^8.3.5",
60
+ "vitest": "^5.0.5"
61
61
  },
62
62
  "peerDependencies": {
63
63
  "@daneren2005/shared-memory-ecs": "^1.10.0",
64
64
  "@daneren2005/shared-memory-objects": "^1.1.0"
65
65
  },
66
66
  "dependencies": {
67
- "flatbush": "^4.6.2"
67
+ "flatbush": "^4.7.0"
68
68
  }
69
69
  }