mirror of
https://github.com/photonstorm/phaser
synced 2025-02-17 06:28:30 +00:00
Docs update
This commit is contained in:
parent
9675c269e6
commit
41c9f8b1e1
2 changed files with 7 additions and 3 deletions
|
@ -109,6 +109,7 @@ The Tile Sprite Game Object has been given an internal overhaul to make it more
|
|||
|
||||
### Updates
|
||||
|
||||
* The Camera class has been split into two: `BaseCamera` which contains all of the core Camera functions and properties, and would serve as a great base for you to extend for your own custom Cameras, and `Camera` which is the same name space as previously. `Camera` extends the Base Camera and adds in follower support and the Special Effects. You don't need to update your code, even if currently extending a Camera, as they work the same as before.
|
||||
* `Camera.x` and `Camera.y` have been turned into getters / setters, mapped to the internal private values `_x` and `_y` respectively. This is so that setting the Camera viewport position directly will now update the new internal resolution calculation vars too.
|
||||
* `Camera.setScene` will now set the Cameras `resolution` property at the same time and update the internal viewport vars.
|
||||
* The `Cull Tiles` method used by the Dynamic Tilemap Layer has had a nice and significant optimization. It will now use the cull area dimensions to restrict the amount of tile iteration that takes place per layer, resulting in dramatic reductions in processing time on large layers, or multiple layers (thanks @tarsupin)
|
||||
|
|
|
@ -163,7 +163,9 @@ var RenderTexture = new Class({
|
|||
this.frame = this.texture.get();
|
||||
|
||||
/**
|
||||
* An internal Camera that can be used to move around the Render Texture!
|
||||
* An internal Camera that can be used to move around the Render Texture.
|
||||
* Control it just like you would any Scene Camera. The difference is that it only impacts the placement of what
|
||||
* is drawn to the Render Texture. You can scroll, zoom and rotate this Camera.
|
||||
*
|
||||
* @name Phaser.GameObjects.RenderTexture#camera
|
||||
* @type {Phaser.Cameras.Scene2D.BaseCamera}
|
||||
|
@ -171,8 +173,6 @@ var RenderTexture = new Class({
|
|||
*/
|
||||
this.camera = new Camera(0, 0, width, height);
|
||||
|
||||
this.camera.setScene(scene);
|
||||
|
||||
/**
|
||||
* Is this Render Texture dirty or not? If not it won't spend time clearing or filling itself.
|
||||
*
|
||||
|
@ -207,6 +207,8 @@ var RenderTexture = new Class({
|
|||
this.drawGameObject = this.batchGameObjectCanvas;
|
||||
}
|
||||
|
||||
this.camera.setScene(scene);
|
||||
|
||||
this.setPosition(x, y);
|
||||
this.setSize(width, height);
|
||||
this.setOrigin(0, 0);
|
||||
|
@ -270,6 +272,7 @@ var RenderTexture = new Class({
|
|||
this.frame.glTexture = this.frame.source.glTexture;
|
||||
}
|
||||
|
||||
this.camera.setSize(width, height);
|
||||
this.frame.setSize(width, height);
|
||||
|
||||
this.width = width;
|
||||
|
|
Loading…
Add table
Reference in a new issue