Three.js game · Portrait mobile
KNIFE SPIN:
A THREE.JS KNIFE THROWING GAME
Knife Spin is a free Three.js 3D browser game. Throw knives into a spinning log, slice apples, clear stages and beat boss logs. Built with WebGL.
· Game overview · Hosted by Indie Forge Studio
Phones: tap anywhere to throw · Desktop: Space or Enter · P pause · M mute
What Is Knife Spin?
Knife Spin is a free portrait 3D knife throwing game for phones and desktop. Tap to throw knives into the spinning log, slice apples for bonus points and clear each stage when your knives run out. Spin speeds and reversals change every stage, and every 5th stage is a boss log. Your best score is saved on your device.
It is a Three.js game that runs as a 3D browser game on WebGL, developed by Shane Brumback and hosted by Indie Forge Studio. It is free with no download or sign-up.
How to Play Knife Spin
- Throw: tap (or press Space) to throw a knife into the spinning log.
- Avoid stuck knives: if your knife hits a knife already in the log, the run is over.
- Slice apples: hit an apple on the rim for 5 bonus points.
- Clear the stage: use all your knives and the log shatters, giving a stage bonus.
- Beat bosses: every 5th stage is a big red boss log with erratic spin and more knives to land.
Controls: Phones: tap anywhere to throw · Desktop: Space or Enter · P pause · M mute
How Knife Spin Is Built with Three.js
Knife Spin is plain JavaScript with no build step. It loads Three.js r160 as an ES module from a local copy of three.module.min.js and draws everything with a single THREE.WebGLRenderer. All the 3D models are built in code from Three.js primitives, so there are no 3D model files to download. Here is what the game code actually does:
- The log is a 13-sided
CylinderGeometryrotated to face the camera, with aCircleGeometryface, all inside a group that spins each frame. - Each knife is a
THREE.Group: aConeGeometryblade flattened withgeometry.scale, plus box meshes for the guard and handle. - When a knife sticks, it is added to the spinning log group at its angle on the rim, so it turns with the log. A hit is decided by comparing that angle with the knives already there.
- Apples are low-poly
IcosahedronGeometrymeshes. Slices and stage clears throw out bursts of smallTetrahedronGeometrypieces. - Sound effects are made on the fly with the Web Audio API (
AudioContextoscillators) instead of audio files, and your best score and mute setting are stored inlocalStorage.
Code from Knife Spin
These short snippets are copied straight from the game's source code.
Sticking a knife into the log
A stuck knife is placed on the rim at its angle and added to the spinning group, so it turns with the log.
function stickAt(a) { const m = makeKnife(); m.position.set(Math.cos(a) * (R + 0.55), Math.sin(a) * (R + 0.55), 0); m.rotation.z = a + Math.PI / 2; spinner.add(m); S.stuck.push({ a, mesh: m }); }
From games/knife-spin/game.js, lines 62–62
Hit or clash
When a knife arrives, its angle on the log is compared with every stuck knife. Too close is a clash and game over; otherwise it sticks and the score goes up.
function hit() {
const k = S.flying; const local = norm(-Math.PI / 2 - spinner.rotation.z);
for (const s of S.stuck) if (Math.abs(norm(s.a - local)) < 0.2) { // clash
k.dead = true; k.vy = -10; k.vx = (Math.random() - 0.5) * 6; k.spin = 14; S.shake = 0.4;
core.beep(1400, 0.08, 'square', 0.06); core.beep(200, 0.3, 'sawtooth', 0.07, -120); core.gameOver(); return;
}
scene.remove(k.mesh); S.flying = null; stickAt(local); S.left--; S.shake = 0.12;
From games/knife-spin/game.js, lines 79–85
Touch and mouse input (shared core.js)
One pointerdown listener on the game frame handles taps and clicks alike, ignoring the pause and mute buttons, and wakes the Web Audio context on the first touch.
frame.addEventListener('pointerdown', (e) => { if (e.target.closest('.icon-btn')) return; C.audio(); e.preventDefault(); primary(e); });
From games/knife-spin/core.js, lines 51–51
Built for Mobile and Portrait Play
Knife Spin is designed for phones held upright. The game runs in a 9:16 portrait frame, and on desktop it plays in a centered portrait frame. Input uses pointer events, so the same code handles touch and mouse, with keyboard controls on desktop.
To keep it smooth on phones, the renderer caps the device pixel ratio, and the game pauses itself when you switch tabs or apps. Phones that support it give a short vibration as feedback.
Play Knife Spin
Free, in your browser, no download. Hosted by Indie Forge Studio.
More games: Browse all 3D games
Frequently Asked Questions
How do I play Knife Spin?
Tap the screen, or press Space or Enter, to throw a knife upward into the spinning log. Time each throw so it lands in an open spot away from the knives already stuck there.
What happens on boss stages?
Every 5th stage is a larger red boss log that speeds up, slows down and reverses unpredictably. Clearing it is worth double the stage bonus.
Is Knife Spin free and does it work on phones?
Yes. It is free, needs no download and is built portrait-first for phones. On desktop it plays in a centered portrait frame.
Is my best score saved?
Yes. Your best score is saved in your browser with localStorage, so it is still there next time you play on the same device.
Can I turn the sound off?
Yes. Tap the speaker button or press M to mute. Your choice is remembered.
Is Knife Spin built with Three.js?
Yes. Knife Spin is a Three.js 3D browser game rendered with WebGL, so it runs in any modern web browser on desktop or mobile with no download or install.
Who hosts Knife Spin?
Knife Spin is developed by Shane Brumback and hosted by Indie Forge Studio. You can play it free on its game page.
Can I learn to make a game like this?
Yes. Browse the free Three.js tutorials.








