mirror of
https://github.com/wassname/phaser.git
synced 2026-09-10 12:29:30 +08:00
Updated doc files.
This commit is contained in:
+111
-38
@@ -90,6 +90,10 @@
|
||||
<a href="Phaser.Device.html">Device</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="Phaser.DOMSprite.html">DOMSprite</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="Phaser.Easing.html">Easing</a>
|
||||
</li>
|
||||
@@ -162,6 +166,14 @@
|
||||
<a href="Phaser.GameObjectFactory.html">GameObjectFactory</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="Phaser.Gamepad.html">Gamepad</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="Phaser.GamepadButton.html">GamepadButton</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="Phaser.Graphics.html">Graphics</a>
|
||||
</li>
|
||||
@@ -186,6 +198,10 @@
|
||||
<a href="Phaser.Keyboard.html">Keyboard</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="Phaser.Line.html">Line</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="Phaser.LinkedList.html">LinkedList</a>
|
||||
</li>
|
||||
@@ -278,6 +294,10 @@
|
||||
<a href="Phaser.Signal.html">Signal</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="Phaser.SinglePad.html">SinglePad</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="Phaser.Sound.html">Sound</a>
|
||||
</li>
|
||||
@@ -342,6 +362,10 @@
|
||||
<a href="Phaser.Timer.html">Timer</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="Phaser.TimerEvent.html">TimerEvent</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="Phaser.Touch.html">Touch</a>
|
||||
</li>
|
||||
@@ -374,36 +398,6 @@
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
<li class="dropdown">
|
||||
<a href="global.html" class="dropdown-toggle" data-toggle="dropdown">Global<b
|
||||
class="caret"></b></a>
|
||||
|
||||
<ul class="dropdown-menu ">
|
||||
|
||||
<li>
|
||||
<a href="global.html#bottom">bottom</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="global.html#HEXtoRGB">HEXtoRGB</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="global.html#render">render</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="global.html#renderXY">renderXY</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="global.html#right">right</a>
|
||||
</li>
|
||||
|
||||
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
@@ -423,7 +417,7 @@
|
||||
<article>
|
||||
<pre class="sunlight-highlight-javascript linenums">/**
|
||||
* @author Richard Davey <rich@photonstorm.com>
|
||||
* @copyright 2013 Photon Storm Ltd.
|
||||
* @copyright 2014 Photon Storm Ltd.
|
||||
* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}
|
||||
*/
|
||||
|
||||
@@ -447,7 +441,6 @@ Phaser.Stage = function (game, width, height) {
|
||||
/**
|
||||
* @property {string} game - Background color of the stage (defaults to black). Set via the public backgroundColor property.
|
||||
* @private
|
||||
* @default 'rgb(0,0,0)'
|
||||
*/
|
||||
this._backgroundColor = 'rgb(0,0,0)';
|
||||
|
||||
@@ -457,10 +450,9 @@ Phaser.Stage = function (game, width, height) {
|
||||
this.offset = new Phaser.Point();
|
||||
|
||||
/**
|
||||
* @property {HTMLCanvasElement} canvas - Reference to the newly created <canvas> element.
|
||||
* @property {HTMLCanvasElement} canvas - Reference to the newly created `canvas` element.
|
||||
*/
|
||||
this.canvas = Phaser.Canvas.create(width, height);
|
||||
this.canvas.style['-webkit-full-screen'] = 'width: 100%; height: 100%';
|
||||
this.canvas = null;
|
||||
|
||||
/**
|
||||
* @property {PIXI.Stage} _stage - The Pixi Stage which is hooked to the renderer.
|
||||
@@ -470,11 +462,21 @@ Phaser.Stage = function (game, width, height) {
|
||||
this._stage.name = '_stage_root';
|
||||
this._stage.interactive = false;
|
||||
|
||||
/**
|
||||
* @property {PIXI.Stage} display - The Pixi Stage which is hooked to the renderer.
|
||||
*/
|
||||
this.display = this._stage;
|
||||
|
||||
/**
|
||||
* @property {number} scaleMode - The current scaleMode.
|
||||
*/
|
||||
this.scaleMode = Phaser.StageScaleMode.NO_SCALE;
|
||||
|
||||
/*
|
||||
* @property {number} fullScreenScaleMode - Scale mode to be used in fullScreen
|
||||
*/
|
||||
this.fullScreenScaleMode = Phaser.StageScaleMode.NO_SCALE;
|
||||
|
||||
/**
|
||||
* @property {Phaser.StageScaleMode} scale - The scale of the current running game.
|
||||
*/
|
||||
@@ -485,6 +487,12 @@ Phaser.Stage = function (game, width, height) {
|
||||
*/
|
||||
this.aspectRatio = width / height;
|
||||
|
||||
/**
|
||||
* @property {boolean} disableVisibilityChange - By default if the browser tab loses focus the game will pause. You can stop that behaviour by setting this property to true.
|
||||
* @default
|
||||
*/
|
||||
this.disableVisibilityChange = false;
|
||||
|
||||
/**
|
||||
* @property {number} _nextOffsetCheck - The time to run the next offset check.
|
||||
* @private
|
||||
@@ -497,10 +505,73 @@ Phaser.Stage = function (game, width, height) {
|
||||
*/
|
||||
this.checkOffsetInterval = 2500;
|
||||
|
||||
if (game.config)
|
||||
{
|
||||
this.parseConfig(game.config);
|
||||
}
|
||||
else
|
||||
{
|
||||
this.canvas = Phaser.Canvas.create(width, height);
|
||||
this.canvas.style['-webkit-full-screen'] = 'width: 100%; height: 100%';
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
Phaser.Stage.prototype = {
|
||||
|
||||
/**
|
||||
* Parses a Game configuration object.
|
||||
*
|
||||
* @method Phaser.Stage#parseConfig
|
||||
* @protected
|
||||
*/
|
||||
parseConfig: function (config) {
|
||||
|
||||
if (config['canvasID'])
|
||||
{
|
||||
this.canvas = Phaser.Canvas.create(this.game.width, this.game.height, config['canvasID']);
|
||||
}
|
||||
else
|
||||
{
|
||||
this.canvas = Phaser.Canvas.create(this.game.width, this.game.height);
|
||||
}
|
||||
|
||||
if (config['canvasStyle'])
|
||||
{
|
||||
this.canvas.stlye = config['canvasStyle'];
|
||||
}
|
||||
else
|
||||
{
|
||||
this.canvas.style['-webkit-full-screen'] = 'width: 100%; height: 100%';
|
||||
}
|
||||
|
||||
if (config['checkOffsetInterval'])
|
||||
{
|
||||
this.checkOffsetInterval = config['checkOffsetInterval'];
|
||||
}
|
||||
|
||||
if (config['disableVisibilityChange'])
|
||||
{
|
||||
this.disableVisibilityChange = config['disableVisibilityChange'];
|
||||
}
|
||||
|
||||
if (config['fullScreenScaleMode'])
|
||||
{
|
||||
this.fullScreenScaleMode = config['fullScreenScaleMode'];
|
||||
}
|
||||
|
||||
if (config['scaleMode'])
|
||||
{
|
||||
this.scaleMode = config['scaleMode'];
|
||||
}
|
||||
|
||||
if (config['backgroundColor'])
|
||||
{
|
||||
this.backgroundColor = config['backgroundColor'];
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* Initialises the stage and adds the event listeners.
|
||||
* @method Phaser.Stage#boot
|
||||
@@ -563,7 +634,7 @@ Phaser.Stage.prototype = {
|
||||
return;
|
||||
}
|
||||
|
||||
if (event.type == 'pagehide' || event.type == 'blur' || document['hidden'] === true || document['webkitHidden'] === true)
|
||||
if (this.game.paused === false && (event.type == 'pagehide' || event.type == 'blur' || document['hidden'] === true || document['webkitHidden'] === true))
|
||||
{
|
||||
this.game.paused = true;
|
||||
}
|
||||
@@ -576,6 +647,8 @@ Phaser.Stage.prototype = {
|
||||
|
||||
};
|
||||
|
||||
Phaser.Stage.prototype.constructor = Phaser.Stage;
|
||||
|
||||
/**
|
||||
* @name Phaser.Stage#backgroundColor
|
||||
* @property {number|string} backgroundColor - Gets and sets the background color of the stage. The color can be given as a number: 0xff0000 or a hex string: '#ff0000'
|
||||
@@ -627,13 +700,13 @@ Object.defineProperty(Phaser.Stage.prototype, "backgroundColor", {
|
||||
|
||||
|
||||
<span class="copyright">
|
||||
Phaser Copyright © 2012-2013 Photon Storm Ltd.
|
||||
Phaser Copyright © 2012-2014 Photon Storm Ltd.
|
||||
</span>
|
||||
<br />
|
||||
|
||||
<span class="jsdoc-message">
|
||||
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.3.0-dev</a>
|
||||
on Thu Nov 28 2013 15:56:25 GMT-0000 (GMT) using the <a href="https://github.com/terryweiss/docstrap">DocStrap template</a>.
|
||||
on Wed Feb 05 2014 06:28:24 GMT-0000 (GMT) using the <a href="https://github.com/terryweiss/docstrap">DocStrap template</a>.
|
||||
</span>
|
||||
</footer>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user