Skip to content

Commit 343db3a

Browse files
committed
Prepare for public release
- Rebrand to Hyper Scatter with Pico CSS styling - Add benchmark link to header, make header thinner - Add npm metadata (keywords, author, license, repo) - Add clustered distribution option for Poincaré demo - Add GitHub Actions: CI, npm publish, Pages deploy - Update WebGL defaults to neutral grayscale - Add vite.config.ts for multi-page build - Add LICENSE (MIT) and CONTRIBUTING.md
1 parent e65e58d commit 343db3a

16 files changed

Lines changed: 959 additions & 989 deletions

File tree

.github/workflows/ci.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# Run tests and build on PRs and pushes
2+
name: CI
3+
4+
on:
5+
push:
6+
branches: [main]
7+
pull_request:
8+
branches: [main]
9+
10+
jobs:
11+
build:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: Checkout
15+
uses: actions/checkout@v4
16+
17+
- name: Setup Node.js
18+
uses: actions/setup-node@v4
19+
with:
20+
node-version: '20'
21+
cache: 'npm'
22+
23+
- name: Install dependencies
24+
run: npm ci
25+
26+
- name: Build demo
27+
run: npm run build
28+
29+
- name: Build library
30+
run: npm run build:lib
31+
32+
- name: Check types
33+
run: npx tsc --noEmit

.github/workflows/deploy.yml

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
# Deploy to GitHub Pages
2+
name: Deploy to GitHub Pages
3+
4+
on:
5+
push:
6+
branches: ['main']
7+
workflow_dispatch:
8+
9+
permissions:
10+
contents: read
11+
pages: write
12+
id-token: write
13+
14+
concurrency:
15+
group: 'pages'
16+
cancel-in-progress: true
17+
18+
jobs:
19+
build:
20+
runs-on: ubuntu-latest
21+
steps:
22+
- name: Checkout
23+
uses: actions/checkout@v4
24+
25+
- name: Setup Node.js
26+
uses: actions/setup-node@v4
27+
with:
28+
node-version: '20'
29+
cache: 'npm'
30+
31+
- name: Install dependencies
32+
run: npm ci
33+
34+
- name: Build
35+
run: npm run build
36+
37+
- name: Setup Pages
38+
uses: actions/configure-pages@v4
39+
40+
- name: Upload artifact
41+
uses: actions/upload-pages-artifact@v3
42+
with:
43+
path: './dist'
44+
45+
deploy:
46+
environment:
47+
name: github-pages
48+
url: ${{ steps.deployment.outputs.page_url }}
49+
runs-on: ubuntu-latest
50+
needs: build
51+
steps:
52+
- name: Deploy to GitHub Pages
53+
id: deployment
54+
uses: actions/deploy-pages@v4

.github/workflows/npm-publish.yml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
# Publish package to npm
2+
3+
name: Publish to npm
4+
5+
on:
6+
release:
7+
types: [published]
8+
workflow_dispatch:
9+
inputs:
10+
dry_run:
11+
description: 'Dry run (do not actually publish)'
12+
type: boolean
13+
default: true
14+
15+
permissions:
16+
contents: read
17+
id-token: write
18+
19+
jobs:
20+
publish:
21+
runs-on: ubuntu-latest
22+
steps:
23+
- name: Checkout
24+
uses: actions/checkout@v4
25+
26+
- name: Setup Node.js
27+
uses: actions/setup-node@v4
28+
with:
29+
node-version: '20'
30+
cache: 'npm'
31+
registry-url: 'https://registry.npmjs.org'
32+
33+
- name: Install dependencies
34+
run: npm ci
35+
36+
- name: Build library
37+
run: npm run build:lib
38+
39+
- name: Publish (dry run)
40+
if: ${{ github.event.inputs.dry_run == 'true' }}
41+
run: npm publish --dry-run
42+
env:
43+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
44+
45+
- name: Publish to npm
46+
if: ${{ github.event_name == 'release' || github.event.inputs.dry_run == 'false' }}
47+
run: npm publish --provenance --access public
48+
env:
49+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,6 @@ dist-lib/
66
*.tgz
77
.DS_Store
88
research/
9+
scripts/
10+
docs/
11+
.playwright-mcp/

CONTRIBUTING.md

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# Contributing to hyper-scatter
2+
3+
First off, thanks for taking the time to contribute!
4+
5+
This project has a unique architecture designed to ensure correctness while maximizing performance. Before you write code, please understand the **Reference/Candidate** methodology.
6+
7+
## The Core Philosophy
8+
9+
We maintain two implementations for every renderer:
10+
11+
1. **Reference (Canvas2D)**: The "Ground Truth". Optimized for readability and correctness.
12+
2. **Candidate (WebGL2)**: The "Speed Demon". Optimized for performance.
13+
14+
Any feature or bug fix must first be verified in the **Reference** implementation. Once the semantics are correct there, we port/optimize it in the **Candidate** implementation and verify they match using the accuracy benchmarks.
15+
16+
## Development Workflow
17+
18+
1. **Install dependencies**
19+
```bash
20+
npm install
21+
```
22+
23+
2. **Run the dev server**
24+
```bash
25+
npm run dev
26+
```
27+
28+
3. **Run benchmarks**
29+
* **Correctness**: `npm run bench:accuracy` (Run this before opening a PR!)
30+
* **Performance**: `npm run bench`
31+
32+
## Future Roadmap
33+
34+
We are looking for contributions in the following areas:
35+
* **Spherical Geometry**: Implementing spherical embeddings (S²) using the same Reference/Candidate pattern.
36+
* **WASM Core**: Moving the heavy math checks to WASM for even better CPU throughput.
37+
38+
## Code Style
39+
40+
* We use TypeScript.
41+
* Formatting is handled by Prettier/ESLint (run lint before committing).
42+
43+
## Attribution
44+
45+
By contributing to this project, you agree that your contributions will be licensed under the MIT License.

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2026
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

0 commit comments

Comments
 (0)