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
Showcase: community entries and the form that registers one
Yifeng "Evan" Wang16576faf9d88
diff --git a/.github/ISSUE_TEMPLATE/showcase.yml b/.github/ISSUE_TEMPLATE/showcase.ymlnew file mode 100644index 0000000..65ab4d5--- /dev/null+++ b/.github/ISSUE_TEMPLATE/showcase.yml@@ -0,0 +1,53 @@+name: Showcase entry+description: Register something you made or remixed with ThreeRT, so it shows in the Showcase's Community section.+title: "Showcase: "+labels: ["showcase"]+body:+ - type: markdown+ attributes:+ value: |+ An entry is a GitHub repository with the project at its root (what `threert create` or `threert remix` made),+ a line about it and a picture. ThreeRT for macOS fills this form from Studio → ⋯ → Submit to the Showcase.+ Accepted entries go into `site/showcase/community.json`; people open them from the app and remix them.+ - type: input+ id: name+ attributes:+ label: Title+ description: What the card says.+ validations:+ required: true+ - type: input+ id: repo+ attributes:+ label: GitHub repository+ description: Public, with `threert.config.json` at its root.+ placeholder: https://github.com/you/your-project+ validations:+ required: true+ - type: input+ id: about+ attributes:+ label: One line about it+ description: What it is, and what it started from if it is a remix.+ validations:+ required: true+ - type: textarea+ id: picture+ attributes:+ label: Picture+ description: Drag a 16:9 still in here (⌘S in ThreeRT saves one to the Desktop). A short clip is welcome too.+ validations:+ required: true+ - type: input+ id: package+ attributes:+ label: Hosted package (optional)+ description: The URL of a `threert pack` output (GitHub Pages works), so the entry plays without cloning.+ placeholder: https://you.github.io/your-project/+ - type: checkboxes+ id: terms+ attributes:+ label: Rights+ options:+ - label: The code, models and textures in the repository are mine to publish, or their licences allow it and are named there.+ required: truediff --git a/site/README.md b/site/README.mdindex 8ed4896..a4d1e66 100644--- a/site/README.md+++ b/site/README.md@@ -45,7 +45,7 @@ page; change it in all four.| Page | What is on it ||---|---|| `index.html` | The landing page (below). Its two buttons, in the hero and at the end: **Download** (to `download/`, named for the visitor's platform by `js/site.js`) and **GitHub**. |-| `showcase/` | Bistro night as a clip under a divider (three.js | ThreeRT at 60 fps, `media/bistro/hero*.mp4`: both sides in one file so they cannot drift) and Zero-Day as a camera move; **Not only games**: the cases (education, commerce, architecture, culture: the packages in `play/` with an `industry`, written in `showcase/` at the repo root), each with what it shows, how to play with it, its links and QR code, and a filter by field; then **Open on your device**: a card for each of the other example packages. The cases' credits go in the footer. |+| `showcase/` | Bistro night as a clip under a divider (three.js | ThreeRT at 60 fps, `media/bistro/hero*.mp4`: both sides in one file so they cannot drift) and Zero-Day as a camera move; **Not only games**: the cases (education, commerce, architecture, culture: the packages in `play/` with an `industry`, written in `showcase/` at the repo root), each with what it shows, how to play with it, its links and QR code, and a filter by field; then **Open on your device**: a card for each of the other example packages; then **Made by you**: the community's entries (`showcase/community.json`, `{items: [{id, title, author, repo, caption, image, package?}]}`: GitHub repositories registered through `.github/ISSUE_TEMPLATE/showcase.yml`, which ThreeRT for macOS fills from its Studio; an accepted issue becomes a line in that file by hand) and the button that opens the form. The app's Showcase reads the same file. The cases' credits go in the footer. || `download/` | ThreeRT for macOS (the build `releases/latest.json` names) and ThreeRT for iPhone (a TestFlight or App Store link once `ios.url` is set), then how a client loads a game: `threert dev`, scan, traced and live. || `docs/` | Getting started: install the client, open an example, write a scene, the dev loop with the `threert` CLI, the package format, links to the reference documents in `docs/` on GitHub. |diff --git a/site/showcase/community.json b/site/showcase/community.jsonnew file mode 100644index 0000000..2feb210--- /dev/null+++ b/site/showcase/community.json@@ -0,0 +1,3 @@+{+ "items": []+}diff --git a/site/showcase/index.html b/site/showcase/index.htmlindex 66a642d..9eb5f10 100644--- a/site/showcase/index.html+++ b/site/showcase/index.html@@ -53,6 +53,22 @@.case .acts { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }@media (max-width: 1100px) { .cases { grid-template-columns: 1fr; } }@media (max-width: 700px) { .case .qr { display: none; } .case .body { grid-template-columns: 1fr; padding: 20px; } .case .ctl { grid-template-columns: 1fr; } .case h3 { font-size: 23px; } }+ /* Community: what people made, registered as GitHub repositories (showcase/community.json). */+ .made { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-bottom: 26px; }+ .made:empty { display: none; }+ .made .card { padding: 0; overflow: hidden; display: grid; grid-template-rows: auto 1fr; }+ .made .thumb { display: block; aspect-ratio: 16 / 9; background: #000; }+ .made .thumb img { width: 100%; height: 100%; object-fit: cover; }+ .made .body { padding: 18px 20px 20px; display: grid; gap: 12px; align-content: start; }+ .made h3 { font: 600 19px/1.2 var(--font-sans); letter-spacing: -0.02em; }+ .made .by { margin-top: 5px; font: 400 12px/1.4 var(--font-mono); color: var(--mute); }+ .made .cap2 { color: var(--bone-2); font-size: 14.5px; }+ .made .acts { display: flex; flex-wrap: wrap; gap: 10px; }+ .submit { display: grid; grid-template-columns: 1fr auto; gap: 18px 32px; align-items: center; padding: 26px 30px; }+ .submit h3 { font: 600 21px/1.2 var(--font-sans); letter-spacing: -0.025em; }+ .submit p { margin-top: 8px; color: var(--bone-2); font-size: 15px; line-height: 1.6; max-width: 68ch; }+ @media (max-width: 1100px) { .made { grid-template-columns: 1fr 1fr; } }+ @media (max-width: 700px) { .made { grid-template-columns: 1fr; } .submit { grid-template-columns: 1fr; padding: 22px; } }.open-note { margin-top: 28px; display: flex; flex-wrap: wrap; gap: 10px 28px; }.open-note[hidden] { display: none; }@media (max-width: 1100px) { .feat, .feat.flip { grid-template-columns: 1fr; gap: 22px; } .feat.flip .txt { order: 0; } .pk { grid-template-columns: 1fr 1fr; } }@@ -127,6 +143,23 @@</div></section>+<section class="sec" id="community">+ <div class="wrap">+ <div class="sec-top rv">+ <h2 class="h-2">Made by you.</h2>+ <p class="lede">Every case and scene on this page can be remixed. In ThreeRT for macOS, press Remix on one: it becomes a project on your Mac with a prompt for your coding agent, and the picture updates as the agent saves. What people made that way, and from scratch, is listed here.</p>+ </div>+ <div class="made" id="made"></div>+ <div class="card submit">+ <div>+ <h3>Show yours</h3>+ <p>An entry is a GitHub repository with your project in it, a line about it and a picture. Register it and it appears here and in the app’s Showcase, where anyone can open it and remix it in turn.</p>+ </div>+ <a class="btn primary" id="submit" rel="noopener">Submit a project</a>+ </div>+ </div>+</section>+<footer class="foot"><div class="wrap cols"><div>@@ -145,13 +178,31 @@<script type="module">import { $, $$, compare, sequence, reveal } from "../js/threert.js";- import { guard, packages, packageLinks, qrSvg, reachable } from "../js/site.js";+ import { GITHUB, ROOT, guard, packages, packageLinks, qrSvg, reachable } from "../js/site.js";reveal();guard("camera moves", () => { for (const el of $$(".feat .cmp")) compare(el); for (const el of $$(".seqp")) sequence(el); });const esc = (s) => String(s).replace(/&/g, "&").replace(/</g, "<").replace(/"/g, """);+ // The community's entries (showcase/community.json: repositories registered through the issue form below).+ $("#submit").href = `${GITHUB}/issues/new?template=showcase.yml`;+ guard("community", async () => {+ const r = await fetch(new URL("showcase/community.json", ROOT));+ const items = r.ok ? (await r.json()).items ?? [] : [];+ $("#made").innerHTML = items.map((g) => {+ const open = g.package ? g.package.replace(/^https:/, "threerts:").replace(/^http:/, "threert:") : null;+ return `<article class="card">+ <a class="thumb" href="${esc(g.repo)}" rel="noopener" aria-label="${esc(g.title)} on GitHub">${g.image ? `<img src="${esc(g.image)}" alt="${esc(g.title)}" loading="lazy">` : ""}</a>+ <div class="body">+ <div><h3>${esc(g.title)}</h3>${g.author ? `<p class="by">${esc(g.author)}</p>` : ""}</div>+ <p class="cap2">${esc(g.caption ?? "")}</p>+ <div class="acts">${open ? `<a class="btn primary sm" href="${esc(open)}">Open in ThreeRT</a>` : ""}<a class="btn ghost sm" href="${esc(g.repo)}" rel="noopener">Repository</a></div>+ </div>+ </article>`;+ }).join("");+ });+// The packages this host carries (play/index.json). A host without them gets a note, not an empty grid.guard("packages", async () => {const pk = $("#pk"), index = await packages();