- Source: src/cameras/2d/typedefs/index.js (Line 7)
Type Definitions
-
CameraConfig
-
Type:
- object
- Since: 3.0.0
- Source: src/cameras/2d/typedefs/CameraConfig.js (Line 1)
Properties:
Name Type Argument Default Description namestring <optional>
'' The name of the Camera.
xnumber <optional>
0 The horizontal position of the Camera viewport.
ynumber <optional>
0 The vertical position of the Camera viewport.
widthnumber <optional>
The width of the Camera viewport.
heightnumber <optional>
The height of the Camera viewport.
zoomnumber <optional>
1 The default zoom level of the Camera.
rotationnumber <optional>
0 The rotation of the Camera, in radians.
roundPixelsboolean <optional>
false Should the Camera round pixels before rendering?
scrollXnumber <optional>
0 The horizontal scroll position of the Camera.
scrollYnumber <optional>
0 The vertical scroll position of the Camera.
backgroundColorfalse | string <optional>
false A CSS color string controlling the Camera background color.
boundsobject <optional>
<nullable>
Defines the Camera bounds.
Properties
Name Type Argument Default Description xnumber <optional>
0 The top-left extent of the Camera bounds.
ynumber <optional>
0 The top-left extent of the Camera bounds.
widthnumber <optional>
The width of the Camera bounds.
heightnumber <optional>
The height of the Camera bounds.
-
CameraFadeCallback(camera, progress)
-
Parameters:
Name Type Description cameraPhaser.Cameras.Scene2D.Camera The camera on which the effect is running.
progressnumber The progress of the effect. A value between 0 and 1.
- Since: 3.5.0
- Source: src/cameras/2d/typedefs/CameraFadeCallback.js (Line 1)
-
CameraFlashCallback(camera, progress)
-
Parameters:
Name Type Description cameraPhaser.Cameras.Scene2D.Camera The camera on which the effect is running.
progressnumber The progress of the effect. A value between 0 and 1.
- Since: 3.5.0
- Source: src/cameras/2d/typedefs/CameraFlashCallback.js (Line 1)
-
CameraPanCallback(camera, progress, x, y)
-
Parameters:
Name Type Description cameraPhaser.Cameras.Scene2D.Camera The camera on which the effect is running.
progressnumber The progress of the effect. A value between 0 and 1.
xnumber The Camera's new scrollX coordinate.
ynumber The Camera's new scrollY coordinate.
- Since: 3.5.0
- Source: src/cameras/2d/typedefs/CameraPanCallback.js (Line 1)
-
CameraShakeCallback(camera, progress)
-
Parameters:
Name Type Description cameraPhaser.Cameras.Scene2D.Camera The camera on which the effect is running.
progressnumber The progress of the effect. A value between 0 and 1.
- Since: 3.5.0
- Source: src/cameras/2d/typedefs/CameraShakeCallback.js (Line 1)
-
CameraZoomCallback(camera, progress, zoom)
-
Parameters:
Name Type Description cameraPhaser.Cameras.Scene2D.Camera The camera on which the effect is running.
progressnumber The progress of the effect. A value between 0 and 1.
zoomnumber The Camera's new zoom value.
- Since: 3.11.0
- Source: src/cameras/2d/typedefs/CameraZoomCallback.js (Line 1)
-
JSONCamera
-
Type:
- object
- Since: 3.0.0
- Source: src/cameras/2d/typedefs/JSONCamera.js (Line 1)
Properties:
Name Type Argument Description namestring The name of the camera
xnumber The horizontal position of camera
ynumber The vertical position of camera
widthnumber The width size of camera
heightnumber The height size of camera
zoomnumber The zoom of camera
rotationnumber The rotation of camera
roundPixelsboolean The round pixels st status of camera
scrollXnumber The horizontal scroll of camera
scrollYnumber The vertical scroll of camera
backgroundColorstring The background color of camera
boundsPhaser.Types.Cameras.Scene2D.JSONCameraBounds | undefined <optional>
The bounds of camera
-
JSONCameraBounds
-
Type:
- object
- Since: 3.0.0
- Source: src/cameras/2d/typedefs/JSONCameraBounds.js (Line 1)
Properties:
Name Type Description xnumber The horizontal position of camera
ynumber The vertical position of camera
widthnumber The width size of camera
heightnumber The height size of camera
