diff --git a/README.md b/README.md index dfe3030..96f727f 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ auto-installs from Google TV over network ADB. It then replaces the stock home screen with a small offline launcher that has six layouts to choose from. -🌐 **[boxclean.vachagan.dev](https://boxclean.vachagan.dev)** (coming soon) +🌐 **[boxclean.vachagan.dev](https://boxclean.vachagan.dev)**

Moving focus across the Bento home, opening the layout picker and switching to the Ribbon layout diff --git a/site/.gitignore b/site/.gitignore new file mode 100644 index 0000000..241b30a --- /dev/null +++ b/site/.gitignore @@ -0,0 +1,4 @@ +.vercel +.env* +node_modules +dist diff --git a/site/index.html b/site/index.html new file mode 100644 index 0000000..625d146 --- /dev/null +++ b/site/index.html @@ -0,0 +1,23 @@ + + + + + +BoxClean — a quiet Mi Box S + + + + + + + + + + + + + +

+ + + diff --git a/site/package.json b/site/package.json new file mode 100644 index 0000000..b5765da --- /dev/null +++ b/site/package.json @@ -0,0 +1,25 @@ +{ + "name": "boxclean-site", + "private": true, + "type": "module", + "scripts": { + "dev": "vite", + "build": "vite build", + "preview": "vite preview", + "check": "svelte-check --tsconfig ./tsconfig.json", + "test": "vitest run" + }, + "dependencies": { + "three": "^0.186.1" + }, + "devDependencies": { + "@sveltejs/vite-plugin-svelte": "^7.3.1", + "@tsconfig/svelte": "^5.0.8", + "@types/three": "^0.186.0", + "svelte": "^5.57.2", + "svelte-check": "^4.7.7", + "typescript": "^6.0.3", + "vite": "^8.3.5", + "vitest": "^5.0.5" + } +} diff --git a/site/pnpm-lock.yaml b/site/pnpm-lock.yaml new file mode 100644 index 0000000..5f69f12 --- /dev/null +++ b/site/pnpm-lock.yaml @@ -0,0 +1,928 @@ +lockfileVersion: '9.0' + +settings: + autoInstallPeers: true + excludeLinksFromLockfile: false + +importers: + + .: + dependencies: + three: + specifier: ^0.186.1 + version: 0.186.1 + devDependencies: + '@sveltejs/vite-plugin-svelte': + specifier: ^7.3.1 + version: 7.3.1(svelte@5.57.2)(vite@8.3.5) + '@tsconfig/svelte': + specifier: ^5.0.8 + version: 5.0.8 + '@types/three': + specifier: ^0.186.0 + version: 0.186.0 + svelte: + specifier: ^5.57.2 + version: 5.57.2 + svelte-check: + specifier: ^4.7.7 + version: 4.7.7(picomatch@4.0.7)(svelte@5.57.2)(typescript@6.0.3) + typescript: + specifier: ^6.0.3 + version: 6.0.3 + vite: + specifier: ^8.3.5 + version: 8.3.5 + vitest: + specifier: ^5.0.5 + version: 5.0.5(vite@8.3.5) + +packages: + + '@dimforge/rapier3d-compat@0.12.0': + resolution: {integrity: sha512-uekIGetywIgopfD97oDL5PfeezkFpNhwlzlaEYNOA0N6ghdsOvh/HYjSMek5Q2O1PYvRSDFcqFVJl4r4ZBwOow==} + + '@jridgewell/gen-mapping@0.3.13': + resolution: {integrity: sha512-2kkt/7niJ6MgEPxF0bYdQ6etZaA+fQvDcLKckhy1yIQOzaoKjBBjSj63/aLVjYE3qhRt5dvM+uUyfCg6UKCBbA==} + + '@jridgewell/remapping@2.3.5': + resolution: {integrity: sha512-LI9u/+laYG4Ds1TDKSJW2YPrIlcVYOwi2fUC6xB43lueCjgxV4lffOCZCtYFiH6TNOX+tQKXx97T4IKHbhyHEQ==} + + '@jridgewell/resolve-uri@3.1.2': + resolution: {integrity: sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==} + engines: {node: '>=6.0.0'} + + '@jridgewell/sourcemap-codec@1.6.0': + resolution: {integrity: sha512-T7jf+5zgsZHwNJ4lvQ7/aezbyk0nNX+zJVWpmHA7VYsEx7a7qr5Rg5IbtJFqkgze5Y2sruq1RUY8Q837Od7iFw==} + + '@jridgewell/trace-mapping@0.3.31': + resolution: {integrity: sha512-zzNR+SdQSDJzc8joaeP8QQoCQr8NuYx2dIIytl1QeBEZHJ9uW6hebsrYgbz8hJwUQao3TWCMtmfV8Nu1twOLAw==} + + '@oxc-project/types@0.155.0': + resolution: {integrity: sha512-SeE8JPwW1xs1tHeNycjUtUBdhorRa8o4jlvjwk49R7/Z291i+4DQa7JJIgOm/TaYQZx+QrPQbVJ/9c8dMIZN8Q==} + + '@rolldown/binding-android-arm-eabi@1.2.15': + resolution: {integrity: sha512-aLcgK9gIJ3YRvrrtfSBbRa27F5WrpiTaPulnFpsHPxpUHgFlSgnU4854MHwoRGEBhfRJDWCS2WQ7lIjskE9Olw==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm] + os: [android] + + '@rolldown/binding-android-arm64@1.2.15': + resolution: {integrity: sha512-xD7DdZCrbThKuxNg7ooQmvp07ys4J/pnSEMTG3/OdOWl6daC67m/Q4fL78sRHMxTH/N4fGUbYhcPM0MF5WFHkg==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [android] + + '@rolldown/binding-darwin-arm64@1.2.15': + resolution: {integrity: sha512-m2WuQ6r0B4OTYxyPpNLtXaMRbRDUbG8YQV2Q3KTdSSK8Th6KHCnC8jVCJt8bvYeSB5WivkkNbc85mKadaSdOxA==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [darwin] + + '@rolldown/binding-darwin-x64@1.2.15': + resolution: {integrity: sha512-5RtnsHM36nodM9WbMy+zip0LGS/G+y5wro5RHrpOlr4ac24+1zSi9kiV2MP1myZeZ/ifEHfulQcWjnAXzc2C2A==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [x64] + os: [darwin] + + '@rolldown/binding-freebsd-x64@1.2.15': + resolution: {integrity: sha512-g3l09pyFqhu+135JKkbkwiKGQmwU5hUMUPJ4VdBADvuqR8d33L6H578rh8m7rtxbdp+VmX/+nzI7nvhSZlzpUQ==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [x64] + os: [freebsd] + + '@rolldown/binding-linux-arm-gnueabihf@1.2.15': + resolution: {integrity: sha512-nIe3VugI97nGQtspPxDqA4sXMUpeiocKIP/CqpY/u/vgbT+alX+cVxu1C/oVBPKg4feNTmYovE91v4DgXvXNwQ==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm] + os: [linux] + + '@rolldown/binding-linux-arm64-gnu@1.2.15': + resolution: {integrity: sha512-iTBjXx+B5QSvgI89lJfmqh4wTh8NabR1YZIIN3hNx4zSG0EVfVqkOvLulNpG4251pbd6/IAmZ/LefVk1Y4rPhw==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [linux] + libc: [glibc] + + '@rolldown/binding-linux-arm64-musl@1.2.15': + resolution: {integrity: sha512-uN26XOnVR7rqQupG3V9oAG2EGGatWjcJHOeDOHUFCh4TBWmP2tHTFoVN13aYbwfm0aHqJAEmcwhAu6sooIjfqQ==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [linux] + libc: [musl] + + '@rolldown/binding-linux-ppc64-gnu@1.2.15': + resolution: {integrity: sha512-9nWkcdd+H+XhaA3fQIwpHnKIrfx/PQ6rO0pivr78Og07tXlUlctBBJoEYLPfhTmCR/QxEVdn6uPjHV5SymPhdw==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [ppc64] + os: [linux] + libc: [glibc] + + '@rolldown/binding-linux-s390x-gnu@1.2.15': + resolution: {integrity: sha512-Ggh0ciFjLwIusLSLz7LZYEaGdxOAUJXI+Qu5JCbhPJJHEt8vP+IjRATTJheiJsdzzTYgUiHUiw3X1Ea3ZpMBdA==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [s390x] + os: [linux] + libc: [glibc] + + '@rolldown/binding-linux-x64-gnu@1.2.15': + resolution: {integrity: sha512-FHg60rS6DBePAYZ9X9F67x+JObFdmgn6tupA1C/a3B+CufFmTD4mX+e8M75tCiAO3foR/6xwVBI0KQiI7sn/rw==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [x64] + os: [linux] + libc: [glibc] + + '@rolldown/binding-linux-x64-musl@1.2.15': + resolution: {integrity: sha512-/cvV/7v5VGz/moiz0XKRj2dE8DzsKyhIu1KpOvJGPjRywg3yscON889UGvAe8zfiJLHup7VLjBduoGWi3HusWQ==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [x64] + os: [linux] + libc: [musl] + + '@rolldown/binding-openharmony-arm64@1.2.15': + resolution: {integrity: sha512-MyzC5Hrv/sm+Z7TSGKP/j8001RO2xQm1zOpCNVL4j0cY/VhBZviludA2YFQ7i4lH6ZAXxQm0lcMdBzM+99mE7w==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [openharmony] + + '@rolldown/binding-win32-arm64-msvc@1.2.15': + resolution: {integrity: sha512-+PgYiS+AH5omy6L45ZLxybasauJaj3M8buoT83D+nzPmCayXlxUV9hydhciCKVyIg0B/v0BtXPDE1uGqNwCPpg==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [win32] + + '@rolldown/binding-win32-x64-msvc@1.2.15': + resolution: {integrity: sha512-HFZd2QNQYn1JbIi+Hpd7H+r/lkWxcfIu28nirZ6eCn2LafuvmExMlb/P96Sfx5tf7pPArw39IdhmCF8vmV+NhQ==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [x64] + os: [win32] + + '@rolldown/pluginutils@1.0.1': + resolution: {integrity: sha512-2j9bGt5Jh8hj+vPtgzPtl72j0yRxHAyumoo6TNfAjsLB04UtpSvPbPcDcBMxz7n+9CYB0c1GxQFxYRg2jimqGw==} + + '@sveltejs/acorn-typescript@1.0.13': + resolution: {integrity: sha512-wgKggnhZVL9Bfx1OaKKTrYY9BFRk6C8UAkQNUcIv1+llzYrIqy+RZm5HPKzn0NpEBvTVhTqB4kQyllZywsRBRQ==} + peerDependencies: + acorn: ^8.9.0 + + '@sveltejs/load-config@0.2.3': + resolution: {integrity: sha512-VT3qmUb8pRV2QrZjd8iAmtg8lf4W0TIjZbvXtz5MKei/q96teWZgGJyyidJzOjzZzvdq616eSRVeMYIQChUTAQ==} + engines: {node: '>= 18.0.0'} + + '@sveltejs/vite-plugin-svelte@7.3.1': + resolution: {integrity: sha512-ZPsLN8B1e/En+Ak5s4V7srFDT532oS0qieLsQwu63NGKsS+iAjoO2Js1BochlHlglcU+Pt7WAO3C5Ee+4f6gVA==} + engines: {node: ^20.19 || ^22.12 || >=24} + peerDependencies: + svelte: ^5.46.4 + vite: ^8.0.0-beta.7 || ^8.0.0 + + '@tsconfig/svelte@5.0.8': + resolution: {integrity: sha512-UkNnw1/oFEfecR8ypyHIQuWYdkPvHiwcQ78sh+ymIiYoF+uc5H1UBetbjyqT+vgGJ3qQN6nhucJviX6HesWtKQ==} + + '@tweenjs/tween.js@23.1.3': + resolution: {integrity: sha512-vJmvvwFxYuGnF2axRtPYocag6Clbb5YS7kLL+SO/TeVFzHqDIWrNKYtcsPMibjDx9O+bu+psAy9NKfWklassUA==} + + '@types/chai@5.2.3': + resolution: {integrity: sha512-Mw558oeA9fFbv65/y4mHtXDs9bPnFMZAL/jxdPFUpOHHIXX91mcgEHbS5Lahr+pwZFR8A7GQleRWeI6cGFC2UA==} + + '@types/deep-eql@4.0.2': + resolution: {integrity: sha512-c9h9dVVMigMPc4bwTvC5dxqtqJZwQPePsWjPlpSOnojbor6pGqdk541lfA7AqFQr5pB1BRdq0juY9db81BwyFw==} + + '@types/estree@1.0.9': + resolution: {integrity: sha512-GhdPgy1el4/ImP05X05Uw4cw2/M93BCUmnEvWZNStlCzEKME4Fkk+YpoA5OiHNQmoS7Cafb8Xa3Pya8m1Qrzeg==} + + '@types/stats.js@0.17.4': + resolution: {integrity: sha512-jIBvWWShCvlBqBNIZt0KAshWpvSjhkwkEu4ZUcASoAvhmrgAUI2t1dXrjSL4xXVLB4FznPrIsX3nKXFl/Dt4vA==} + + '@types/three@0.186.0': + resolution: {integrity: sha512-mxYSBpDC+D0pLfSP6sW4WZTcT+nrtmZcimMqnVmy36Hte3XpeYSrvgg4TRdaM1GemGog1AWzI5qL2VoIfMXbJQ==} + + '@types/webxr@0.5.24': + resolution: {integrity: sha512-h8fgEd/DpoS9CBrjEQXR+dIDraopAEfu4wYVNY2tEPwk60stPWhvZMf4Foo5FakuQ7HFZoa8WceaWFervK2Ovg==} + + '@vitest/mocker@5.0.5': + resolution: {integrity: sha512-xLL3lkDegJZw+MGoGaCCsFayDZthGgpAtr3Vziyfc4p7xH89K7KRPcRBBh/kEYm0Aqkt5DtTmkYpBtRV/FrHZg==} + peerDependencies: + msw: ^2.4.9 || ^3.0.0 + vite: ^6.0.0 || ^7.0.0 || ^8.0.0 + peerDependenciesMeta: + msw: + optional: true + vite: + optional: true + + '@vitest/spy@5.0.5': + resolution: {integrity: sha512-lwJRExuH417257Q5wv9QYugN9IMJkoxcrKrYxGPQkBzl7wlNpTUxD/5yNX4ESKVUIShKPgkGchYPFMWOOk0wzw==} + + acorn@8.19.0: + resolution: {integrity: sha512-oJlA3XiRm7Cyk6qFD2Jn8ak9B7jSy0qy00ADO3+8dpT0LSjFihQYv4C02LFCSYJV3Q37xYwwRy5m+IpIiUzqWw==} + engines: {node: '>=0.4.0'} + hasBin: true + + aria-query@5.3.1: + resolution: {integrity: sha512-Z/ZeOgVl7bcSYZ/u/rh0fOpvEpq//LZmdbkXyc7syVzjPAhfOa9ebsdTSjEBDU4vs5nC98Kfduj1uFo0qyET3g==} + engines: {node: '>= 0.4'} + + assertion-error@2.0.1: + resolution: {integrity: sha512-Izi8RQcffqCeNVgFigKli1ssklIbpHnCYc6AknXGYoB6grJqyeby7jv12JUQgmTAnIDnbck1uxksT4dzN3PWBA==} + engines: {node: '>=12'} + + axobject-query@4.1.0: + resolution: {integrity: sha512-qIj0G9wZbMGNLjLmg1PT6v2mE9AH2zlnADJD/2tC6E00hgmhUOfEB6greHPAfLRSufHqROIUTkw6E+M3lH0PTQ==} + engines: {node: '>= 0.4'} + + chai@6.3.0: + resolution: {integrity: sha512-XWAtwJ6OHO+tj0EKCs0Y2UamnyOxseZWltU4x2U2wh8g4AigdjwvtUjvLP2tqkA/avxHEtzxNaqGq/YGNwckKg==} + engines: {node: '>=18'} + + chokidar@4.0.3: + resolution: {integrity: sha512-Qgzu8kfBvo+cA4962jnP1KkS6Dop5NS6g7R5LFYJr4b8Ub94PPQXUksCw9PvXoeXPRRddRNC5C1JQUR2SMGtnA==} + engines: {node: '>= 14.16.0'} + + clsx@2.1.1: + resolution: {integrity: sha512-eYm0QWBtUrBWZWG0d386OGAw16Z995PiOVo2B7bjWSbHedGl5e0ZWaq65kOGgUSNesEIDkB9ISbTg/JK9dhCZA==} + engines: {node: '>=6'} + + deepmerge@4.3.1: + resolution: {integrity: sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A==} + engines: {node: '>=0.10.0'} + + detect-libc@2.1.2: + resolution: {integrity: sha512-Btj2BOOO83o3WyH59e8MgXsxEQVcarkUOpEYrubB0urwnN10yQ364rsiByU11nZlqWYZm05i/of7io4mzihBtQ==} + engines: {node: '>=8'} + + devalue@5.9.4: + resolution: {integrity: sha512-sPAT4pztbu6586/hrhOnMKS17IJrvg12mXiSPSS3W5qDeN2RGgvZ0diZCm31dBbnevfVmujNO3IM2wrS4Y2Rhg==} + + es-module-lexer@2.3.2: + resolution: {integrity: sha512-poHGpORABojJJucnV9KbOavETW8lBVnphkW77ER5/BQ5Fz7oXSoCNek7IH3vR5nRjdsEz926ibFYX8KtLQmdyw==} + + esm-env@1.2.2: + resolution: {integrity: sha512-Epxrv+Nr/CaL4ZcFGPJIYLWFom+YeV1DqMLHJoEd9SYRxNbaFruBwfEX/kkHUJf55j2+TUbmDcmuilbP1TmXHA==} + + esrap@2.4.0: + resolution: {integrity: sha512-CQPcneEHw/czj32uwQC52nYnax8H4SXt25FCM+LIwGZ49cMIxpOj3bP8wmzcI+Z0HIy5KkClaPhRLfCySzwHPA==} + peerDependencies: + '@typescript-eslint/types': ^8.2.0 + peerDependenciesMeta: + '@typescript-eslint/types': + optional: true + + estree-walker@3.0.3: + resolution: {integrity: sha512-7RUKfXgSMMkzt6ZuXmqapOurLGPPfgj6l9uRZ7lRGolvk0y2yocc35LdcxKC5PQZdn2DMqioAQ2NoWcrTKmm6g==} + + expect-type@1.4.0: + resolution: {integrity: sha512-KfYbmpRm0VbLjEvVa9yGwCi9GI34xvi7A/HXYWQO65CSD2u3MczUJSuwXKFIxlGsgBQizV9q5J9NHj4VG0n+pA==} + engines: {node: '>=12.0.0'} + + fdir@6.5.0: + resolution: {integrity: sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg==} + engines: {node: '>=12.0.0'} + peerDependencies: + picomatch: ^3 || ^4 + peerDependenciesMeta: + picomatch: + optional: true + + fflate@0.8.3: + resolution: {integrity: sha512-tbZNuJrLwGUp3zshBtdy4W+ORxZuIh8a5ilyIEQDC5rY1f3U20JMry0Ll3WBzU58EZKsEuJFXhb5gwv8CsPvgA==} + + fsevents@2.3.3: + resolution: {integrity: sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==} + engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0} + os: [darwin] + + is-reference@3.0.3: + resolution: {integrity: sha512-ixkJoqQvAP88E6wLydLGGqCJsrFUnqoH6HnaczB8XmDH1oaWU+xxdptvikTgaEhtZ53Ky6YXiBuUI2WXLMCwjw==} + + lightningcss-android-arm64@1.33.0: + resolution: {integrity: sha512-gEpRTalKdosp4Bb8qWtc2iOgE5SeIHlpS1up9bFq2wAyYhl1UdTObYiHe98zEM9SQvSoqQZ1IQD0JNpg3Ml5pg==} + engines: {node: '>= 12.0.0'} + cpu: [arm64] + os: [android] + + lightningcss-darwin-arm64@1.33.0: + resolution: {integrity: sha512-Sciaz8eenNTKn9b3t7+xr0ipTp9YxKQY4npwQ3mrRuL0BAVHBLyZxofhaKBAVtzmtRZ/zTyo0/to4B1uWG/Djg==} + engines: {node: '>= 12.0.0'} + cpu: [arm64] + os: [darwin] + + lightningcss-darwin-x64@1.33.0: + resolution: {integrity: sha512-Z5UPAxzrjlWNNyGy6i65cJzzvgJ5D3T6wMvs+gWpY9d7qRhANrxqAp6LhxIgZhWEw18RfJTGcRxjuLIBr+m8XQ==} + engines: {node: '>= 12.0.0'} + cpu: [x64] + os: [darwin] + + lightningcss-freebsd-x64@1.33.0: + resolution: {integrity: sha512-QQM/Ti/hQajJwCY+RiWuCZ9sdtI/XQk7nDK5vC8kkdwixezOlDgvDx7+RT+QjK6FcFT4MpsuoBnHIo/O3StRRg==} + engines: {node: '>= 12.0.0'} + cpu: [x64] + os: [freebsd] + + lightningcss-linux-arm-gnueabihf@1.33.0: + resolution: {integrity: sha512-N7FVBe6iS24MlM6R/4RBTxGhQheZGs7tiQ9U32UtF75NzP5Q7xWPRqLBCKxlRQRk3rY1jCIPLzx7WzOhuUIRLQ==} + engines: {node: '>= 12.0.0'} + cpu: [arm] + os: [linux] + + lightningcss-linux-arm64-gnu@1.33.0: + resolution: {integrity: sha512-j2v/itmy4HlNxlc6voKXYgBqNi0Ng2LShg4z7GufpEgs05P+2suBVyi9I6YHq5uoVFx9ETin3eCEhLVyXGQnKg==} + engines: {node: '>= 12.0.0'} + cpu: [arm64] + os: [linux] + libc: [glibc] + + lightningcss-linux-arm64-musl@1.33.0: + resolution: {integrity: sha512-yiO5ROMuYQgXbC60yjZU5CYSFZGKXL0HFATXt9mHJn1+zW55oCtMI9NfcVhYLMFDL7gV7oBPon/EmMMGg2OvtQ==} + engines: {node: '>= 12.0.0'} + cpu: [arm64] + os: [linux] + libc: [musl] + + lightningcss-linux-x64-gnu@1.33.0: + resolution: {integrity: sha512-ar+Ju7LmcN0Jo4FpL4hpFybwNG9/3A/Br5KW2n2jyODg3MEZXaDYADdemoNS+BDNfMgKvylJLj4S5tyRActuAg==} + engines: {node: '>= 12.0.0'} + cpu: [x64] + os: [linux] + libc: [glibc] + + lightningcss-linux-x64-musl@1.33.0: + resolution: {integrity: sha512-RYiYbkokw0trfKqqzfF55lginwEPrD3OJDfTuJzFs1MK6iFnDenaz1fqLLtX4ITG3OktJQXOeTaw1awrBAlZPw==} + engines: {node: '>= 12.0.0'} + cpu: [x64] + os: [linux] + libc: [musl] + + lightningcss-win32-arm64-msvc@1.33.0: + resolution: {integrity: sha512-1K+MPfLSFVpphzpdbfkhlWk6wBrTObBzS2T6db10PNOZgR9GoVsAWzwNyuhUYYbTp23j+4RrncfujZ4uAzXvwA==} + engines: {node: '>= 12.0.0'} + cpu: [arm64] + os: [win32] + + lightningcss-win32-x64-msvc@1.33.0: + resolution: {integrity: sha512-OlEICDx/Xl0FqSp4bry8zFnCvGpig3Gl4gCquvYwHuqJKEC1+n9NgDniFvqHGmMv1ZkqDJrDqKKSykTDX+ehuA==} + engines: {node: '>= 12.0.0'} + cpu: [x64] + os: [win32] + + lightningcss@1.33.0: + resolution: {integrity: sha512-WkUDrojuJs0xkgGf2udWxa3yGBRxPtxUkB79i6aCZLRgc7PM8fZe9TosfPDcvEpQZbuFASnHYmRLBLUbmLOIIA==} + engines: {node: '>= 12.0.0'} + + locate-character@3.0.0: + resolution: {integrity: sha512-SW13ws7BjaeJ6p7Q6CO2nchbYEc3X3J6WrmTTDto7yMPqVSZTUyY5Tjbid+Ab8gLnATtygYtiDIJGQRRn2ZOiA==} + + magic-string@0.30.21: + resolution: {integrity: sha512-vd2F4YUyEXKGcLHoq+TEyCjxueSeHnFxyyjNp80yg0XV4vUhnDer/lvvlqM/arB5bXQN5K2/3oinyCRyx8T2CQ==} + + magic-string@1.4.3: + resolution: {integrity: sha512-z12OxmaPGE0F4xlpGdjuAUckipLpQlTAuAmyGhNoD7ODpYUzvDfvtxUbjM/jwznyP178oju/KDdyi220wNJ0RQ==} + + meshoptimizer@1.1.1: + resolution: {integrity: sha512-oRFNWJRDA/WTrVj7NWvqa5HqE1t9MYDj2VaWirQCzCCrAd2GHrqR/sQezCxiWATPNlKTcRaPRHPJwIRoPBAp5g==} + + mri@1.2.0: + resolution: {integrity: sha512-tzzskb3bG8LvYGFF/mDTpq3jpI6Q9wc3LEmBaghu+DdCssd1FakN7Bc0hVNmEyGq1bq3RgfkCb3cmQLpNPOroA==} + engines: {node: '>=4'} + + nanoid@3.3.20: + resolution: {integrity: sha512-uKdg2G3GNCKQn9byYOpxbGqrT2fGO5KRt5J/8b3pok8rT6qxGWF6hxMyJiEYtAf+FVyYuD9hRaDqX5uPFYJ4ZQ==} + engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1} + hasBin: true + + obug@2.2.1: + resolution: {integrity: sha512-XrsrhT5sybtKI6wakr2SPOlGZWWYbUXZ7a0jT8/QOeAPau+1X/bSegNe5YR75oJmEZQbKningirmGOEJCIk61Q==} + engines: {node: '>=12.20.0'} + + obug@3.0.0: + resolution: {integrity: sha512-5vvB5+W7ePv+p3uqxi+RcW1XAzLW0/hxt3/4X4Lc4qHudzOhmBiBwOY6DRob4WnanAEGvNcLjF+KNOufrUoEQw==} + engines: {node: '>=12.20.0'} + + picocolors@1.1.1: + resolution: {integrity: sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==} + + picomatch@4.0.7: + resolution: {integrity: sha512-qcJu88Q2IWqJsDD529JKMdwGm/dvInW4HvQnRwiH9JtihJvzGOscDtHE3x1pBKeUOTysQ8kVmLnJ2kJu7yhcGA==} + engines: {node: '>=12'} + + postcss@8.5.31: + resolution: {integrity: sha512-YUbWYCgErwnMAVkjUnYa+KlMBzGpHwiIt/DE7f0G33AuX2LH9UcTk6KgWxd3zRU+pN3u/C+Xl3EnMLM4Hea7Sg==} + engines: {node: ^10 || ^12 || >=14} + + readdirp@4.1.2: + resolution: {integrity: sha512-GDhwkLfywWL2s6vEjyhri+eXmfH6j1L7JE27WhqLeYzoh/A3DBaYGEj2H/HFZCn/kMfim73FXxEJTw06WtxQwg==} + engines: {node: '>= 14.18.0'} + + rolldown@1.2.15: + resolution: {integrity: sha512-6odND+fel5zVw3I4Yc2e69gvguDnX0CAAGiNDZSq4ik5WUcaLrkD2GLuog0XcODbor31hZ5ayEMgVDno+KPV5g==} + engines: {node: ^20.19.0 || >=22.12.0} + hasBin: true + + sade@1.8.1: + resolution: {integrity: sha512-xal3CZX1Xlo/k4ApwCFrHVACi9fBqJ7V+mwhBsuf/1IOKbBy098Fex+Wa/5QMubw09pSZ/u8EY8PWgevJsXp1A==} + engines: {node: '>=6'} + + source-map-js@1.2.2: + resolution: {integrity: sha512-KGj/8Y43x35aZVDtt+J4mK1hoLGHULMYfSkODJNQjNDC3oW1PqPoxMwo0pLUsWM/UEGzON/NxeHywEfNXNP3Vw==} + engines: {node: '>=0.10.0'} + + std-env@4.3.0: + resolution: {integrity: sha512-OtU/EgQ1kIm5KwqQpBC6ZEMXrZRui11w8zgfTWp8cdO9B8OaPsbA8bTHO2P+HNo1VlUTGMVBwPhydu6poeXiag==} + + svelte-check@4.7.7: + resolution: {integrity: sha512-Ge2IMdeTpbJuzNFGRiiMg0RWgbScysKQu7xwcyFJ22+DU9F5nPX51+Q3gHmGqRxYQMx2knreVWt5oCtfe0vf2g==} + engines: {node: '>= 18.0.0'} + hasBin: true + peerDependencies: + svelte: ^4.0.0 || ^5.0.0-next.0 + typescript: ^5.0.0 || ^6.0.0 + + svelte@5.57.2: + resolution: {integrity: sha512-1YiPCAXT0Ct6g1vOMmSLa0Nsc3QRMvtDF32ihgglGVrugIuIK38RyDiFNXVDhtQ81TJjSO57NdMw6DyYLqSGDQ==} + engines: {node: '>=18'} + + three@0.186.1: + resolution: {integrity: sha512-blFeqb49wRCSGUGj7gtpfnSGHy2lwDk94RhUmS1c/hTby70kvChbWpkJ4Pm1390LqzzvTmzgXKHPEafJwCb8jA==} + + tinybench@6.2.2: + resolution: {integrity: sha512-nIZ2N2dFpjBsg2hgitKu7mA+FvsIJuGJOwysRngmVRRmWgR/UyPjwJj8c/fT/dhm8EkHnF5EOogRf+0Z2qrimA==} + engines: {node: '>=20.0.0'} + + tinyexec@1.3.1: + resolution: {integrity: sha512-GCvB3aoys96IuDFBMcTB46JOR6mdMtAToqwiW8JlWhsoh1mhHi/xn9ss/Dg7N555GiJyEt2qzoG/NHCwM6h1EA==} + engines: {node: '>=18'} + + tinyglobby@0.2.17: + resolution: {integrity: sha512-wXR/dYpcqKmfWpEdZjiKJOwCNFndD0DMnrW/cYjVGttEkBfVgcLFHoNrlj47mjOVic9yyNu65alsgF4NQyTa2g==} + engines: {node: '>=12.0.0'} + + typescript@6.0.3: + resolution: {integrity: sha512-y2TvuxSZPDyQakkFRPZHKFm+KKVqIisdg9/CZwm9ftvKXLP8NRWj38/ODjNbr43SsoXqNuAisEf1GdCxqWcdBw==} + engines: {node: '>=14.17'} + hasBin: true + + vite@8.3.5: + resolution: {integrity: sha512-z1YpjieJ9g0ebTmQpLBv/oq9E3F9EIlOe+7LahW8SrE3LTiG3udBRUXQOlYXP9b+IC2q2phHeVxj9xGlw34OEQ==} + engines: {node: ^20.19.0 || >=22.12.0} + hasBin: true + peerDependencies: + '@types/node': ^20.19.0 || >=22.12.0 + '@vitejs/devtools': ^0.7.1 || ^0.8.0 + esbuild: ^0.27.0 || ^0.28.0 + jiti: '>=1.21.0' + less: ^4.0.0 + sass: ^1.70.0 + sass-embedded: ^1.70.0 + stylus: '>=0.54.8' + sugarss: ^5.0.0 + terser: ^5.16.0 + tsx: ^4.8.1 + yaml: ^2.4.2 + peerDependenciesMeta: + '@types/node': + optional: true + '@vitejs/devtools': + optional: true + esbuild: + optional: true + jiti: + optional: true + less: + optional: true + sass: + optional: true + sass-embedded: + optional: true + stylus: + optional: true + sugarss: + optional: true + terser: + optional: true + tsx: + optional: true + yaml: + optional: true + + vitefu@1.1.3: + resolution: {integrity: sha512-ub4okH7Z5KLjb6hDyjqrGXqWtWvoYdU3IGm/NorpgHncKoLTCfRIbvlhBm7r0YstIaQRYlp4yEbFqDcKSzXSSg==} + peerDependencies: + vite: ^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0 + peerDependenciesMeta: + vite: + optional: true + + vitest@5.0.5: + resolution: {integrity: sha512-cPODOMF8YnkiiYtDdHo6n4wWmBrOBBbOIYH2d33M4l3CdNn72h+qMmO6uXffUN6A5AZFXNND/d+krS9mgkXRfg==} + engines: {node: ^22.12.0 || ^24.0.0 || >=26.0.0} + hasBin: true + peerDependencies: + '@edge-runtime/vm': '*' + '@opentelemetry/api': ^1.9.0 + '@types/node': ^22.0.0 || >=24.0.0 + '@vitest/browser-playwright': 5.0.5 + '@vitest/browser-preview': 5.0.5 + '@vitest/browser-webdriverio': ^5.0.0-beta.5 || >=5.0.0 + '@vitest/coverage-istanbul': 5.0.5 + '@vitest/coverage-v8': 5.0.5 + '@vitest/ui': 5.0.5 + happy-dom: '*' + jsdom: '*' + vite: ^6.4.0 || ^7.0.0 || ^8.0.0 + peerDependenciesMeta: + '@edge-runtime/vm': + optional: true + '@opentelemetry/api': + optional: true + '@types/node': + optional: true + '@vitest/browser-playwright': + optional: true + '@vitest/browser-preview': + optional: true + '@vitest/browser-webdriverio': + optional: true + '@vitest/coverage-istanbul': + optional: true + '@vitest/coverage-v8': + optional: true + '@vitest/ui': + optional: true + happy-dom: + optional: true + jsdom: + optional: true + + why-is-node-running@3.2.1: + resolution: {integrity: sha512-Tb2FUhB4vUsGQlfSquQLYkApkuPAFQXGFzxWKHHumVz2dK+X1RUm/HnID4+TfIGYJ1kTcwOaCk/buYCEJr6YjQ==} + engines: {node: '>=20.11'} + hasBin: true + + zimmerframe@1.1.5: + resolution: {integrity: sha512-msJxIvYDYcoNL+PJsu+7qmpDWsYmAxTY+2TNYXXF0hzBzBk0BMecOqDOG/EckUoKCuKwObfbugIl8QpqHDXeFA==} + +snapshots: + + '@dimforge/rapier3d-compat@0.12.0': {} + + '@jridgewell/gen-mapping@0.3.13': + dependencies: + '@jridgewell/sourcemap-codec': 1.6.0 + '@jridgewell/trace-mapping': 0.3.31 + + '@jridgewell/remapping@2.3.5': + dependencies: + '@jridgewell/gen-mapping': 0.3.13 + '@jridgewell/trace-mapping': 0.3.31 + + '@jridgewell/resolve-uri@3.1.2': {} + + '@jridgewell/sourcemap-codec@1.6.0': {} + + '@jridgewell/trace-mapping@0.3.31': + dependencies: + '@jridgewell/resolve-uri': 3.1.2 + '@jridgewell/sourcemap-codec': 1.6.0 + + '@oxc-project/types@0.155.0': {} + + '@rolldown/binding-android-arm-eabi@1.2.15': + optional: true + + '@rolldown/binding-android-arm64@1.2.15': + optional: true + + '@rolldown/binding-darwin-arm64@1.2.15': + optional: true + + '@rolldown/binding-darwin-x64@1.2.15': + optional: true + + '@rolldown/binding-freebsd-x64@1.2.15': + optional: true + + '@rolldown/binding-linux-arm-gnueabihf@1.2.15': + optional: true + + '@rolldown/binding-linux-arm64-gnu@1.2.15': + optional: true + + '@rolldown/binding-linux-arm64-musl@1.2.15': + optional: true + + '@rolldown/binding-linux-ppc64-gnu@1.2.15': + optional: true + + '@rolldown/binding-linux-s390x-gnu@1.2.15': + optional: true + + '@rolldown/binding-linux-x64-gnu@1.2.15': + optional: true + + '@rolldown/binding-linux-x64-musl@1.2.15': + optional: true + + '@rolldown/binding-openharmony-arm64@1.2.15': + optional: true + + '@rolldown/binding-win32-arm64-msvc@1.2.15': + optional: true + + '@rolldown/binding-win32-x64-msvc@1.2.15': + optional: true + + '@rolldown/pluginutils@1.0.1': {} + + '@sveltejs/acorn-typescript@1.0.13(acorn@8.19.0)': + dependencies: + acorn: 8.19.0 + + '@sveltejs/load-config@0.2.3': {} + + '@sveltejs/vite-plugin-svelte@7.3.1(svelte@5.57.2)(vite@8.3.5)': + dependencies: + deepmerge: 4.3.1 + magic-string: 1.4.3 + obug: 2.2.1 + svelte: 5.57.2 + vite: 8.3.5 + vitefu: 1.1.3(vite@8.3.5) + + '@tsconfig/svelte@5.0.8': {} + + '@tweenjs/tween.js@23.1.3': {} + + '@types/chai@5.2.3': + dependencies: + '@types/deep-eql': 4.0.2 + assertion-error: 2.0.1 + + '@types/deep-eql@4.0.2': {} + + '@types/estree@1.0.9': {} + + '@types/stats.js@0.17.4': {} + + '@types/three@0.186.0': + dependencies: + '@dimforge/rapier3d-compat': 0.12.0 + '@tweenjs/tween.js': 23.1.3 + '@types/stats.js': 0.17.4 + '@types/webxr': 0.5.24 + fflate: 0.8.3 + meshoptimizer: 1.1.1 + + '@types/webxr@0.5.24': {} + + '@vitest/mocker@5.0.5(vite@8.3.5)': + dependencies: + '@jridgewell/trace-mapping': 0.3.31 + '@vitest/spy': 5.0.5 + estree-walker: 3.0.3 + magic-string: 1.4.3 + optionalDependencies: + vite: 8.3.5 + + '@vitest/spy@5.0.5': {} + + acorn@8.19.0: {} + + aria-query@5.3.1: {} + + assertion-error@2.0.1: {} + + axobject-query@4.1.0: {} + + chai@6.3.0: {} + + chokidar@4.0.3: + dependencies: + readdirp: 4.1.2 + + clsx@2.1.1: {} + + deepmerge@4.3.1: {} + + detect-libc@2.1.2: {} + + devalue@5.9.4: {} + + es-module-lexer@2.3.2: {} + + esm-env@1.2.2: {} + + esrap@2.4.0: + dependencies: + '@jridgewell/sourcemap-codec': 1.6.0 + + estree-walker@3.0.3: + dependencies: + '@types/estree': 1.0.9 + + expect-type@1.4.0: {} + + fdir@6.5.0(picomatch@4.0.7): + optionalDependencies: + picomatch: 4.0.7 + + fflate@0.8.3: {} + + fsevents@2.3.3: + optional: true + + is-reference@3.0.3: + dependencies: + '@types/estree': 1.0.9 + + lightningcss-android-arm64@1.33.0: + optional: true + + lightningcss-darwin-arm64@1.33.0: + optional: true + + lightningcss-darwin-x64@1.33.0: + optional: true + + lightningcss-freebsd-x64@1.33.0: + optional: true + + lightningcss-linux-arm-gnueabihf@1.33.0: + optional: true + + lightningcss-linux-arm64-gnu@1.33.0: + optional: true + + lightningcss-linux-arm64-musl@1.33.0: + optional: true + + lightningcss-linux-x64-gnu@1.33.0: + optional: true + + lightningcss-linux-x64-musl@1.33.0: + optional: true + + lightningcss-win32-arm64-msvc@1.33.0: + optional: true + + lightningcss-win32-x64-msvc@1.33.0: + optional: true + + lightningcss@1.33.0: + dependencies: + detect-libc: 2.1.2 + optionalDependencies: + lightningcss-android-arm64: 1.33.0 + lightningcss-darwin-arm64: 1.33.0 + lightningcss-darwin-x64: 1.33.0 + lightningcss-freebsd-x64: 1.33.0 + lightningcss-linux-arm-gnueabihf: 1.33.0 + lightningcss-linux-arm64-gnu: 1.33.0 + lightningcss-linux-arm64-musl: 1.33.0 + lightningcss-linux-x64-gnu: 1.33.0 + lightningcss-linux-x64-musl: 1.33.0 + lightningcss-win32-arm64-msvc: 1.33.0 + lightningcss-win32-x64-msvc: 1.33.0 + + locate-character@3.0.0: {} + + magic-string@0.30.21: + dependencies: + '@jridgewell/sourcemap-codec': 1.6.0 + + magic-string@1.4.3: + dependencies: + '@jridgewell/sourcemap-codec': 1.6.0 + + meshoptimizer@1.1.1: {} + + mri@1.2.0: {} + + nanoid@3.3.20: {} + + obug@2.2.1: {} + + obug@3.0.0: {} + + picocolors@1.1.1: {} + + picomatch@4.0.7: {} + + postcss@8.5.31: + dependencies: + nanoid: 3.3.20 + picocolors: 1.1.1 + source-map-js: 1.2.2 + + readdirp@4.1.2: {} + + rolldown@1.2.15: + dependencies: + '@oxc-project/types': 0.155.0 + '@rolldown/pluginutils': 1.0.1 + optionalDependencies: + '@rolldown/binding-android-arm-eabi': 1.2.15 + '@rolldown/binding-android-arm64': 1.2.15 + '@rolldown/binding-darwin-arm64': 1.2.15 + '@rolldown/binding-darwin-x64': 1.2.15 + '@rolldown/binding-freebsd-x64': 1.2.15 + '@rolldown/binding-linux-arm-gnueabihf': 1.2.15 + '@rolldown/binding-linux-arm64-gnu': 1.2.15 + '@rolldown/binding-linux-arm64-musl': 1.2.15 + '@rolldown/binding-linux-ppc64-gnu': 1.2.15 + '@rolldown/binding-linux-s390x-gnu': 1.2.15 + '@rolldown/binding-linux-x64-gnu': 1.2.15 + '@rolldown/binding-linux-x64-musl': 1.2.15 + '@rolldown/binding-openharmony-arm64': 1.2.15 + '@rolldown/binding-win32-arm64-msvc': 1.2.15 + '@rolldown/binding-win32-x64-msvc': 1.2.15 + + sade@1.8.1: + dependencies: + mri: 1.2.0 + + source-map-js@1.2.2: {} + + std-env@4.3.0: {} + + svelte-check@4.7.7(picomatch@4.0.7)(svelte@5.57.2)(typescript@6.0.3): + dependencies: + '@jridgewell/trace-mapping': 0.3.31 + '@sveltejs/load-config': 0.2.3 + chokidar: 4.0.3 + fdir: 6.5.0(picomatch@4.0.7) + picocolors: 1.1.1 + sade: 1.8.1 + svelte: 5.57.2 + typescript: 6.0.3 + transitivePeerDependencies: + - picomatch + + svelte@5.57.2: + dependencies: + '@jridgewell/remapping': 2.3.5 + '@jridgewell/sourcemap-codec': 1.6.0 + '@sveltejs/acorn-typescript': 1.0.13(acorn@8.19.0) + '@types/estree': 1.0.9 + acorn: 8.19.0 + aria-query: 5.3.1 + axobject-query: 4.1.0 + clsx: 2.1.1 + devalue: 5.9.4 + esm-env: 1.2.2 + esrap: 2.4.0 + is-reference: 3.0.3 + locate-character: 3.0.0 + magic-string: 0.30.21 + zimmerframe: 1.1.5 + transitivePeerDependencies: + - '@typescript-eslint/types' + + three@0.186.1: {} + + tinybench@6.2.2: {} + + tinyexec@1.3.1: {} + + tinyglobby@0.2.17: + dependencies: + fdir: 6.5.0(picomatch@4.0.7) + picomatch: 4.0.7 + + typescript@6.0.3: {} + + vite@8.3.5: + dependencies: + lightningcss: 1.33.0 + picomatch: 4.0.7 + postcss: 8.5.31 + rolldown: 1.2.15 + tinyglobby: 0.2.17 + optionalDependencies: + fsevents: 2.3.3 + + vitefu@1.1.3(vite@8.3.5): + optionalDependencies: + vite: 8.3.5 + + vitest@5.0.5(vite@8.3.5): + dependencies: + '@types/chai': 5.2.3 + '@vitest/mocker': 5.0.5(vite@8.3.5) + chai: 6.3.0 + es-module-lexer: 2.3.2 + expect-type: 1.4.0 + magic-string: 1.4.3 + obug: 3.0.0 + picomatch: 4.0.7 + std-env: 4.3.0 + tinybench: 6.2.2 + tinyexec: 1.3.1 + tinyglobby: 0.2.17 + vite: 8.3.5 + why-is-node-running: 3.2.1 + transitivePeerDependencies: + - msw + + why-is-node-running@3.2.1: {} + + zimmerframe@1.1.5: {} diff --git a/site/public/media/bento.jpg b/site/public/media/bento.jpg new file mode 100644 index 0000000..dfe6631 Binary files /dev/null and b/site/public/media/bento.jpg differ diff --git a/site/public/media/classic.jpg b/site/public/media/classic.jpg new file mode 100644 index 0000000..13695b1 Binary files /dev/null and b/site/public/media/classic.jpg differ diff --git a/site/public/media/demo.mp4 b/site/public/media/demo.mp4 new file mode 100644 index 0000000..cfd2a09 Binary files /dev/null and b/site/public/media/demo.mp4 differ diff --git a/site/public/media/editorial.jpg b/site/public/media/editorial.jpg new file mode 100644 index 0000000..1bb4ceb Binary files /dev/null and b/site/public/media/editorial.jpg differ diff --git a/site/public/media/glow-bento.jpg b/site/public/media/glow-bento.jpg new file mode 100644 index 0000000..27ebc90 Binary files /dev/null and b/site/public/media/glow-bento.jpg differ diff --git a/site/public/media/glow-classic.jpg b/site/public/media/glow-classic.jpg new file mode 100644 index 0000000..f9617ab Binary files /dev/null and b/site/public/media/glow-classic.jpg differ diff --git a/site/public/media/glow-editorial.jpg b/site/public/media/glow-editorial.jpg new file mode 100644 index 0000000..c64bb59 Binary files /dev/null and b/site/public/media/glow-editorial.jpg differ diff --git a/site/public/media/glow-rail.jpg b/site/public/media/glow-rail.jpg new file mode 100644 index 0000000..f339e36 Binary files /dev/null and b/site/public/media/glow-rail.jpg differ diff --git a/site/public/media/glow-ribbon.jpg b/site/public/media/glow-ribbon.jpg new file mode 100644 index 0000000..b002c72 Binary files /dev/null and b/site/public/media/glow-ribbon.jpg differ diff --git a/site/public/media/glow-spotlight.jpg b/site/public/media/glow-spotlight.jpg new file mode 100644 index 0000000..8bb8041 Binary files /dev/null and b/site/public/media/glow-spotlight.jpg differ diff --git a/site/public/media/glow-stock.jpg b/site/public/media/glow-stock.jpg new file mode 100644 index 0000000..529066d Binary files /dev/null and b/site/public/media/glow-stock.jpg differ diff --git a/site/public/media/glow-v1.jpg b/site/public/media/glow-v1.jpg new file mode 100644 index 0000000..cc1264c Binary files /dev/null and b/site/public/media/glow-v1.jpg differ diff --git a/site/public/media/glow-v2.jpg b/site/public/media/glow-v2.jpg new file mode 100644 index 0000000..396423c Binary files /dev/null and b/site/public/media/glow-v2.jpg differ diff --git a/site/public/media/og.jpg b/site/public/media/og.jpg new file mode 100644 index 0000000..1a22386 Binary files /dev/null and b/site/public/media/og.jpg differ diff --git a/site/public/media/picker.jpg b/site/public/media/picker.jpg new file mode 100644 index 0000000..389850e Binary files /dev/null and b/site/public/media/picker.jpg differ diff --git a/site/public/media/rail.jpg b/site/public/media/rail.jpg new file mode 100644 index 0000000..ae604c6 Binary files /dev/null and b/site/public/media/rail.jpg differ diff --git a/site/public/media/ribbon.jpg b/site/public/media/ribbon.jpg new file mode 100644 index 0000000..b083cc8 Binary files /dev/null and b/site/public/media/ribbon.jpg differ diff --git a/site/public/media/spotlight.jpg b/site/public/media/spotlight.jpg new file mode 100644 index 0000000..32d7ba4 Binary files /dev/null and b/site/public/media/spotlight.jpg differ diff --git a/site/public/media/stock.jpg b/site/public/media/stock.jpg new file mode 100644 index 0000000..b0fc733 Binary files /dev/null and b/site/public/media/stock.jpg differ diff --git a/site/public/media/v1.jpg b/site/public/media/v1.jpg new file mode 100644 index 0000000..b288e24 Binary files /dev/null and b/site/public/media/v1.jpg differ diff --git a/site/public/media/v2.jpg b/site/public/media/v2.jpg new file mode 100644 index 0000000..83c54a9 Binary files /dev/null and b/site/public/media/v2.jpg differ diff --git a/site/src/App.svelte b/site/src/App.svelte new file mode 100644 index 0000000..520b200 --- /dev/null +++ b/site/src/App.svelte @@ -0,0 +1,80 @@ + + + +
+ + + BoxClean + + +
+
+ + + + + + +
+
+ + diff --git a/site/src/app.css b/site/src/app.css new file mode 100644 index 0000000..965df1c --- /dev/null +++ b/site/src/app.css @@ -0,0 +1,79 @@ +:root { + --room: #0B1020; + --surface: #141A2E; + --line: #262E48; + --text: #E8EBF4; + --soft: #C9CEDD; + --muted: #8C94AE; + --sans: "Bricolage Grotesque", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif; + --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace; + --gutter: clamp(16px, 5vw, 72px); + color-scheme: dark; +} +* { box-sizing: border-box; } +html { scroll-behavior: smooth; overflow-x: clip; } +body { + margin: 0; + background: var(--room); + color: var(--text); + font: 400 1.0625rem/1.6 var(--sans); + font-optical-sizing: auto; + -webkit-font-smoothing: antialiased; + overflow-x: clip; +} +img, video { display: block; max-width: 100%; height: auto; } +a { color: inherit; text-decoration-color: color-mix(in srgb, currentColor 40%, transparent); text-underline-offset: .2em; } +a:hover { text-decoration-color: currentColor; } +:focus-visible { outline: 2px solid #fff; outline-offset: 3px; border-radius: 4px; } +code { font-family: var(--mono); font-size: .86em; } + +main { position: relative; z-index: 1; } +.wrap { max-width: 1320px; margin: 0 auto; padding-inline: var(--gutter); } + +/* text sits on the side of the room the TV is not on */ +.panel { width: min(100%, 31rem); } +.panel.right { margin-left: auto; } +.panel.wide { width: min(100%, 36rem); } + +h1, h2 { font-weight: 600; margin: 0 0 18px; text-wrap: balance; } +h1 { + font-size: clamp(2.8rem, 5.6vw, 5.2rem); + line-height: .96; + letter-spacing: -.024em; + font-variation-settings: "opsz" 96; +} +h2 { + font-size: clamp(2rem, 3.8vw, 3.2rem); + line-height: 1.02; + letter-spacing: -.026em; + font-variation-settings: "opsz" 72; +} +h3 { font-size: 1.3rem; line-height: 1.2; letter-spacing: -.015em; font-weight: 600; margin: 0 0 10px; } +p { margin: 0 0 16px; } +.soft { color: var(--soft); } +.muted { color: var(--muted); } +.small { font-size: .9rem; color: var(--muted); } + +.btn { + display: inline-flex; align-items: center; gap: 10px; + padding: 13px 22px; + border-radius: 999px; + font-weight: 550; font-size: 1rem; + text-decoration: none; + border: 1px solid var(--line); + background: rgb(11 16 32 / .5); + backdrop-filter: blur(8px); + transition: background .2s, border-color .2s; +} +.btn:hover { border-color: #4A5480; } +.btn.primary { background: var(--text); color: var(--room); border-color: var(--text); } +.btn.primary:hover { background: #fff; } +.btn svg { width: 18px; height: 18px; flex: none; } +.actions { display: flex; flex-wrap: wrap; gap: 12px; } + +@media (max-width: 860px) { + .panel, .panel.wide { width: 100%; } +} +@media (prefers-reduced-motion: reduce) { + html { scroll-behavior: auto; } +} diff --git a/site/src/lib/Stage.svelte b/site/src/lib/Stage.svelte new file mode 100644 index 0000000..adf868f --- /dev/null +++ b/site/src/lib/Stage.svelte @@ -0,0 +1,131 @@ + + + +{#if fallback} + +{/if} + + diff --git a/site/src/lib/data.test.ts b/site/src/lib/data.test.ts new file mode 100644 index 0000000..a3ed898 --- /dev/null +++ b/site/src/lib/data.test.ts @@ -0,0 +1,14 @@ +import { describe, expect, it } from "vitest"; +import { parseList, TELEMETRY_PACKAGES } from "./data"; + +describe("parseList", () => { + it("drops comments, inline comments and blank lines", () => { + expect(parseList("# head\n\ncom.a # why\n com.b\n#com.c\n")).toEqual(["com.a", "com.b"]); + }); + + it("reads the real telemetry list", () => { + expect(TELEMETRY_PACKAGES).toHaveLength(10); + expect(TELEMETRY_PACKAGES).toContain("com.miui.tv.analytics"); + expect(TELEMETRY_PACKAGES.every((p) => !p.includes(" ") && !p.includes("#"))).toBe(true); + }); +}); diff --git a/site/src/lib/data.ts b/site/src/lib/data.ts new file mode 100644 index 0000000..8bd4d91 --- /dev/null +++ b/site/src/lib/data.ts @@ -0,0 +1,99 @@ +import telemetryList from "../../../lists/1-telemetry-ads.txt?raw"; + +export const REPO = "https://github.com/VachaganGrigoryan/BoxClean"; +export const RELEASES = `${REPO}/releases/latest`; +export const CLEANYOURTV = "https://github.com/Gathin23/cleanyourtv"; + +/** Package names from a lists/*.txt file: one per line, `#` starts a comment. */ +export function parseList(text: string): string[] { + return text + .split("\n") + .map((line) => line.replace(/#.*/, "").trim()) + .filter(Boolean); +} + +export const TELEMETRY_LIST = "lists/1-telemetry-ads.txt"; +export const TELEMETRY_PACKAGES = parseList(telemetryList); + +export type ShotKey = "stock" | "v1" | "v2" | LayoutId; +export type LayoutId = "bento" | "ribbon" | "spotlight" | "editorial" | "rail" | "classic"; + +export const CHAPTERS: { shot: ShotKey; title: string; caption: string; body: string }[] = [ + { + shot: "stock", + title: "Google TV, as it ships", + caption: "Google TV home", + body: 'The stock home opens on Google TV\'s own tabs and a "Discover more apps" banner. Behind it run dozens of services you never asked for: telemetry, promos and apps that install themselves.', + }, + { + shot: "v1", + title: "A home that stays offline", + caption: "BoxClean Home, first version", + body: "With the clutter switched off, the box needs a home screen that doesn't phone home. The first BoxClean Home was a plain grid: a clock, your apps and Settings. It has no network permission at all.", + }, + { + shot: "v2", + title: "One polished look", + caption: "BoxClean Home, one look", + body: "Next came the Outfit type, a colour glow sampled from the focused app, and a glass highlight that glides between tiles. This look, adapted from CleanYourTV, lives on as the Classic layout.", + }, + { + shot: "bento", + title: "Six layouts, picked from the remote", + caption: "BoxClean Home, Bento layout", + body: "Today the launcher builds its home from the layout you choose: Bento, Ribbon, Spotlight, Editorial, Side rail or Classic. Press Layout, pick one, and it stays picked after a reboot.", + }, +]; + +export const LAYOUTS: { id: LayoutId; name: string; desc: string }[] = [ + { id: "bento", name: "Bento", desc: "The default. A board of rounded cells with a clock, four big apps and Wi-Fi, Settings and Layout; every other app is in a grid below." }, + { id: "ribbon", name: "Ribbon", desc: "LG webOS style. The focused app's banner, blurred, fills the screen above one ribbon of cards." }, + { id: "spotlight", name: "Spotlight", desc: "One app at a time, big. Left and right flip through the apps, Down opens a strip of all of them." }, + { id: "editorial", name: "Editorial", desc: "A magazine contents page, with numbered app names and the focused one's banner framed beside them." }, + { id: "rail", name: "Side rail", desc: "Round app icons down the left edge next to a big clock." }, + { id: "classic", name: "Classic", desc: "Apple TV style, with a large app name over a dock, a gliding glass highlight and a grid." }, +]; + +export const STEPS: { title: string; body: string; cmd?: string }[] = [ + { + title: "Turn on ADB on the box", + body: 'Settings → System → About, press OK on Build seven times. Then Developer options → USB debugging on. Note the IP address under Settings → Network and accept "Allow debugging?" on the TV.', + }, + { + title: "Look first, and back up", + body: "Neither command changes anything.", + cmd: "TV_HOST= uv run tools/boxclean.py probe\nTV_HOST= uv run tools/boxclean.py backup", + }, + { + title: "Debloat in batches", + body: "Dry-run each list, then apply it. Repeat with lists/2-personal.txt after editing it to suit you.", + cmd: "TV_HOST= uv run tools/boxclean.py disable lists/1-telemetry-ads.txt --dry-run\nTV_HOST= uv run tools/boxclean.py disable lists/1-telemetry-ads.txt", + }, + { + title: "Install BoxClean Home", + body: "Build and install it, then switch off the stock launcher. Or install the APK from Releases instead of building.", + cmd: "TV_HOST= launcher/build-install.sh\nTV_HOST= uv run tools/boxclean.py disable lists/3-launcher.txt", + }, + { + title: "Pick a layout", + body: "Press Layout on the home screen and choose one. For the clock screensaver:", + cmd: "adb shell settings put secure screensaver_components com.boxclean.home/.ClockDream", + }, + { + title: "Close ADB again", + body: "Turn USB debugging off, revoke the authorisations and reboot. Then check that the port is shut; it must say \"refused\".", + cmd: "TV_HOST= uv run tools/boxclean.py closed", + }, +]; + +/** The first version's history, oldest first, as `git log --format='%h %s'` printed it. */ +export const COMMITS = [ + "010c4aa feat: BoxClean debloat tool and offline launcher for Mi Box S 2nd gen", + "5565470 feat(launcher): Apple TV style home, remote keys, clock screensaver", + "0515948 feat(launcher): bento home layout with Layout switch", + "07e1d52 refactor(launcher): layouts behind HomeLayout, picker panel for Layout", + "5675654 feat(launcher): LG webOS style Ribbon layout", + "fbbd857 feat(launcher): Spotlight, Editorial and Side rail layouts", + "a7a971c docs: README with screenshots, demo GIF and install guide", + "7fd8abf chore: Apache-2.0 license, CI, issue templates", +]; diff --git a/site/src/lib/scene/Scene.ts b/site/src/lib/scene/Scene.ts new file mode 100644 index 0000000..892832b --- /dev/null +++ b/site/src/lib/scene/Scene.ts @@ -0,0 +1,428 @@ +import { + AdditiveBlending, + BufferAttribute, + BufferGeometry, + CanvasTexture, + Color, + Fog, + Mesh, + MeshStandardMaterial, + NeutralToneMapping, + PerspectiveCamera, + PlaneGeometry, + Points, + RectAreaLight, + Scene as ThreeScene, + ShaderMaterial, + SRGBColorSpace, + type Texture, + TextureLoader, + Vector2, + Vector3, + VideoTexture, + WebGLRenderer, + HemisphereLight, + MeshBasicMaterial, +} from "three"; +import { RoundedBoxGeometry } from "three/addons/geometries/RoundedBoxGeometry.js"; +import { RectAreaLightUniformsLib } from "three/addons/lights/RectAreaLightUniformsLib.js"; +import { EffectComposer } from "three/addons/postprocessing/EffectComposer.js"; +import { OutputPass } from "three/addons/postprocessing/OutputPass.js"; +import { RenderPass } from "three/addons/postprocessing/RenderPass.js"; +import { UnrealBloomPass } from "three/addons/postprocessing/UnrealBloomPass.js"; +import type { Frame, Pose, Screen } from "../timeline"; +import { ClockDream, DisableRun, GitLog, InstallStep } from "./canvases"; +import { dustFrag, dustVert, glowFrag, screenFrag, screenVert } from "./shaders"; + +const TV_W = 3.2; +const TV_H = 1.8; +const FLOOR_Y = -1.5; +const ROOM = new Color("#0B1020"); +const SHOTS = ["stock", "v1", "v2", "bento", "ribbon", "spotlight", "editorial", "rail", "classic"]; +const WIPE_MS = 750; + +export interface SceneOptions { + mobile: boolean; + reduced: boolean; + media: string; +} + +type ScreenKeys = { a: string; b: string; mix: number }; + +/** The one TV the whole page is told on: a floating panel, its light on the room, a Mi Box on the floor. */ +export class Scene { + private renderer: WebGLRenderer; + private scene = new ThreeScene(); + private camera = new PerspectiveCamera(30, 1, 0.1, 80); + private composer?: EffectComposer; + private screenMat: ShaderMaterial; + private glowMat: ShaderMaterial; + private dust?: Points; + private floorLight: RectAreaLight; + private led: MeshBasicMaterial; + private boxMats: (MeshStandardMaterial | MeshBasicMaterial)[] = []; + private boxFade = 1; + + private textures = new Map(); + private glows = new Map(); + private colours = new Map(); + private video: HTMLVideoElement; + private disable = new DisableRun(); + private gitlog = new GitLog(); + private install = new InstallStep(); + private clock = new ClockDream(); + + private target?: Frame; + private pose?: Pose; + private shown: ScreenKeys = { a: "video", b: "video", mix: 0 }; + private anim?: { from: string; to: string; start: number }; + private pending?: Screen; + private pointer = new Vector2(); + private pointerSmooth = new Vector2(); + private raf = 0; + private last = performance.now(); + private size = new Vector2(); + private disposed = false; + + constructor( + private canvas: HTMLCanvasElement, + private opts: SceneOptions, + ) { + this.renderer = new WebGLRenderer({ canvas, antialias: true, powerPreference: "high-performance" }); + this.renderer.setPixelRatio(Math.min(devicePixelRatio, opts.mobile ? 1.5 : 1.75)); + this.renderer.toneMapping = NeutralToneMapping; + this.renderer.outputColorSpace = SRGBColorSpace; + this.scene.background = ROOM; + this.scene.fog = new Fog(ROOM, 9, 26); + RectAreaLightUniformsLib.init(); + + this.loadTextures(); + this.video = this.makeVideo(); + + const uniforms = () => ({ + mapA: { value: this.tex("video") }, + mapB: { value: this.tex("video") }, + wipe: { value: 0 }, + }); + this.screenMat = new ShaderMaterial({ + uniforms: { ...uniforms(), power: { value: 0.9 } }, + vertexShader: screenVert, + fragmentShader: screenFrag, + }); + this.glowMat = new ShaderMaterial({ + uniforms: { + ...uniforms(), + mapA: { value: this.glow("video") }, + mapB: { value: this.glow("video") }, + strength: { value: opts.mobile ? 0.7 : 0.85 }, + spread: { value: new Vector2(1.9, 1.9) }, + }, + vertexShader: screenVert, + fragmentShader: glowFrag, + blending: AdditiveBlending, + depthWrite: false, + transparent: true, + }); + + // the panel: a satin slab with the screen just proud of its face, and its light spilling behind + const slab = new Mesh( + new RoundedBoxGeometry(TV_W + 0.03, TV_H + 0.03, 0.05, 4, 0.018), + new MeshStandardMaterial({ color: "#10131D", roughness: 0.35, metalness: 0.7 }), + ); + slab.position.z = -0.03; + const screen = new Mesh(new PlaneGeometry(TV_W, TV_H), this.screenMat); + const glow = new Mesh(new PlaneGeometry(TV_W * 2.6, TV_H * 3), this.glowMat); + glow.position.z = -0.4; + this.scene.add(glow, slab, screen); + + // the room: a dark satin floor lit by the screen itself + const floor = new Mesh( + new PlaneGeometry(80, 80), + // emissive = the room colour, so the unlit floor melts into the background instead of showing a horizon + new MeshStandardMaterial({ color: "#0D1326", emissive: ROOM, roughness: 0.42, metalness: 0.15 }), + ); + floor.rotation.x = -Math.PI / 2; + floor.position.y = FLOOR_Y; + this.floorLight = new RectAreaLight("#ffffff", 7, TV_W, TV_H); + this.floorLight.position.set(0, 0, 0.02); + this.floorLight.lookAt(0, 0, 5); + this.scene.add(floor, this.floorLight, new HemisphereLight("#8090c0", "#000000", 0.25)); + + // the Mi Box S: a small rounded puck in front of the panel, with its white LED + const boxMat = new MeshStandardMaterial({ color: "#0A0A0C", roughness: 0.55, metalness: 0.2, transparent: true }); + const box = new Mesh(new RoundedBoxGeometry(0.34, 0.06, 0.34, 4, 0.028), boxMat); + box.position.set(-0.7, FLOOR_Y + 0.03, 1.1); + box.rotation.y = 0.35; + this.led = new MeshBasicMaterial({ color: "#ffffff", transparent: true }); + const led = new Mesh(new PlaneGeometry(0.012, 0.006), this.led); + led.position.set(0, 0.0, 0.1705); + box.add(led); + const shadowMat = new MeshBasicMaterial({ map: radialShadow(), transparent: true, depthWrite: false }); + const shadow = new Mesh(new PlaneGeometry(0.9, 0.9), shadowMat); + this.boxMats = [boxMat, this.led, shadowMat]; + shadow.rotation.x = -Math.PI / 2; + shadow.position.set(-0.7, FLOOR_Y + 0.002, 1.1); + this.scene.add(shadow, box); + + if (!opts.mobile && !opts.reduced) this.dust = this.makeDust(); + + if (!opts.mobile) { + this.composer = new EffectComposer(this.renderer); + this.composer.addPass(new RenderPass(this.scene, this.camera)); + this.composer.addPass(new UnrealBloomPass(new Vector2(256, 256), 0.32, 0.55, 0.9)); + this.composer.addPass(new OutputPass()); + } + + addEventListener("pointermove", this.onPointer, { passive: true }); + document.fonts?.ready.then(() => [this.disable, this.gitlog, this.install].forEach((t) => t.invalidate())); + this.resize(); + this.raf = requestAnimationFrame(this.tick); + } + + setFrame(f: Frame) { + this.target = f; + } + + resize() { + const w = this.canvas.clientWidth; + const h = this.canvas.clientHeight; + if (!w || !h) return; + this.size.set(w, h); + this.renderer.setSize(w, h, false); + this.composer?.setSize(w, h); + this.camera.aspect = w / h; + this.camera.updateProjectionMatrix(); + } + + dispose() { + this.disposed = true; + cancelAnimationFrame(this.raf); + removeEventListener("pointermove", this.onPointer); + this.video.pause(); + this.video.removeAttribute("src"); + this.renderer.dispose(); + } + + private onPointer = (e: PointerEvent) => { + this.pointer.set((e.clientX / innerWidth) * 2 - 1, (e.clientY / innerHeight) * 2 - 1); + }; + + private tick = (now: number) => { + if (this.disposed) return; + this.raf = requestAnimationFrame(this.tick); + const dt = Math.min(0.1, (now - this.last) / 1000); + this.last = now; + const f = this.target; + if (!f) return; + + // pose: damped towards the scroll target, plus a little parallax from the pointer + const k = this.opts.reduced ? 1 : 1 - Math.exp(-dt * 3.2); + this.pose = this.pose ? lerpPose(this.pose, f.pose, k) : { ...f.pose }; + this.pointerSmooth.lerp(this.pointer, this.opts.reduced || this.opts.mobile ? 0 : 1 - Math.exp(-dt * 2)); + this.place(this.pose); + + this.updateScreen(f.screen, now); + const key = this.anim ? this.anim.to : dominant(this.shown); + if (key === "video") { + if (this.video.paused) this.video.play().catch(() => {}); + } else if (!this.video.paused) this.video.pause(); + for (const k of [this.shown.a, this.shown.b]) this.updateCanvas(k, f.screen.term, now); + + // the box steps aside where page text sits over the floor in front of the TV + this.boxFade += ((f.section === "footer" || f.section === "layouts" ? 0 : 1) - this.boxFade) * k; + for (const m of this.boxMats) m.opacity = this.boxFade; + this.led.color.setScalar(f.section === "tools" && f.screen.term < 1 ? (Math.sin(now / 90) > 0 ? 1 : 0.15) : 0.9); + + if (this.dust) this.dust.material.uniforms.time.value = now / 1000; + if (this.composer) this.composer.render(); + else this.renderer.render(this.scene, this.camera); + }; + + /** Orbit the focus point, frame the TV at the pose's size, then shift the lens to move it on screen. */ + private place(p: Pose) { + const cam = this.camera; + const fov = (cam.fov * Math.PI) / 180; + const d = TV_W / (p.size * 2 * Math.tan(fov / 2) * cam.aspect); + const yaw = p.yaw + this.pointerSmooth.x * 0.05; + const pitch = p.pitch + this.pointerSmooth.y * 0.025; + const focus = new Vector3(0, p.focusY, 0); + cam.position.set( + focus.x + d * Math.sin(yaw) * Math.cos(pitch), + focus.y + d * Math.sin(pitch), + focus.z + d * Math.cos(yaw) * Math.cos(pitch), + ); + cam.lookAt(focus); + const { x: w, y: h } = this.size; + cam.setViewOffset(w, h, (-p.ox * w) / 2, (p.oy * h) / 2, w, h); + } + + /** + * Scroll-scrubbed wipes set the mix directly. Any other change of picture (a new section, a layout pick) + * runs a timed wipe from what is showing to what should show. + */ + private updateScreen(s: Screen, now: number) { + if (this.anim) { + const t = this.opts.reduced ? 1 : (now - this.anim.start) / WIPE_MS; + this.apply(this.anim.from, this.anim.to, ease(t)); + if (t < 1) { + this.pending = s; + return; + } + this.shown = { a: this.anim.to, b: this.anim.to, mix: 0 }; + this.anim = undefined; + s = this.pending ?? s; + } + if (s.a === this.shown.a && s.b === this.shown.b) { + this.shown.mix = s.mix; + } else { + const from = dominant(this.shown); + const to = dominant(s); + if (from !== to) { + this.anim = { from, to, start: now }; + this.apply(from, to, 0); + return; + } + this.shown = { a: s.a, b: s.b, mix: s.mix }; + } + this.apply(this.shown.a, this.shown.b, this.shown.mix); + } + + private apply(a: string, b: string, mix: number) { + const u = this.screenMat.uniforms; + u.mapA.value = this.tex(a); + u.mapB.value = this.tex(b); + u.wipe.value = mix; + const g = this.glowMat.uniforms; + g.mapA.value = this.glow(a); + g.mapB.value = this.glow(b); + g.wipe.value = mix; + this.floorLight.color.copy(this.colour(a)).lerp(this.colour(b), mix); + if (this.dust) this.dust.material.uniforms.color.value.copy(this.floorLight.color).lerp(new Color("#ffffff"), 0.5); + } + + private updateCanvas(key: string, term: number, now: number) { + if (key === "term-tools") this.disable.update(term, now); + else if (key === "term-git") this.gitlog.update(term, now); + else if (key === "term-install") this.install.update(term, now); + else if (key === "clock") this.clock.update(0, now); + } + + private tex(key: string): Texture { + if (key === "term-tools") return this.disable.texture; + if (key === "term-git") return this.gitlog.texture; + if (key === "term-install") return this.install.texture; + if (key === "clock") return this.clock.texture; + // the video shows the Bento shot until its first frame arrives + if (key === "video" && this.video.readyState < 2) return this.textures.get("bento")!; + return this.textures.get(key) ?? this.textures.get("bento")!; + } + + private glow(key: string): Texture { + return this.glows.get(key === "video" ? "bento" : key) ?? this.glows.get("term")!; + } + + private colour(key: string): Color { + return this.colours.get(key === "video" ? "bento" : key) ?? this.colours.get("term")!; + } + + private loadTextures() { + const loader = new TextureLoader(); + const aniso = this.renderer.capabilities.getMaxAnisotropy(); + for (const key of SHOTS) { + const t = loader.load(`${this.opts.media}/${key}.jpg`); + t.colorSpace = SRGBColorSpace; + t.anisotropy = aniso; + this.textures.set(key, t); + const g = loader.load(`${this.opts.media}/glow-${key}.jpg`, (tex) => { + this.colours.set(key, averageColour(tex.image as HTMLImageElement)); + }); + g.colorSpace = SRGBColorSpace; + this.glows.set(key, g); + this.colours.set(key, new Color("#30385a")); + } + this.glows.set("term", solid("#1c2850")); + this.colours.set("term", new Color("#3a4c8a")); + } + + private makeVideo() { + const v = document.createElement("video"); + Object.assign(v, { src: `${this.opts.media}/demo.mp4`, muted: true, loop: true, playsInline: true, crossOrigin: "anonymous" }); + v.setAttribute("muted", ""); + const t = new VideoTexture(v); + t.colorSpace = SRGBColorSpace; + this.textures.set("video", t); + return v; + } + + private makeDust() { + const n = 140; + const pos = new Float32Array(n * 3); + const seed = new Float32Array(n); + for (let i = 0; i < n; i++) { + pos.set([(Math.random() - 0.5) * 4.4, -1.1 + Math.random() * 2.4, 0.25 + Math.random() * 2], i * 3); + seed[i] = Math.random(); + } + const geo = new BufferGeometry(); + geo.setAttribute("position", new BufferAttribute(pos, 3)); + geo.setAttribute("seed", new BufferAttribute(seed, 1)); + const mat = new ShaderMaterial({ + uniforms: { time: { value: 0 }, scale: { value: 14 * this.renderer.getPixelRatio() }, color: { value: new Color("#c8d0ff") } }, + vertexShader: dustVert, + fragmentShader: dustFrag, + blending: AdditiveBlending, + depthWrite: false, + transparent: true, + }); + const pts = new Points(geo, mat); + this.scene.add(pts); + return pts; + } +} + +const dominant = (s: { a: string; b: string; mix: number }) => (s.mix >= 0.5 ? s.b : s.a); +const ease = (t: number) => { + const x = Math.min(1, Math.max(0, t)); + return x < 0.5 ? 4 * x * x * x : 1 - (-2 * x + 2) ** 3 / 2; +}; + +function lerpPose(a: Pose, b: Pose, k: number): Pose { + const l = (x: number, y: number) => x + (y - x) * k; + return { yaw: l(a.yaw, b.yaw), pitch: l(a.pitch, b.pitch), size: l(a.size, b.size), ox: l(a.ox, b.ox), oy: l(a.oy, b.oy), focusY: l(a.focusY, b.focusY) }; +} + +/** Average colour of a small image: draw it into one pixel and read that pixel back. */ +function averageColour(img: HTMLImageElement): Color { + const c = document.createElement("canvas"); + c.width = c.height = 1; + const ctx = c.getContext("2d", { willReadFrequently: true })!; + ctx.drawImage(img, 0, 0, 1, 1); + const [r, g, b] = ctx.getImageData(0, 0, 1, 1).data; + // brighten: the light should carry the shot's hue, not its darkness + const col = new Color().setRGB(r / 255, g / 255, b / 255, SRGBColorSpace); + const hsl = { h: 0, s: 0, l: 0 }; + col.getHSL(hsl); + return col.setHSL(hsl.h, Math.min(1, hsl.s * 1.3), Math.max(0.35, hsl.l)); +} + +function solid(hex: string): CanvasTexture { + const c = document.createElement("canvas"); + c.width = c.height = 2; + const ctx = c.getContext("2d")!; + ctx.fillStyle = hex; + ctx.fillRect(0, 0, 2, 2); + const t = new CanvasTexture(c); + t.colorSpace = SRGBColorSpace; + return t; +} + +function radialShadow(): CanvasTexture { + const c = document.createElement("canvas"); + c.width = c.height = 128; + const ctx = c.getContext("2d")!; + const g = ctx.createRadialGradient(64, 64, 8, 64, 64, 64); + g.addColorStop(0, "rgba(0,0,0,0.75)"); + g.addColorStop(1, "rgba(0,0,0,0)"); + ctx.fillStyle = g; + ctx.fillRect(0, 0, 128, 128); + return new CanvasTexture(c); +} diff --git a/site/src/lib/scene/canvases.ts b/site/src/lib/scene/canvases.ts new file mode 100644 index 0000000..bfdf10c --- /dev/null +++ b/site/src/lib/scene/canvases.ts @@ -0,0 +1,221 @@ +import { CanvasTexture, SRGBColorSpace } from "three"; +import { COMMITS, STEPS, TELEMETRY_LIST, TELEMETRY_PACKAGES } from "../data"; + +const W = 1600; +const H = 900; +const PAD = 96; +const MONO = '"JetBrains Mono", ui-monospace, Menlo, monospace'; +const SANS = '"Bricolage Grotesque", ui-sans-serif, system-ui, sans-serif'; + +const INK = "#E8EBF4"; +const DIM = "#7B84A0"; +const OK = "#8FD9B6"; + +type Line = { text: string; color?: string; dim?: string }; + +/** A 16:9 canvas the screen samples; redraws only when what it shows changes. */ +abstract class CanvasScreen { + readonly canvas = document.createElement("canvas"); + readonly ctx: CanvasRenderingContext2D; + readonly texture: CanvasTexture; + private last = ""; + + constructor() { + this.canvas.width = W; + this.canvas.height = H; + this.ctx = this.canvas.getContext("2d")!; + this.texture = new CanvasTexture(this.canvas); + this.texture.colorSpace = SRGBColorSpace; + } + + /** Draws if the signature of what it would draw changed. */ + update(param: number, now: number) { + const sig = this.signature(param, now); + if (sig === this.last) return; + this.last = sig; + this.draw(param, now); + this.texture.needsUpdate = true; + } + + invalidate() { + this.last = ""; + } + + protected abstract signature(param: number, now: number): string; + protected abstract draw(param: number, now: number): void; +} + +/** Terminal look: lines top-down, long lines wrapped at spaces, an optional block cursor. */ +abstract class Terminal extends CanvasScreen { + protected size = 40; + + protected paint(lines: Line[], cursor: boolean) { + const { ctx } = this; + const g = ctx.createLinearGradient(0, 0, W, H); + g.addColorStop(0, "#0E1426"); + g.addColorStop(1, "#080B16"); + ctx.fillStyle = g; + ctx.fillRect(0, 0, W, H); + ctx.font = `400 ${this.size}px ${MONO}`; + ctx.textBaseline = "top"; + const lh = this.size * 1.55; + let y = PAD; + let x = PAD; + for (const line of lines) { + for (const row of wrap(ctx, line.text, W - PAD * 2)) { + x = PAD; + ctx.fillStyle = line.color ?? INK; + ctx.fillText(row, x, y); + x += ctx.measureText(row).width; + y += lh; + } + if (line.dim) { + y -= lh; + ctx.fillStyle = DIM; + ctx.fillText(line.dim, x, y); + x += ctx.measureText(line.dim).width; + y += lh; + } + } + if (cursor) { + ctx.fillStyle = INK; + ctx.fillRect(x + 6, y - lh + 4, this.size * 0.6, this.size * 1.1); + } + } +} + +function wrap(ctx: CanvasRenderingContext2D, text: string, max: number): string[] { + if (ctx.measureText(text).width <= max) return [text]; + const rows: string[] = []; + let row = ""; + for (const word of text.split(" ")) { + const next = row ? `${row} ${word}` : word; + if (row && ctx.measureText(next).width > max) { + rows.push(row); + row = ` ${word}`; + } else row = next; + } + return [...rows, row]; +} + +const blink = (now: number) => Math.floor(now / 530) % 2 === 0; + +/** `boxclean.py disable` on the real telemetry list; param 0..1 is how far the run has got. */ +export class DisableRun extends Terminal { + protected size = 36; + private shown = (p: number) => Math.round(p * TELEMETRY_PACKAGES.length); + + protected signature(p: number, now: number) { + return `${this.shown(p)}|${blink(now)}`; + } + + protected draw(p: number, now: number) { + const n = this.shown(p); + const lines: Line[] = [{ text: `$ boxclean.py disable ${TELEMETRY_LIST}` }, { text: " " }]; + for (const pkg of TELEMETRY_PACKAGES.slice(0, n)) lines.push({ text: pkg, color: INK, dim: " disabled-user" }); + if (n === TELEMETRY_PACKAGES.length) { + lines.push({ text: " " }); + lines.push({ text: `disabled ${n}; undo with: restore ${TELEMETRY_LIST}`, color: OK }); + } + this.paint(lines, n === TELEMETRY_PACKAGES.length && blink(now)); + } +} + +/** The first version's eight commits; param 0..1 reveals them oldest first. */ +export class GitLog extends Terminal { + protected size = 34; + private shown = (p: number) => Math.round(p * COMMITS.length); + + protected signature(p: number, now: number) { + return `${this.shown(p)}|${blink(now)}`; + } + + protected draw(p: number, now: number) { + const lines: Line[] = [{ text: "$ git log --reverse --oneline", color: INK }, { text: " " }]; + for (const c of COMMITS.slice(0, this.shown(p))) { + const [hash, ...rest] = c.split(" "); + const subject = rest.join(" "); + lines.push({ text: hash, color: OK, dim: " " + fit(this.ctx, subject, W - PAD * 2 - this.size * 5) }); + } + lines.push({ text: " " }); + lines.push({ text: "# all eight on 21 October 2026", color: DIM }); + this.paint(lines, blink(now)); + } +} + +function fit(ctx: CanvasRenderingContext2D, text: string, max: number) { + if (ctx.measureText(text).width <= max) return text; + let t = text; + while (t.length > 4 && ctx.measureText(t + "…").width > max) t = t.slice(0, -1); + return t + "…"; +} + +/** The install step in view, its command typed out after the step changes. */ +export class InstallStep extends Terminal { + protected size = 38; + private step = -1; + private since = 0; + + protected signature(step: number, now: number) { + if (step !== this.step) { + this.step = step; + this.since = now; + } + return `${step}|${this.typed(now)}|${blink(now)}`; + } + + private typed(now: number) { + return Math.floor((now - this.since) / 22); + } + + protected draw(step: number, now: number) { + const s = STEPS[step]; + const cmd = + s.cmd ?? "# on the TV:\n# Settings → System → About\n# press OK on Build seven times\n# Developer options → USB debugging ON"; + let left = this.typed(now); + const lines: Line[] = [{ text: `# ${step + 1} of ${STEPS.length} ${s.title}`, color: DIM }, { text: " " }]; + for (const raw of cmd.split("\n")) { + if (left <= 0) break; + const comment = raw.startsWith("#"); + const full = comment ? raw : `$ ${raw}`; + lines.push({ text: full.slice(0, left), color: comment ? DIM : INK }); + left -= full.length; + } + this.paint(lines, blink(now) || left < 0); + } +} + +/** The launcher's screensaver: a thin clock and date drifting over a soft glow. */ +export class ClockDream extends CanvasScreen { + protected signature(_: number, now: number) { + return String(Math.floor(now / 50)); + } + + protected draw(_: number, now: number) { + const { ctx } = this; + const t = now / 1000; + const x = W * (0.5 + Math.sin(t * 0.07) * 0.22); + const y = H * (0.5 + Math.cos(t * 0.05) * 0.18); + ctx.fillStyle = "#000"; + ctx.fillRect(0, 0, W, H); + const g = ctx.createRadialGradient(x, y, 0, x, y, 520); + g.addColorStop(0, "rgba(90,110,190,0.30)"); + g.addColorStop(1, "rgba(0,0,0,0)"); + ctx.fillStyle = g; + ctx.fillRect(0, 0, W, H); + const d = new Date(); + const time = d.toLocaleTimeString([], { hour: "numeric", minute: "2-digit" }).replace(/\s?[AP]M$/i, ""); + const date = d.toLocaleDateString("en-GB", { weekday: "long", day: "numeric", month: "long" }).toUpperCase(); + ctx.textAlign = "center"; + ctx.textBaseline = "alphabetic"; + ctx.fillStyle = "#F2F4FA"; + ctx.font = `200 220px ${SANS}`; + ctx.fillText(time, x, y + 40); + ctx.fillStyle = "rgba(242,244,250,0.7)"; + ctx.font = `500 30px ${SANS}`; + ctx.letterSpacing = "6px"; + ctx.fillText(date, x, y + 110); + ctx.letterSpacing = "0px"; + ctx.textAlign = "start"; + } +} diff --git a/site/src/lib/scene/shaders.ts b/site/src/lib/scene/shaders.ts new file mode 100644 index 0000000..6611823 --- /dev/null +++ b/site/src/lib/scene/shaders.ts @@ -0,0 +1,70 @@ +/** The panel: shot a wiped left-to-right into shot b, with a bright edge while the wipe runs. */ +export const screenVert = /* glsl */ ` +varying vec2 vUv; +void main() { + vUv = uv; + gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0); +}`; + +export const screenFrag = /* glsl */ ` +uniform sampler2D mapA; +uniform sampler2D mapB; +uniform float wipe; +uniform float power; +varying vec2 vUv; +void main() { + vec3 col = mix(texture2D(mapA, vUv).rgb, texture2D(mapB, vUv).rgb, step(vUv.x, wipe)); + float running = step(0.0005, wipe) * step(wipe, 0.9995); + float d = abs(vUv.x - wipe); + col += running * (vec3(2.4) * exp(-d * 1400.0) + vec3(0.55, 0.65, 1.0) * exp(-d * 45.0) * 0.28); + // faint glass sheen across the top-left of the panel + col += vec3(0.035) * smoothstep(0.35, 0.0, abs(vUv.x * 0.7 - vUv.y * 0.9 + 0.35)); + gl_FragColor = vec4(col * power, 1.0); + #include + #include +}`; + +/** The light behind the panel: the shot's tiny blurred copy, spread out and faded at the rim. */ +export const glowFrag = /* glsl */ ` +uniform sampler2D mapA; +uniform sampler2D mapB; +uniform float wipe; +uniform float strength; +uniform vec2 spread; +varying vec2 vUv; +void main() { + vec2 p = (vUv - 0.5) * spread + 0.5; + vec2 q = clamp(p, 0.0, 1.0); + vec3 col = mix(texture2D(mapA, q).rgb, texture2D(mapB, q).rgb, smoothstep(wipe + 0.15, wipe - 0.15, q.x)); + vec2 e = (vUv - 0.5) * 2.0; + float fall = pow(clamp(1.0 - length(e * vec2(0.92, 1.0)), 0.0, 1.0), 1.6); + gl_FragColor = vec4(col * fall * strength, 1.0); + #include +}`; + +/** Dust drifting through the light. */ +export const dustVert = /* glsl */ ` +uniform float time; +uniform float scale; +attribute float seed; +varying float vFade; +void main() { + vec3 p = position; + p.y += mod(time * 0.035 * (0.5 + seed) + seed * 3.0, 3.0) - 1.5; + p.x += sin(time * 0.2 + seed * 12.0) * 0.08; + vec4 mv = modelViewMatrix * vec4(p, 1.0); + gl_Position = projectionMatrix * mv; + gl_PointSize = scale * (0.6 + seed) / -mv.z; + // motes catch the light only near the screen + float near = smoothstep(2.6, 0.4, length(p.xy * vec2(0.7, 1.0))); + vFade = near * (0.4 + 0.6 * (sin(time * 0.6 + seed * 20.0) * 0.5 + 0.5)); +}`; + +export const dustFrag = /* glsl */ ` +uniform vec3 color; +varying float vFade; +void main() { + float d = length(gl_PointCoord - 0.5); + float a = smoothstep(0.5, 0.0, d) * vFade * 0.3; + gl_FragColor = vec4(color * a, 1.0); +}`; diff --git a/site/src/lib/sections/Cta.svelte b/site/src/lib/sections/Cta.svelte new file mode 100644 index 0000000..16a3d11 --- /dev/null +++ b/site/src/lib/sections/Cta.svelte @@ -0,0 +1,14 @@ + + + diff --git a/site/src/lib/sections/Footer.svelte b/site/src/lib/sections/Footer.svelte new file mode 100644 index 0000000..c9d328f --- /dev/null +++ b/site/src/lib/sections/Footer.svelte @@ -0,0 +1,45 @@ + + +
+
+

Give the box its quiet back.

+ +

+ BoxClean is Apache-2.0. Parts adapted from CleanYourTV stay MIT, and the launcher's + Outfit font is under the SIL Open Font License. Not affiliated with Xiaomi or Google. + github.com/VachaganGrigoryan/BoxClean +

+
+
+ + diff --git a/site/src/lib/sections/Hero.svelte b/site/src/lib/sections/Hero.svelte new file mode 100644 index 0000000..1b8942a --- /dev/null +++ b/site/src/lib/sections/Hero.svelte @@ -0,0 +1,39 @@ + + +
+
+

Your Mi Box, quiet and yours.

+

+ BoxClean removes the ads, telemetry and auto-installs from a Xiaomi Mi Box S 2nd gen over network ADB. Then it + replaces the Google TV home screen with a small offline launcher that has six layouts. +

+ +

Free and open source under Apache-2.0. Every change can be undone.

+
+
+ + diff --git a/site/src/lib/sections/Install.svelte b/site/src/lib/sections/Install.svelte new file mode 100644 index 0000000..5cd0c0e --- /dev/null +++ b/site/src/lib/sections/Install.svelte @@ -0,0 +1,122 @@ + + +
+
+

Set it up

+

+ You need a Mac or Linux machine on the same network as the box, uv and + Android's adb. Replace <ip> with your box's address. +

+
+
    + {#each STEPS as s, i} +
  1. + {i + 1} +
    +

    {s.title}

    +

    {s.body}

    + {#if s.cmd} +
    +
    {s.cmd}
    + +
    + {/if} +
    +
  2. + {/each} +
+

+ Changed your mind? restore lists/<list>.txt puts it all back. The + README has every detail. +

+
+ + diff --git a/site/src/lib/sections/Layouts.svelte b/site/src/lib/sections/Layouts.svelte new file mode 100644 index 0000000..f6db446 --- /dev/null +++ b/site/src/lib/sections/Layouts.svelte @@ -0,0 +1,130 @@ + + +
+
+
+

Six ways to see your apps

+

Pick one the way you would on the TV. Every layout is plain Android views, so focus moves instantly on the box's small GPU.

+
+
+
+ {#each LAYOUTS as l, i} + + {/each} +
+

{current.name}. {current.desc}

+
+
+
+ + diff --git a/site/src/lib/sections/Rebuilt.svelte b/site/src/lib/sections/Rebuilt.svelte new file mode 100644 index 0000000..f39aff6 --- /dev/null +++ b/site/src/lib/sections/Rebuilt.svelte @@ -0,0 +1,98 @@ + + +
+
+

Rebuilt, not copied

+
+

BoxClean exists because of CleanYourTV, Gathin's open-source project that showed a Google TV box can lose its ads without root.

+

Forking it would have been the quick route. Instead, BoxClean was rebuilt from an empty folder with Claude Code, one decision at a time, so every package it turns off and every view it draws is understood. The first version, from the debloat script to the sixth layout, landed in eight commits on 21 October 2026.

+

Where BoxClean does borrow, it says so. Those parts keep their MIT license and are credited in NOTICE.

+
+
+
+

Adapted from CleanYourTV

+
    +
  • The Classic layout's look and motion
  • +
  • The colour glow from the focused app
  • +
  • The gliding glass highlight
  • +
  • The clock screensaver
  • +
  • The remote-key service
  • +
  • The first Mi Box S debloat list
  • +
+
+
+

Written for BoxClean

+
    +
  • Five more layouts and the picker
  • +
  • A debloat tool that records state and restores it
  • +
  • Dry runs, probe, backup and an ADB-closed check
  • +
  • Tests, CI and ready-built APK releases
  • +
+
+
+

On screen: the Classic look wiping into Bento, then the eight commits.

+
+
+ + diff --git a/site/src/lib/sections/Story.svelte b/site/src/lib/sections/Story.svelte new file mode 100644 index 0000000..de47cc3 --- /dev/null +++ b/site/src/lib/sections/Story.svelte @@ -0,0 +1,60 @@ + + +
+ {#each CHAPTERS as c, i} +
+ {#if i === 0}

What changes on your TV

{/if} +
{i + 1} of {CHAPTERS.length}
+

{c.title}

+

{c.body}

+

On screen: {c.caption}, a real screenshot from the box.

+
+ {/each} +
+ + diff --git a/site/src/lib/sections/Tools.svelte b/site/src/lib/sections/Tools.svelte new file mode 100644 index 0000000..9de1445 --- /dev/null +++ b/site/src/lib/sections/Tools.svelte @@ -0,0 +1,70 @@ + + +
+
+

Two small tools

+

One cleans the box from your computer. The other is the home screen it leaves behind.

+
+
+

The debloat script

+
    +
  • Disables, never uninstalls. Packages are turned off for user 0 with pm disable-user.
  • +
  • Records first. Before the first change it saves every package's state and the current Home app.
  • +
  • Undo is one command. restore turns everything back on and returns Home to its old owner.
  • +
  • Dry runs. disable and restore show what they would do first.
  • +
+
+
+

BoxClean Home

+
    +
  • Offline. No network permission, no accounts, no trackers, no AndroidX.
  • +
  • Your buttons. Remote keys whose own app is off can open an app you pick.
  • +
  • A drifting clock as the screensaver instead of Google's ambient feed.
  • +
  • Fast on old hardware. Plain framework views, tuned for the box's GPU.
  • +
+
+
+

On screen: the {TELEMETRY_PACKAGES.length} packages in {TELEMETRY_LIST}, the first batch to go.

+
+
+ + diff --git a/site/src/lib/timeline.test.ts b/site/src/lib/timeline.test.ts new file mode 100644 index 0000000..b5e25cf --- /dev/null +++ b/site/src/lib/timeline.test.ts @@ -0,0 +1,68 @@ +import { describe, expect, it } from "vitest"; +import { frame, screenOf, type SectionBox } from "./timeline"; + +const VH = 1000; +const boxes: SectionBox[] = [ + { id: "hero", top: 0, height: 1000 }, + { id: "story", top: 1000, height: 4000 }, + { id: "layouts", top: 5000, height: 2000 }, + { id: "tools", top: 7000, height: 1400 }, + { id: "rebuilt", top: 8400, height: 1600 }, + { id: "install", top: 10000, height: 3000 }, + { id: "footer", top: 13000, height: 1000 }, +]; +const at = (centre: number, mobile = false) => frame(boxes, centre - VH / 2, VH, mobile, "ribbon"); + +describe("frame", () => { + it("holds a section's pose away from its edges", () => { + expect(at(3000).section).toBe("story"); + expect(at(3000).pose).toEqual(at(3500).pose); + }); + + it("blends halfway exactly on a boundary", () => { + const mid = at(5000).pose; + const story = at(3000).pose; + const layouts = at(6000).pose; + expect(mid.size).toBeCloseTo((story.size + layouts.size) / 2); + expect(mid.ox).toBeCloseTo((story.ox + layouts.ox) / 2); + }); + + it("clamps above the top and past the end", () => { + expect(frame(boxes, -500, VH, false, "bento").section).toBe("hero"); + const end = frame(boxes, 99999, VH, false, "bento"); + expect(end.section).toBe("footer"); + expect(end.p).toBe(1); + }); + + it("centres the TV in the half-height canvas on phones", () => { + const pose = frame(boxes, 3000, VH, true, "bento").pose; + expect(pose.ox).toBe(0); + expect(pose.size).toBeGreaterThan(0.7); + }); + + it("shows the picked layout", () => { + expect(at(6000).screen).toMatchObject({ a: "ribbon", b: "ribbon" }); + }); +}); + +describe("screenOf story", () => { + it("starts on stock and ends on bento", () => { + expect(screenOf("story", 0, "bento").screen).toMatchObject({ a: "stock", b: "stock", mix: 0 }); + expect(screenOf("story", 1, "bento").screen).toMatchObject({ a: "v2", b: "bento", mix: 1 }); + }); + + it("is halfway through the first wipe where chapter 2 begins", () => { + const { screen, step } = screenOf("story", 0.25, "bento"); + expect(screen).toMatchObject({ a: "stock", b: "v1" }); + expect(screen.mix).toBeCloseTo(0.5); + expect(step).toBe(1); + }); +}); + +describe("screenOf install", () => { + it("maps progress to the six steps", () => { + expect(screenOf("install", 0, "bento").step).toBe(0); + expect(screenOf("install", 0.5, "bento").step).toBe(3); + expect(screenOf("install", 1, "bento").step).toBe(5); + }); +}); diff --git a/site/src/lib/timeline.ts b/site/src/lib/timeline.ts new file mode 100644 index 0000000..5450cab --- /dev/null +++ b/site/src/lib/timeline.ts @@ -0,0 +1,138 @@ +import { CHAPTERS, type LayoutId, STEPS } from "./data"; + +export type SectionId = "hero" | "story" | "layouts" | "tools" | "rebuilt" | "install" | "footer"; + +/** + * Where the camera sits around the TV and where the TV lands on screen. + * yaw/pitch orbit the focus point (radians), size is the TV's width as a share of the viewport width, + * ox/oy move the TV's centre in NDC (-1..1) by shifting the lens, focusY lifts or lowers what the camera aims at. + */ +export interface Pose { + yaw: number; + pitch: number; + size: number; + ox: number; + oy: number; + focusY: number; +} + +/** What the screen shows: texture a, wiped left-to-right into b by mix; term drives terminal/step screens. */ +export interface Screen { + a: string; + b: string; + mix: number; + term: number; +} + +export interface SectionBox { + id: SectionId; + top: number; + height: number; +} + +export interface Frame { + section: SectionId; + p: number; + step: number; + pose: Pose; + screen: Screen; +} + +const P = (yaw: number, pitch: number, size: number, ox: number, oy: number, focusY = 0): Pose => ({ + yaw, pitch, size, ox, oy, focusY, +}); + +const DESKTOP: Record = { + hero: P(0.42, 0.07, 0.5, 0.4, -0.04), + story: P(0.16, 0.04, 0.5, 0.36, 0), + layouts: P(0, 0.03, 0.52, 0, 0.04), + tools: P(-0.55, 0.34, 0.4, -0.38, 0.02, -0.55), + rebuilt: P(-0.3, 0.08, 0.38, -0.4, 0), + install: P(0.32, 0.05, 0.42, 0.42, 0), + footer: P(0, -0.02, 0.4, 0, 0.3, 0.2), +}; + +// phones: the canvas is only the top half of the viewport, so the TV is centred in it +const MOBILE: Record = { + hero: P(0.26, 0.06, 0.8, 0, 0), + story: P(0.1, 0.04, 0.8, 0, 0), + layouts: P(0, 0.03, 0.84, 0, 0), + tools: P(-0.34, 0.3, 0.6, 0, 0.04, -0.55), + rebuilt: P(-0.18, 0.06, 0.74, 0, 0), + install: P(0.16, 0.04, 0.76, 0, 0), + footer: P(0, 0.02, 0.8, 0, 0), +}; + +export const clamp = (v: number, a = 0, b = 1) => Math.min(b, Math.max(a, v)); +export const smooth = (v: number) => { + const x = clamp(v); + return x * x * (3 - 2 * x); +}; +const lerp = (a: number, b: number, t: number) => a + (b - a) * t; + +export function mixPose(a: Pose, b: Pose, t: number): Pose { + return { + yaw: lerp(a.yaw, b.yaw, t), + pitch: lerp(a.pitch, b.pitch, t), + size: lerp(a.size, b.size, t), + ox: lerp(a.ox, b.ox, t), + oy: lerp(a.oy, b.oy, t), + focusY: lerp(a.focusY, b.focusY, t), + }; +} + +/** The screen for a section at local progress p (0..1). */ +export function screenOf(id: SectionId, p: number, layout: LayoutId): { screen: Screen; step: number } { + const still = (key: string, term = 0) => ({ a: key, b: key, mix: 0, term }); + switch (id) { + case "hero": + return { screen: still("video"), step: 0 }; + case "story": { + const shots = CHAPTERS.map((c) => c.shot); + const t = p * shots.length; + // wipe i (to shot i) is centred where chapter i begins, so it runs between two blocks of text + for (let i = shots.length - 1; i > 0; i--) { + const w = smooth((t - i + 0.3) / 0.6); + if (w > 0) return { screen: { a: shots[i - 1], b: shots[i], mix: w, term: 0 }, step: Math.min(shots.length - 1, Math.floor(t)) }; + } + return { screen: still(shots[0]), step: 0 }; + } + case "layouts": + return { screen: still(layout), step: 0 }; + case "tools": + return { screen: still("term-tools", clamp((p - 0.12) / 0.6)), step: 0 }; + case "rebuilt": + if (p < 0.5) return { screen: { a: "classic", b: "bento", mix: smooth((p - 0.12) / 0.26), term: 0 }, step: 0 }; + return { screen: { a: "bento", b: "term-git", mix: smooth((p - 0.5) / 0.16), term: clamp((p - 0.6) / 0.3) }, step: 1 }; + case "install": { + const step = Math.min(STEPS.length - 1, Math.floor(p * STEPS.length)); + return { screen: still("term-install", step), step }; + } + case "footer": + return { screen: still("clock"), step: 0 }; + } +} + +/** Everything the stage needs for one scroll position. Boxes are in page coordinates, sorted top to bottom. */ +export function frame(boxes: SectionBox[], scrollY: number, vh: number, mobile: boolean, layout: LayoutId): Frame { + const poses = mobile ? MOBILE : DESKTOP; + // the reading line: mid-screen, or the middle of the text area under the TV on phones + const centre = scrollY + vh * (mobile ? 0.74 : 0.5); + let i = boxes.findIndex((b) => centre < b.top + b.height); + if (i < 0) i = boxes.length - 1; + const box = boxes[i]; + const p = clamp((centre - box.top) / box.height); + + // camera moves only in a band around each boundary, so it holds still while a section reads + const band = vh * 0.4; + let pose = poses[box.id]; + if (i > 0 && centre < box.top + band) { + pose = mixPose(poses[boxes[i - 1].id], pose, smooth((centre - (box.top - band)) / (2 * band))); + } else if (i < boxes.length - 1 && centre > box.top + box.height - band) { + const end = box.top + box.height; + pose = mixPose(pose, poses[boxes[i + 1].id], smooth((centre - (end - band)) / (2 * band))); + } + + const { screen, step } = screenOf(box.id, p, layout); + return { section: box.id, p, step, pose, screen }; +} diff --git a/site/src/lib/ui.svelte.ts b/site/src/lib/ui.svelte.ts new file mode 100644 index 0000000..0ea1502 --- /dev/null +++ b/site/src/lib/ui.svelte.ts @@ -0,0 +1,5 @@ +import type { LayoutId } from "./data"; +import type { SectionId } from "./timeline"; + +/** What the stage reports back to the page: the section and step in view, and the picked layout. */ +export const ui = $state({ section: "hero" as SectionId, step: 0, layout: "bento" as LayoutId }); diff --git a/site/src/main.ts b/site/src/main.ts new file mode 100644 index 0000000..068cce4 --- /dev/null +++ b/site/src/main.ts @@ -0,0 +1,5 @@ +import { mount } from "svelte"; +import App from "./App.svelte"; +import "./app.css"; + +mount(App, { target: document.getElementById("app")! }); diff --git a/site/svelte.config.js b/site/svelte.config.js new file mode 100644 index 0000000..6a0aa8f --- /dev/null +++ b/site/svelte.config.js @@ -0,0 +1,3 @@ +import { vitePreprocess } from "@sveltejs/vite-plugin-svelte"; + +export default { preprocess: vitePreprocess() }; diff --git a/site/tsconfig.json b/site/tsconfig.json new file mode 100644 index 0000000..35e4682 --- /dev/null +++ b/site/tsconfig.json @@ -0,0 +1,13 @@ +{ + "extends": "@tsconfig/svelte/tsconfig.json", + "compilerOptions": { + "target": "ES2022", + "module": "ESNext", + "moduleResolution": "bundler", + "strict": true, + "noEmit": true, + "skipLibCheck": true, + "types": ["vite/client"] + }, + "include": ["src/**/*.ts", "src/**/*.svelte", "vite.config.ts"] +} diff --git a/site/vercel.json b/site/vercel.json new file mode 100644 index 0000000..d0f740a --- /dev/null +++ b/site/vercel.json @@ -0,0 +1,25 @@ +{ + "framework": "vite", + "buildCommand": "pnpm build", + "outputDirectory": "dist", + "headers": [ + { + "source": "/assets/(.*)", + "headers": [ + { + "key": "Cache-Control", + "value": "public, max-age=31536000, immutable" + } + ] + }, + { + "source": "/media/(.*)", + "headers": [ + { + "key": "Cache-Control", + "value": "public, max-age=604800" + } + ] + } + ] +} diff --git a/site/vite.config.ts b/site/vite.config.ts new file mode 100644 index 0000000..3131359 --- /dev/null +++ b/site/vite.config.ts @@ -0,0 +1,10 @@ +import { defineConfig } from "vite"; +import { svelte } from "@sveltejs/vite-plugin-svelte"; + +export default defineConfig({ + plugins: [svelte()], + // the package list lives in the repo's lists/, one level up + server: { fs: { allow: [".."] } }, + // three.js is the lazy Scene chunk (~250 KB gz), loaded after first paint + build: { chunkSizeWarningLimit: 900 }, +});