Skip to content
프로젝트

소개

Scrollable Index of all 43252003274489856000 Rubik's Cube states

디자인 및 미디어

이 수치를 측정하는 방법

측정된 스타 증가

in 24h
0
in 7 days
0
in 15 days
0
in 1 month
기록 수집 중

서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.

README.md

Original

Every Cube

Every Cube

A scrollable index of every reachable Rubik's Cube permutation (43,252,003,274,489,856,000 of them), rendered as a live 3D cube that mutates as you scroll. There is no database. Every state is generated on the fly from an index n via a rank/unrank function over the cube group.

Scroll (or drag the ruler) and the cube updates in place: #1 is solved, the first few thousand states are light scrambles, and the ruler has markers for a couple of famous patterns (superflip, checkerboard) so you can jump straight to them.

Getting started

npm install
npm run dev

Then open http://localhost:3000.

Scripts

  • npm run dev: start the dev server
  • npm run build / npm run start: production build and serve
  • npm run test:math: unit tests for the rank/unrank math core (lib/cubeMath.ts, lib/cubeState.ts, lib/cubiePlacement.ts, lib/cubeMoves.ts, lib/patterns.ts)

How it works

Any permutation index n splits into four standard cube coordinates (corner and edge permutation, corner and edge orientation), ordered so low indices change orientation only. The cube starts solved and lightly scrambles before permutations kick in. See lib/cubeMath.ts for the math and lib/cubiePlacement.ts for how it turns into per-piece 3D transforms that pieces can physically animate between.

Famous patterns on the ruler (lib/patterns.ts) are not hardcoded guesses. Superflip is built from its textbook definition and cross-checked with a round-trip through the ranking pipeline. Checkerboard is produced with a small, from-scratch move engine (lib/cubeMoves.ts) and verified against the pattern's actual visual property (each face alternates two colors) before it is allowed to ship. Both checks run at module load, so a wrong pattern can never appear silently.

Tech

Next.js (App Router), TypeScript, Tailwind, and react-three-fiber for the 3D view. No backend and no database, so it deploys as a static Next.js app.

관련 프로젝트 살펴보기

불러오는 중…