FixedKeyControlConfig
<static> FixedKeyControlConfig
name | type | optional | default | description |
---|---|---|---|---|
camera | Yes | The Camera that this Control will update. | ||
left | Yes | The Key to be pressed that will move the Camera left. | ||
right | Yes | The Key to be pressed that will move the Camera right. | ||
up | Yes | The Key to be pressed that will move the Camera up. | ||
down | Yes | The Key to be pressed that will move the Camera down. | ||
zoomIn | Yes | The Key to be pressed that will zoom the Camera in. | ||
zoomOut | Yes | The Key to be pressed that will zoom the Camera out. | ||
zoomSpeed | number | Yes | 0.01 | The speed at which the camera will zoom if the |
speed | number | Object | Yes | 0 | The horizontal and vertical speed the camera will move. |
minZoom | number | Yes | 0.001 | The smallest zoom value the camera will reach when zoomed out. |
maxZoom | number | Yes | 1000 | The largest zoom value the camera will reach when zoomed in. |
Type: object
Member of: Phaser.Types.Cameras.Controls
Source: src/cameras/controls/typedefs/FixedKeyControlConfig.js#L1
Since: 3.0.0
SmoothedKeyControlConfig
<static> SmoothedKeyControlConfig
name | type | optional | default | description |
---|---|---|---|---|
camera | Yes | The Camera that this Control will update. | ||
left | Yes | The Key to be pressed that will move the Camera left. | ||
right | Yes | The Key to be pressed that will move the Camera right. | ||
up | Yes | The Key to be pressed that will move the Camera up. | ||
down | Yes | The Key to be pressed that will move the Camera down. | ||
zoomIn | Yes | The Key to be pressed that will zoom the Camera in. | ||
zoomOut | Yes | The Key to be pressed that will zoom the Camera out. | ||
zoomSpeed | number | Yes | 0.01 | The speed at which the camera will zoom if the |
acceleration | number | Object | Yes | 0 | The horizontal and vertical acceleration the camera will move. |
drag | number | Object | Yes | 0 | The horizontal and vertical drag applied to the camera when it is moving. |
maxSpeed | number | Object | Yes | 0 | The maximum horizontal and vertical speed the camera will move. |
minZoom | number | Yes | 0.001 | The smallest zoom value the camera will reach when zoomed out. |
maxZoom | number | Yes | 1000 | The largest zoom value the camera will reach when zoomed in. |
Type: object
Member of: Phaser.Types.Cameras.Controls
Source: src/cameras/controls/typedefs/SmoothedKeyControlConfig.js#L1
Since: 3.0.0