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.
Rust electron-alternativegame-engineglobal-illuminationgraphicsjavascript-runtimemetalpath-tracingray-tracingreal-time-renderingrenderingrustthreejstypescriptvoxelvulkanwebgpuwgpu
Site: the macOS app's update feed (releases/appcast.xml) checked and said on Download (#50)
Evan (Yifeng) Wang53346a0a1bfa
diff --git a/site/README.md b/site/README.mdindex d3dceeb..61948d9 100644--- a/site/README.md+++ b/site/README.md@@ -94,6 +94,12 @@ puts up a Download button with nothing behind it.}```+`releases/appcast.xml`, written by the same release for a signed build, is the update feed installed copies of ThreeRT+for macOS read (Sparkle, from 0.3.0; `https://threert.dev/releases/appcast.xml` is in the app's Info.plist): one item,+the release, its image's URL and length and the EdDSA signature the apps check. It is a static asset next to+`latest.json`; the image it names is the one `deploy.ts` puts in R2 first. `build.ts` stops on a feed that offers+another version, file or size than `latest.json`, or a non-https URL.+`play/index.json`, next to a thumbnail and a package directory for each game:```jsoncdiff --git a/site/download/index.html b/site/download/index.htmlindex da54516..67bcc92 100644--- a/site/download/index.html+++ b/site/download/index.html@@ -64,6 +64,7 @@<li>Hardware ray tracing on M3 and later; dynamic resolution holds the frame rate</li><li>A game plays as soon as it opens: drag to orbit, click to play, <kbd>⌘R</kbd> to reload, <kbd>⌘S</kbd> for a screenshot</li><li>Carries the <code>threert</code> command line: <b>Install threert</b> in its library puts it on your PATH</li>+ <li>Keeps itself up to date: a new version is offered in the app as soon as it is out (<b>Check for Updates…</b>, or Settings for automatic installs)</li></ul><span></span><div class="act" id="macAct">diff --git a/site/tools/build.ts b/site/tools/build.tsindex 6786f30..637fec2 100644--- a/site/tools/build.ts+++ b/site/tools/build.ts@@ -2,7 +2,7 @@// The pages plus the npm files they import (three.js, the QR encoder); no bundling, nothing rewritten.//// Two directories are generated elsewhere and copied when they are there (site/README.md):-// site/releases/ latest.json and the client build it names (the Download page)+// site/releases/ latest.json and the client build it names (the Download page), appcast.xml (the apps' update feed)// site/play/ index.json and the example packages (Showcase's "Open on your device")// Without them the pages say that nothing is published on this host; the build warns. --require-release makes that// (and a file over the host's size limit) an error: what the deploy uses. The disk image itself stays out of the build@@ -44,8 +44,23 @@ if (existsSync(latest)) {// A public build opens like any app: never one that asks the user to get past Gatekeeper.if (r.macos && (r.macos.signed !== "developer-id" || r.macos.notarized !== true))problems.push(`site/releases/latest.json: the macOS build is ${r.macos.signed ?? "unsigned"}${r.macos.notarized ? "" : ", not notarized"} (release.ts --sign <Developer ID> --notarize <profile>)`);+ // The update feed installed apps read (the client's tools/sparkle.ts): it must offer the image latest.json names, at+ // its size, or an app would download something else than the Download page offers (or fail the length check).+ const feed = join(site, "releases/appcast.xml");+ if (existsSync(feed) && r.macos) {+ const xml = readFileSync(feed, "utf8");+ const enc = /<enclosure\s+url="([^"]+)"\s+length="(\d+)"[^>]*sparkle:edSignature="[^"]+"/.exec(xml);+ const ver = /<sparkle:version>([^<]+)<\/sparkle:version>/.exec(xml)?.[1];+ if (!enc) problems.push("site/releases/appcast.xml: no enclosure with a URL, a length and an EdDSA signature");+ else {+ if (!/^https:\/\//.test(enc[1])) problems.push(`site/releases/appcast.xml: the update is not on https (${enc[1]})`);+ if (!enc[1].endsWith(`/${r.macos.file}`) && enc[1] !== r.macos.url) problems.push(`site/releases/appcast.xml offers ${enc[1]}, latest.json ${r.macos.url ?? r.macos.file}`);+ if (Number(enc[2]) !== r.macos.size) problems.push(`site/releases/appcast.xml says ${enc[2]} bytes, latest.json ${r.macos.size}`);+ if (ver !== r.version) problems.push(`site/releases/appcast.xml offers ${ver}, latest.json is ${r.version}`);+ }+ }cpSync(join(site, "releases"), join(out, "releases"), { recursive: true, filter: (src) => withImage || !src.endsWith(".dmg") });- console.log(`release ${r.version}: ${r.macos?.url ?? r.macos?.file ?? "no macOS build"}${r.macos?.url || withImage ? "" : " (served from R2: deploy.ts uploads it)"}; iOS ${r.ios?.url ?? "not published"}`);+ console.log(`release ${r.version}: ${r.macos?.url ?? r.macos?.file ?? "no macOS build"}${r.macos?.url || withImage ? "" : " (served from R2: deploy.ts uploads it)"}; updates ${existsSync(feed) ? "releases/appcast.xml" : "none (no appcast.xml)"}; iOS ${r.ios?.url ?? "not published"}`);} else {problems.push("no site/releases/latest.json: the Download page will say that no build is published on this host");}