Cube Twist: A 3D Twisty Cube Puzzle From 2×2 to 10×10
- Lab Skill
- v0.1.1
- Game creation
Turn layers of a twisty cube in 3D, in one offline HTML file: drag a sticker to turn its layer with a snap, drag empty space to look around, scramble with an animation and see when it is solved, at any size from 2×2 to 10×10. The cube is built in code.
Beispiel
Cube Twist 3D puzzle
Das Beispiel läuft in einem sandboxed Frame ohne Zugriff auf diese Seite.
Online ausführen
In einer SandBase-Sandbox ausführen und Ihre Ergebnisse in Lab ansehen.
In Lab öffnen ↗Was Sie erhalten
Bring face colours, the sizes on offer and the look, and optionally the feel and scramble length. The Skill returns a downloadable Skill (the reference puzzle project, a customize guide, headless verification) and one playable example cube.
So funktioniert es
- 01
Copy the finished cube game
Cube Twist starts with node scripts/new-project.mjs --out my-cube and npm ci on Node 22.4 or newer. The rules are in src/cube/model.js, drag gestures in src/cube/gesture.js and rendering in src/cube/view.js. Your coding agent reads references/customize.md for colours, backdrop, sticker shape, sizes, feel, scramble, framing, text or a new button. Nothing calls a model or paid service.
- 02
Change values in config
Most requests are a value in src/config.js, which also holds the English TEXT. A prompt might ask for pastel face colours, sizes 3 to 7 and a slate backdrop. Read references/lessons.md before touching gesture code. Any image, font, sound or model you add goes in CREDITS.json with its licence, and no third-party brands or logos may appear.
- 03
Build and run the cube checks
npm run build:single writes dist-single/index.html, about 0.55 MiB against an 8 MiB limit. npm run shoot needs local Chrome and writes shots/report.json and shots/*.jpg for a drag turn, mid-turn, release, view drag, scramble, solve, a 5 by 5, reset and a phone. Repeat until every check passes, then confirm the status reads Solved after a full solve.
FAQ
What does Cube Twist let you do?
Cube Twist is a playable 3D twisty cube from 2 by 2 to 10 by 10 in one HTML file. Drag a sticker and its layer follows, easing to the nearest quarter turn on release. Drag empty space to tumble the whole cube. Scramble plays random turns, and the status returns to Solved when every side is one colour.
Does Cube Twist include a solver?
No. Cube Twist's Solve action, available only through act('solve'), replays the recorded turns backwards. A cube you mixed by hand must be solved by you. Picture cubes, where centre orientation matters, are not supported.
Does Cube Twist remember my cube?
Only for the session, per size. Cube Twist keeps each order's cube while the page is open, because a sandboxed frame has no storage. Reset asks for a second tap before putting the cube back.
Why did my Cube Twist drag turn the whole cube?
Cube Twist decides the layer once, after 5 px of movement. A drag that starts on a black gap between stickers rotates the whole cube instead of a hidden layer. Deciding once also stops a curving drag from jumping between layers.
Does Cube Twist need a key or a network?
No. Cube Twist calls no model or paid service, and npm ci only downloads three.js, Vite and playwright-core from npm. The built file uses no network, storage, workers, dialogs or pointer lock.
How does Cube Twist handle a 10 by 10?
Cube Twist draws order 10 as 1000 cubies and 600 stickers in two instanced draw calls. Positions are whole numbers and a quarter turn is a coordinate swap, so hundreds of turns never drift. Much larger orders would grow with the cube of the size.
Weitere Skills
Alle Game creation Skills →
Seagull Swoop
Build a 3D flight-and-delivery game with light fries, heavy fish, crosswinds and optional ring routes. The gull must bring lunch home; cargo weight changes which openings it can safely reach.

Wedding Cake Wobble
Build a 3D fragile-cargo delivery game around a wobbling wedding cake. Brake before turns, avoid crossing guests and steer around tables. Lost tiers change the score, while a partial delivery can still succeed.

Hermit Tide
Build a 3D route-and-timing game where a hermit crab changes shells to cross a tidal shore. Narrow gaps favour the cap, stronger shells resist waves, and dry stones provide shelter and checkpoints.

Clover Circuit: Estate Cut
Drive a coral ride-on mower through a fenced estate garden. Steering, braking and the moving blade cut actual grass tufts; Overview reveals the genuine trail. Edit three gardens and three scene palettes offline. Coverage counts trimmed tuft centers rather than continuous ground area.

Glide Gates: Lagoon Run
Flap a golden bird through emerald pipe pairs above a turquoise lagoon. Actual fixed-step gravity, swept circle contacts and full-gate scoring power both manual flight and clearly labeled practice. Edit three courses and three scene palettes offline.

3D Interactive Garden Islands
Walk a curved garden, harvest fruit, share gifts, catch butterflies, fish, grow flowers and craft furniture. Four lighting states and one offline HTML with bilingual keyboard and touch controls.

