@threenative/core 0.3.2 → 0.3.4
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/capabilities.json +1891 -101
- package/dist/{assets-kyoF7JlJ.d.ts → assets-CqvE429w.d.ts} +52 -3
- package/dist/{audio-BFiGneTL.d.ts → audio-7i3Xl0l3.d.ts} +32 -1
- package/dist/{canvas-layer-BLVijiUJ.d.ts → canvas-layer-DDmC_VVF.d.ts} +1 -1
- package/dist/{game-XGrTzapq.d.ts → game-CljaDv4D.d.ts} +503 -11
- package/dist/{gpu-readback-D2iRvoe9.d.ts → gpu-readback-CqJEfWNQ.d.ts} +16 -6
- package/dist/hot.d.ts +5 -5
- package/dist/hot.js +20 -3
- package/dist/index.d.ts +1496 -43
- package/dist/index.js +8345 -753
- package/dist/playtest.d.ts +11 -5
- package/dist/playtest.js +96 -11
- package/dist/react.d.ts +2 -2
- package/dist/{renderer-C6hqZpoG.d.ts → renderer-CfsS2hxi.d.ts} +436 -14
- package/dist/ui-layer.d.ts +15 -7
- package/dist/ui-layer.js +2 -1
- package/dist/world.d.ts +900 -14
- package/dist/world.js +10876 -126
- package/gpl/fixtures/make_world_fixture.py +184 -0
- package/gpl/recipes/_common.py +11 -0
- package/gpl/recipes/decimate.py +11 -5
- package/gpl/recipes/export_world.py +682 -0
- package/mcp/blender-server.mjs +55 -1
- package/mcp/engine-server.mjs +84 -22
- package/mcp/servers.mjs +3 -3
- package/package.json +6 -6
- package/patches/three@0.185.1.patch +2228 -105
- package/scripts/apply-three-patch.mjs +61 -37
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Object3D } from 'three';
|
|
2
|
-
import { I as IRendererLike } from './renderer-
|
|
1
|
+
import { Object3D, Camera } from 'three';
|
|
2
|
+
import { I as IRendererLike } from './renderer-CfsS2hxi.js';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* The lifecycle contract for a game-owned GPU simulation.
|
|
@@ -17,8 +17,15 @@ interface IComputeDriven {
|
|
|
17
17
|
* existing behavior of consumers whose simulation is intentionally tied to presentation.
|
|
18
18
|
*/
|
|
19
19
|
readonly processCadence?: "fixed" | "render";
|
|
20
|
-
/**
|
|
21
|
-
|
|
20
|
+
/**
|
|
21
|
+
* Dispatched once per fixed step, in scene-add order unless render cadence is declared.
|
|
22
|
+
*
|
|
23
|
+
* `camera` is the frame's render camera, handed over at render cadence so a consumer that culls by
|
|
24
|
+
* the view — a streamed world narrowing its instanced windows to what the frustum covers — can do
|
|
25
|
+
* it from the driver that runs every frame rather than from a draw three will not submit. An
|
|
26
|
+
* implementation that does not need it simply declares one parameter.
|
|
27
|
+
*/
|
|
28
|
+
process(renderer: IRendererLike, camera?: Camera): void;
|
|
22
29
|
detach(): void;
|
|
23
30
|
readonly released: boolean;
|
|
24
31
|
}
|
|
@@ -34,8 +41,11 @@ declare class ComputeDrivenRegistry {
|
|
|
34
41
|
get warmupNodes(): readonly unknown[];
|
|
35
42
|
/** Dispatch fixed-step objects once; detached scene children are released before dispatch. */
|
|
36
43
|
process(renderer: IRendererLike): void;
|
|
37
|
-
/**
|
|
38
|
-
|
|
44
|
+
/**
|
|
45
|
+
* Dispatch render-cadence objects once with the frame's render camera; detached scene children are
|
|
46
|
+
* released before dispatch.
|
|
47
|
+
*/
|
|
48
|
+
processRender(renderer: IRendererLike, camera?: Camera): void;
|
|
39
49
|
/** Release every registered object, continuing after a failure so no resource is stranded. */
|
|
40
50
|
clear(): void;
|
|
41
51
|
}
|
package/dist/hot.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { a as audioRuntimeSnapshot } from './audio-
|
|
2
|
-
import { I as IGame } from './game-
|
|
1
|
+
import { a as audioRuntimeSnapshot } from './audio-7i3Xl0l3.js';
|
|
2
|
+
import { I as IGame } from './game-CljaDv4D.js';
|
|
3
3
|
import 'three';
|
|
4
|
-
import './assets-
|
|
5
|
-
import './renderer-
|
|
4
|
+
import './assets-CqvE429w.js';
|
|
5
|
+
import './renderer-CfsS2hxi.js';
|
|
6
6
|
import 'three/webgpu';
|
|
7
|
-
import './canvas-layer-
|
|
7
|
+
import './canvas-layer-DDmC_VVF.js';
|
|
8
8
|
import 'zustand/vanilla';
|
|
9
9
|
|
|
10
10
|
interface IHotDiagnostics {
|
package/dist/hot.js
CHANGED
|
@@ -1,21 +1,38 @@
|
|
|
1
1
|
import 'three';
|
|
2
2
|
|
|
3
3
|
// src/audio.ts
|
|
4
|
-
var
|
|
4
|
+
var AUDIO_STATE = /* @__PURE__ */ Symbol.for("threenative.audio.runtime");
|
|
5
|
+
function audioState() {
|
|
6
|
+
const host = globalThis;
|
|
7
|
+
const existing = host[AUDIO_STATE];
|
|
8
|
+
if (existing !== void 0) return existing;
|
|
9
|
+
const created = { buses: /* @__PURE__ */ new Set(), cueCounts: /* @__PURE__ */ new Map(), cueLog: [] };
|
|
10
|
+
host[AUDIO_STATE] = created;
|
|
11
|
+
return created;
|
|
12
|
+
}
|
|
5
13
|
function audioRuntimeSnapshot() {
|
|
6
14
|
let queued = 0;
|
|
7
15
|
let voices = 0;
|
|
8
16
|
let pooled = 0;
|
|
9
17
|
let paused = 0;
|
|
10
18
|
const unsupported = /* @__PURE__ */ new Set();
|
|
11
|
-
|
|
19
|
+
const state = audioState();
|
|
20
|
+
for (const bus of state.buses) {
|
|
12
21
|
queued += bus.queued;
|
|
13
22
|
voices += bus.voices;
|
|
14
23
|
pooled += bus.pooled;
|
|
15
24
|
paused += bus.pausedVoices;
|
|
16
25
|
for (const option of bus.unsupported) unsupported.add(option);
|
|
17
26
|
}
|
|
18
|
-
return {
|
|
27
|
+
return {
|
|
28
|
+
cues: Object.fromEntries(state.cueCounts),
|
|
29
|
+
paused,
|
|
30
|
+
pooled,
|
|
31
|
+
queued,
|
|
32
|
+
recentCues: state.cueLog.map((entry) => ({ ...entry })),
|
|
33
|
+
unsupported: [...unsupported].sort(),
|
|
34
|
+
voices
|
|
35
|
+
};
|
|
19
36
|
}
|
|
20
37
|
|
|
21
38
|
// src/hot.ts
|