Sand AISand AI MAGI-2ตอนนี้ MAGI-2 อยู่บน SandBase แล้ว: วิดีโอ 1080p พร้อมเสียงในตัวลองใช้เลย

Cube Twist: A 3D Twisty Cube Puzzle From 2×2 to 10×10

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.

ตัวอย่าง

Cube Twist 3D puzzle
เปิดในแท็บใหม่

Cube Twist 3D puzzle

ตัวอย่างนี้ทำงานในเฟรมแบบ sandbox ที่ไม่มีสิทธิ์เข้าถึงหน้านี้

รันออนไลน์

รันใน SandBase sandbox และดูผลลัพธ์ของคุณใน Lab

เปิดใน Lab ↗

สิ่งที่คุณจะได้รับ

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.

วิธีการทำงาน

  1. 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.

  2. 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.

  3. 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.

คำถามที่พบบ่อย

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.

Lab Skill · Games

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.

Lab Skill · Games

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.

Lab Skill · Games

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.

Lab Skill · Games

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.

Lab Skill · Games

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.

Lab Skill · Games

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.