@multitapio/multitap 0.0.15 → 0.0.16
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/channel.d.ts.map +1 -1
- package/dist/codegen/config.d.ts +1 -0
- package/dist/codegen/config.d.ts.map +1 -1
- package/dist/codegen/rust.d.ts.map +1 -1
- package/dist/executor.d.ts +4 -2
- package/dist/executor.d.ts.map +1 -1
- package/dist/init-data.d.ts +23 -2
- package/dist/init-data.d.ts.map +1 -1
- package/dist/input-codec.d.ts +4 -3
- package/dist/input-codec.d.ts.map +1 -1
- package/dist/lib.d.ts +2 -1
- package/dist/lib.d.ts.map +1 -1
- package/dist/lib.js +442 -127
- package/dist/loader.d.ts +39 -0
- package/dist/loader.d.ts.map +1 -0
- package/dist/rollback.d.ts +0 -5
- package/dist/rollback.d.ts.map +1 -1
- package/dist/schema.d.ts +10 -0
- package/dist/schema.d.ts.map +1 -1
- package/dist/session.d.ts +3 -4
- package/dist/session.d.ts.map +1 -1
- package/dist/test-session.d.ts +17 -2
- package/dist/test-session.d.ts.map +1 -1
- package/dist/types/channel.d.ts.map +1 -1
- package/dist/types/codegen/config.d.ts +1 -0
- package/dist/types/codegen/config.d.ts.map +1 -1
- package/dist/types/codegen/rust.d.ts.map +1 -1
- package/dist/types/executor.d.ts +4 -2
- package/dist/types/executor.d.ts.map +1 -1
- package/dist/types/init-data.d.ts +23 -2
- package/dist/types/init-data.d.ts.map +1 -1
- package/dist/types/input-codec.d.ts +4 -3
- package/dist/types/input-codec.d.ts.map +1 -1
- package/dist/types/lib.d.ts +2 -1
- package/dist/types/lib.d.ts.map +1 -1
- package/dist/types/loader.d.ts +39 -0
- package/dist/types/loader.d.ts.map +1 -0
- package/dist/types/rollback.d.ts +0 -5
- package/dist/types/rollback.d.ts.map +1 -1
- package/dist/types/schema.d.ts +10 -0
- package/dist/types/schema.d.ts.map +1 -1
- package/dist/types/session.d.ts +3 -4
- package/dist/types/session.d.ts.map +1 -1
- package/dist/types/test-session.d.ts +17 -2
- package/dist/types/test-session.d.ts.map +1 -1
- package/dist/types/vite/codegen-runner.d.ts +11 -0
- package/dist/types/vite/codegen-runner.d.ts.map +1 -1
- package/dist/types/vite/plugin.d.ts +3 -14
- package/dist/types/vite/plugin.d.ts.map +1 -1
- package/dist/types/vite/types.d.ts +73 -0
- package/dist/types/vite/types.d.ts.map +1 -1
- package/dist/vite/codegen-runner.d.ts +11 -0
- package/dist/vite/codegen-runner.d.ts.map +1 -1
- package/dist/vite/index.js +2417 -124
- package/dist/vite/plugin.d.ts +3 -14
- package/dist/vite/plugin.d.ts.map +1 -1
- package/dist/vite/types.d.ts +73 -0
- package/dist/vite/types.d.ts.map +1 -1
- package/package.json +3 -2
- package/dist/diagnostics/index.d.ts +0 -12
- package/dist/diagnostics/index.d.ts.map +0 -1
- package/dist/diagnostics.js +0 -7192
- package/dist/mesh-utils.d.ts +0 -58
- package/dist/mesh-utils.d.ts.map +0 -1
- package/dist/types/diagnostics/index.d.ts +0 -12
- package/dist/types/diagnostics/index.d.ts.map +0 -1
- package/dist/types/mesh-utils.d.ts +0 -58
- package/dist/types/mesh-utils.d.ts.map +0 -1
- package/dist/types/vite/module-builder.d.ts +0 -29
- package/dist/types/vite/module-builder.d.ts.map +0 -1
- package/dist/vite/module-builder.d.ts +0 -29
- package/dist/vite/module-builder.d.ts.map +0 -1
package/dist/mesh-utils.d.ts
DELETED
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Mesh extraction utilities for trimesh colliders.
|
|
3
|
-
*
|
|
4
|
-
* Extracts triangle mesh data from Three.js BufferGeometry and encodes it
|
|
5
|
-
* as a binary blob for passing to the physics simulation.
|
|
6
|
-
*/
|
|
7
|
-
/**
|
|
8
|
-
* Extracted mesh data ready for encoding.
|
|
9
|
-
*/
|
|
10
|
-
export interface ExtractedMesh {
|
|
11
|
-
/** Flat array of vertex positions (xyz triples) */
|
|
12
|
-
vertices: Float32Array;
|
|
13
|
-
/** Triangle indices (3 indices per triangle) */
|
|
14
|
-
indices: Uint32Array;
|
|
15
|
-
}
|
|
16
|
-
/**
|
|
17
|
-
* Minimal interface for BufferGeometry to avoid Three.js dependency.
|
|
18
|
-
* Compatible with THREE.BufferGeometry.
|
|
19
|
-
*/
|
|
20
|
-
export interface BufferGeometryLike {
|
|
21
|
-
attributes: {
|
|
22
|
-
position?: {
|
|
23
|
-
array: ArrayLike<number>;
|
|
24
|
-
count: number;
|
|
25
|
-
itemSize: number;
|
|
26
|
-
};
|
|
27
|
-
};
|
|
28
|
-
index?: {
|
|
29
|
-
array: ArrayLike<number>;
|
|
30
|
-
count: number;
|
|
31
|
-
} | null;
|
|
32
|
-
}
|
|
33
|
-
/**
|
|
34
|
-
* Extract trimesh data from a BufferGeometry-like object.
|
|
35
|
-
*
|
|
36
|
-
* @param geometry - The geometry to extract from
|
|
37
|
-
* @param scale - Scale factor to apply to vertices (default: 1)
|
|
38
|
-
* @param offset - XYZ offset to add to each vertex (default: [0, 0, 0])
|
|
39
|
-
* @returns Extracted mesh with vertices and indices
|
|
40
|
-
*/
|
|
41
|
-
export declare function extractMeshFromGeometry(geometry: BufferGeometryLike, scale?: number, offset?: [number, number, number]): ExtractedMesh;
|
|
42
|
-
/**
|
|
43
|
-
* Encode extracted mesh data as a binary blob for the physics plugin.
|
|
44
|
-
*
|
|
45
|
-
* Binary format:
|
|
46
|
-
* - Header (8 bytes):
|
|
47
|
-
* - vertex_count: u32 (LE)
|
|
48
|
-
* - triangle_count: u32 (LE)
|
|
49
|
-
* - Vertices (vertex_count * 12 bytes):
|
|
50
|
-
* - x: f32, y: f32, z: f32 (LE each)
|
|
51
|
-
* - Indices (triangle_count * 12 bytes):
|
|
52
|
-
* - i0: u32, i1: u32, i2: u32 (LE each)
|
|
53
|
-
*
|
|
54
|
-
* @param mesh - Extracted mesh data
|
|
55
|
-
* @returns Binary blob ready for init data
|
|
56
|
-
*/
|
|
57
|
-
export declare function encodeTriMeshBlob(mesh: ExtractedMesh): Uint8Array;
|
|
58
|
-
//# sourceMappingURL=mesh-utils.d.ts.map
|
package/dist/mesh-utils.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"mesh-utils.d.ts","sourceRoot":"","sources":["../../src/mesh-utils.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B,mDAAmD;IACnD,QAAQ,EAAE,YAAY,CAAC;IACvB,gDAAgD;IAChD,OAAO,EAAE,WAAW,CAAC;CACtB;AAED;;;GAGG;AACH,MAAM,WAAW,kBAAkB;IACjC,UAAU,EAAE;QACV,QAAQ,CAAC,EAAE;YACT,KAAK,EAAE,SAAS,CAAC,MAAM,CAAC,CAAC;YACzB,KAAK,EAAE,MAAM,CAAC;YACd,QAAQ,EAAE,MAAM,CAAC;SAClB,CAAC;KACH,CAAC;IACF,KAAK,CAAC,EAAE;QACN,KAAK,EAAE,SAAS,CAAC,MAAM,CAAC,CAAC;QACzB,KAAK,EAAE,MAAM,CAAC;KACf,GAAG,IAAI,CAAC;CACV;AAED;;;;;;;GAOG;AACH,wBAAgB,uBAAuB,CACrC,QAAQ,EAAE,kBAAkB,EAC5B,KAAK,GAAE,MAAU,EACjB,MAAM,GAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAa,GAC3C,aAAa,CAyCf;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,aAAa,GAAG,UAAU,CAiCjE"}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Diagnostics client for e2e testing.
|
|
3
|
-
*
|
|
4
|
-
* Minimal browser client that:
|
|
5
|
-
* - Parses URL params (connectionURL, serverCertHash, relayPubKey)
|
|
6
|
-
* - Creates a Session with zero plugins (channel-only mode)
|
|
7
|
-
* - Generates random inputs on 50ms interval
|
|
8
|
-
* - Logs SYNC ticks to console for conformance testing
|
|
9
|
-
* - Exits when session duration elapses
|
|
10
|
-
*/
|
|
11
|
-
export {};
|
|
12
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/diagnostics/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG"}
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Mesh extraction utilities for trimesh colliders.
|
|
3
|
-
*
|
|
4
|
-
* Extracts triangle mesh data from Three.js BufferGeometry and encodes it
|
|
5
|
-
* as a binary blob for passing to the physics simulation.
|
|
6
|
-
*/
|
|
7
|
-
/**
|
|
8
|
-
* Extracted mesh data ready for encoding.
|
|
9
|
-
*/
|
|
10
|
-
export interface ExtractedMesh {
|
|
11
|
-
/** Flat array of vertex positions (xyz triples) */
|
|
12
|
-
vertices: Float32Array;
|
|
13
|
-
/** Triangle indices (3 indices per triangle) */
|
|
14
|
-
indices: Uint32Array;
|
|
15
|
-
}
|
|
16
|
-
/**
|
|
17
|
-
* Minimal interface for BufferGeometry to avoid Three.js dependency.
|
|
18
|
-
* Compatible with THREE.BufferGeometry.
|
|
19
|
-
*/
|
|
20
|
-
export interface BufferGeometryLike {
|
|
21
|
-
attributes: {
|
|
22
|
-
position?: {
|
|
23
|
-
array: ArrayLike<number>;
|
|
24
|
-
count: number;
|
|
25
|
-
itemSize: number;
|
|
26
|
-
};
|
|
27
|
-
};
|
|
28
|
-
index?: {
|
|
29
|
-
array: ArrayLike<number>;
|
|
30
|
-
count: number;
|
|
31
|
-
} | null;
|
|
32
|
-
}
|
|
33
|
-
/**
|
|
34
|
-
* Extract trimesh data from a BufferGeometry-like object.
|
|
35
|
-
*
|
|
36
|
-
* @param geometry - The geometry to extract from
|
|
37
|
-
* @param scale - Scale factor to apply to vertices (default: 1)
|
|
38
|
-
* @param offset - XYZ offset to add to each vertex (default: [0, 0, 0])
|
|
39
|
-
* @returns Extracted mesh with vertices and indices
|
|
40
|
-
*/
|
|
41
|
-
export declare function extractMeshFromGeometry(geometry: BufferGeometryLike, scale?: number, offset?: [number, number, number]): ExtractedMesh;
|
|
42
|
-
/**
|
|
43
|
-
* Encode extracted mesh data as a binary blob for the physics plugin.
|
|
44
|
-
*
|
|
45
|
-
* Binary format:
|
|
46
|
-
* - Header (8 bytes):
|
|
47
|
-
* - vertex_count: u32 (LE)
|
|
48
|
-
* - triangle_count: u32 (LE)
|
|
49
|
-
* - Vertices (vertex_count * 12 bytes):
|
|
50
|
-
* - x: f32, y: f32, z: f32 (LE each)
|
|
51
|
-
* - Indices (triangle_count * 12 bytes):
|
|
52
|
-
* - i0: u32, i1: u32, i2: u32 (LE each)
|
|
53
|
-
*
|
|
54
|
-
* @param mesh - Extracted mesh data
|
|
55
|
-
* @returns Binary blob ready for init data
|
|
56
|
-
*/
|
|
57
|
-
export declare function encodeTriMeshBlob(mesh: ExtractedMesh): Uint8Array;
|
|
58
|
-
//# sourceMappingURL=mesh-utils.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"mesh-utils.d.ts","sourceRoot":"","sources":["../../src/mesh-utils.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B,mDAAmD;IACnD,QAAQ,EAAE,YAAY,CAAC;IACvB,gDAAgD;IAChD,OAAO,EAAE,WAAW,CAAC;CACtB;AAED;;;GAGG;AACH,MAAM,WAAW,kBAAkB;IACjC,UAAU,EAAE;QACV,QAAQ,CAAC,EAAE;YACT,KAAK,EAAE,SAAS,CAAC,MAAM,CAAC,CAAC;YACzB,KAAK,EAAE,MAAM,CAAC;YACd,QAAQ,EAAE,MAAM,CAAC;SAClB,CAAC;KACH,CAAC;IACF,KAAK,CAAC,EAAE;QACN,KAAK,EAAE,SAAS,CAAC,MAAM,CAAC,CAAC;QACzB,KAAK,EAAE,MAAM,CAAC;KACf,GAAG,IAAI,CAAC;CACV;AAED;;;;;;;GAOG;AACH,wBAAgB,uBAAuB,CACrC,QAAQ,EAAE,kBAAkB,EAC5B,KAAK,GAAE,MAAU,EACjB,MAAM,GAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAa,GAC3C,aAAa,CAyCf;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,aAAa,GAAG,UAAU,CAiCjE"}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Virtual module generation for the Multitap Vite plugin.
|
|
3
|
-
*
|
|
4
|
-
* Generates the JavaScript module that exports the config object
|
|
5
|
-
* with embedded WASM bytes and compiled schemas.
|
|
6
|
-
*
|
|
7
|
-
* Ported from sdk/go/build/build_multitap.go generateJSModule()
|
|
8
|
-
*
|
|
9
|
-
* @module vite/module-builder
|
|
10
|
-
*/
|
|
11
|
-
import type { Config } from '../codegen/config';
|
|
12
|
-
import type { CompiledStateSchema, CompiledInitDataSchema } from '../schema';
|
|
13
|
-
import type { WasmCompileResult } from './types';
|
|
14
|
-
export interface BuildModuleOptions {
|
|
15
|
-
config: Config;
|
|
16
|
-
plugins: WasmCompileResult[];
|
|
17
|
-
compiledState: CompiledStateSchema;
|
|
18
|
-
compiledInitData?: CompiledInitDataSchema | undefined;
|
|
19
|
-
}
|
|
20
|
-
/**
|
|
21
|
-
* Build the virtual module JavaScript source code.
|
|
22
|
-
*
|
|
23
|
-
* Generates a module that exports:
|
|
24
|
-
* - appID, tickRate, maxTicks, maxParticipants
|
|
25
|
-
* - plugins array with WASM bytes
|
|
26
|
-
* - schema object with compiled state and raw input
|
|
27
|
-
*/
|
|
28
|
-
export declare function buildVirtualModule(options: BuildModuleOptions): string;
|
|
29
|
-
//# sourceMappingURL=module-builder.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"module-builder.d.ts","sourceRoot":"","sources":["../../../src/vite/module-builder.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,KAAK,EAAE,mBAAmB,EAAE,sBAAsB,EAAE,MAAM,WAAW,CAAC;AAC7E,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAgEjD,MAAM,WAAW,kBAAkB;IACjC,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,iBAAiB,EAAE,CAAC;IAC7B,aAAa,EAAE,mBAAmB,CAAC;IACnC,gBAAgB,CAAC,EAAE,sBAAsB,GAAG,SAAS,CAAC;CACvD;AAED;;;;;;;GAOG;AACH,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,kBAAkB,GAAG,MAAM,CA6CtE"}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Virtual module generation for the Multitap Vite plugin.
|
|
3
|
-
*
|
|
4
|
-
* Generates the JavaScript module that exports the config object
|
|
5
|
-
* with embedded WASM bytes and compiled schemas.
|
|
6
|
-
*
|
|
7
|
-
* Ported from sdk/go/build/build_multitap.go generateJSModule()
|
|
8
|
-
*
|
|
9
|
-
* @module vite/module-builder
|
|
10
|
-
*/
|
|
11
|
-
import type { Config } from '../codegen/config';
|
|
12
|
-
import type { CompiledStateSchema, CompiledInitDataSchema } from '../schema';
|
|
13
|
-
import type { WasmCompileResult } from './types';
|
|
14
|
-
export interface BuildModuleOptions {
|
|
15
|
-
config: Config;
|
|
16
|
-
plugins: WasmCompileResult[];
|
|
17
|
-
compiledState: CompiledStateSchema;
|
|
18
|
-
compiledInitData?: CompiledInitDataSchema | undefined;
|
|
19
|
-
}
|
|
20
|
-
/**
|
|
21
|
-
* Build the virtual module JavaScript source code.
|
|
22
|
-
*
|
|
23
|
-
* Generates a module that exports:
|
|
24
|
-
* - appID, tickRate, maxTicks, maxParticipants
|
|
25
|
-
* - plugins array with WASM bytes
|
|
26
|
-
* - schema object with compiled state and raw input
|
|
27
|
-
*/
|
|
28
|
-
export declare function buildVirtualModule(options: BuildModuleOptions): string;
|
|
29
|
-
//# sourceMappingURL=module-builder.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"module-builder.d.ts","sourceRoot":"","sources":["../../../src/vite/module-builder.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,KAAK,EAAE,mBAAmB,EAAE,sBAAsB,EAAE,MAAM,WAAW,CAAC;AAC7E,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAgEjD,MAAM,WAAW,kBAAkB;IACjC,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,iBAAiB,EAAE,CAAC;IAC7B,aAAa,EAAE,mBAAmB,CAAC;IACnC,gBAAgB,CAAC,EAAE,sBAAsB,GAAG,SAAS,CAAC;CACvD;AAED;;;;;;;GAOG;AACH,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,kBAAkB,GAAG,MAAM,CA6CtE"}
|