phaser/docs/Phaser.StageScaleMode.html

4302 lines
No EOL
58 KiB
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Phaser Class: StageScaleMode</title>
<!--[if lt IE 9]>
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<link type="text/css" rel="stylesheet" href="styles/sunlight.default.css">
<link type="text/css" rel="stylesheet" href="styles/site.cerulean.css">
</head>
<body>
<div class="container-fluid">
<div class="navbar navbar-fixed-top navbar-inverse">
<div class="navbar-inner">
<a class="brand" href="index.html">Phaser</a>
<ul class="nav">
<li class="dropdown">
<a href="namespaces.list.html" class="dropdown-toggle" data-toggle="dropdown">Namespaces<b
class="caret"></b></a>
<ul class="dropdown-menu ">
<li>
<a href="Phaser.html">Phaser</a>
</li>
</ul>
</li>
<li class="dropdown">
<a href="classes.list.html" class="dropdown-toggle" data-toggle="dropdown">Classes<b
class="caret"></b></a>
<ul class="dropdown-menu ">
<li>
<a href="Phaser.Animation.html">Animation</a>
</li>
<li>
<a href="Phaser.AnimationManager.html">AnimationManager</a>
</li>
<li>
<a href="Phaser.AnimationParser.html">AnimationParser</a>
</li>
<li>
<a href="Phaser.BitmapText.html">BitmapText</a>
</li>
<li>
<a href="Phaser.Button.html">Button</a>
</li>
<li>
<a href="Phaser.Cache.html">Cache</a>
</li>
<li>
<a href="Phaser.Camera.html">Camera</a>
</li>
<li>
<a href="Phaser.Canvas.html">Canvas</a>
</li>
<li>
<a href="Phaser.Circle.html">Circle</a>
</li>
<li>
<a href="Phaser.Color.html">Color</a>
</li>
<li>
<a href="Phaser.Device.html">Device</a>
</li>
<li>
<a href="Phaser.Easing.html">Easing</a>
</li>
<li>
<a href="Phaser.Easing.Back.html">Back</a>
</li>
<li>
<a href="Phaser.Easing.Bounce.html">Bounce</a>
</li>
<li>
<a href="Phaser.Easing.Circular.html">Circular</a>
</li>
<li>
<a href="Phaser.Easing.Cubic.html">Cubic</a>
</li>
<li>
<a href="Phaser.Easing.Elastic.html">Elastic</a>
</li>
<li>
<a href="Phaser.Easing.Exponential.html">Exponential</a>
</li>
<li>
<a href="Phaser.Easing.Linear.html">Linear</a>
</li>
<li>
<a href="Phaser.Easing.Quadratic.html">Quadratic</a>
</li>
<li>
<a href="Phaser.Easing.Quartic.html">Quartic</a>
</li>
<li>
<a href="Phaser.Easing.Quintic.html">Quintic</a>
</li>
<li>
<a href="Phaser.Easing.Sinusoidal.html">Sinusoidal</a>
</li>
<li>
<a href="Phaser.Events.html">Events</a>
</li>
<li>
<a href="Phaser.Frame.html">Frame</a>
</li>
<li>
<a href="Phaser.FrameData.html">FrameData</a>
</li>
<li>
<a href="Phaser.Game.html">Game</a>
</li>
<li>
<a href="Phaser.GameObjectFactory.html">GameObjectFactory</a>
</li>
<li>
<a href="Phaser.Graphics.html">Graphics</a>
</li>
<li>
<a href="Phaser.Group.html">Group</a>
</li>
<li>
<a href="Phaser.Input.html">Input</a>
</li>
<li>
<a href="Phaser.InputHandler.html">InputHandler</a>
</li>
<li>
<a href="Phaser.Key.html">Key</a>
</li>
<li>
<a href="Phaser.Keyboard.html">Keyboard</a>
</li>
<li>
<a href="Phaser.LinkedList.html">LinkedList</a>
</li>
<li>
<a href="Phaser.Loader.html">Loader</a>
</li>
<li>
<a href="Phaser.LoaderParser.html">LoaderParser</a>
</li>
<li>
<a href="Phaser.Math.html">Math</a>
</li>
<li>
<a href="Phaser.Mouse.html">Mouse</a>
</li>
<li>
<a href="Phaser.MSPointer.html">MSPointer</a>
</li>
<li>
<a href="Phaser.Net.html">Net</a>
</li>
<li>
<a href="Phaser.Particles.html">Particles</a>
</li>
<li>
<a href="Phaser.Particles.Arcade.Emitter.html">Emitter</a>
</li>
<li>
<a href="Phaser.Physics.html">Physics</a>
</li>
<li>
<a href="Phaser.Physics.Arcade.html">Arcade</a>
</li>
<li>
<a href="Phaser.Physics.Arcade.Body.html">Body</a>
</li>
<li>
<a href="Phaser.Plugin.html">Plugin</a>
</li>
<li>
<a href="Phaser.PluginManager.html">PluginManager</a>
</li>
<li>
<a href="Phaser.Point.html">Point</a>
</li>
<li>
<a href="Phaser.Pointer.html">Pointer</a>
</li>
<li>
<a href="Phaser.Polygon.html">Polygon</a>
</li>
<li>
<a href="Phaser.QuadTree.html">QuadTree</a>
</li>
<li>
<a href="Phaser.RandomDataGenerator.html">RandomDataGenerator</a>
</li>
<li>
<a href="Phaser.Rectangle.html">Rectangle</a>
</li>
<li>
<a href="Phaser.RenderTexture.html">RenderTexture</a>
</li>
<li>
<a href="Phaser.RequestAnimationFrame.html">RequestAnimationFrame</a>
</li>
<li>
<a href="Phaser.Signal.html">Signal</a>
</li>
<li>
<a href="Phaser.Sound.html">Sound</a>
</li>
<li>
<a href="Phaser.SoundManager.html">SoundManager</a>
</li>
<li>
<a href="Phaser.Sprite.html">Sprite</a>
</li>
<li>
<a href="Phaser.Stage.html">Stage</a>
</li>
<li>
<a href="Phaser.StageScaleMode.html">StageScaleMode</a>
</li>
<li>
<a href="Phaser.State.html">State</a>
</li>
<li>
<a href="Phaser.StateManager.html">StateManager</a>
</li>
<li>
<a href="Phaser.Text.html">Text</a>
</li>
<li>
<a href="Phaser.TileSprite.html">TileSprite</a>
</li>
<li>
<a href="Phaser.Time.html">Time</a>
</li>
<li>
<a href="Phaser.Touch.html">Touch</a>
</li>
<li>
<a href="Phaser.Tween.html">Tween</a>
</li>
<li>
<a href="Phaser.TweenManager.html">TweenManager</a>
</li>
<li>
<a href="Phaser.Utils.html">Utils</a>
</li>
<li>
<a href="Phaser.Utils.Debug.html">Debug</a>
</li>
<li>
<a href="Phaser.World.html">World</a>
</li>
<li>
<a href="SignalBinding.html">SignalBinding</a>
</li>
</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#right">right</a>
</li>
</ul>
</li>
</ul>
</div>
</div>
<div class="row-fluid">
<div class="span8">
<div id="main">
<h1 class="page-title">Class: StageScaleMode</h1>
<section>
<header>
<h2>
<span class="ancestors"><a href="Phaser.html">Phaser</a>.</span>
StageScaleMode
</h2>
<div class="class-description"><p>Phaser.StageScaleMode</p></div>
</header>
<article>
<div class="container-overview">
<dt>
<h4 class="name" id="StageScaleMode"><span class="type-signature"></span>new StageScaleMode<span class="signature">(game, width, height)</span><span class="type-signature"></span></h4>
</dt>
<dd>
<div class="description">
<p>An Animation instance contains a single animation and the controls to play it.
It is created by the AnimationManager, consists of Animation.Frame objects and belongs to a single Game Object such as a Sprite.</p>
</div>
<h5>Parameters:</h5>
<table class="params table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>game</code></td>
<td class="type">
<span class="param-type"><a href="Phaser.Game.html">Phaser.Game</a></span>
</td>
<td class="description last"><p>A reference to the currently running game.</p></td>
</tr>
<tr>
<td class="name"><code>width</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="description last"><p>Description.</p></td>
</tr>
<tr>
<td class="name"><code>height</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="description last"><p>Description.</p></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="StageScaleMode.js.html">system/StageScaleMode.js</a>, <a href="StageScaleMode.js.html#sunlight-1-line-17">line 17</a>
</li></ul></dd>
</dl>
</dd>
</div>
<h3 class="subsection-title">Members</h3>
<dl>
<dt>
<h4 class="name" id="EXACT_FIT"><span class="type-signature">&lt;static, constant> </span>EXACT_FIT<span class="type-signature"> :number</span></h4>
</dt>
<dd>
<h5>Type:</h5>
<ul>
<li>
<span class="param-type">number</span>
</li>
</ul>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="StageScaleMode.js.html">system/StageScaleMode.js</a>, <a href="StageScaleMode.js.html#sunlight-1-line-193">line 193</a>
</li></ul></dd>
</dl>
</dd>
<dt>
<h4 class="name" id="NO_SCALE"><span class="type-signature">&lt;static, constant> </span>NO_SCALE<span class="type-signature"> :number</span></h4>
</dt>
<dd>
<h5>Type:</h5>
<ul>
<li>
<span class="param-type">number</span>
</li>
</ul>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="StageScaleMode.js.html">system/StageScaleMode.js</a>, <a href="StageScaleMode.js.html#sunlight-1-line-199">line 199</a>
</li></ul></dd>
</dl>
</dd>
<dt>
<h4 class="name" id="SHOW_ALL"><span class="type-signature">&lt;static, constant> </span>SHOW_ALL<span class="type-signature"> :number</span></h4>
</dt>
<dd>
<h5>Type:</h5>
<ul>
<li>
<span class="param-type">number</span>
</li>
</ul>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="StageScaleMode.js.html">system/StageScaleMode.js</a>, <a href="StageScaleMode.js.html#sunlight-1-line-205">line 205</a>
</li></ul></dd>
</dl>
</dd>
<dt>
<h4 class="name" id="aspectRatio"><span class="type-signature"></span>aspectRatio<span class="type-signature"></span></h4>
</dt>
<dd>
<dl class="details">
<h5 class="subsection-title">Properties:</h5>
<dl>
<table class="props table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>aspectRatio</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="description last"><p>Aspect ratio.</p></td>
</tr>
</tbody>
</table>
</dl>
<dt class="tag-default">Default Value:</dt>
<dd class="tag-default"><ul class="dummy"><li>0</li></ul></dd>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="StageScaleMode.js.html">system/StageScaleMode.js</a>, <a href="StageScaleMode.js.html#sunlight-1-line-163">line 163</a>
</li></ul></dd>
</dl>
</dd>
<dt>
<h4 class="name" id="enterLandscape"><span class="type-signature"></span>enterLandscape<span class="type-signature"></span></h4>
</dt>
<dd>
<dl class="details">
<h5 class="subsection-title">Properties:</h5>
<dl>
<table class="props table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>enterLandscape</code></td>
<td class="type">
<span class="param-type"><a href="Phaser.Signal.html">Phaser.Signal</a></span>
</td>
<td class="description last"><p>The event that is dispatched when the browser enters landscape orientation.</p></td>
</tr>
</tbody>
</table>
</dl>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="StageScaleMode.js.html">system/StageScaleMode.js</a>, <a href="StageScaleMode.js.html#sunlight-1-line-131">line 131</a>
</li></ul></dd>
</dl>
</dd>
<dt>
<h4 class="name" id="enterPortrait"><span class="type-signature"></span>enterPortrait<span class="type-signature"></span></h4>
</dt>
<dd>
<dl class="details">
<h5 class="subsection-title">Properties:</h5>
<dl>
<table class="props table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>enterPortrait</code></td>
<td class="type">
<span class="param-type"><a href="Phaser.Signal.html">Phaser.Signal</a></span>
</td>
<td class="description last"><p>The event that is dispatched when the browser enters horizontal orientation.</p></td>
</tr>
</tbody>
</table>
</dl>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="StageScaleMode.js.html">system/StageScaleMode.js</a>, <a href="StageScaleMode.js.html#sunlight-1-line-136">line 136</a>
</li></ul></dd>
</dl>
</dd>
<dt>
<h4 class="name" id="forceLandscape"><span class="type-signature"></span>forceLandscape<span class="type-signature"></span></h4>
</dt>
<dd>
<dl class="details">
<h5 class="subsection-title">Properties:</h5>
<dl>
<table class="props table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>forceLandscape</code></td>
<td class="type">
<span class="param-type">boolean</span>
</td>
<td class="description last"><p>If the game should be forced to use Landscape mode, this is set to true by Game.Stage</p></td>
</tr>
</tbody>
</table>
</dl>
<dt class="tag-default">Default Value:</dt>
<dd class="tag-default"><ul class="dummy"><li>false</li></ul></dd>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="StageScaleMode.js.html">system/StageScaleMode.js</a>, <a href="StageScaleMode.js.html#sunlight-1-line-71">line 71</a>
</li></ul></dd>
</dl>
</dd>
<dt>
<h4 class="name" id="forcePortrait"><span class="type-signature"></span>forcePortrait<span class="type-signature"></span></h4>
</dt>
<dd>
<dl class="details">
<h5 class="subsection-title">Properties:</h5>
<dl>
<table class="props table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>forcePortrait</code></td>
<td class="type">
<span class="param-type">boolean</span>
</td>
<td class="description last"><p>If the game should be forced to use Portrait mode, this is set to true by Game.Stage</p></td>
</tr>
</tbody>
</table>
</dl>
<dt class="tag-default">Default Value:</dt>
<dd class="tag-default"><ul class="dummy"><li>false</li></ul></dd>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="StageScaleMode.js.html">system/StageScaleMode.js</a>, <a href="StageScaleMode.js.html#sunlight-1-line-77">line 77</a>
</li></ul></dd>
</dl>
</dd>
<dt>
<h4 class="name" id="game"><span class="type-signature"></span>game<span class="type-signature"></span></h4>
</dt>
<dd>
<dl class="details">
<h5 class="subsection-title">Properties:</h5>
<dl>
<table class="props table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>game</code></td>
<td class="type">
<span class="param-type"><a href="Phaser.Game.html">Phaser.Game</a></span>
</td>
<td class="description last"><p>A reference to the currently running game.</p></td>
</tr>
</tbody>
</table>
</dl>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="StageScaleMode.js.html">system/StageScaleMode.js</a>, <a href="StageScaleMode.js.html#sunlight-1-line-22">line 22</a>
</li></ul></dd>
</dl>
</dd>
<dt>
<h4 class="name" id="height"><span class="type-signature"></span>height<span class="type-signature"></span></h4>
</dt>
<dd>
<dl class="details">
<h5 class="subsection-title">Properties:</h5>
<dl>
<table class="props table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>height</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="description last"><p>Height of the stage after calculation.</p></td>
</tr>
</tbody>
</table>
</dl>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="StageScaleMode.js.html">system/StageScaleMode.js</a>, <a href="StageScaleMode.js.html#sunlight-1-line-32">line 32</a>
</li></ul></dd>
</dl>
</dd>
<dt>
<h4 class="name" id="incorrectOrientation"><span class="type-signature"></span>incorrectOrientation<span class="type-signature"></span></h4>
</dt>
<dd>
<dl class="details">
<h5 class="subsection-title">Properties:</h5>
<dl>
<table class="props table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>incorrectOrientation</code></td>
<td class="type">
<span class="param-type">boolean</span>
</td>
<td class="description last"><p>If the game should be forced to use a specific orientation and the device currently isn't in that orientation this is set to true.</p></td>
</tr>
</tbody>
</table>
</dl>
<dt class="tag-default">Default Value:</dt>
<dd class="tag-default"><ul class="dummy"><li>false</li></ul></dd>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="StageScaleMode.js.html">system/StageScaleMode.js</a>, <a href="StageScaleMode.js.html#sunlight-1-line-83">line 83</a>
</li></ul></dd>
</dl>
</dd>
<dt>
<h4 class="name" id="isFullScreen"><span class="type-signature">&lt;readonly> </span>isFullScreen<span class="type-signature"></span></h4>
</dt>
<dd>
<dl class="details">
<h5 class="subsection-title">Properties:</h5>
<dl>
<table class="props table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>isFullScreen</code></td>
<td class="type">
<span class="param-type">boolean</span>
</td>
<td class="description last"><p>Returns true if the browser is in full screen mode, otherwise false.</p></td>
</tr>
</tbody>
</table>
</dl>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="StageScaleMode.js.html">system/StageScaleMode.js</a>, <a href="StageScaleMode.js.html#sunlight-1-line-669">line 669</a>
</li></ul></dd>
</dl>
</dd>
<dt>
<h4 class="name" id="isLandscape"><span class="type-signature">&lt;readonly> </span>isLandscape<span class="type-signature"></span></h4>
</dt>
<dd>
<dl class="details">
<h5 class="subsection-title">Properties:</h5>
<dl>
<table class="props table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>isLandscape</code></td>
<td class="type">
<span class="param-type">boolean</span>
</td>
<td class="description last"><p>Returns true if the browser dimensions match a landscape display.</p></td>
</tr>
</tbody>
</table>
</dl>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="StageScaleMode.js.html">system/StageScaleMode.js</a>, <a href="StageScaleMode.js.html#sunlight-1-line-697">line 697</a>
</li></ul></dd>
</dl>
</dd>
<dt>
<h4 class="name" id="isPortrait"><span class="type-signature">&lt;readonly> </span>isPortrait<span class="type-signature"></span></h4>
</dt>
<dd>
<dl class="details">
<h5 class="subsection-title">Properties:</h5>
<dl>
<table class="props table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>isPortrait</code></td>
<td class="type">
<span class="param-type">boolean</span>
</td>
<td class="description last"><p>Returns true if the browser dimensions match a portrait display.</p></td>
</tr>
</tbody>
</table>
</dl>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="StageScaleMode.js.html">system/StageScaleMode.js</a>, <a href="StageScaleMode.js.html#sunlight-1-line-684">line 684</a>
</li></ul></dd>
</dl>
</dd>
<dt>
<h4 class="name" id="maxHeight"><span class="type-signature"></span>maxHeight<span class="type-signature"></span></h4>
</dt>
<dd>
<dl class="details">
<h5 class="subsection-title">Properties:</h5>
<dl>
<table class="props table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>maxHeight</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="description last"><p>Maximum height the canvas should be scaled to (in pixels).
If null it will scale to whatever height the browser can handle.</p></td>
</tr>
</tbody>
</table>
</dl>
<dt class="tag-default">Default Value:</dt>
<dd class="tag-default"><ul class="dummy"><li>null</li></ul></dd>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="StageScaleMode.js.html">system/StageScaleMode.js</a>, <a href="StageScaleMode.js.html#sunlight-1-line-58">line 58</a>
</li></ul></dd>
</dl>
</dd>
<dt>
<h4 class="name" id="maxIterations"><span class="type-signature"></span>maxIterations<span class="type-signature"></span></h4>
</dt>
<dd>
<dl class="details">
<h5 class="subsection-title">Properties:</h5>
<dl>
<table class="props table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>maxIterations</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="description last"><p>The maximum number of times it will try to resize the canvas to fill the browser.</p></td>
</tr>
</tbody>
</table>
</dl>
<dt class="tag-default">Default Value:</dt>
<dd class="tag-default"><ul class="dummy"><li>5</li></ul></dd>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="StageScaleMode.js.html">system/StageScaleMode.js</a>, <a href="StageScaleMode.js.html#sunlight-1-line-119">line 119</a>
</li></ul></dd>
</dl>
</dd>
<dt>
<h4 class="name" id="maxWidth"><span class="type-signature"></span>maxWidth<span class="type-signature"></span></h4>
</dt>
<dd>
<dl class="details">
<h5 class="subsection-title">Properties:</h5>
<dl>
<table class="props table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>maxWidth</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="description last"><p>Maximum width the canvas should be scaled to (in pixels).
If null it will scale to whatever width the browser can handle.</p></td>
</tr>
</tbody>
</table>
</dl>
<dt class="tag-default">Default Value:</dt>
<dd class="tag-default"><ul class="dummy"><li>null</li></ul></dd>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="StageScaleMode.js.html">system/StageScaleMode.js</a>, <a href="StageScaleMode.js.html#sunlight-1-line-45">line 45</a>
</li></ul></dd>
</dl>
</dd>
<dt>
<h4 class="name" id="minHeight"><span class="type-signature"></span>minHeight<span class="type-signature"></span></h4>
</dt>
<dd>
<dl class="details">
<h5 class="subsection-title">Properties:</h5>
<dl>
<table class="props table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>minHeight</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="description last"><p>Minimum height the canvas should be scaled to (in pixels).</p></td>
</tr>
</tbody>
</table>
</dl>
<dt class="tag-default">Default Value:</dt>
<dd class="tag-default"><ul class="dummy"><li>null</li></ul></dd>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="StageScaleMode.js.html">system/StageScaleMode.js</a>, <a href="StageScaleMode.js.html#sunlight-1-line-51">line 51</a>
</li></ul></dd>
</dl>
</dd>
<dt>
<h4 class="name" id="minWidth"><span class="type-signature"></span>minWidth<span class="type-signature"></span></h4>
</dt>
<dd>
<dl class="details">
<h5 class="subsection-title">Properties:</h5>
<dl>
<table class="props table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>minWidth</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="description last"><p>Minimum width the canvas should be scaled to (in pixels).</p></td>
</tr>
</tbody>
</table>
</dl>
<dt class="tag-default">Default Value:</dt>
<dd class="tag-default"><ul class="dummy"><li>null</li></ul></dd>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="StageScaleMode.js.html">system/StageScaleMode.js</a>, <a href="StageScaleMode.js.html#sunlight-1-line-38">line 38</a>
</li></ul></dd>
</dl>
</dd>
<dt>
<h4 class="name" id="orientationSprite"><span class="type-signature"></span>orientationSprite<span class="type-signature"></span></h4>
</dt>
<dd>
<dl class="details">
<h5 class="subsection-title">Properties:</h5>
<dl>
<table class="props table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>orientationSprite</code></td>
<td class="type">
<span class="param-type">PIXI.Sprite</span>
</td>
<td class="description last"><p>The Sprite that is optionally displayed if the browser enters an unsupported orientation.</p></td>
</tr>
</tbody>
</table>
</dl>
<dt class="tag-default">Default Value:</dt>
<dd class="tag-default"><ul class="dummy"><li>null</li></ul></dd>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="StageScaleMode.js.html">system/StageScaleMode.js</a>, <a href="StageScaleMode.js.html#sunlight-1-line-126">line 126</a>
</li></ul></dd>
</dl>
</dd>
<dt>
<h4 class="name" id="pageAlignHorizontally"><span class="type-signature"></span>pageAlignHorizontally<span class="type-signature"></span></h4>
</dt>
<dd>
<dl class="details">
<h5 class="subsection-title">Properties:</h5>
<dl>
<table class="props table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>pageAlignHorizontally</code></td>
<td class="type">
<span class="param-type">boolean</span>
</td>
<td class="description last"><p>If you wish to align your game in the middle of the page then you can set this value to true.
It will place a re-calculated margin-left pixel value onto the canvas element which is updated on orientation/resizing.
It doesn't care about any other DOM element that may be on the page, it literally just sets the margin.</p></td>
</tr>
</tbody>
</table>
</dl>
<dt class="tag-default">Default Value:</dt>
<dd class="tag-default"><ul class="dummy"><li>false</li></ul></dd>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="StageScaleMode.js.html">system/StageScaleMode.js</a>, <a href="StageScaleMode.js.html#sunlight-1-line-91">line 91</a>
</li></ul></dd>
</dl>
</dd>
<dt>
<h4 class="name" id="pageAlignVertically"><span class="type-signature"></span>pageAlignVertically<span class="type-signature"></span></h4>
</dt>
<dd>
<dl class="details">
<h5 class="subsection-title">Properties:</h5>
<dl>
<table class="props table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>pageAlignVertically</code></td>
<td class="type">
<span class="param-type">boolean</span>
</td>
<td class="description last"><p>If you wish to align your game in the middle of the page then you can set this value to true.
It will place a re-calculated margin-left pixel value onto the canvas element which is updated on orientation/resizing.
It doesn't care about any other DOM element that may be on the page, it literally just sets the margin.</p></td>
</tr>
</tbody>
</table>
</dl>
<dt class="tag-default">Default Value:</dt>
<dd class="tag-default"><ul class="dummy"><li>false</li></ul></dd>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="StageScaleMode.js.html">system/StageScaleMode.js</a>, <a href="StageScaleMode.js.html#sunlight-1-line-99">line 99</a>
</li></ul></dd>
</dl>
</dd>
<dt>
<h4 class="name" id="scaleFactor"><span class="type-signature"></span>scaleFactor<span class="type-signature"></span></h4>
</dt>
<dd>
<dl class="details">
<h5 class="subsection-title">Properties:</h5>
<dl>
<table class="props table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>scaleFactor</code></td>
<td class="type">
<span class="param-type"><a href="Phaser.Point.html">Phaser.Point</a></span>
</td>
<td class="description last"><p>The scale factor based on the game dimensions vs. the scaled dimensions.</p></td>
</tr>
</tbody>
</table>
</dl>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="StageScaleMode.js.html">system/StageScaleMode.js</a>, <a href="StageScaleMode.js.html#sunlight-1-line-157">line 157</a>
</li></ul></dd>
</dl>
</dd>
<dt>
<h4 class="name" id="width"><span class="type-signature"></span>width<span class="type-signature"></span></h4>
</dt>
<dd>
<dl class="details">
<h5 class="subsection-title">Properties:</h5>
<dl>
<table class="props table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>width</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="description last"><p>Width of the stage after calculation.</p></td>
</tr>
</tbody>
</table>
</dl>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="StageScaleMode.js.html">system/StageScaleMode.js</a>, <a href="StageScaleMode.js.html#sunlight-1-line-27">line 27</a>
</li></ul></dd>
</dl>
</dd>
</dl>
<h3 class="subsection-title">Methods</h3>
<dl>
<dt>
<h4 class="name" id="checkOrientation"><span class="type-signature"></span>checkOrientation<span class="signature">(event)</span><span class="type-signature"></span></h4>
</dt>
<dd>
<div class="description">
<p>Handle window.orientationchange events</p>
</div>
<h5>Parameters:</h5>
<table class="params table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>event</code></td>
<td class="type">
<span class="param-type">Event</span>
</td>
<td class="description last"><p>The orientationchange event data.</p></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="StageScaleMode.js.html">system/StageScaleMode.js</a>, <a href="StageScaleMode.js.html#sunlight-1-line-399">line 399</a>
</li></ul></dd>
</dl>
</dd>
<dt>
<h4 class="name" id="checkOrientationState"><span class="type-signature"></span>checkOrientationState<span class="signature">()</span><span class="type-signature"></span></h4>
</dt>
<dd>
<div class="description">
<p>Checks if the browser is in the correct orientation for your game (if forceLandscape or forcePortrait have been set)</p>
</div>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="StageScaleMode.js.html">system/StageScaleMode.js</a>, <a href="StageScaleMode.js.html#sunlight-1-line-356">line 356</a>
</li></ul></dd>
</dl>
</dd>
<dt>
<h4 class="name" id="checkResize"><span class="type-signature"></span>checkResize<span class="signature">(event)</span><span class="type-signature"></span></h4>
</dt>
<dd>
<div class="description">
<p>Handle window.resize events</p>
</div>
<h5>Parameters:</h5>
<table class="params table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>event</code></td>
<td class="type">
<span class="param-type">Event</span>
</td>
<td class="description last"><p>The resize event data.</p></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="StageScaleMode.js.html">system/StageScaleMode.js</a>, <a href="StageScaleMode.js.html#sunlight-1-line-424">line 424</a>
</li></ul></dd>
</dl>
</dd>
<dt>
<h4 class="name" id="forceOrientation"><span class="type-signature"></span>forceOrientation<span class="signature">(forceLandscape, forcePortrait, <span class="optional">forcePortrait</span>)</span><span class="type-signature"></span></h4>
</dt>
<dd>
<div class="description">
<p>If you need your game to run in only one orientation you can force that to happen.
The optional orientationImage is displayed when the game is in the incorrect orientation.</p>
</div>
<h5>Parameters:</h5>
<table class="params table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Argument</th>
<th>Default</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>forceLandscape</code></td>
<td class="type">
<span class="param-type">boolean</span>
</td>
<td class="attributes">
</td>
<td class="default">
</td>
<td class="description last"><p>true if the game should run in landscape mode only.</p></td>
</tr>
<tr>
<td class="name"><code>forcePortrait</code></td>
<td class="type">
<span class="param-type">boolean</span>
</td>
<td class="attributes">
</td>
<td class="default">
</td>
<td class="description last"><p>true if the game should run in portrait mode only.</p></td>
</tr>
<tr>
<td class="name"><code>forcePortrait</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="attributes">
&lt;optional><br>
</td>
<td class="default">
''
</td>
<td class="description last"><p>The string of an image in the Phaser.Cache to display when this game is in the incorrect orientation.</p></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="StageScaleMode.js.html">system/StageScaleMode.js</a>, <a href="StageScaleMode.js.html#sunlight-1-line-308">line 308</a>
</li></ul></dd>
</dl>
</dd>
<dt>
<h4 class="name" id="fullScreenChange"><span class="type-signature">&lt;protected> </span>fullScreenChange<span class="signature">(event)</span><span class="type-signature"></span></h4>
</dt>
<dd>
<div class="description">
<p>Called automatically when the browser enters of leaves full screen mode.</p>
</div>
<h5>Parameters:</h5>
<table class="params table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>event</code></td>
<td class="type">
<span class="param-type">Event</span>
</td>
<td class="description last"><p>The fullscreenchange event</p></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="StageScaleMode.js.html">system/StageScaleMode.js</a>, <a href="StageScaleMode.js.html#sunlight-1-line-270">line 270</a>
</li></ul></dd>
</dl>
</dd>
<dt>
<h4 class="name" id="refresh"><span class="type-signature"></span>refresh<span class="signature">()</span><span class="type-signature"></span></h4>
</dt>
<dd>
<div class="description">
<p>Re-calculate scale mode and update screen size.</p>
</div>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="StageScaleMode.js.html">system/StageScaleMode.js</a>, <a href="StageScaleMode.js.html#sunlight-1-line-458">line 458</a>
</li></ul></dd>
</dl>
</dd>
<dt>
<h4 class="name" id="setExactFit"><span class="type-signature"></span>setExactFit<span class="signature">()</span><span class="type-signature"></span></h4>
</dt>
<dd>
<div class="description">
<p>Sets the width and height values of the canvas, no larger than the maxWidth/Height.</p>
</div>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="StageScaleMode.js.html">system/StageScaleMode.js</a>, <a href="StageScaleMode.js.html#sunlight-1-line-636">line 636</a>
</li></ul></dd>
</dl>
</dd>
<dt>
<h4 class="name" id="setMaximum"><span class="type-signature"></span>setMaximum<span class="signature">()</span><span class="type-signature"></span></h4>
</dt>
<dd>
<div class="description">
<p>Sets this.width equal to window.innerWidth and this.height equal to window.innerHeight</p>
</div>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="StageScaleMode.js.html">system/StageScaleMode.js</a>, <a href="StageScaleMode.js.html#sunlight-1-line-612">line 612</a>
</li></ul></dd>
</dl>
</dd>
<dt>
<h4 class="name" id="setScreenSize"><span class="type-signature"></span>setScreenSize<span class="signature">(force)</span><span class="type-signature"></span></h4>
</dt>
<dd>
<div class="description">
<p>Set screen size automatically based on the scaleMode.</p>
</div>
<h5>Parameters:</h5>
<table class="params table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>force</code></td>
<td class="type">
<span class="param-type">boolean</span>
</td>
<td class="description last"><p>If force is true it will try to resize the game regardless of the document dimensions.</p></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="StageScaleMode.js.html">system/StageScaleMode.js</a>, <a href="StageScaleMode.js.html#sunlight-1-line-497">line 497</a>
</li></ul></dd>
</dl>
</dd>
<dt>
<h4 class="name" id="setShowAll"><span class="type-signature"></span>setShowAll<span class="signature">()</span><span class="type-signature"></span></h4>
</dt>
<dd>
<div class="description">
<p>Calculates the multiplier needed to scale the game proportionally.</p>
</div>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="StageScaleMode.js.html">system/StageScaleMode.js</a>, <a href="StageScaleMode.js.html#sunlight-1-line-623">line 623</a>
</li></ul></dd>
</dl>
</dd>
<dt>
<h4 class="name" id="setSize"><span class="type-signature"></span>setSize<span class="signature">()</span><span class="type-signature"></span></h4>
</dt>
<dd>
<div class="description">
<p>Sets the canvas style width and height values based on minWidth/Height and maxWidth/Height.</p>
</div>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="StageScaleMode.js.html">system/StageScaleMode.js</a>, <a href="StageScaleMode.js.html#sunlight-1-line-543">line 543</a>
</li></ul></dd>
</dl>
</dd>
<dt>
<h4 class="name" id="startFullScreen"><span class="type-signature"></span>startFullScreen<span class="signature">(antialias)</span><span class="type-signature"></span></h4>
</dt>
<dd>
<div class="description">
<p>Tries to enter the browser into full screen mode.
Please note that this needs to be supported by the web browser and isn't the same thing as setting your game to fill the browser.</p>
</div>
<h5>Parameters:</h5>
<table class="params table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>antialias</code></td>
<td class="type">
<span class="param-type">boolean</span>
</td>
<td class="description last"><p>You can toggle the anti-alias feature of the canvas before jumping in to full screen (false = retain pixel art, true = smooth art)</p></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="StageScaleMode.js.html">system/StageScaleMode.js</a>, <a href="StageScaleMode.js.html#sunlight-1-line-209">line 209</a>
</li></ul></dd>
</dl>
</dd>
<dt>
<h4 class="name" id="stopFullScreen"><span class="type-signature"></span>stopFullScreen<span class="signature">()</span><span class="type-signature"></span></h4>
</dt>
<dd>
<div class="description">
<p>Stops full screen mode if the browser is in it.</p>
</div>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="StageScaleMode.js.html">system/StageScaleMode.js</a>, <a href="StageScaleMode.js.html#sunlight-1-line-249">line 249</a>
</li></ul></dd>
</dl>
</dd>
</dl>
</article>
</section>
</div>
<div class="clearfix"></div>
<footer>
<span class="copyright">
Phaser Copyright © 2012-2013 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 07 2013 06:07:40 GMT-0000 (GMT) using the <a href="https://github.com/terryweiss/docstrap">DocStrap template</a>.
</span>
</footer>
</div>
<div class="span3">
<div id="toc"></div>
</div>
<br clear="both">
</div>
</div>
<script src="scripts/sunlight.js"></script>
<script src="scripts/sunlight.javascript.js"></script>
<script src="scripts/sunlight-plugin.doclinks.js"></script>
<script src="scripts/sunlight-plugin.linenumbers.js"></script>
<script src="scripts/sunlight-plugin.menu.js"></script>
<script src="scripts/jquery.min.js"></script>
<script src="scripts/jquery.scrollTo.js"></script>
<script src="scripts/jquery.localScroll.js"></script>
<script src="scripts/bootstrap-dropdown.js"></script>
<script src="scripts/toc.js"></script>
<script> Sunlight.highlightAll({lineNumbers:true, showMenu: true, enableDoclinks :true}); </script>
<script>
$( function () {
$( "#toc" ).toc( {
selectors : "h1,h2,h3,h4",
showAndHide : false,
scrollTo : 60
} );
$( "#toc>ul" ).addClass( "nav nav-pills nav-stacked" );
$( "#main span[id^='toc']" ).addClass( "toc-shim" );
} );
</script>
</body>
</html>