create-threenative 0.2.20 → 0.2.22

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.
@@ -27,6 +27,10 @@ Then start the game on its scene: `defineGame({ ...FOREST_GAME, plugins: [rapier
27
27
  `README.md` says what each file decides: the landform in `bake.mjs`, what grows where in
28
28
  `biome.data.json`, every art path in `world/terrainAssets.ts`, and the look in `render/biomes.ts`.
29
29
 
30
+ Asked for another environment (a desert, a taiga, a coast, a real place)? Copy the forest kit
31
+ under the new name and change its data and look, not its bake or scene:
32
+ `node_modules/@threenative/terrain/docs/authoring/new-environment.md` is the step-by-step guide.
33
+
30
34
  ## Name a region, not just a biome
31
35
 
32
36
  The terrain MCP's `terrain_generate` reads a region word and cooks that region's own world: its real
@@ -55,6 +55,7 @@ prompt (`TN_DISCOVERY_GATE=off` opts out).
55
55
  deprecations, so call `engine_capability_detail` only for a symbol the search did not return.
56
56
  Record installed capabilities and binding constraints. A
57
57
  `verdict: "none"` means game-owned behavior in `src/`; do not rephrase until something matches.
58
+ Its `nearMatches` are under-floor suggestions only, never binding capabilities.
58
59
  These role names add no servers.
59
60
  4. **Plan** — hand **Kit**, **Mechanics** and **References** to `prd-creator`. Plan the core loop
60
61
  from both discovery passes, with controls, camera, state, acceptance checks, target platforms
package/dist/index.js CHANGED
@@ -152,7 +152,7 @@ var CODEX_MCP_SERVERS = Object.freeze(
152
152
  );
153
153
 
154
154
  // ../core/src/version.ts
155
- var CORE_VERSION = "0.3.15";
155
+ var CORE_VERSION = "0.3.17";
156
156
  var MCP_HOSTS = Object.freeze([
157
157
  Object.freeze({
158
158
  id: "claude-code",
@@ -1999,6 +1999,7 @@ var ENGINE_ADDON_CLASSES = {
1999
1999
  };
2000
2000
  var ENGINE_ADDON_PREFIX = "\0threenative:web-engine-addon:";
2001
2001
  var SKELETON_UTILS_ID = "\0threenative:web-engine-skeleton-utils";
2002
+ var RAPIER_COMPAT_ID = "\0threenative:web-engine-rapier-compat";
2002
2003
  var WASM_ENGINE_ENTRY = "build/web/tn-native-engine-web.mjs";
2003
2004
  var WASM_THREADS_ENTRY = "build/web/tn-native-engine-web-threads.mjs";
2004
2005
  var THREADS_OFF = "TN_WEB_THREADS_OFF";
@@ -2139,6 +2140,7 @@ function createWebEnginePlugin(options = {}) {
2139
2140
  const engineClass = ENGINE_ADDON_CLASSES[source];
2140
2141
  if (engineClass !== void 0) return ENGINE_ADDON_PREFIX + engineClass;
2141
2142
  if (source === "three/addons/utils/SkeletonUtils.js") return SKELETON_UTILS_ID;
2143
+ if (source === "@dimforge/rapier3d-compat") return RAPIER_COMPAT_ID;
2142
2144
  if (source === "three-mesh-bvh")
2143
2145
  return browserModule("web-engine-mesh-bvh.js", "addons/mesh-bvh.ts");
2144
2146
  if (source === "three-mesh-bvh/webgpu")
@@ -2170,6 +2172,8 @@ function createWebEnginePlugin(options = {}) {
2170
2172
  if (native && id.startsWith(ENGINE_ADDON_PREFIX))
2171
2173
  return `export { ${id.slice(ENGINE_ADDON_PREFIX.length)} } from "three";
2172
2174
  `;
2175
+ if (native && id === RAPIER_COMPAT_ID)
2176
+ return 'throw new Error("TN_PHYSICS_COMPAT_EXCLUDED: engine \\"threenative\\" runs physics on the Rapier crate; rapier3d-compat loads only under engine \\"threejs\\".");\n';
2173
2177
  if (native && id === SKELETON_UTILS_ID)
2174
2178
  return 'import { SkeletonUtils } from "three";\nexport const clone = (source) => SkeletonUtils.clone(source);\n';
2175
2179
  if (!native || id !== WEB_ENGINE_ID) return null;
@@ -2639,7 +2643,15 @@ function createWebBrandPlugin() {
2639
2643
  const loaded = await loadConfig(path8.resolve(vite.root ?? process.cwd()));
2640
2644
  if (loaded.engine === "threenative" && process.env.THREENATIVE_NATIVE_BUNDLE === void 0)
2641
2645
  return {
2642
- optimizeDeps: { exclude: ["three", "three/webgpu", "three/tsl", "three-mesh-bvh"] },
2646
+ optimizeDeps: {
2647
+ exclude: [
2648
+ "three",
2649
+ "three/webgpu",
2650
+ "three/tsl",
2651
+ "three-mesh-bvh",
2652
+ "@threenative/physics"
2653
+ ]
2654
+ },
2643
2655
  // Vite runs only `worker.plugins` on a worker bundle, so a game booted in a worker
2644
2656
  // (PRD-752) needs the same resolver, as ES output for the engine's top-level await.
2645
2657
  worker: {
@@ -3269,11 +3269,11 @@ var MCP_SERVERS = Object.freeze({
3269
3269
  })
3270
3270
  });
3271
3271
  var MCP_PACKAGES = Object.freeze({
3272
- assets: Object.freeze({ name: "threenative-asset-mcp", version: "0.16.0" }),
3273
- terrain: Object.freeze({ name: "@threenative/terrain", version: "0.1.11" }),
3272
+ assets: Object.freeze({ name: "threenative-asset-mcp", version: "0.17.0" }),
3273
+ terrain: Object.freeze({ name: "@threenative/terrain", version: "0.1.13" }),
3274
3274
  sculpt: Object.freeze({ name: "threenative-sculpt-mcp", version: "0.2.2" }),
3275
- engine: Object.freeze({ name: "threenative-engine-mcp", version: "0.2.15" }),
3276
- animation: Object.freeze({ name: "threenative-animation-mcp", version: "0.1.12" }),
3275
+ engine: Object.freeze({ name: "threenative-engine-mcp", version: "0.2.17" }),
3276
+ animation: Object.freeze({ name: "threenative-animation-mcp", version: "0.1.14" }),
3277
3277
  // `args` fixes the launch for every host. The Chrome flags are `WEBGPU_BROWSER_ARGS` from
3278
3278
  // `@threenative/playtest`, so a DevTools trace profiles the same adapter a playtest does and not
3279
3279
  // SwiftShader. An isolated profile keeps the user's own Chrome profile out, and the two opt-outs
@@ -3387,7 +3387,7 @@ var MCP_HOSTS = Object.freeze([
3387
3387
  ]);
3388
3388
 
3389
3389
  // ../core/src/version.ts
3390
- var CORE_VERSION = "0.3.15";
3390
+ var CORE_VERSION = "0.3.17";
3391
3391
 
3392
3392
  // src/mcp-servers.ts
3393
3393
  var CORE_PACKAGE_NAME = "@threenative/core";
@@ -31739,14 +31739,22 @@ var native_registry_default = {
31739
31739
  "__tnGuardWatch",
31740
31740
  "__tnMaterialCheck",
31741
31741
  "__tnMaterialWatch",
31742
+ "__tnModelLodAttach",
31743
+ "__tnModelLodMeshes",
31744
+ "__tnModelLodSelect",
31742
31745
  "__tnPoseBlend",
31743
31746
  "__tnPoseReset",
31744
31747
  "__tnPoseRestore",
31745
31748
  "__tnPoseTick",
31746
31749
  "__tnPoseWatch",
31747
31750
  "__tnProjectionReport",
31751
+ "__tnSphereBounds",
31752
+ "__tnSphereBoundsAttach",
31748
31753
  "__tnStaleEntries",
31749
31754
  "__tnStaleRows",
31755
+ "__tnStaticChanged",
31756
+ "__tnStaticRoots",
31757
+ "__tnStaticWatch",
31750
31758
  "__tnStructureStamp",
31751
31759
  "__tnUpdateMatrixWorld",
31752
31760
  "__tnVisibleInWorld",
@@ -32032,14 +32040,22 @@ var native_registry_default = {
32032
32040
  "__tnGuardWatch",
32033
32041
  "__tnMaterialCheck",
32034
32042
  "__tnMaterialWatch",
32043
+ "__tnModelLodAttach",
32044
+ "__tnModelLodMeshes",
32045
+ "__tnModelLodSelect",
32035
32046
  "__tnPoseBlend",
32036
32047
  "__tnPoseReset",
32037
32048
  "__tnPoseRestore",
32038
32049
  "__tnPoseTick",
32039
32050
  "__tnPoseWatch",
32040
32051
  "__tnProjectionReport",
32052
+ "__tnSphereBounds",
32053
+ "__tnSphereBoundsAttach",
32041
32054
  "__tnStaleEntries",
32042
32055
  "__tnStaleRows",
32056
+ "__tnStaticChanged",
32057
+ "__tnStaticRoots",
32058
+ "__tnStaticWatch",
32043
32059
  "__tnStructureStamp",
32044
32060
  "__tnUpdateMatrixWorld",
32045
32061
  "__tnVisibleInWorld",
@@ -32364,14 +32380,22 @@ var native_registry_default = {
32364
32380
  "__tnGuardWatch",
32365
32381
  "__tnMaterialCheck",
32366
32382
  "__tnMaterialWatch",
32383
+ "__tnModelLodAttach",
32384
+ "__tnModelLodMeshes",
32385
+ "__tnModelLodSelect",
32367
32386
  "__tnPoseBlend",
32368
32387
  "__tnPoseReset",
32369
32388
  "__tnPoseRestore",
32370
32389
  "__tnPoseTick",
32371
32390
  "__tnPoseWatch",
32372
32391
  "__tnProjectionReport",
32392
+ "__tnSphereBounds",
32393
+ "__tnSphereBoundsAttach",
32373
32394
  "__tnStaleEntries",
32374
32395
  "__tnStaleRows",
32396
+ "__tnStaticChanged",
32397
+ "__tnStaticRoots",
32398
+ "__tnStaticWatch",
32375
32399
  "__tnStructureStamp",
32376
32400
  "__tnUpdateMatrixWorld",
32377
32401
  "__tnVisibleInWorld",
@@ -32821,14 +32845,22 @@ var native_registry_default = {
32821
32845
  "__tnGuardWatch",
32822
32846
  "__tnMaterialCheck",
32823
32847
  "__tnMaterialWatch",
32848
+ "__tnModelLodAttach",
32849
+ "__tnModelLodMeshes",
32850
+ "__tnModelLodSelect",
32824
32851
  "__tnPoseBlend",
32825
32852
  "__tnPoseReset",
32826
32853
  "__tnPoseRestore",
32827
32854
  "__tnPoseTick",
32828
32855
  "__tnPoseWatch",
32829
32856
  "__tnProjectionReport",
32857
+ "__tnSphereBounds",
32858
+ "__tnSphereBoundsAttach",
32830
32859
  "__tnStaleEntries",
32831
32860
  "__tnStaleRows",
32861
+ "__tnStaticChanged",
32862
+ "__tnStaticRoots",
32863
+ "__tnStaticWatch",
32832
32864
  "__tnStructureStamp",
32833
32865
  "__tnUpdateMatrixWorld",
32834
32866
  "__tnVisibleInWorld",
@@ -33902,14 +33934,22 @@ var native_registry_default = {
33902
33934
  "__tnGuardWatch",
33903
33935
  "__tnMaterialCheck",
33904
33936
  "__tnMaterialWatch",
33937
+ "__tnModelLodAttach",
33938
+ "__tnModelLodMeshes",
33939
+ "__tnModelLodSelect",
33905
33940
  "__tnPoseBlend",
33906
33941
  "__tnPoseReset",
33907
33942
  "__tnPoseRestore",
33908
33943
  "__tnPoseTick",
33909
33944
  "__tnPoseWatch",
33910
33945
  "__tnProjectionReport",
33946
+ "__tnSphereBounds",
33947
+ "__tnSphereBoundsAttach",
33911
33948
  "__tnStaleEntries",
33912
33949
  "__tnStaleRows",
33950
+ "__tnStaticChanged",
33951
+ "__tnStaticRoots",
33952
+ "__tnStaticWatch",
33913
33953
  "__tnStructureStamp",
33914
33954
  "__tnUpdateMatrixWorld",
33915
33955
  "__tnVisibleInWorld",
@@ -34472,14 +34512,22 @@ var native_registry_default = {
34472
34512
  "__tnGuardWatch",
34473
34513
  "__tnMaterialCheck",
34474
34514
  "__tnMaterialWatch",
34515
+ "__tnModelLodAttach",
34516
+ "__tnModelLodMeshes",
34517
+ "__tnModelLodSelect",
34475
34518
  "__tnPoseBlend",
34476
34519
  "__tnPoseReset",
34477
34520
  "__tnPoseRestore",
34478
34521
  "__tnPoseTick",
34479
34522
  "__tnPoseWatch",
34480
34523
  "__tnProjectionReport",
34524
+ "__tnSphereBounds",
34525
+ "__tnSphereBoundsAttach",
34481
34526
  "__tnStaleEntries",
34482
34527
  "__tnStaleRows",
34528
+ "__tnStaticChanged",
34529
+ "__tnStaticRoots",
34530
+ "__tnStaticWatch",
34483
34531
  "__tnStructureStamp",
34484
34532
  "__tnUpdateMatrixWorld",
34485
34533
  "__tnVisibleInWorld",
@@ -34654,14 +34702,22 @@ var native_registry_default = {
34654
34702
  "__tnGuardWatch",
34655
34703
  "__tnMaterialCheck",
34656
34704
  "__tnMaterialWatch",
34705
+ "__tnModelLodAttach",
34706
+ "__tnModelLodMeshes",
34707
+ "__tnModelLodSelect",
34657
34708
  "__tnPoseBlend",
34658
34709
  "__tnPoseReset",
34659
34710
  "__tnPoseRestore",
34660
34711
  "__tnPoseTick",
34661
34712
  "__tnPoseWatch",
34662
34713
  "__tnProjectionReport",
34714
+ "__tnSphereBounds",
34715
+ "__tnSphereBoundsAttach",
34663
34716
  "__tnStaleEntries",
34664
34717
  "__tnStaleRows",
34718
+ "__tnStaticChanged",
34719
+ "__tnStaticRoots",
34720
+ "__tnStaticWatch",
34665
34721
  "__tnStructureStamp",
34666
34722
  "__tnUpdateMatrixWorld",
34667
34723
  "__tnVisibleInWorld",
@@ -35092,16 +35148,26 @@ var native_registry_default = {
35092
35148
  "__tnGuardCheck",
35093
35149
  "__tnGuardCheckAncestors",
35094
35150
  "__tnGuardWatch",
35151
+ "__tnInstancedLodAttach",
35152
+ "__tnInstancedLodUpdate",
35095
35153
  "__tnMaterialCheck",
35096
35154
  "__tnMaterialWatch",
35155
+ "__tnModelLodAttach",
35156
+ "__tnModelLodMeshes",
35157
+ "__tnModelLodSelect",
35097
35158
  "__tnPoseBlend",
35098
35159
  "__tnPoseReset",
35099
35160
  "__tnPoseRestore",
35100
35161
  "__tnPoseTick",
35101
35162
  "__tnPoseWatch",
35102
35163
  "__tnProjectionReport",
35164
+ "__tnSphereBounds",
35165
+ "__tnSphereBoundsAttach",
35103
35166
  "__tnStaleEntries",
35104
35167
  "__tnStaleRows",
35168
+ "__tnStaticChanged",
35169
+ "__tnStaticRoots",
35170
+ "__tnStaticWatch",
35105
35171
  "__tnStructureStamp",
35106
35172
  "__tnUpdateMatrixWorld",
35107
35173
  "__tnVisibleInWorld",
@@ -35427,14 +35493,22 @@ var native_registry_default = {
35427
35493
  "__tnGuardWatch",
35428
35494
  "__tnMaterialCheck",
35429
35495
  "__tnMaterialWatch",
35496
+ "__tnModelLodAttach",
35497
+ "__tnModelLodMeshes",
35498
+ "__tnModelLodSelect",
35430
35499
  "__tnPoseBlend",
35431
35500
  "__tnPoseReset",
35432
35501
  "__tnPoseRestore",
35433
35502
  "__tnPoseTick",
35434
35503
  "__tnPoseWatch",
35435
35504
  "__tnProjectionReport",
35505
+ "__tnSphereBounds",
35506
+ "__tnSphereBoundsAttach",
35436
35507
  "__tnStaleEntries",
35437
35508
  "__tnStaleRows",
35509
+ "__tnStaticChanged",
35510
+ "__tnStaticRoots",
35511
+ "__tnStaticWatch",
35438
35512
  "__tnStructureStamp",
35439
35513
  "__tnUpdateMatrixWorld",
35440
35514
  "__tnVisibleInWorld",
@@ -35728,14 +35802,22 @@ var native_registry_default = {
35728
35802
  "__tnGuardWatch",
35729
35803
  "__tnMaterialCheck",
35730
35804
  "__tnMaterialWatch",
35805
+ "__tnModelLodAttach",
35806
+ "__tnModelLodMeshes",
35807
+ "__tnModelLodSelect",
35731
35808
  "__tnPoseBlend",
35732
35809
  "__tnPoseReset",
35733
35810
  "__tnPoseRestore",
35734
35811
  "__tnPoseTick",
35735
35812
  "__tnPoseWatch",
35736
35813
  "__tnProjectionReport",
35814
+ "__tnSphereBounds",
35815
+ "__tnSphereBoundsAttach",
35737
35816
  "__tnStaleEntries",
35738
35817
  "__tnStaleRows",
35818
+ "__tnStaticChanged",
35819
+ "__tnStaticRoots",
35820
+ "__tnStaticWatch",
35739
35821
  "__tnStructureStamp",
35740
35822
  "__tnUpdateMatrixWorld",
35741
35823
  "__tnVisibleInWorld",
@@ -36133,14 +36215,22 @@ var native_registry_default = {
36133
36215
  "__tnGuardWatch",
36134
36216
  "__tnMaterialCheck",
36135
36217
  "__tnMaterialWatch",
36218
+ "__tnModelLodAttach",
36219
+ "__tnModelLodMeshes",
36220
+ "__tnModelLodSelect",
36136
36221
  "__tnPoseBlend",
36137
36222
  "__tnPoseReset",
36138
36223
  "__tnPoseRestore",
36139
36224
  "__tnPoseTick",
36140
36225
  "__tnPoseWatch",
36141
36226
  "__tnProjectionReport",
36227
+ "__tnSphereBounds",
36228
+ "__tnSphereBoundsAttach",
36142
36229
  "__tnStaleEntries",
36143
36230
  "__tnStaleRows",
36231
+ "__tnStaticChanged",
36232
+ "__tnStaticRoots",
36233
+ "__tnStaticWatch",
36144
36234
  "__tnStructureStamp",
36145
36235
  "__tnUpdateMatrixWorld",
36146
36236
  "__tnVisibleInWorld",
@@ -36545,14 +36635,22 @@ var native_registry_default = {
36545
36635
  "__tnGuardWatch",
36546
36636
  "__tnMaterialCheck",
36547
36637
  "__tnMaterialWatch",
36638
+ "__tnModelLodAttach",
36639
+ "__tnModelLodMeshes",
36640
+ "__tnModelLodSelect",
36548
36641
  "__tnPoseBlend",
36549
36642
  "__tnPoseReset",
36550
36643
  "__tnPoseRestore",
36551
36644
  "__tnPoseTick",
36552
36645
  "__tnPoseWatch",
36553
36646
  "__tnProjectionReport",
36647
+ "__tnSphereBounds",
36648
+ "__tnSphereBoundsAttach",
36554
36649
  "__tnStaleEntries",
36555
36650
  "__tnStaleRows",
36651
+ "__tnStaticChanged",
36652
+ "__tnStaticRoots",
36653
+ "__tnStaticWatch",
36556
36654
  "__tnStructureStamp",
36557
36655
  "__tnUpdateMatrixWorld",
36558
36656
  "__tnVisibleInWorld",
@@ -38125,14 +38223,22 @@ var native_registry_default = {
38125
38223
  "__tnGuardWatch",
38126
38224
  "__tnMaterialCheck",
38127
38225
  "__tnMaterialWatch",
38226
+ "__tnModelLodAttach",
38227
+ "__tnModelLodMeshes",
38228
+ "__tnModelLodSelect",
38128
38229
  "__tnPoseBlend",
38129
38230
  "__tnPoseReset",
38130
38231
  "__tnPoseRestore",
38131
38232
  "__tnPoseTick",
38132
38233
  "__tnPoseWatch",
38133
38234
  "__tnProjectionReport",
38235
+ "__tnSphereBounds",
38236
+ "__tnSphereBoundsAttach",
38134
38237
  "__tnStaleEntries",
38135
38238
  "__tnStaleRows",
38239
+ "__tnStaticChanged",
38240
+ "__tnStaticRoots",
38241
+ "__tnStaticWatch",
38136
38242
  "__tnStructureStamp",
38137
38243
  "__tnUpdateMatrixWorld",
38138
38244
  "__tnVisibleInWorld",
@@ -38398,14 +38504,22 @@ var native_registry_default = {
38398
38504
  "__tnGuardWatch",
38399
38505
  "__tnMaterialCheck",
38400
38506
  "__tnMaterialWatch",
38507
+ "__tnModelLodAttach",
38508
+ "__tnModelLodMeshes",
38509
+ "__tnModelLodSelect",
38401
38510
  "__tnPoseBlend",
38402
38511
  "__tnPoseReset",
38403
38512
  "__tnPoseRestore",
38404
38513
  "__tnPoseTick",
38405
38514
  "__tnPoseWatch",
38406
38515
  "__tnProjectionReport",
38516
+ "__tnSphereBounds",
38517
+ "__tnSphereBoundsAttach",
38407
38518
  "__tnStaleEntries",
38408
38519
  "__tnStaleRows",
38520
+ "__tnStaticChanged",
38521
+ "__tnStaticRoots",
38522
+ "__tnStaticWatch",
38409
38523
  "__tnStructureStamp",
38410
38524
  "__tnUpdateMatrixWorld",
38411
38525
  "__tnVisibleInWorld",
@@ -38634,14 +38748,22 @@ var native_registry_default = {
38634
38748
  "__tnGuardWatch",
38635
38749
  "__tnMaterialCheck",
38636
38750
  "__tnMaterialWatch",
38751
+ "__tnModelLodAttach",
38752
+ "__tnModelLodMeshes",
38753
+ "__tnModelLodSelect",
38637
38754
  "__tnPoseBlend",
38638
38755
  "__tnPoseReset",
38639
38756
  "__tnPoseRestore",
38640
38757
  "__tnPoseTick",
38641
38758
  "__tnPoseWatch",
38642
38759
  "__tnProjectionReport",
38760
+ "__tnSphereBounds",
38761
+ "__tnSphereBoundsAttach",
38643
38762
  "__tnStaleEntries",
38644
38763
  "__tnStaleRows",
38764
+ "__tnStaticChanged",
38765
+ "__tnStaticRoots",
38766
+ "__tnStaticWatch",
38645
38767
  "__tnStructureStamp",
38646
38768
  "__tnUpdateMatrixWorld",
38647
38769
  "__tnVisibleInWorld",
@@ -38972,14 +39094,22 @@ var native_registry_default = {
38972
39094
  "__tnGuardWatch",
38973
39095
  "__tnMaterialCheck",
38974
39096
  "__tnMaterialWatch",
39097
+ "__tnModelLodAttach",
39098
+ "__tnModelLodMeshes",
39099
+ "__tnModelLodSelect",
38975
39100
  "__tnPoseBlend",
38976
39101
  "__tnPoseReset",
38977
39102
  "__tnPoseRestore",
38978
39103
  "__tnPoseTick",
38979
39104
  "__tnPoseWatch",
38980
39105
  "__tnProjectionReport",
39106
+ "__tnSphereBounds",
39107
+ "__tnSphereBoundsAttach",
38981
39108
  "__tnStaleEntries",
38982
39109
  "__tnStaleRows",
39110
+ "__tnStaticChanged",
39111
+ "__tnStaticRoots",
39112
+ "__tnStaticWatch",
38983
39113
  "__tnStructureStamp",
38984
39114
  "__tnUpdateMatrixWorld",
38985
39115
  "__tnVisibleInWorld",
@@ -39206,14 +39336,22 @@ var native_registry_default = {
39206
39336
  "__tnGuardWatch",
39207
39337
  "__tnMaterialCheck",
39208
39338
  "__tnMaterialWatch",
39339
+ "__tnModelLodAttach",
39340
+ "__tnModelLodMeshes",
39341
+ "__tnModelLodSelect",
39209
39342
  "__tnPoseBlend",
39210
39343
  "__tnPoseReset",
39211
39344
  "__tnPoseRestore",
39212
39345
  "__tnPoseTick",
39213
39346
  "__tnPoseWatch",
39214
39347
  "__tnProjectionReport",
39348
+ "__tnSphereBounds",
39349
+ "__tnSphereBoundsAttach",
39215
39350
  "__tnStaleEntries",
39216
39351
  "__tnStaleRows",
39352
+ "__tnStaticChanged",
39353
+ "__tnStaticRoots",
39354
+ "__tnStaticWatch",
39217
39355
  "__tnStructureStamp",
39218
39356
  "__tnUpdateMatrixWorld",
39219
39357
  "__tnVisibleInWorld",
@@ -39916,14 +40054,22 @@ var native_registry_default = {
39916
40054
  "__tnGuardWatch",
39917
40055
  "__tnMaterialCheck",
39918
40056
  "__tnMaterialWatch",
40057
+ "__tnModelLodAttach",
40058
+ "__tnModelLodMeshes",
40059
+ "__tnModelLodSelect",
39919
40060
  "__tnPoseBlend",
39920
40061
  "__tnPoseReset",
39921
40062
  "__tnPoseRestore",
39922
40063
  "__tnPoseTick",
39923
40064
  "__tnPoseWatch",
39924
40065
  "__tnProjectionReport",
40066
+ "__tnSphereBounds",
40067
+ "__tnSphereBoundsAttach",
39925
40068
  "__tnStaleEntries",
39926
40069
  "__tnStaleRows",
40070
+ "__tnStaticChanged",
40071
+ "__tnStaticRoots",
40072
+ "__tnStaticWatch",
39927
40073
  "__tnStructureStamp",
39928
40074
  "__tnUpdateMatrixWorld",
39929
40075
  "__tnVisibleInWorld",
@@ -40268,14 +40414,22 @@ var native_registry_default = {
40268
40414
  "__tnGuardWatch",
40269
40415
  "__tnMaterialCheck",
40270
40416
  "__tnMaterialWatch",
40417
+ "__tnModelLodAttach",
40418
+ "__tnModelLodMeshes",
40419
+ "__tnModelLodSelect",
40271
40420
  "__tnPoseBlend",
40272
40421
  "__tnPoseReset",
40273
40422
  "__tnPoseRestore",
40274
40423
  "__tnPoseTick",
40275
40424
  "__tnPoseWatch",
40276
40425
  "__tnProjectionReport",
40426
+ "__tnSphereBounds",
40427
+ "__tnSphereBoundsAttach",
40277
40428
  "__tnStaleEntries",
40278
40429
  "__tnStaleRows",
40430
+ "__tnStaticChanged",
40431
+ "__tnStaticRoots",
40432
+ "__tnStaticWatch",
40279
40433
  "__tnStructureStamp",
40280
40434
  "__tnUpdateMatrixWorld",
40281
40435
  "__tnVisibleInWorld",
@@ -40733,14 +40887,22 @@ var native_registry_default = {
40733
40887
  "__tnGuardWatch",
40734
40888
  "__tnMaterialCheck",
40735
40889
  "__tnMaterialWatch",
40890
+ "__tnModelLodAttach",
40891
+ "__tnModelLodMeshes",
40892
+ "__tnModelLodSelect",
40736
40893
  "__tnPoseBlend",
40737
40894
  "__tnPoseReset",
40738
40895
  "__tnPoseRestore",
40739
40896
  "__tnPoseTick",
40740
40897
  "__tnPoseWatch",
40741
40898
  "__tnProjectionReport",
40899
+ "__tnSphereBounds",
40900
+ "__tnSphereBoundsAttach",
40742
40901
  "__tnStaleEntries",
40743
40902
  "__tnStaleRows",
40903
+ "__tnStaticChanged",
40904
+ "__tnStaticRoots",
40905
+ "__tnStaticWatch",
40744
40906
  "__tnStructureStamp",
40745
40907
  "__tnUpdateMatrixWorld",
40746
40908
  "__tnVisibleInWorld",
@@ -40973,14 +41135,22 @@ var native_registry_default = {
40973
41135
  "__tnGuardWatch",
40974
41136
  "__tnMaterialCheck",
40975
41137
  "__tnMaterialWatch",
41138
+ "__tnModelLodAttach",
41139
+ "__tnModelLodMeshes",
41140
+ "__tnModelLodSelect",
40976
41141
  "__tnPoseBlend",
40977
41142
  "__tnPoseReset",
40978
41143
  "__tnPoseRestore",
40979
41144
  "__tnPoseTick",
40980
41145
  "__tnPoseWatch",
40981
41146
  "__tnProjectionReport",
41147
+ "__tnSphereBounds",
41148
+ "__tnSphereBoundsAttach",
40982
41149
  "__tnStaleEntries",
40983
41150
  "__tnStaleRows",
41151
+ "__tnStaticChanged",
41152
+ "__tnStaticRoots",
41153
+ "__tnStaticWatch",
40984
41154
  "__tnStructureStamp",
40985
41155
  "__tnUpdateMatrixWorld",
40986
41156
  "__tnVisibleInWorld",
@@ -43909,7 +44079,9 @@ function setValues(target, className, values) {
43909
44079
  if (value === void 0) continue;
43910
44080
  const current = self[key];
43911
44081
  if (current === void 0)
43912
- throw new TypeError(`TN_BROWSER_PARAMETER_UNSUPPORTED: ${className} has no '${key}'`);
44082
+ throw new TypeError(
44083
+ `TN_BROWSER_PARAMETER_UNSUPPORTED: ${className} has no '${key}'. The engine does not implement this parameter on ${className}: remove the key.`
44084
+ );
43913
44085
  if (isWrapperOf(current, "Color")) setColor(current, value);
43914
44086
  else if (isWrapperOf(current, "Vector3") && value.isVector3)
43915
44087
  current.copy?.(value);
@@ -46286,6 +46458,7 @@ function createWasmRuntime(abi) {
46286
46458
  );
46287
46459
  return readValue(out);
46288
46460
  }),
46461
+ ...abi._tn_ownership_epoch === void 0 ? {} : { ownershipEpoch: () => abi._tn_ownership_epoch() },
46289
46462
  engineReferences: (refs) => scoped(() => {
46290
46463
  const handles = alloc(Math.max(1, refs.length) * HANDLE);
46291
46464
  refs.forEach((ref, i) => writeHandle(handles + i * HANDLE, ref));
@@ -46420,6 +46593,7 @@ function createWasmRuntime(abi) {
46420
46593
  // ../three-native/src/browser-backend.ts
46421
46594
  var TSL_NODE = /* @__PURE__ */ Symbol("tn.tslNode");
46422
46595
  var SETTLED_PASS = 64;
46596
+ var FULL_PASS_EVERY = 512;
46423
46597
  var ADDRESS = /* @__PURE__ */ Symbol("tn.engineAddress");
46424
46598
  function defineOwn(target, own) {
46425
46599
  for (const field of own) Object.defineProperty(target, field.key, field.descriptor);
@@ -46563,6 +46737,7 @@ function defineBrowserClasses(registry, source, catalog) {
46563
46737
  debug?.crossing("call", self, method, typeNames.get(self.type) ?? String(self.type));
46564
46738
  return source.invoke(self, method, args);
46565
46739
  },
46740
+ ...source.ownershipEpoch === void 0 ? {} : { ownershipEpoch: source.ownershipEpoch },
46566
46741
  ...source.engineReferences === void 0 ? {} : {
46567
46742
  engineReferences: (refs) => {
46568
46743
  crossings++;
@@ -46798,6 +46973,10 @@ function defineBrowserClasses(registry, source, catalog) {
46798
46973
  };
46799
46974
  let cursor = settled.values();
46800
46975
  let peak = 0;
46976
+ let epochSeen;
46977
+ let epochAtPass;
46978
+ let passDue = true;
46979
+ let sinceFullPass = 0;
46801
46980
  const userData = /* @__PURE__ */ new WeakMap();
46802
46981
  const shaderNodes = /* @__PURE__ */ new Map();
46803
46982
  const released = new FinalizationRegistry((ref) => {
@@ -47060,6 +47239,12 @@ function defineBrowserClasses(registry, source, catalog) {
47060
47239
  } finally {
47061
47240
  if (loans.length > mark) result = repay(mark, result);
47062
47241
  if (drives) animated = /* @__PURE__ */ new WeakMap();
47242
+ if (method === "__tnRecords" && Array.isArray(args[0])) {
47243
+ for (const attribute of args[0]) {
47244
+ const entry = arrays.get(attribute);
47245
+ if (entry !== void 0) syncFull(attribute, entry);
47246
+ }
47247
+ }
47063
47248
  }
47064
47249
  if (materialClass && (method === "clone" || method === "copy")) {
47065
47250
  const [from, to] = method === "clone" ? [this, result] : [args[0], this];
@@ -47773,8 +47958,15 @@ function defineBrowserClasses(registry, source, catalog) {
47773
47958
  }
47774
47959
  if (hierarchyAt !== void 0 && readWord !== void 0 && readWord(hierarchyAt) !== keptVersion)
47775
47960
  kept = /* @__PURE__ */ new WeakMap();
47961
+ const epoch = runtime.ownershipEpoch?.();
47962
+ if (epoch === void 0 || epoch !== epochSeen || ++sinceFullPass >= FULL_PASS_EVERY) {
47963
+ epochSeen = epoch;
47964
+ sinceFullPass = 0;
47965
+ passDue = true;
47966
+ }
47967
+ if (held.size === 0 && !passDue) return;
47776
47968
  peak = Math.max(peak, settled.size);
47777
- const budget = Math.ceil(peak / SETTLED_PASS);
47969
+ const budget = passDue ? Math.ceil(peak / SETTLED_PASS) : 0;
47778
47970
  const candidates = [...held];
47779
47971
  const fresh = candidates.length;
47780
47972
  while (candidates.length < fresh + budget) {
@@ -47785,6 +47977,8 @@ function defineBrowserClasses(registry, source, catalog) {
47785
47977
  }
47786
47978
  cursor = settled.values();
47787
47979
  peak = settled.size;
47980
+ if (epoch !== void 0 && epochAtPass === epoch) passDue = false;
47981
+ epochAtPass = epoch;
47788
47982
  if (candidates.length > fresh || settled.size === 0) break;
47789
47983
  }
47790
47984
  const counts = runtime.engineReferences?.(candidates.map(refOf));