Skip to content
Work in progress. These docs describe Spawnite at launch, and some parts are still being built.

Camera2DOrthographicProps

Property Type Default value Description
aimHeight? number 0 Metres above the ground the frame aims at, on the ground plane: Luminati’s 1, the character’s chest. Unreal’s spring arm TargetOffset and Cinemachine’s tracked object offset carry it as a vector’s up.
bounds? PlaneBounds | null the mounted maps' extent The plane rectangle the frame never leaves, Phaser’s camera bounds and Godot’s limits; bounds smaller than the frame centre it. Left out, the mounted maps’ extent, x alone on the side plane; null is unbounded.
dampingSeconds? number 0 Seconds the frame takes to close most of the way on the character: Godot’s position smoothing, off by default there too, and Cinemachine’s damping. A teleport snaps. While pixel-perfect a damped frame gives the character up to a texel of back-and-forth, as Unity’s Pixel Perfect Camera under Cinemachine does.
deadZone? Camera2DDeadZone { width: 0, height: 0 } Metres the character walks across the frame’s middle before the camera moves, the box’s full extent: Cinemachine’s Dead Zone Width and Height, and Phaser’s setDeadzone. In metres, so it covers twice the screen at zoom 2.
fit? "crop" | "expand" | Camera2DFit Camera2DFit.Expand How the frame meets a screen between two scales.
follow? "player" | ViewTarget | null CameraTarget.ViewTarget What the frame follows, as Camera’s follow: the view target through the dead zone, damping, look-ahead and bounds below, as Godot’s Camera2D and Phaser’s startFollow follow. null holds the frame where it was last placed and leaves the aim to the game’s onCameraUpdate, which moves it with placeCamera2D or runs aimCamera2D itself, as Phaser’s stopFollow.
followHeight? boolean false Follows the height the character last stood at, on the ground plane, so a terrace or a cliff top stays in the frame’s middle; a jump holds it, and a target that is no character is followed as it moves. Off, the frame aims at the plane, as a flat map wants.
highGround? Camera2DHighGround undefined Steepens the pitch over high ground, on the ground plane.
lookAheadDampingSeconds? number 0.25 Seconds the look-ahead takes to close most of the way, Cinemachine’s Lookahead Smoothing.
lookAheadSeconds? number 0 Seconds of the character’s velocity the frame moves ahead of it, Cinemachine’s Lookahead Time.
maxZoom? number zoom The most zoom the player reaches, as minZoom.
minZoom? number zoom The least zoom the wheel, a pinch and the held zoomOut reach, the name three’s OrbitControls give it. Set with maxZoom, the player zooms; left out, zoom holds. Luminati’s eye stands 18 to 42 m off at 30, 0.71 to 1.67 at a referenceHeight 30 m away. Whole numbers while pixel-perfect.
offset? readonly [number, number] [0, 0] Metres the frame sits off the character, screen right and screen up: Godot’s offset and Cinemachine’s tracked object offset, such as a platformer’s character in the lower third.
orbit? Camera2DOrbit undefined Turns the view about world up on the ground plane, on a smooth lens. Left out, the view keeps its yaw of 0.
pitch? number square on: 90 on the ground, 0 on the side plane Degrees the camera looks down from level, as Camera’s pitch. Square on to the plane is 90 on the ground, straight down, and 0 on the side plane, level. Away from it the view tilts for a 2.5D look, the eye south of what it frames on the ground and above it on the side plane, and draws smooth. From 5 to 90 on the ground and from 0 to 85 on the side plane.
pixelPerfect? boolean square on Draws into a small target upscaled by a whole number, so no texel stretches. On where it can hold, square on to the plane; set with a tilt it throws in development.
pixelsPerMetre? number 16 Texels in a metre, which every sheet and tile set must match. Unity’s and PlayCanvas’s pixels per unit default to 100.
plane? "ground" | "side" | Plane2D Plane2D.Ground The plane the game plays on.
projection? "orthographic" | Orthographic CameraProjection.Orthographic -
referenceHeight? number 360 Texels across the screen’s short side, a whole number: the baseline the whole scale is chosen from, Godot’s 640 by 360 baseline. Under Camera2DFit.Expand a screen between two scales shows more, and one shorter than this shows less; under Crop the frame is this tall, or this wide on an upright screen.
referenceWidth? number referenceHeight at 16 by 9, 640 for 360 Texels across the long side under Camera2DFit.Crop; unread under Expand.
shakeTexels? number 4 Texels a whole shake moves the frame, in the plane and never turning it; whole texels while pixel-perfect.
zoom? number 1 What multiplies the scale, for a level-up’s close-in: a whole number while pixel-perfect, any positive number when smooth. With minZoom and maxZoom, where the player’s zoom starts. A perspective lens stands referenceHeight texels’ frame away, so the eye’s distance divides by it.