Skip to content

Commit f0f93cd

Browse files
committed
The CameraManager.onResize method no longer receives or uses the resolution parameter.
1 parent 3579d39 commit f0f93cd

1 file changed

Lines changed: 30 additions & 30 deletions

File tree

src/cameras/2d/CameraManager.js

Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,13 @@ var SceneEvents = require('../../scene/events');
1515
/**
1616
* @classdesc
1717
* The Camera Manager is a plugin that belongs to a Scene and is responsible for managing all of the Scene Cameras.
18-
*
18+
*
1919
* By default you can access the Camera Manager from within a Scene using `this.cameras`, although this can be changed
2020
* in your game config.
21-
*
21+
*
2222
* Create new Cameras using the `add` method. Or extend the Camera class with your own addition code and then add
2323
* the new Camera in using the `addExisting` method.
24-
*
24+
*
2525
* Cameras provide a view into your game world, and can be positioned, rotated, zoomed and scrolled accordingly.
2626
*
2727
* A Camera consists of two elements: The viewport and the scroll values.
@@ -36,7 +36,7 @@ var SceneEvents = require('../../scene/events');
3636
* viewport, and changing the viewport has no impact on the scrolling.
3737
*
3838
* By default a Camera will render all Game Objects it can see. You can change this using the `ignore` method,
39-
* allowing you to filter Game Objects out on a per-Camera basis. The Camera Manager can manage up to 31 unique
39+
* allowing you to filter Game Objects out on a per-Camera basis. The Camera Manager can manage up to 31 unique
4040
* 'Game Object ignore capable' Cameras. Any Cameras beyond 31 that you create will all be given a Camera ID of
4141
* zero, meaning that they cannot be used for Game Object exclusion. This means if you need your Camera to ignore
4242
* Game Objects, make sure it's one of the first 31 created.
@@ -102,11 +102,11 @@ var CameraManager = new Class({
102102
* A handy reference to the 'main' camera. By default this is the first Camera the
103103
* Camera Manager creates. You can also set it directly, or use the `makeMain` argument
104104
* in the `add` and `addExisting` methods. It allows you to access it from your game:
105-
*
105+
*
106106
* ```javascript
107107
* var cam = this.cameras.main;
108108
* ```
109-
*
109+
*
110110
* Also see the properties `camera1`, `camera2` and so on.
111111
*
112112
* @name Phaser.Cameras.Scene2D.CameraManager#main
@@ -192,7 +192,7 @@ var CameraManager = new Class({
192192
// Make one
193193
this.add();
194194
}
195-
195+
196196
this.main = this.cameras[0];
197197
}
198198

@@ -204,19 +204,19 @@ var CameraManager = new Class({
204204

205205
/**
206206
* Adds a new Camera into the Camera Manager. The Camera Manager can support up to 31 different Cameras.
207-
*
207+
*
208208
* Each Camera has its own viewport, which controls the size of the Camera and its position within the canvas.
209-
*
209+
*
210210
* Use the `Camera.scrollX` and `Camera.scrollY` properties to change where the Camera is looking, or the
211211
* Camera methods such as `centerOn`. Cameras also have built in special effects, such as fade, flash, shake,
212212
* pan and zoom.
213-
*
213+
*
214214
* By default Cameras are transparent and will render anything that they can see based on their `scrollX`
215215
* and `scrollY` values. Game Objects can be set to be ignored by a Camera by using the `Camera.ignore` method.
216-
*
216+
*
217217
* The Camera will have its `roundPixels` property set to whatever `CameraManager.roundPixels` is. You can change
218218
* it after creation if required.
219-
*
219+
*
220220
* See the Camera class documentation for more details.
221221
*
222222
* @method Phaser.Cameras.Scene2D.CameraManager#add
@@ -260,15 +260,15 @@ var CameraManager = new Class({
260260

261261
/**
262262
* Adds an existing Camera into the Camera Manager.
263-
*
263+
*
264264
* The Camera should either be a `Phaser.Cameras.Scene2D.Camera` instance, or a class that extends from it.
265-
*
265+
*
266266
* The Camera will have its `roundPixels` property set to whatever `CameraManager.roundPixels` is. You can change
267267
* it after addition if required.
268-
*
268+
*
269269
* The Camera will be assigned an ID, which is used for Game Object exclusion and then added to the
270270
* manager. As long as it doesn't already exist in the manager it will be added then returned.
271-
*
271+
*
272272
* If this method returns `null` then the Camera already exists in this Camera Manager.
273273
*
274274
* @method Phaser.Cameras.Scene2D.CameraManager#addExisting
@@ -297,7 +297,7 @@ var CameraManager = new Class({
297297
{
298298
this.main = camera;
299299
}
300-
300+
301301
return camera;
302302
}
303303

@@ -306,7 +306,7 @@ var CameraManager = new Class({
306306

307307
/**
308308
* Gets the next available Camera ID number.
309-
*
309+
*
310310
* The Camera Manager supports up to 31 unique cameras, after which the ID returned will always be zero.
311311
* You can create additional cameras beyond 31, but they cannot be used for Game Object exclusion.
312312
*
@@ -354,12 +354,12 @@ var CameraManager = new Class({
354354

355355
/**
356356
* Gets the total number of Cameras in this Camera Manager.
357-
*
357+
*
358358
* If the optional `isVisible` argument is set it will only count Cameras that are currently visible.
359359
*
360360
* @method Phaser.Cameras.Scene2D.CameraManager#getTotal
361361
* @since 3.11.0
362-
*
362+
*
363363
* @param {boolean} [isVisible=false] - Set the `true` to only include visible Cameras in the total.
364364
*
365365
* @return {integer} The total number of Cameras in this Camera Manager.
@@ -387,7 +387,7 @@ var CameraManager = new Class({
387387

388388
/**
389389
* Populates this Camera Manager based on the given configuration object, or an array of config objects.
390-
*
390+
*
391391
* See the `Phaser.Types.Cameras.Scene2D.CameraConfig` documentation for details of the object structure.
392392
*
393393
* @method Phaser.Cameras.Scene2D.CameraManager#fromJSON
@@ -456,7 +456,7 @@ var CameraManager = new Class({
456456

457457
/**
458458
* Gets a Camera based on its name.
459-
*
459+
*
460460
* Camera names are optional and don't have to be set, so this method is only of any use if you
461461
* have given your Cameras unique names.
462462
*
@@ -484,7 +484,7 @@ var CameraManager = new Class({
484484

485485
/**
486486
* Returns an array of all cameras below the given Pointer.
487-
*
487+
*
488488
* The first camera in the array is the top-most camera in the camera list.
489489
*
490490
* @method Phaser.Cameras.Scene2D.CameraManager#getCamerasBelowPointer
@@ -519,10 +519,10 @@ var CameraManager = new Class({
519519

520520
/**
521521
* Removes the given Camera, or an array of Cameras, from this Camera Manager.
522-
*
522+
*
523523
* If found in the Camera Manager it will be immediately removed from the local cameras array.
524524
* If also currently the 'main' camera, 'main' will be reset to be camera 0.
525-
*
525+
*
526526
* The removed Cameras are automatically destroyed if the `runDestroy` argument is `true`, which is the default.
527527
* If you wish to re-use the cameras then set this to `false`, but know that they will retain their references
528528
* and internal data until destroyed or re-added to a Camera Manager.
@@ -532,7 +532,7 @@ var CameraManager = new Class({
532532
*
533533
* @param {(Phaser.Cameras.Scene2D.Camera|Phaser.Cameras.Scene2D.Camera[])} camera - The Camera, or an array of Cameras, to be removed from this Camera Manager.
534534
* @param {boolean} [runDestroy=true] - Automatically call `Camera.destroy` on each Camera removed from this Camera Manager.
535-
*
535+
*
536536
* @return {integer} The total number of Cameras removed.
537537
*/
538538
remove: function (camera, runDestroy)
@@ -574,7 +574,7 @@ var CameraManager = new Class({
574574

575575
/**
576576
* The internal render method. This is called automatically by the Scene and should not be invoked directly.
577-
*
577+
*
578578
* It will iterate through all local cameras and render them in turn, as long as they're visible and have
579579
* an alpha level > 0.
580580
*
@@ -607,7 +607,7 @@ var CameraManager = new Class({
607607

608608
/**
609609
* Resets this Camera Manager.
610-
*
610+
*
611611
* This will iterate through all current Cameras, destroying them all, then it will reset the
612612
* cameras array, reset the ID counter and create 1 new single camera using the default values.
613613
*
@@ -655,9 +655,9 @@ var CameraManager = new Class({
655655
* @since 3.18.0
656656
*
657657
* @param {Phaser.Structs.Size} gameSize - The default Game Size object. This is the un-modified game dimensions.
658-
* @param {Phaser.Structs.Size} baseSize - The base Size object. The game dimensions multiplied by the resolution. The canvas width / height values match this.
658+
* @param {Phaser.Structs.Size} baseSize - The base Size object. The game dimensions. The canvas width / height values match this.
659659
*/
660-
onResize: function (gameSize, baseSize, displaySize, resolution, previousWidth, previousHeight)
660+
onResize: function (gameSize, baseSize, displaySize, previousWidth, previousHeight)
661661
{
662662
for (var i = 0; i < this.cameras.length; i++)
663663
{

0 commit comments

Comments
 (0)