Constructor
new Camera(Render)
Creates a new camera object used by Render
Parameters:
Name | Type | Description |
---|---|---|
Render | Render | Render object the camera for |
- Source
Members
(readonly) position :vec
Position of the camera
Type:
- Source
(readonly) fov :number
Field of view
Type:
- number
- Source
Methods
setPosition(position)
Sets the camera position
Parameters:
Name | Type | Description |
---|---|---|
position | vec | New position |
- Source
setFov(fov)
Sets the camera's field of view
Parameters:
Name | Type | Description |
---|---|---|
fov | number | New field of view |
- Source
(async) shake(intensityopt, durationopt, intensityCurveopt, directionopt)
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
intensity | number | <optional> | 30 | How much the camera shakes |
duration | number | <optional> | 1 | How long the camera shakes, in seconds |
intensityCurve | function | <optional> | Animation.ease.out.cubic | Animation curve, see Animation for ease functions |
direction | vec | <optional> | Direction the camera shakes. Shakes in all directions if left undefined |
- Source