struct Camera3D
Swift
struct Camera3D
A perspective camera: where it is, what it looks at, and how wide it sees.
Sources/LavaUI/Spatial.swift:78
Properties
var far: Float
Distance to the far clipping plane. Anything farther is not drawn.
Sources/LavaUI/Spatial.swift:88
var fieldOfView: Angle3D
Vertical field of view.
Sources/LavaUI/Spatial.swift:84
var near: Float
Distance to the near clipping plane. Anything closer is not drawn.
Sources/LavaUI/Spatial.swift:86
var position: Vector3
Where the camera is, in world units.
Sources/LavaUI/Spatial.swift:80
var target: Vector3
The point the camera looks at; also what orbit controls turn around.
Sources/LavaUI/Spatial.swift:82
Methods
static func perspective(position: Vector3 = [0, 0, 7], target: Vector3 = [0, 0, 0], fieldOfView: Angle3D = .degrees(42), near: Float = 0.05, far: Float = 100) -> Camera3D
A camera on the +z axis looking at the origin, with a 42° field of view.
Sources/LavaUI/Spatial.swift:91