Phaser AE

Voxel Editor

Free packv3.0.0-33DLogic

Point at a block and change it. The targeting, the cadence, the mining progress and the guards a block-building game needs, with none of the effects, so a break means whatever your game says it means.

This is a Free pack. Every phaser.io account can use it in their games.

Released October 14, 2026 · updated October 19, 2026

Voxel Editor: a screenshot of its demo
A note about these graphics

Expansion packs don't come with graphics. This screenshot is one way of drawing what the pack does, made for its demo: none of the sprites, tiles or backgrounds in it are in the pack.

That's by design. A pack is a game's logic, mechanics and effects, and it works with whatever art you give it. Some packs draw effects, backdrops or 3D scenes of their own, but none carries a game's sprites.

So the look is yours. Make the art on phaser.io, bring your own, or let your agent draw it in code: the same pack can look like anything.

What it does

Each frame you call update(dt, input) with a ray, usually from the eye along the camera, and whether the break and place buttons are held. The editor casts the ray into the voxel world within reach, commits a target, and returns it with the empty cell a place would fill, whether that place is refused, and anything hit, broken or placed this frame. The same events reach onHit, onBreak and onPlace.

Four rules make it feel right. The target is debounced: a new target must hold for a few frames before it commits, so the outline does not flip between two cells at a seam where one pixel of aim decides. The cadence timer persists across a change of target: breaking a block reveals the one behind it, and resetting the timer then would let a held button break one block per frame and dig straight down; only the per-block progress resets. Hardness says how many hits a block takes, one by default for creative mining, and anything more makes onHit report a rising progress for a crack overlay. And forbid marks cells a place must not fill, usually the player's own body, with blocked reported so a placement ghost can turn red.

It draws nothing and plays nothing. Debris, dropped items, sounds and scores are your game's, written in the callbacks. cubeOutline gives the twelve edges of a unit cube as polylines, for drawing the target outline and the placement ghost.

Features

  • Debounced targeting — debounce frames before a new target commits, 3 by default, 0 for instant.
  • Held-button cadence — breakRate and placeRate seconds between actions, 0.15 and 0.2 by default.
  • Hardness — hits needed per block id, with progress from 0 to 1 on every hit.
  • An anti-embed guard — forbid refuses places into cells such as the player's body, and reports blocked.
  • Hotbar-ready — block sets what a place drops and reach the ray's length in blocks, 8 by default, both live.
  • Events, not effects — onHit, onBreak and onPlace, and the same in what update returns.
  • An outline shape — cubeOutline for the target outline and the ghost.

Good for

  • Block-building sandbox games in the style of Minecraft, in creative or survival play.
  • Survival mining, where harder blocks take several hits and report their progress for a crack overlay.
  • Creative build modes with instant breaking and a hotbar of blocks.
  • Digging and voxel puzzle games where the player carves a way through a block world.

Make it yours

The options are reach, block, breakRate, placeRate and debounce, and block, reach, hardness and forbid can be changed while the game runs. Two different uses: a creative mode with every block breaking in one hit, a long reach and a quick place rate for building; and a survival mode with a hardness function that makes soft blocks one hit and stone several, debris and a dropped item spawned in onBreak, and a crack overlay drawn from each hit's progress.

A quick look

Debris on every break, a guard round the player, and one frame of editing:

game.voxelEdit.onBreak(e => spawnDebris(e.x, e.y, e.z, e.id));
game.voxelEdit.forbid((x, y, z) => insidePlayer(x, y, z));
const r = game.voxelEdit.update(dt, { origin: eye, dir: mc.forward(), mining: mc.mining, placing: mc.placing });
if (r.target) moveOutlineTo(r.target);

Works with

  • voxels-3d — the block world it edits, which it needs.
  • rig-minecraft — the first-person block-game controls that say when break and place are held.
  • vector-3d — wireframe lines to draw the target outline and the placement ghost.
  • particles-3d — debris when a block breaks.

Good to know

  • It owns no visuals: the outline and the ghost are yours to draw, and the editor only says where they go.
  • One ray, one target: there is no area edit, fill or undo; build those on the voxel world's own block setter.
  • It finds the voxel world through the registry and does nothing until one is composed.

More Logic packs

Show all →