@recast-navigation/core 0.4.0 → 0.4.1

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,5 +1,5 @@
1
- import type R from '@recast-navigation/wasm';
2
1
  import { NavMesh } from './nav-mesh';
2
+ import type R from './raw-module';
3
3
  import { Vector3 } from './utils';
4
4
  export type NavMeshQueryParams = {
5
5
  navMesh: NavMesh;
@@ -1,6 +1,6 @@
1
- import type R from '@recast-navigation/wasm';
1
+ import { DetourMeshTile, DetourOffMeshConnection, dtPoly } from './detour';
2
+ import type R from './raw-module';
2
3
  import { Vector3 } from './utils';
3
- import { DetourMeshTile, dtPoly, DetourOffMeshConnection } from './detour';
4
4
  export declare class NavMeshGetTilesAtResult {
5
5
  raw: R.NavMeshGetTilesAtResult;
6
6
  constructor(raw: R.NavMeshGetTilesAtResult);
@@ -0,0 +1,2 @@
1
+ import RawModule from '@recast-navigation/wasm';
2
+ export default RawModule;
package/dist/raw.d.ts CHANGED
@@ -1,23 +1,36 @@
1
- import Module from '@recast-navigation/wasm';
2
- declare const instances: readonly ["Recast", "Detour", "DetourNavMeshBuilder", "DetourTileCacheBuilder", "ChunkyTriMesh", "NavMeshImporter", "NavMeshExporter", "CrowdUtils"];
3
- declare const classes: readonly ["rcContext", "dtNavMeshParams", "dtNavMeshCreateParams", "RecastLinearAllocator", "RecastFastLZCompressor", "rcChunkyTriMesh", "TileCacheData", "dtTileCacheParams", "dtTileCacheLayerHeader"];
1
+ import RawModule from './raw-module';
4
2
  declare const arrays: readonly ["IntArray", "UnsignedCharArray", "UnsignedShortArray", "FloatArray"];
5
- type RawType = {
6
- Module: typeof Module;
7
- Arrays: {
8
- [K in typeof arrays[number]]: typeof Module[K];
9
- };
10
- isNull: (obj: unknown) => boolean;
11
- } & {
12
- [K in typeof instances[number]]: InstanceType<typeof Module[K]>;
13
- } & {
14
- [K in typeof classes[number]]: typeof Module[K];
15
- };
16
3
  /**
17
4
  * Lower level bindings for the Recast and Detour libraries.
18
5
  *
19
6
  * The `init` function must be called before using the `Raw` api.
20
7
  */
21
- export declare const Raw: RawType;
8
+ export declare const Raw: {
9
+ Module: typeof RawModule;
10
+ Arrays: {
11
+ IntArray: typeof RawModule.IntArray;
12
+ UnsignedCharArray: typeof RawModule.UnsignedCharArray;
13
+ UnsignedShortArray: typeof RawModule.UnsignedShortArray;
14
+ FloatArray: typeof RawModule.FloatArray;
15
+ };
16
+ isNull: (obj: unknown) => boolean;
17
+ CrowdUtils: RawModule.CrowdUtils;
18
+ Detour: RawModule.Detour;
19
+ Recast: RawModule.Recast;
20
+ DetourNavMeshBuilder: RawModule.DetourNavMeshBuilder;
21
+ DetourTileCacheBuilder: RawModule.DetourTileCacheBuilder;
22
+ ChunkyTriMesh: RawModule.ChunkyTriMesh;
23
+ NavMeshImporter: RawModule.NavMeshImporter;
24
+ NavMeshExporter: RawModule.NavMeshExporter;
25
+ dtNavMeshCreateParams: typeof RawModule.dtNavMeshCreateParams;
26
+ dtNavMeshParams: typeof RawModule.dtNavMeshParams;
27
+ dtTileCacheParams: typeof RawModule.dtTileCacheParams;
28
+ RecastFastLZCompressor: typeof RawModule.RecastFastLZCompressor;
29
+ RecastLinearAllocator: typeof RawModule.RecastLinearAllocator;
30
+ rcContext: typeof RawModule.rcContext;
31
+ dtTileCacheLayerHeader: typeof RawModule.dtTileCacheLayerHeader;
32
+ TileCacheData: typeof RawModule.TileCacheData;
33
+ rcChunkyTriMesh: typeof RawModule.rcChunkyTriMesh;
34
+ };
22
35
  export declare const init: () => Promise<void>;
23
36
  export {};
package/dist/recast.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import R from '@recast-navigation/wasm';
1
+ import type R from './raw-module';
2
2
  import { Vector3 } from './utils';
3
3
  export type RecastConfigType = {
4
4
  /**
@@ -1,5 +1,5 @@
1
- import type R from '@recast-navigation/wasm';
2
1
  import { NavMesh } from '../nav-mesh';
2
+ import type R from '../raw-module';
3
3
  import { TileCache, TileCacheMeshProcess } from '../tile-cache';
4
4
  export type NavMeshImporterResult = {
5
5
  navMesh: NavMesh;
@@ -1,5 +1,5 @@
1
- import type R from '@recast-navigation/wasm';
2
1
  import { NavMesh } from './nav-mesh';
2
+ import type R from './raw-module';
3
3
  import { Vector3 } from './utils';
4
4
  export type ObstacleRef = R.dtObstacleRef;
5
5
  export type BoxObstacle = {
package/dist/utils.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import type R from '@recast-navigation/wasm';
1
+ import type R from './raw-module';
2
2
  export type Vector3 = {
3
3
  x: number;
4
4
  y: number;
package/package.json CHANGED
@@ -6,7 +6,7 @@
6
6
  "email": "isaac@isaacmason.com",
7
7
  "url": "https://isaacmason.com/"
8
8
  },
9
- "version": "0.4.0",
9
+ "version": "0.4.1",
10
10
  "license": "MIT",
11
11
  "homepage": "https://github.com/isaac-mason/recast-navigation-js",
12
12
  "bugs": {
@@ -24,9 +24,11 @@
24
24
  "build": "rollup --config rollup.config.js --bundleConfigAsCjs",
25
25
  "test": "vitest run"
26
26
  },
27
+ "dependencies": {
28
+ "@recast-navigation/wasm": "0.4.1"
29
+ },
27
30
  "devDependencies": {
28
31
  "@babel/core": "^7.22.5",
29
- "@recast-navigation/wasm": "0.4.0",
30
32
  "@rollup/plugin-commonjs": "^24.0.1",
31
33
  "@rollup/plugin-node-resolve": "^15.0.1",
32
34
  "@rollup/plugin-terser": "^0.4.3",
@@ -45,7 +47,7 @@
45
47
  "eslint-plugin-prettier": "^4.0.0",
46
48
  "eslint-plugin-simple-import-sort": "^10.0.0",
47
49
  "eslint-plugin-typescript-enum": "^2.1.0",
48
- "prettier": "^2.3.2",
50
+ "prettier": "^3.0.2",
49
51
  "rollup": "^3.26.3",
50
52
  "rollup-plugin-copy": "^3.4.0",
51
53
  "rollup-plugin-filesize": "^10.0.0",