mirror of
https://github.com/photonstorm/phaser
synced 2024-11-23 21:24:09 +00:00
No longer needed.
This commit is contained in:
parent
6784a9c1df
commit
8069560aaf
1 changed files with 0 additions and 78 deletions
|
@ -1,78 +0,0 @@
|
|||
/**
|
||||
* @author Mat Groves http://matgroves.com/ @Doormat23
|
||||
*/
|
||||
|
||||
/**
|
||||
* A Stage represents the root of the display tree. Everything connected to the stage is rendered
|
||||
*
|
||||
* @class Stage
|
||||
* @extends DisplayObjectContainer
|
||||
* @constructor
|
||||
* @param backgroundColor {Number} the background color of the stage, you have to pass this in is in hex format
|
||||
* like: 0xFFFFFF for white
|
||||
*
|
||||
* Creating a stage is a mandatory process when you use Pixi, which is as simple as this :
|
||||
* var stage = new PIXI.Stage(0xFFFFFF);
|
||||
* where the parameter given is the background colour of the stage, in hex
|
||||
* you will use this stage instance to add your sprites to it and therefore to the renderer
|
||||
* Here is how to add a sprite to the stage :
|
||||
* stage.addChild(sprite);
|
||||
*/
|
||||
PIXI.Stage = function(backgroundColor)
|
||||
{
|
||||
PIXI.DisplayObjectContainer.call( this );
|
||||
|
||||
/**
|
||||
* [read-only] Current transform of the object based on world (parent) factors
|
||||
*
|
||||
* @property worldTransform
|
||||
* @type Matrix
|
||||
* @readOnly
|
||||
* @private
|
||||
*/
|
||||
this.worldTransform = new PIXI.Matrix();
|
||||
|
||||
this.stage = this;
|
||||
|
||||
this.r = 0;
|
||||
this.g = 0;
|
||||
this.b = 0;
|
||||
this.a = 0;
|
||||
// this.setBackgroundColor(backgroundColor);
|
||||
};
|
||||
|
||||
// constructor
|
||||
PIXI.Stage.prototype = Object.create( PIXI.DisplayObjectContainer.prototype );
|
||||
PIXI.Stage.prototype.constructor = PIXI.Stage;
|
||||
|
||||
/*
|
||||
* Updates the object transform for rendering
|
||||
*
|
||||
* @method updateTransform
|
||||
* @private
|
||||
*/
|
||||
PIXI.Stage.prototype.updateTransform = function()
|
||||
{
|
||||
this.worldAlpha = 1;
|
||||
|
||||
for (var i = 0; i < this.children.length; i++)
|
||||
{
|
||||
this.children[i].updateTransform();
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Sets the background color for the stage
|
||||
*
|
||||
* @method setBackgroundColor
|
||||
* @param backgroundColor {Number} the color of the background, easiest way to pass this in is in hex format
|
||||
* like: 0xFFFFFF for white
|
||||
PIXI.Stage.prototype.setBackgroundColor = function(backgroundColor)
|
||||
{
|
||||
this.backgroundColor = backgroundColor || 0x000000;
|
||||
this.backgroundColorSplit = PIXI.hex2rgb(this.backgroundColor);
|
||||
var hex = this.backgroundColor.toString(16);
|
||||
hex = '000000'.substr(0, 6 - hex.length) + hex;
|
||||
this.backgroundColorString = '#' + hex;
|
||||
};
|
||||
*/
|
Loading…
Reference in a new issue