You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -121,6 +121,7 @@ Updated
121
121
* Emitters now bring the particle they are about to emit to the top of the Group before doing so. Avoids particles hidden behind others.
122
122
* ArcadePhysics.Body.setSize corrected to take the parameters as positive, not negative values.
123
123
* ArcadePhysics.World.seperate will now check gravity totals to determine separation order. You can set World.forceX to true to always separate on X first and skip this check.
124
+
* TileSprites now emit outOfBounds and enterBounds events accordingly.
Copy file name to clipboardExpand all lines: src/gameobjects/TileSprite.js
+65-7Lines changed: 65 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -98,6 +98,25 @@ Phaser.TileSprite = function (game, x, y, width, height, key, frame) {
98
98
*/
99
99
this.world=newPhaser.Point(x,y);
100
100
101
+
/**
102
+
* Should this Sprite be automatically culled if out of range of the camera?
103
+
* A culled sprite has its renderable property set to 'false'.
104
+
* Be advised this is quite an expensive operation, as it has to calculate the bounds of the object every frame, so only enable it if you really need it.
105
+
*
106
+
* @property {boolean} autoCull - A flag indicating if the Sprite should be automatically camera culled or not.
107
+
* @default
108
+
*/
109
+
this.autoCull=false;
110
+
111
+
/**
112
+
* If true the Sprite checks if it is still within the world each frame, when it leaves the world it dispatches Sprite.events.onOutOfBounds
113
+
* and optionally kills the sprite (if Sprite.outOfBoundsKill is true). By default this is disabled because the Sprite has to calculate its
114
+
* bounds every frame to support it, and not all games need it. Enable it by setting the value to true.
115
+
* @property {boolean} checkWorldBounds
116
+
* @default
117
+
*/
118
+
this.checkWorldBounds=false;
119
+
101
120
/**
102
121
* @property {Phaser.Point} cameraOffset - If this object is fixedToCamera then this stores the x/y offset that its drawn at, from the top-left of the camera view.
0 commit comments