RtsCameraOptions beta
Interface of @v12-engine/client
export interface RtsCameraOptionsSettings for an RTS camera: its angle, how near and far it goes, its speed and its edges
Members
bounds
bounds?: CameraBounds;Where the player may look, in world units: a part of the map. The whole map when left out
distance
distance?: number;The distance the view starts at, in cells: 32 when left out, kept between the nearest and the farthest
edgeSize
edgeSize?: number;Pixels from the screen edge where the view starts to scroll
maxDistance
maxDistance?: number;How far the view goes, in cells: 48 when left out. RtsCamera.setLimits changes both while the game runs
minDistance
minDistance?: number;How close the view comes, in cells: 12 when left out
overviewFrom
overviewFrom?: number;Past this distance the view looks at the map rather than from in it, as an editor's does: the map's mist and what is left out by distance (DetailLook.cull, a level's draw: 'none') move away by as much as the view is farther than this, so they look from up there as they do from here. A game's camera stays in its look when left out
pitch
pitch?: number;Degrees between the view direction and the ground, the same at every zoom: 56 when left out. A game's view with neither this nor pitchCurve tilts as it zooms, as the examples' do (zoomPitch)
pitchCurve
pitchCurve?: (distance: number) => number;How steep the view is at a distance, in degrees, instead of pitch: closer is flatter, as in Warcraft III ((distance) => 40 + distance * 0.4). While there is one it has the say over tilt and topDown
turn
turn?: boolean;Whether the player may turn the view (Q and E, where the keys are as they come). Yes when left out
yaw
yaw?: number;Degrees the view rests turned by, and swings back to once the keys that turn it are let go of: 0 looks north
zoomSpeed
zoomSpeed?: number;How fast the wheel zooms, times the usual: 1 when left out
zoomToPointer
zoomToPointer?: boolean;Whether the wheel zooms about what is under the pointer, which stays there, rather than about the middle of the view. No when left out