From 330e0397635d62b27b3e6b842cdac1462325d5c0 Mon Sep 17 00:00:00 2001 From: Austyn Studdard Date: Sat, 19 May 2018 13:36:42 -0500 Subject: [PATCH] fixed #3646 --- src/cameras/2d/Camera.js | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/cameras/2d/Camera.js b/src/cameras/2d/Camera.js index e5b0ca581..df861d71f 100644 --- a/src/cameras/2d/Camera.js +++ b/src/cameras/2d/Camera.js @@ -428,8 +428,8 @@ var Camera = new Class({ var cullW = cameraW + objectW; var cullH = cameraH + objectH; - if (tx > -objectW || ty > -objectH || tx < cullW || ty < cullH || - tw > -objectW || th > -objectH || tw < cullW || th < cullH) + if (tx > -objectW && ty > -objectH && tx < cullW && ty < cullH && + tw > -objectW && th > -objectH && tw < cullW && th < cullH) { culledObjects.push(object); } @@ -753,7 +753,7 @@ var Camera = new Class({ /** * Set the rotation of this Camera. This causes everything it renders to appear rotated. - * + * * Rotating a camera does not rotate the viewport itself, it is applied during rendering. * * @method Phaser.Cameras.Scene2D.Camera#setAngle @@ -774,7 +774,7 @@ var Camera = new Class({ /** * Sets the background color for this Camera. - * + * * By default a Camera has a transparent background but it can be given a solid color, with any level * of transparency, via this method. * @@ -845,7 +845,7 @@ var Camera = new Class({ /** * Set the position of the Camera viewport within the game. - * + * * This does not change where the camera is 'looking'. See `setScroll` to control that. * * @method Phaser.Cameras.Scene2D.Camera#setPosition @@ -868,7 +868,7 @@ var Camera = new Class({ /** * Set the rotation of this Camera. This causes everything it renders to appear rotated. - * + * * Rotating a camera does not rotate the viewport itself, it is applied during rendering. * * @method Phaser.Cameras.Scene2D.Camera#setRotation @@ -926,7 +926,7 @@ var Camera = new Class({ * Set the position of where the Camera is looking within the game. * You can also modify the properties `Camera.scrollX` and `Camera.scrollY` directly. * Use this method, or the scroll properties, to move your camera around the game world. - * + * * This does not change where the camera viewport is placed. See `setPosition` to control that. * * @method Phaser.Cameras.Scene2D.Camera#setScroll @@ -978,7 +978,7 @@ var Camera = new Class({ * If you're trying to change where the Camera is looking at in your game, then see * the method `Camera.setScroll` instead. This method is for changing the viewport * itself, not what the camera can see. - * + * * By default a Camera is the same size as the game, but can be made smaller via this method, * allowing you to create mini-cam style effects by creating and positioning a smaller Camera * viewport within your game.