@threenative/core 0.3.0 → 0.3.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/README.md +10 -0
- package/capabilities.json +1881 -131
- package/dist/assets-kyoF7JlJ.d.ts +103 -0
- package/dist/{audio-Dp2mXpD3.d.ts → audio-BFiGneTL.d.ts} +62 -0
- package/dist/canvas-layer-BLVijiUJ.d.ts +62 -0
- package/dist/{game-CYIaKhgl.d.ts → game-XGrTzapq.d.ts} +350 -164
- package/dist/gpu-readback-D2iRvoe9.d.ts +112 -0
- package/dist/hot.d.ts +5 -3
- package/dist/hot.js +5 -1
- package/dist/index.d.ts +813 -143
- package/dist/index.js +4548 -941
- package/dist/net.d.ts +65 -0
- package/dist/net.js +643 -0
- package/dist/playtest.d.ts +29 -5
- package/dist/playtest.js +181 -35
- package/dist/react.d.ts +4 -2
- package/dist/{canvas-layer-CtrZHgIh.d.ts → renderer-C6hqZpoG.d.ts} +237 -75
- package/dist/world.d.ts +203 -4
- package/dist/world.js +2536 -25
- package/gpl/LICENSE.GPL +117 -0
- package/gpl/convert.py +192 -0
- package/gpl/recipes/_common.py +169 -0
- package/gpl/recipes/bake_ao.py +111 -0
- package/gpl/recipes/decimate.py +64 -0
- package/gpl/recipes/retarget.py +131 -0
- package/gpl/recipes/unwrap.py +71 -0
- package/mcp/blender-server.mjs +632 -0
- package/mcp/blender.mjs +27 -0
- package/mcp/engine-server.mjs +271 -23
- package/mcp/engine.mjs +15 -7
- package/mcp/install.d.mts +37 -0
- package/mcp/install.mjs +94 -26
- package/mcp/servers.d.mts +34 -0
- package/mcp/servers.mjs +110 -9
- package/package.json +36 -8
- package/patches/three@0.185.1.patch +249 -14
- package/scripts/ensure-mcp.mjs +20 -13
- package/scripts/bundle-engine-mcp.mjs +0 -15
- package/scripts/generate-version.mjs +0 -13
package/dist/net.d.ts
ADDED
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Optional portable message transport over the platform WebTransport seam.
|
|
3
|
+
*
|
|
4
|
+
* Browser and native share this implementation: WebTransport owns QUIC/HTTP3
|
|
5
|
+
* security and reliability, while this module owns validation, bounded queues,
|
|
6
|
+
* application framing and delivery semantics. Gameplay serialization and
|
|
7
|
+
* simulation stay in game/server code.
|
|
8
|
+
*/
|
|
9
|
+
interface INetworkChannel {
|
|
10
|
+
id: number;
|
|
11
|
+
delivery: "unreliable" | "reliable-ordered";
|
|
12
|
+
}
|
|
13
|
+
interface INetworkOptions {
|
|
14
|
+
applicationProtocol: string;
|
|
15
|
+
credential: string;
|
|
16
|
+
channels: readonly INetworkChannel[];
|
|
17
|
+
signal?: AbortSignal;
|
|
18
|
+
connectTimeoutMs?: number;
|
|
19
|
+
maxReliableMessageBytes?: number;
|
|
20
|
+
maxQueuedReliableBytes?: number;
|
|
21
|
+
maxQueuedDatagrams?: number;
|
|
22
|
+
}
|
|
23
|
+
interface INetworkMessage {
|
|
24
|
+
channel: number;
|
|
25
|
+
data: Uint8Array;
|
|
26
|
+
}
|
|
27
|
+
interface INetworkPoll {
|
|
28
|
+
messages: INetworkMessage[];
|
|
29
|
+
disconnected: boolean;
|
|
30
|
+
reason: string | null;
|
|
31
|
+
}
|
|
32
|
+
interface INetworkStats {
|
|
33
|
+
transport: "webtransport";
|
|
34
|
+
state: "connected" | "closing" | "closed";
|
|
35
|
+
sessionId: string;
|
|
36
|
+
maxDatagramPayload: number;
|
|
37
|
+
maxReliableMessageBytes: number;
|
|
38
|
+
maxQueuedReliableBytes: number;
|
|
39
|
+
maxQueuedDatagrams: number;
|
|
40
|
+
queuedReliableBytes: number;
|
|
41
|
+
queuedDatagrams: number;
|
|
42
|
+
droppedDatagrams: number;
|
|
43
|
+
rttMs: number | null;
|
|
44
|
+
}
|
|
45
|
+
interface INetworkConnection {
|
|
46
|
+
send(channel: number, data: Uint8Array): boolean;
|
|
47
|
+
poll(): INetworkPoll;
|
|
48
|
+
getStats(): INetworkStats;
|
|
49
|
+
close(): Promise<void>;
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Open a bounded, authenticated WebTransport message channel shared by browser and native games.
|
|
53
|
+
*
|
|
54
|
+
* @situation connect two game clients over the portable WebTransport seam
|
|
55
|
+
* @situation send ordered actions and bounded unreliable state messages between game clients
|
|
56
|
+
* @situation exchange multiplayer messages without putting replication or gameplay in the engine
|
|
57
|
+
* @constraint the URL must use HTTPS and the credential is supplied by the game's identity flow; this API never issues credentials
|
|
58
|
+
* @constraint channels, message sizes, and queues are validated before WebTransport opens, and reliable overflow returns false
|
|
59
|
+
* @constraint native qualification depends on the installed host WebTransport bridge; iOS remains unverified
|
|
60
|
+
* @override connectTimeoutMs, maxReliableMessageBytes, maxQueuedReliableBytes, and maxQueuedDatagrams are named per-connection limits
|
|
61
|
+
* @example const connection = await connect("https://game.example/game", { applicationProtocol: "my-game/1", credential, channels: [{ id: 1, delivery: "unreliable" }] });
|
|
62
|
+
*/
|
|
63
|
+
declare function connect(url: string, options: INetworkOptions): Promise<INetworkConnection>;
|
|
64
|
+
|
|
65
|
+
export { type INetworkChannel, type INetworkConnection, type INetworkMessage, type INetworkOptions, type INetworkPoll, type INetworkStats, connect };
|