Phaser AE

3D World

Free packv3.0.0-43DWorld

The world every game seen in perspective is built in. A mesh is an ordinary game object with a pose, so everything that works on sprites works on it, and the camera, materials and picking are ready to use.

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

Released October 14, 2026 · updated October 19, 2026

3D World: 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

The space is fixed and simple: y is up, it is right-handed, and a camera at yaw 0 looks along +z, with increasing yaw turning right. Every 3D object is an ordinary object in the game, the same kind as a sprite, that also carries a pose, yaw, pitch, roll and a scale on three axes, and the mesh it wears. Scenes, tweens, tags, queries and timers work on it unchanged, and spawning a mesh through game.spawn means other packs' spawn data, a collider or a physics body, comes with it.

The camera has one model for the common rigs. With distance at 0, its position is the eye, for first person and free flight; above 0, the eye pulls back along the view so the position is the point it orbits or chases. roll banks the view for a flyer turning hard. Rig packs drive it, so a game rarely touches it by hand.

From the screen back into the world, toGround and groundAt find where a tap meets the ground or any horizontal plane, screenRay gives the world ray under a point, and pick and pickAll find the objects it passes through. A turret aims at the pointer at its own height in two lines. The pack draws nothing itself: it gathers what is in view, near to far with frustum culling, and render-3d draws it. A 2D game never composes it, so a 2D build ships no 3D code.

Features

  • Meshes as game objects — a pose, a mesh, a colour, a texture or a material, and billboarding, on the same objects scenes, tweens and queries already handle.
  • Primitives and your own meshes — mesh builds or reuses a primitive, defineMesh registers your own vertices, and packs can register, replace and update meshes of their own.
  • Named materials — metallic, roughness, emission, unlit, texture maps, shadow casting, soft translucency and procedural patterns, with materialAt changing every object that wears one at once.
  • One camera for every view — first person at distance 0, orbit and chase above it, with field of view, pitch and roll.
  • Screen to world — toScreen, toGround, groundAt and screenRay.
  • Picking — pick for the nearest object under a point and pickAll for everything along the ray, both with a filter.
  • Facing — lookAt turns an object to a world point once, upright if you ask.
  • Frustum culling — on by default, switchable live, with a count of what it dropped.

Good for

  • Third-person action and chase-camera games — the camera orbits or follows at a distance.
  • First-person games and free-flight cameras — the camera at distance 0 is the player's eye.
  • 3D board and tabletop games — pick finds the piece under a tap and groundAt the square.
  • Tower defence and turret games — groundAt at the turret's height, then lookAt, aims at the pointer.
  • Flight games — the camera's roll banks into the turns.
  • Prototypes from primitives — boxes and coloured, patterned materials stand in before any model is made.

Make it yours

The options name the draw layers back to front, set the near and far clip planes, and switch CPU culling on or off. Beyond that, a game's look is its meshes and materials: primitives, your own vertices, and materials whose roughness or metalness you can change live for every object wearing them.

The same world serves very different games. A first-person maze keeps the camera at distance 0, driven by rig-fps, with walls as box meshes. A tabletop strategy game pulls the camera back into an orbit over the board and uses pick to select units and groundAt to send them to the square under the pointer.

A quick look

A patterned floor, and a turret turned to face the pointer at its own height:

const tiles = game.world3d.material({ name: 'tiles', rough: 0.9, pattern: { kind: 'checker', colors: ['#8a3a2a'], scale: 0.5 } });
game.spawn({ id: 'floor', mesh: 'box', x: 0, y: -0.05, z: 0, size: [12, 0.1, 12], color: '#e8d8b8', material: tiles });
const p = game.input.pointer;
const at = p ? game.world3d.groundAt(p.x, p.y, 1) : null;     // the pointer at the turret's height
if (at) game.world3d.lookAt(turret, at.x, at.y, at.z, true);

Works with

  • core-3d — includes it with the renderer, lighting, an orbit camera, models and collisions, so most 3D games have it already.
  • render-3d — required beside it; it draws what this world gathers.
  • world-screen — a HUD drawn over the 3D view.
  • rig-orbit, rig-fps and rig-minecraft — the camera rigs that move the view.
  • aim-3d — keeps a turret or a head facing the pointer; turntable spins a dragged object.
  • pointer — tap and hover handlers on individual objects.

Good to know

  • Ray picking tests each object's oriented box, which is exact for a box and generous for a sphere or a model; render-3d offers picking against the real geometry.
  • pickAll is linear in the number of objects, so a very large scene should filter its candidates.
  • toGround returns world x and z in an { x, y } pair, the same shape as the 2D transform.
  • It needs a backend that draws meshes; the build refuses one that does not.

More World packs

Show all →