Files
rubik/package.json
T
tiennm99 eb592e5c98 feat: add kociemba solver and vitest unit tests
- Solver: cubejs-backed two-phase solver, lazy-loaded chunk so the ~80 KB
  table-init cost stays out of the main bundle. New cube-to-facelets
  converter (3D model -> 54-char URFDLB string) verified bit-for-bit
  against cubejs's own move() output.
- Solve button in ControlsPanel with disabled "Solving..." state, wired
  through the CubeView controller; animates each move sequentially.
- Rewrite solved-check to the WCA face-uniformity definition. The old
  strict "identity quaternion per cubie" check rejected center spins
  (invisible) and whole-cube rotations, both of which are still solved
  per WCA / Kociemba.
- Vitest specs under tests/ cover cubie-model, move-definitions,
  move-parser, apply-move (4x turns, inverses, sune order=6, R2 == R R),
  scrambler, solved-check, algorithm-runner, cube-to-facelets, solver.
  39 tests, ~3 s. Adds npm test / npm run test:watch scripts.
2026-04-27 10:25:28 +07:00

37 lines
1.0 KiB
JSON

{
"name": "rubik",
"description": "Interactive 3D Rubik's 3x3 cube simulator in the browser (Three.js + Svelte)",
"version": "0.1.0",
"type": "module",
"repository": {
"type": "git",
"url": "git+https://github.com/tiennm99/rubik.git"
},
"author": "tiennm99",
"license": "Apache-2.0",
"licenseUrl": "https://www.apache.org/licenses/LICENSE-2.0",
"bugs": {
"url": "https://github.com/tiennm99/rubik/issues"
},
"homepage": "https://tiennm99.github.io/rubik/",
"scripts": {
"dev": "vite --config vite/config.dev.mjs",
"dev:codeserver": "vite --config vite/config.codeserver.mjs",
"build": "vite build --config vite/config.prod.mjs",
"preview": "vite preview --config vite/config.prod.mjs",
"test": "vitest run",
"test:watch": "vitest"
},
"dependencies": {
"@tweenjs/tween.js": "^25.0.0",
"cubejs": "^1.3.2",
"three": "^0.171.0"
},
"devDependencies": {
"@sveltejs/vite-plugin-svelte": "^5.0.3",
"svelte": "^5.19.0",
"vite": "^6.3.6",
"vitest": "^4.1.5"
}
}