Skip to content

Commit efe649b

Browse files
authored
Merge pull request phaserjs#3628 from PaNaVTEC/camerajsonbounds-typings
Fix camera bound typings
2 parents eb1c55b + 5f03557 commit efe649b

1 file changed

Lines changed: 9 additions & 5 deletions

File tree

src/cameras/2d/Camera.js

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,14 @@ var TransformMatrix = require('../../gameobjects/components/TransformMatrix');
1313
var ValueToColor = require('../../display/color/ValueToColor');
1414
var Vector2 = require('../../math/Vector2');
1515

16+
/**
17+
* @typedef {object} JSONCameraBounds
18+
* @property {number} x - The horizontal position of camera
19+
* @property {number} y - The vertical position of camera
20+
* @property {number} width - The width size of camera
21+
* @property {number} height - The height size of camera
22+
*/
23+
1624
/**
1725
* @typedef {object} JSONCamera
1826
*
@@ -27,11 +35,7 @@ var Vector2 = require('../../math/Vector2');
2735
* @property {number} scrollX - The horizontal scroll of camera
2836
* @property {number} scrollY - The vertical scroll of camera
2937
* @property {string} backgroundColor - The background color of camera
30-
* @property {object} [bounds] - The bounds of camera
31-
* @property {number} [bounds.x] - The horizontal position of bounds of camera
32-
* @property {number} [bounds.y] - The vertical position of bounds of camera
33-
* @property {number} [bounds.width] - The width of the bounds of camera
34-
* @property {number} [bounds.height] - The height of the bounds of camera
38+
* @property {(JSONCameraBounds|undefined)} [bounds] - The bounds of camera
3539
*/
3640

3741
/**

0 commit comments

Comments
 (0)