Skip to content

The native runtime for three.js: three.js, down to the metal. 45× smaller than Electron, on a Sony PS3, and path-traced at 60 fps on ray-tracing GPUs.

1.1 KB
Raw Blame
// Deploy: bun site/tools/deploy.ts (builds out/site, then wrangler deploy with this file).
{
  "name": "threert-site",
  // The Cloudflare account that holds the threert.dev zone.
  "account_id": "5e97b4b91f8abaf2de54de9f866bfcae",
  "main": "worker.ts",
  "compatibility_date": "2026-11-01",
  "assets": {
    "directory": "../out/site",
    "binding": "ASSETS",
    // The worker runs first: www redirects, the clients' files under /releases/ come from R2, every other request
    // goes to the assets.
    "run_worker_first": true
  },
  // The clients' files (the disk image is over the 25 MiB a file that static assets take; the tarball and the APK
  // go the same way, served as downloads): site/tools/deploy.ts uploads the files site/releases/latest.json names
  // here, worker.ts serves them at /releases/<file>. Create it once:
  //   bunx wrangler@4 r2 bucket create threert-releases
  "r2_buckets": [{ "binding": "RELEASES", "bucket_name": "threert-releases" }],
  "routes": [
    { "pattern": "threert.dev", "custom_domain": true },
    { "pattern": "www.threert.dev", "custom_domain": true }
  ],
  "workers_dev": false
}