mirror of
https://github.com/photonstorm/phaser
synced 2025-02-17 06:28:30 +00:00
fixed #3646
This commit is contained in:
parent
60d35be269
commit
330e039763
1 changed files with 8 additions and 8 deletions
|
@ -428,8 +428,8 @@ var Camera = new Class({
|
||||||
var cullW = cameraW + objectW;
|
var cullW = cameraW + objectW;
|
||||||
var cullH = cameraH + objectH;
|
var cullH = cameraH + objectH;
|
||||||
|
|
||||||
if (tx > -objectW || ty > -objectH || tx < cullW || ty < cullH ||
|
if (tx > -objectW && ty > -objectH && tx < cullW && ty < cullH &&
|
||||||
tw > -objectW || th > -objectH || tw < cullW || th < cullH)
|
tw > -objectW && th > -objectH && tw < cullW && th < cullH)
|
||||||
{
|
{
|
||||||
culledObjects.push(object);
|
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.
|
* 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.
|
* Rotating a camera does not rotate the viewport itself, it is applied during rendering.
|
||||||
*
|
*
|
||||||
* @method Phaser.Cameras.Scene2D.Camera#setAngle
|
* @method Phaser.Cameras.Scene2D.Camera#setAngle
|
||||||
|
@ -774,7 +774,7 @@ var Camera = new Class({
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the background color for this Camera.
|
* 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
|
* By default a Camera has a transparent background but it can be given a solid color, with any level
|
||||||
* of transparency, via this method.
|
* of transparency, via this method.
|
||||||
*
|
*
|
||||||
|
@ -845,7 +845,7 @@ var Camera = new Class({
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set the position of the Camera viewport within the game.
|
* Set the position of the Camera viewport within the game.
|
||||||
*
|
*
|
||||||
* This does not change where the camera is 'looking'. See `setScroll` to control that.
|
* This does not change where the camera is 'looking'. See `setScroll` to control that.
|
||||||
*
|
*
|
||||||
* @method Phaser.Cameras.Scene2D.Camera#setPosition
|
* @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.
|
* 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.
|
* Rotating a camera does not rotate the viewport itself, it is applied during rendering.
|
||||||
*
|
*
|
||||||
* @method Phaser.Cameras.Scene2D.Camera#setRotation
|
* @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.
|
* Set the position of where the Camera is looking within the game.
|
||||||
* You can also modify the properties `Camera.scrollX` and `Camera.scrollY` directly.
|
* 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.
|
* 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.
|
* This does not change where the camera viewport is placed. See `setPosition` to control that.
|
||||||
*
|
*
|
||||||
* @method Phaser.Cameras.Scene2D.Camera#setScroll
|
* @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
|
* 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
|
* the method `Camera.setScroll` instead. This method is for changing the viewport
|
||||||
* itself, not what the camera can see.
|
* 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,
|
* 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
|
* allowing you to create mini-cam style effects by creating and positioning a smaller Camera
|
||||||
* viewport within your game.
|
* viewport within your game.
|
||||||
|
|
Loading…
Add table
Reference in a new issue