create-threenative 0.2.13 → 0.2.15

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.
Files changed (36) hide show
  1. package/agent-docs/references/capability-reference.md +1 -1
  2. package/capabilities.json +1 -1
  3. package/dist/index.js +1 -1
  4. package/dist/threenative.js +7 -3
  5. package/dist/web-engine-post-effects.js +1 -1
  6. package/dist/web-engine-runtime.js +3 -0
  7. package/package.json +8 -8
  8. package/template-assets/patches/{three@0.185.1.patch → three@0.187.0.patch} +2543 -3560
  9. package/templates/action-rpg/package.json +10 -10
  10. package/templates/action-rpg/src/render/gpuSky.ts +3 -4
  11. package/templates/adventure/package.json +10 -10
  12. package/templates/collectathon/package.json +10 -10
  13. package/templates/kart/package.json +9 -9
  14. package/templates/minimal/package.json +9 -9
  15. package/templates/minimal/src/render/gpuSky.ts +3 -4
  16. package/templates/platformer/package.json +10 -10
  17. package/templates/puzzle/package.json +10 -10
  18. package/templates/racing/package.json +10 -10
  19. package/templates/racing/src/render/gpuSky.ts +3 -4
  20. package/templates/rain/package.json +9 -9
  21. package/templates/rts/package.json +9 -9
  22. package/templates/runner/package.json +10 -10
  23. package/templates/runner/src/render/gpuSky.ts +3 -4
  24. package/templates/sailing/package.json +10 -10
  25. package/templates/sailing/playtests/float-after-the-run-ends.playtest.json +1 -1
  26. package/templates/shooter/package.json +10 -10
  27. package/templates/shooter/src/render/gpuSky.ts +3 -4
  28. package/templates/shooter/src/scenes/Play.ts +4 -3
  29. package/templates/snow/package.json +10 -10
  30. package/templates/starter/package.json +10 -10
  31. package/templates/starter/src/render/gpuSky.ts +3 -4
  32. package/templates/starter/src/render/temporalAA.ts +10 -9
  33. package/templates/starter/src/render/temporalAAFrame.ts +2 -5
  34. package/templates/starter/src/render/temporalAAHooks.ts +53 -31
  35. package/templates/starter/src/render/temporalResolveDepth.ts +2 -2
  36. package/templates/tower-defense/package.json +10 -10
@@ -662,7 +662,7 @@ const effects = new AudioBus({ camera });
662
662
  `class` — Auto exposure with Unreal 5.8.3's metering: a 64-bin histogram of log2 luminance (the darkest and brightest 10% ignored), key 0.18 x 2, -10 to +20 EV100, 3 stops/s brighter and 1 stop/s darker. `AutoExposureNode` meters a colour texture and outputs the adapted exposure; `exposureSettings` holds the defaults.
663
663
 
664
664
  ```ts
665
- export class AutoExposureNode extends TempNode<"float"> { … }
665
+ export class AutoExposureNode extends Node<"float"> { … }
666
666
  ```
667
667
 
668
668
  - **Use when:** the frame should expose itself the way a fresh Unreal project does as the sun and the view change · a white snowfield or a bright storm should not meter to middle grey, and the compensation changes with the weather
package/capabilities.json CHANGED
@@ -873,7 +873,7 @@
873
873
  "`setExposureBias(stops)` is Unreal's Exposure Compensation, live: the game changes it per place or weather (`WorldEnvironment.apply` returns the node as `exposure`)"
874
874
  ],
875
875
  "package": "@threenative/core",
876
- "signature": "export class AutoExposureNode extends TempNode<\"float\"> { … }",
876
+ "signature": "export class AutoExposureNode extends Node<\"float\"> { … }",
877
877
  "situations": [
878
878
  "the frame should expose itself the way a fresh Unreal project does as the sun and the view change",
879
879
  "a white snowfield or a bright storm should not meter to middle grey, and the compensation changes with the weather"
package/dist/index.js CHANGED
@@ -2752,7 +2752,7 @@ async function applyPackageSources(target, packageSources) {
2752
2752
  }
2753
2753
  var FRAMEWORK_PATCH_DIRECTORY = "patches";
2754
2754
  var FRAMEWORK_PATCH_SOURCES = {
2755
- "three@0.185.1.patch": "../core/patches/three@0.185.1.patch",
2755
+ "three@0.187.0.patch": "../core/patches/three@0.187.0.patch",
2756
2756
  "vite@8.2.0.patch": "../../patches/vite@8.2.0.patch",
2757
2757
  "@tailwindcss__node@4.3.3.patch": "../../patches/@tailwindcss__node@4.3.3.patch"
2758
2758
  };
@@ -2322,6 +2322,10 @@ function uiBuildDriver(cwd, page, output, cssSourcemaps = false) {
2322
2322
  'import { build, loadConfigFromFile, mergeConfig } from "vite";',
2323
2323
  "",
2324
2324
  `const root = ${literal(cwd)};`,
2325
+ // The host of this page brings its own engine: a `src/ui/` that reaches a core value must not pull
2326
+ // the threaded Wasm engine, which refuses a page without cross-origin isolation (TN_WEB_THREADS_OFF).
2327
+ // Same switch as the native game bundle (runtime-native/scripts/bundle.mjs).
2328
+ 'process.env.THREENATIVE_NATIVE_BUNDLE = "ui";',
2325
2329
  `const loaded = await loadConfigFromFile({ command: "build", mode: "production" }, undefined, root);`,
2326
2330
  "const config = mergeConfig(loaded?.config ?? {}, {",
2327
2331
  " root,",
@@ -3237,7 +3241,7 @@ var MCP_SERVERS = Object.freeze({
3237
3241
  var MCP_PACKAGES = Object.freeze({
3238
3242
  assets: Object.freeze({ name: "threenative-asset-mcp", version: "0.15.0" }),
3239
3243
  sculpt: Object.freeze({ name: "threenative-sculpt-mcp", version: "0.2.2" }),
3240
- engine: Object.freeze({ name: "threenative-engine-mcp", version: "0.2.9" }),
3244
+ engine: Object.freeze({ name: "threenative-engine-mcp", version: "0.2.11" }),
3241
3245
  animation: Object.freeze({ name: "threenative-animation-mcp", version: "0.1.3" }),
3242
3246
  // `args` fixes the launch for every host. The Chrome flags are `WEBGPU_BROWSER_ARGS` from
3243
3247
  // `@threenative/playtest`, so a DevTools trace profiles the same adapter a playtest does and not
@@ -3398,7 +3402,7 @@ function requiredAndroidSdkFromRoot(root) {
3398
3402
  }
3399
3403
  }
3400
3404
  var CORE_PACKAGE_NAME = "@threenative/core";
3401
- var CORE_PACKAGE_VERSION = "0.3.9";
3405
+ var CORE_PACKAGE_VERSION = "0.3.11";
3402
3406
  var CORE_RESOLVED_SERVERS = /* @__PURE__ */ new Set([
3403
3407
  "threenative-engine",
3404
3408
  "threenative-animation"
@@ -3714,7 +3718,7 @@ function probeMcpServer(projectRoot, spec) {
3714
3718
  method: "initialize",
3715
3719
  params: {
3716
3720
  capabilities: {},
3717
- clientInfo: { name: "threenative-doctor", version: "0.3.9" },
3721
+ clientInfo: { name: "threenative-doctor", version: "0.3.11" },
3718
3722
  protocolVersion: "2025-06-18"
3719
3723
  }
3720
3724
  });
@@ -187,7 +187,7 @@ function definePostEffects(tsl) {
187
187
  const clearViewOffset = () => {
188
188
  viewCamera.clearViewOffset();
189
189
  node.__effect("viewOffset", 0);
190
- jitterIndex = (jitterIndex + 1) % 31;
190
+ jitterIndex = (jitterIndex + 1) % 32;
191
191
  };
192
192
  Object.defineProperties(node, {
193
193
  setViewOffset: { value: setViewOffset, configurable: true },
@@ -42798,7 +42798,9 @@ function defineTempNode(prototype, key = TSL_NODE, read = (output) => {
42798
42798
  }
42799
42799
  }
42800
42800
  Object.setPrototypeOf(TempNode.prototype, prototype);
42801
+ const Node = TempNode;
42801
42802
  return {
42803
+ Node,
42802
42804
  TempNode,
42803
42805
  update(frame) {
42804
42806
  if (!frame?.renderer || frame.frameId === void 0) return;
@@ -43654,6 +43656,7 @@ function defineTsl(runtime, classes) {
43654
43656
  };
43655
43657
  const custom = defineTempNode(prototype);
43656
43658
  const exports = {};
43659
+ exports.Node = custom.Node;
43657
43660
  exports.TempNode = custom.TempNode;
43658
43661
  exports.NodeUpdateType = NodeUpdateType;
43659
43662
  for (const name of FUNCTIONS)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-threenative",
3
- "version": "0.2.13",
3
+ "version": "0.2.15",
4
4
  "license": "MIT",
5
5
  "description": "Scaffold a readable ThreeNative game project.",
6
6
  "keywords": [
@@ -70,7 +70,7 @@
70
70
  "ktx-parse": "^1.1.0",
71
71
  "ktx2-encoder": "0.6.0",
72
72
  "meshoptimizer": "1.1.1",
73
- "three": "0.185.1",
73
+ "three": "0.187.0",
74
74
  "@jridgewell/trace-mapping": "0.3.31",
75
75
  "@eslint-community/eslint-plugin-eslint-comments": "4.8.1",
76
76
  "eslint-plugin-react-hooks": "7.1.1",
@@ -79,7 +79,7 @@
79
79
  "devDependencies": {
80
80
  "@gltf-transform/core": "4.4.2",
81
81
  "@types/node": "20.19.43",
82
- "@types/three": "0.185.3",
82
+ "@types/three": "0.187.0",
83
83
  "esbuild": "0.27.0",
84
84
  "publint": "0.3.22",
85
85
  "tsup": "8.5.1",
@@ -90,13 +90,13 @@
90
90
  "@typescript-eslint/parser": "8.72.0",
91
91
  "@typescript-eslint/eslint-plugin": "8.72.0",
92
92
  "@types/estree": "1.0.8",
93
- "@threenative/assets": "0.3.10",
94
- "@threenative/core": "0.3.9",
95
- "@threenative/physics": "0.3.9",
96
- "@threenative/blender-bridge": "0.2.2"
93
+ "@threenative/assets": "0.3.12",
94
+ "@threenative/core": "0.3.11",
95
+ "@threenative/physics": "0.3.11",
96
+ "@threenative/blender-bridge": "0.2.4"
97
97
  },
98
98
  "peerDependencies": {
99
- "@threenative/assets": ">=0.3.10 <0.4.0"
99
+ "@threenative/assets": ">=0.3.12 <0.4.0"
100
100
  },
101
101
  "scripts": {
102
102
  "build": "tsup --config tsup.config.ts && publint",