mirror of
https://github.com/photonstorm/phaser
synced 2024-11-10 23:24:41 +00:00
7812 lines
No EOL
136 KiB
HTML
7812 lines
No EOL
136 KiB
HTML
<!DOCTYPE html>
|
|
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<title>Phaser Class: ScaleManager</title>
|
|
|
|
<!--[if lt IE 9]>
|
|
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
|
|
<![endif]-->
|
|
|
|
<link type="text/css" rel="stylesheet" href="styles/default.css">
|
|
|
|
<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 style="position: absolute; width: 143px; height: 31px; right: 10px; top: 10px; z-index: 1050"><a href="http://phaser.io"><img src="img/phaser.png" border="0" /></a></div>
|
|
<div class="navbar-inner">
|
|
<a class="brand" href="index.html">Phaser API</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 class="class-depth-0">
|
|
<a href="Phaser.html">Phaser</a>
|
|
</li>
|
|
|
|
<li class="class-depth-0">
|
|
<a href="PIXI.html">PIXI</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 class="class-depth-1">
|
|
<a href="Phaser.Animation.html">Animation</a>
|
|
</li>
|
|
|
|
<li class="class-depth-1">
|
|
<a href="Phaser.AnimationManager.html">AnimationManager</a>
|
|
</li>
|
|
|
|
<li class="class-depth-1">
|
|
<a href="Phaser.AnimationParser.html">AnimationParser</a>
|
|
</li>
|
|
|
|
<li class="class-depth-1">
|
|
<a href="Phaser.ArrayList.html">ArrayList</a>
|
|
</li>
|
|
|
|
<li class="class-depth-1">
|
|
<a href="Phaser.ArraySet.html">ArraySet</a>
|
|
</li>
|
|
|
|
<li class="class-depth-1">
|
|
<a href="Phaser.ArrayUtils.html">ArrayUtils</a>
|
|
</li>
|
|
|
|
<li class="class-depth-1">
|
|
<a href="Phaser.AudioSprite.html">AudioSprite</a>
|
|
</li>
|
|
|
|
<li class="class-depth-1">
|
|
<a href="Phaser.BitmapData.html">BitmapData</a>
|
|
</li>
|
|
|
|
<li class="class-depth-1">
|
|
<a href="Phaser.BitmapText.html">BitmapText</a>
|
|
</li>
|
|
|
|
<li class="class-depth-1">
|
|
<a href="Phaser.Button.html">Button</a>
|
|
</li>
|
|
|
|
<li class="class-depth-1">
|
|
<a href="Phaser.Cache.html">Cache</a>
|
|
</li>
|
|
|
|
<li class="class-depth-1">
|
|
<a href="Phaser.Camera.html">Camera</a>
|
|
</li>
|
|
|
|
<li class="class-depth-1">
|
|
<a href="Phaser.Canvas.html">Canvas</a>
|
|
</li>
|
|
|
|
<li class="class-depth-1">
|
|
<a href="Phaser.Circle.html">Circle</a>
|
|
</li>
|
|
|
|
<li class="class-depth-1">
|
|
<a href="Phaser.Color.html">Color</a>
|
|
</li>
|
|
|
|
<li class="class-depth-1">
|
|
<a href="Phaser.Device.html">Device</a>
|
|
</li>
|
|
|
|
<li class="class-depth-1">
|
|
<a href="Phaser.DOM.html">DOM</a>
|
|
</li>
|
|
|
|
<li class="class-depth-1">
|
|
<a href="Phaser.Easing.html">Easing</a>
|
|
</li>
|
|
|
|
<li class="class-depth-1">
|
|
<a href="Phaser.Ellipse.html">Ellipse</a>
|
|
</li>
|
|
|
|
<li class="class-depth-1">
|
|
<a href="Phaser.Events.html">Events</a>
|
|
</li>
|
|
|
|
<li class="class-depth-1">
|
|
<a href="Phaser.Filter.html">Filter</a>
|
|
</li>
|
|
|
|
<li class="class-depth-1">
|
|
<a href="Phaser.FlexGrid.html">FlexGrid</a>
|
|
</li>
|
|
|
|
<li class="class-depth-1">
|
|
<a href="Phaser.FlexLayer.html">FlexLayer</a>
|
|
</li>
|
|
|
|
<li class="class-depth-1">
|
|
<a href="Phaser.Frame.html">Frame</a>
|
|
</li>
|
|
|
|
<li class="class-depth-1">
|
|
<a href="Phaser.FrameData.html">FrameData</a>
|
|
</li>
|
|
|
|
<li class="class-depth-1">
|
|
<a href="Phaser.Game.html">Game</a>
|
|
</li>
|
|
|
|
<li class="class-depth-1">
|
|
<a href="Phaser.GameObjectCreator.html">GameObjectCreator</a>
|
|
</li>
|
|
|
|
<li class="class-depth-1">
|
|
<a href="Phaser.GameObjectFactory.html">GameObjectFactory</a>
|
|
</li>
|
|
|
|
<li class="class-depth-1">
|
|
<a href="Phaser.Gamepad.html">Gamepad</a>
|
|
</li>
|
|
|
|
<li class="class-depth-1">
|
|
<a href="Phaser.GamepadButton.html">GamepadButton</a>
|
|
</li>
|
|
|
|
<li class="class-depth-1">
|
|
<a href="Phaser.Graphics.html">Graphics</a>
|
|
</li>
|
|
|
|
<li class="class-depth-1">
|
|
<a href="Phaser.Group.html">Group</a>
|
|
</li>
|
|
|
|
<li class="class-depth-1">
|
|
<a href="Phaser.Image.html">Image</a>
|
|
</li>
|
|
|
|
<li class="class-depth-1">
|
|
<a href="Phaser.Input.html">Input</a>
|
|
</li>
|
|
|
|
<li class="class-depth-1">
|
|
<a href="Phaser.InputHandler.html">InputHandler</a>
|
|
</li>
|
|
|
|
<li class="class-depth-1">
|
|
<a href="Phaser.Key.html">Key</a>
|
|
</li>
|
|
|
|
<li class="class-depth-1">
|
|
<a href="Phaser.Keyboard.html">Keyboard</a>
|
|
</li>
|
|
|
|
<li class="class-depth-1">
|
|
<a href="Phaser.Line.html">Line</a>
|
|
</li>
|
|
|
|
<li class="class-depth-1">
|
|
<a href="Phaser.LinkedList.html">LinkedList</a>
|
|
</li>
|
|
|
|
<li class="class-depth-1">
|
|
<a href="Phaser.Loader.html">Loader</a>
|
|
</li>
|
|
|
|
<li class="class-depth-1">
|
|
<a href="Phaser.LoaderParser.html">LoaderParser</a>
|
|
</li>
|
|
|
|
<li class="class-depth-1">
|
|
<a href="Phaser.Math.html">Math</a>
|
|
</li>
|
|
|
|
<li class="class-depth-1">
|
|
<a href="Phaser.Mouse.html">Mouse</a>
|
|
</li>
|
|
|
|
<li class="class-depth-1">
|
|
<a href="Phaser.MSPointer.html">MSPointer</a>
|
|
</li>
|
|
|
|
<li class="class-depth-1">
|
|
<a href="Phaser.Net.html">Net</a>
|
|
</li>
|
|
|
|
<li class="class-depth-1">
|
|
<a href="Phaser.Particle.html">Particle</a>
|
|
</li>
|
|
|
|
<li class="class-depth-1">
|
|
<a href="Phaser.Particles.html">Particles</a>
|
|
</li>
|
|
|
|
<li class="class-depth-2">
|
|
<a href="Phaser.Particles.Arcade.html">Arcade</a>
|
|
</li>
|
|
|
|
<li class="class-depth-3">
|
|
<a href="Phaser.Particles.Arcade.Emitter.html">Emitter</a>
|
|
</li>
|
|
|
|
<li class="class-depth-1">
|
|
<a href="Phaser.Physics.html">Physics</a>
|
|
</li>
|
|
|
|
<li class="class-depth-2">
|
|
<a href="Phaser.Physics.Arcade.html">Arcade</a>
|
|
</li>
|
|
|
|
<li class="class-depth-3">
|
|
<a href="Phaser.Physics.Arcade.Body.html">Body</a>
|
|
</li>
|
|
|
|
<li class="class-depth-2">
|
|
<a href="Phaser.Physics.Ninja.html">Ninja</a>
|
|
</li>
|
|
|
|
<li class="class-depth-3">
|
|
<a href="Phaser.Physics.Ninja.AABB.html">AABB</a>
|
|
</li>
|
|
|
|
<li class="class-depth-3">
|
|
<a href="Phaser.Physics.Ninja.Body.html">Body</a>
|
|
</li>
|
|
|
|
<li class="class-depth-3">
|
|
<a href="Phaser.Physics.Ninja.Circle.html">Circle</a>
|
|
</li>
|
|
|
|
<li class="class-depth-3">
|
|
<a href="Phaser.Physics.Ninja.Tile.html">Tile</a>
|
|
</li>
|
|
|
|
<li class="class-depth-2">
|
|
<a href="Phaser.Physics.P2.html">P2</a>
|
|
</li>
|
|
|
|
<li class="class-depth-3">
|
|
<a href="Phaser.Physics.P2.Body.html">Body</a>
|
|
</li>
|
|
|
|
<li class="class-depth-3">
|
|
<a href="Phaser.Physics.P2.BodyDebug.html">BodyDebug</a>
|
|
</li>
|
|
|
|
<li class="class-depth-3">
|
|
<a href="Phaser.Physics.P2.CollisionGroup.html">CollisionGroup</a>
|
|
</li>
|
|
|
|
<li class="class-depth-3">
|
|
<a href="Phaser.Physics.P2.ContactMaterial.html">ContactMaterial</a>
|
|
</li>
|
|
|
|
<li class="class-depth-3">
|
|
<a href="Phaser.Physics.P2.DistanceConstraint.html">DistanceConstraint</a>
|
|
</li>
|
|
|
|
<li class="class-depth-3">
|
|
<a href="Phaser.Physics.P2.FixtureList.html">FixtureList</a>
|
|
</li>
|
|
|
|
<li class="class-depth-3">
|
|
<a href="Phaser.Physics.P2.GearConstraint.html">GearConstraint</a>
|
|
</li>
|
|
|
|
<li class="class-depth-3">
|
|
<a href="Phaser.Physics.P2.InversePointProxy.html">InversePointProxy</a>
|
|
</li>
|
|
|
|
<li class="class-depth-3">
|
|
<a href="Phaser.Physics.P2.LockConstraint.html">LockConstraint</a>
|
|
</li>
|
|
|
|
<li class="class-depth-3">
|
|
<a href="Phaser.Physics.P2.Material.html">Material</a>
|
|
</li>
|
|
|
|
<li class="class-depth-3">
|
|
<a href="Phaser.Physics.P2.PointProxy.html">PointProxy</a>
|
|
</li>
|
|
|
|
<li class="class-depth-3">
|
|
<a href="Phaser.Physics.P2.PrismaticConstraint.html">PrismaticConstraint</a>
|
|
</li>
|
|
|
|
<li class="class-depth-3">
|
|
<a href="Phaser.Physics.P2.RevoluteConstraint.html">RevoluteConstraint</a>
|
|
</li>
|
|
|
|
<li class="class-depth-3">
|
|
<a href="Phaser.Physics.P2.RotationalSpring.html">RotationalSpring</a>
|
|
</li>
|
|
|
|
<li class="class-depth-3">
|
|
<a href="Phaser.Physics.P2.Spring.html">Spring</a>
|
|
</li>
|
|
|
|
<li class="class-depth-1">
|
|
<a href="Phaser.Plugin.html">Plugin</a>
|
|
</li>
|
|
|
|
<li class="class-depth-1">
|
|
<a href="Phaser.PluginManager.html">PluginManager</a>
|
|
</li>
|
|
|
|
<li class="class-depth-1">
|
|
<a href="Phaser.Point.html">Point</a>
|
|
</li>
|
|
|
|
<li class="class-depth-1">
|
|
<a href="Phaser.Pointer.html">Pointer</a>
|
|
</li>
|
|
|
|
<li class="class-depth-1">
|
|
<a href="Phaser.Polygon.html">Polygon</a>
|
|
</li>
|
|
|
|
<li class="class-depth-1">
|
|
<a href="Phaser.QuadTree.html">QuadTree</a>
|
|
</li>
|
|
|
|
<li class="class-depth-1">
|
|
<a href="Phaser.RandomDataGenerator.html">RandomDataGenerator</a>
|
|
</li>
|
|
|
|
<li class="class-depth-1">
|
|
<a href="Phaser.Rectangle.html">Rectangle</a>
|
|
</li>
|
|
|
|
<li class="class-depth-1">
|
|
<a href="Phaser.RenderTexture.html">RenderTexture</a>
|
|
</li>
|
|
|
|
<li class="class-depth-1">
|
|
<a href="Phaser.RequestAnimationFrame.html">RequestAnimationFrame</a>
|
|
</li>
|
|
|
|
<li class="class-depth-1">
|
|
<a href="Phaser.RetroFont.html">RetroFont</a>
|
|
</li>
|
|
|
|
<li class="class-depth-1">
|
|
<a href="Phaser.Rope.html">Rope</a>
|
|
</li>
|
|
|
|
<li class="class-depth-1">
|
|
<a href="Phaser.ScaleManager.html">ScaleManager</a>
|
|
</li>
|
|
|
|
<li class="class-depth-1">
|
|
<a href="Phaser.Signal.html">Signal</a>
|
|
</li>
|
|
|
|
<li class="class-depth-1">
|
|
<a href="Phaser.SignalBinding.html">SignalBinding</a>
|
|
</li>
|
|
|
|
<li class="class-depth-1">
|
|
<a href="Phaser.SinglePad.html">SinglePad</a>
|
|
</li>
|
|
|
|
<li class="class-depth-1">
|
|
<a href="Phaser.Sound.html">Sound</a>
|
|
</li>
|
|
|
|
<li class="class-depth-1">
|
|
<a href="Phaser.SoundManager.html">SoundManager</a>
|
|
</li>
|
|
|
|
<li class="class-depth-1">
|
|
<a href="Phaser.Sprite.html">Sprite</a>
|
|
</li>
|
|
|
|
<li class="class-depth-1">
|
|
<a href="Phaser.SpriteBatch.html">SpriteBatch</a>
|
|
</li>
|
|
|
|
<li class="class-depth-1">
|
|
<a href="Phaser.Stage.html">Stage</a>
|
|
</li>
|
|
|
|
<li class="class-depth-1">
|
|
<a href="Phaser.State.html">State</a>
|
|
</li>
|
|
|
|
<li class="class-depth-1">
|
|
<a href="Phaser.StateManager.html">StateManager</a>
|
|
</li>
|
|
|
|
<li class="class-depth-1">
|
|
<a href="Phaser.Text.html">Text</a>
|
|
</li>
|
|
|
|
<li class="class-depth-1">
|
|
<a href="Phaser.Tile.html">Tile</a>
|
|
</li>
|
|
|
|
<li class="class-depth-1">
|
|
<a href="Phaser.Tilemap.html">Tilemap</a>
|
|
</li>
|
|
|
|
<li class="class-depth-1">
|
|
<a href="Phaser.TilemapLayer.html">TilemapLayer</a>
|
|
</li>
|
|
|
|
<li class="class-depth-1">
|
|
<a href="Phaser.TilemapParser.html">TilemapParser</a>
|
|
</li>
|
|
|
|
<li class="class-depth-1">
|
|
<a href="Phaser.Tileset.html">Tileset</a>
|
|
</li>
|
|
|
|
<li class="class-depth-1">
|
|
<a href="Phaser.TileSprite.html">TileSprite</a>
|
|
</li>
|
|
|
|
<li class="class-depth-1">
|
|
<a href="Phaser.Time.html">Time</a>
|
|
</li>
|
|
|
|
<li class="class-depth-1">
|
|
<a href="Phaser.Timer.html">Timer</a>
|
|
</li>
|
|
|
|
<li class="class-depth-1">
|
|
<a href="Phaser.TimerEvent.html">TimerEvent</a>
|
|
</li>
|
|
|
|
<li class="class-depth-1">
|
|
<a href="Phaser.Touch.html">Touch</a>
|
|
</li>
|
|
|
|
<li class="class-depth-1">
|
|
<a href="Phaser.Tween.html">Tween</a>
|
|
</li>
|
|
|
|
<li class="class-depth-1">
|
|
<a href="Phaser.TweenData.html">TweenData</a>
|
|
</li>
|
|
|
|
<li class="class-depth-1">
|
|
<a href="Phaser.TweenManager.html">TweenManager</a>
|
|
</li>
|
|
|
|
<li class="class-depth-1">
|
|
<a href="Phaser.Utils.html">Utils</a>
|
|
</li>
|
|
|
|
<li class="class-depth-2">
|
|
<a href="Phaser.Utils.Debug.html">Debug</a>
|
|
</li>
|
|
|
|
<li class="class-depth-1">
|
|
<a href="Phaser.World.html">World</a>
|
|
</li>
|
|
|
|
<li class="class-depth-1">
|
|
<a href="PIXI.AbstractFilter.html">AbstractFilter</a>
|
|
</li>
|
|
|
|
<li class="class-depth-1">
|
|
<a href="PIXI.AjaxRequest.html">AjaxRequest</a>
|
|
</li>
|
|
|
|
<li class="class-depth-1">
|
|
<a href="PIXI.AlphaMaskFilter.html">AlphaMaskFilter</a>
|
|
</li>
|
|
|
|
<li class="class-depth-1">
|
|
<a href="PIXI.AsciiFilter.html">AsciiFilter</a>
|
|
</li>
|
|
|
|
<li class="class-depth-1">
|
|
<a href="PIXI.AssetLoader.html">AssetLoader</a>
|
|
</li>
|
|
|
|
<li class="class-depth-1">
|
|
<a href="PIXI.AtlasLoader.html">AtlasLoader</a>
|
|
</li>
|
|
|
|
<li class="class-depth-1">
|
|
<a href="PIXI.BaseTexture.html">BaseTexture</a>
|
|
</li>
|
|
|
|
<li class="class-depth-1">
|
|
<a href="PIXI.BitmapFontLoader.html">BitmapFontLoader</a>
|
|
</li>
|
|
|
|
<li class="class-depth-1">
|
|
<a href="PIXI.BitmapText.html">BitmapText</a>
|
|
</li>
|
|
|
|
<li class="class-depth-1">
|
|
<a href="PIXI.BlurFilter.html">BlurFilter</a>
|
|
</li>
|
|
|
|
<li class="class-depth-1">
|
|
<a href="PIXI.BlurXFilter.html">BlurXFilter</a>
|
|
</li>
|
|
|
|
<li class="class-depth-1">
|
|
<a href="PIXI.BlurYFilter.html">BlurYFilter</a>
|
|
</li>
|
|
|
|
<li class="class-depth-1">
|
|
<a href="PIXI.CanvasBuffer.html">CanvasBuffer</a>
|
|
</li>
|
|
|
|
<li class="class-depth-1">
|
|
<a href="PIXI.CanvasGraphics.html">CanvasGraphics</a>
|
|
</li>
|
|
|
|
<li class="class-depth-1">
|
|
<a href="PIXI.CanvasMaskManager.html">CanvasMaskManager</a>
|
|
</li>
|
|
|
|
<li class="class-depth-1">
|
|
<a href="PIXI.CanvasRenderer.html">CanvasRenderer</a>
|
|
</li>
|
|
|
|
<li class="class-depth-1">
|
|
<a href="PIXI.CanvasTinter.html">CanvasTinter</a>
|
|
</li>
|
|
|
|
<li class="class-depth-1">
|
|
<a href="PIXI.Circle.html">Circle</a>
|
|
</li>
|
|
|
|
<li class="class-depth-1">
|
|
<a href="PIXI.ColorMatrixFilter.html">ColorMatrixFilter</a>
|
|
</li>
|
|
|
|
<li class="class-depth-1">
|
|
<a href="PIXI.ColorStepFilter.html">ColorStepFilter</a>
|
|
</li>
|
|
|
|
<li class="class-depth-1">
|
|
<a href="PIXI.ComplexPrimitiveShader.html">ComplexPrimitiveShader</a>
|
|
</li>
|
|
|
|
<li class="class-depth-1">
|
|
<a href="PIXI.ConvolutionFilter.html">ConvolutionFilter</a>
|
|
</li>
|
|
|
|
<li class="class-depth-1">
|
|
<a href="PIXI.CrossHatchFilter.html">CrossHatchFilter</a>
|
|
</li>
|
|
|
|
<li class="class-depth-1">
|
|
<a href="PIXI.DisplacementFilter.html">DisplacementFilter</a>
|
|
</li>
|
|
|
|
<li class="class-depth-1">
|
|
<a href="PIXI.DisplayObject.html">DisplayObject</a>
|
|
</li>
|
|
|
|
<li class="class-depth-1">
|
|
<a href="PIXI.DisplayObjectContainer.html">DisplayObjectContainer</a>
|
|
</li>
|
|
|
|
<li class="class-depth-1">
|
|
<a href="PIXI.DotScreenFilter.html">DotScreenFilter</a>
|
|
</li>
|
|
|
|
<li class="class-depth-1">
|
|
<a href="PIXI.Ellipse.html">Ellipse</a>
|
|
</li>
|
|
|
|
<li class="class-depth-1">
|
|
<a href="PIXI.Event.html">Event</a>
|
|
</li>
|
|
|
|
<li class="class-depth-1">
|
|
<a href="PIXI.EventTarget.html">EventTarget</a>
|
|
</li>
|
|
|
|
<li class="class-depth-1">
|
|
<a href="PIXI.FilterBlock.html">FilterBlock</a>
|
|
</li>
|
|
|
|
<li class="class-depth-1">
|
|
<a href="PIXI.FilterTexture.html">FilterTexture</a>
|
|
</li>
|
|
|
|
<li class="class-depth-1">
|
|
<a href="PIXI.Graphics.html">Graphics</a>
|
|
</li>
|
|
|
|
<li class="class-depth-1">
|
|
<a href="PIXI.GraphicsData.html">GraphicsData</a>
|
|
</li>
|
|
|
|
<li class="class-depth-1">
|
|
<a href="PIXI.GrayFilter.html">GrayFilter</a>
|
|
</li>
|
|
|
|
<li class="class-depth-1">
|
|
<a href="PIXI.ImageLoader.html">ImageLoader</a>
|
|
</li>
|
|
|
|
<li class="class-depth-1">
|
|
<a href="PIXI.InteractionData.html">InteractionData</a>
|
|
</li>
|
|
|
|
<li class="class-depth-1">
|
|
<a href="PIXI.InteractionManager.html">InteractionManager</a>
|
|
</li>
|
|
|
|
<li class="class-depth-1">
|
|
<a href="PIXI.InvertFilter.html">InvertFilter</a>
|
|
</li>
|
|
|
|
<li class="class-depth-1">
|
|
<a href="PIXI.JsonLoader.html">JsonLoader</a>
|
|
</li>
|
|
|
|
<li class="class-depth-1">
|
|
<a href="PIXI.Matrix.html">Matrix</a>
|
|
</li>
|
|
|
|
<li class="class-depth-1">
|
|
<a href="PIXI.MovieClip.html">MovieClip</a>
|
|
</li>
|
|
|
|
<li class="class-depth-1">
|
|
<a href="PIXI.NoiseFilter.html">NoiseFilter</a>
|
|
</li>
|
|
|
|
<li class="class-depth-1">
|
|
<a href="PIXI.NormalMapFilter.html">NormalMapFilter</a>
|
|
</li>
|
|
|
|
<li class="class-depth-1">
|
|
<a href="PIXI.PixelateFilter.html">PixelateFilter</a>
|
|
</li>
|
|
|
|
<li class="class-depth-1">
|
|
<a href="PIXI.PIXI.html">PIXI</a>
|
|
</li>
|
|
|
|
<li class="class-depth-1">
|
|
<a href="PIXI.PixiFastShader.html">PixiFastShader</a>
|
|
</li>
|
|
|
|
<li class="class-depth-1">
|
|
<a href="PIXI.PixiShader.html">PixiShader</a>
|
|
</li>
|
|
|
|
<li class="class-depth-1">
|
|
<a href="PIXI.Point.html">Point</a>
|
|
</li>
|
|
|
|
<li class="class-depth-1">
|
|
<a href="PIXI.Polygon.html">Polygon</a>
|
|
</li>
|
|
|
|
<li class="class-depth-1">
|
|
<a href="PIXI.PolyK.html">PolyK</a>
|
|
</li>
|
|
|
|
<li class="class-depth-1">
|
|
<a href="PIXI.PrimitiveShader.html">PrimitiveShader</a>
|
|
</li>
|
|
|
|
<li class="class-depth-1">
|
|
<a href="PIXI.Rectangle.html">Rectangle</a>
|
|
</li>
|
|
|
|
<li class="class-depth-1">
|
|
<a href="PIXI.RenderTexture.html">RenderTexture</a>
|
|
</li>
|
|
|
|
<li class="class-depth-1">
|
|
<a href="PIXI.RGBSplitFilter.html">RGBSplitFilter</a>
|
|
</li>
|
|
|
|
<li class="class-depth-1">
|
|
<a href="PIXI.Rope.html">Rope</a>
|
|
</li>
|
|
|
|
<li class="class-depth-1">
|
|
<a href="PIXI.RoundedRectangle.html">RoundedRectangle</a>
|
|
</li>
|
|
|
|
<li class="class-depth-1">
|
|
<a href="PIXI.SepiaFilter.html">SepiaFilter</a>
|
|
</li>
|
|
|
|
<li class="class-depth-1">
|
|
<a href="PIXI.SmartBlurFilter.html">SmartBlurFilter</a>
|
|
</li>
|
|
|
|
<li class="class-depth-1">
|
|
<a href="PIXI.Spine.html">Spine</a>
|
|
</li>
|
|
|
|
<li class="class-depth-1">
|
|
<a href="PIXI.SpineLoader.html">SpineLoader</a>
|
|
</li>
|
|
|
|
<li class="class-depth-1">
|
|
<a href="PIXI.SpineTextureLoader.html">SpineTextureLoader</a>
|
|
</li>
|
|
|
|
<li class="class-depth-1">
|
|
<a href="PIXI.Sprite.html">Sprite</a>
|
|
</li>
|
|
|
|
<li class="class-depth-1">
|
|
<a href="PIXI.SpriteBatch.html">SpriteBatch</a>
|
|
</li>
|
|
|
|
<li class="class-depth-1">
|
|
<a href="PIXI.SpriteSheetLoader.html">SpriteSheetLoader</a>
|
|
</li>
|
|
|
|
<li class="class-depth-1">
|
|
<a href="PIXI.Stage.html">Stage</a>
|
|
</li>
|
|
|
|
<li class="class-depth-1">
|
|
<a href="PIXI.Strip.html">Strip</a>
|
|
</li>
|
|
|
|
<li class="class-depth-1">
|
|
<a href="PIXI.StripShader.html">StripShader</a>
|
|
</li>
|
|
|
|
<li class="class-depth-1">
|
|
<a href="PIXI.Text.html">Text</a>
|
|
</li>
|
|
|
|
<li class="class-depth-1">
|
|
<a href="PIXI.Texture.html">Texture</a>
|
|
</li>
|
|
|
|
<li class="class-depth-1">
|
|
<a href="PIXI.TilingSprite.html">TilingSprite</a>
|
|
</li>
|
|
|
|
<li class="class-depth-1">
|
|
<a href="PIXI.TiltShiftFilter.html">TiltShiftFilter</a>
|
|
</li>
|
|
|
|
<li class="class-depth-1">
|
|
<a href="PIXI.TiltShiftXFilter.html">TiltShiftXFilter</a>
|
|
</li>
|
|
|
|
<li class="class-depth-1">
|
|
<a href="PIXI.TiltShiftYFilter.html">TiltShiftYFilter</a>
|
|
</li>
|
|
|
|
<li class="class-depth-1">
|
|
<a href="PIXI.TwistFilter.html">TwistFilter</a>
|
|
</li>
|
|
|
|
<li class="class-depth-1">
|
|
<a href="PIXI.VideoTexture.html">VideoTexture</a>
|
|
</li>
|
|
|
|
<li class="class-depth-1">
|
|
<a href="PIXI.WebGLBlendModeManager.html">WebGLBlendModeManager</a>
|
|
</li>
|
|
|
|
<li class="class-depth-1">
|
|
<a href="PIXI.WebGLFastSpriteBatch.html">WebGLFastSpriteBatch</a>
|
|
</li>
|
|
|
|
<li class="class-depth-1">
|
|
<a href="PIXI.WebGLFilterManager.html">WebGLFilterManager</a>
|
|
</li>
|
|
|
|
<li class="class-depth-1">
|
|
<a href="PIXI.WebGLRenderer.html">WebGLRenderer</a>
|
|
</li>
|
|
|
|
|
|
</ul>
|
|
</li>
|
|
|
|
|
|
<li class="dropdown">
|
|
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Core<b class="caret"></b></a>
|
|
<ul class="dropdown-menu ">
|
|
<li class="class-depth-1"><a href="Phaser.Game.html">Game</a></li>
|
|
<li class="class-depth-1"><a href="Phaser.Group.html">Group</a></li>
|
|
<li class="class-depth-1"><a href="Phaser.World.html">World</a></li>
|
|
<li class="class-depth-1"><a href="Phaser.Loader.html">Loader</a></li>
|
|
<li class="class-depth-1"><a href="Phaser.Time.html">Time</a></li>
|
|
<li class="class-depth-1"><a href="Phaser.Camera.html">Camera</a></li>
|
|
<li class="class-depth-1"><a href="Phaser.StateManager.html">State Manager</a></li>
|
|
<li class="class-depth-1"><a href="Phaser.TweenManager.html">Tween Manager</a></li>
|
|
<li class="class-depth-1"><a href="Phaser.SoundManager.html">Sound Manager</a></li>
|
|
<li class="class-depth-1"><a href="Phaser.InputManager.html">Input Manager</a></li>
|
|
<li class="class-depth-1"><a href="Phaser.ScaleManager.html">Scale Manager</a></li>
|
|
</ul>
|
|
</li>
|
|
|
|
<li class="dropdown">
|
|
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Game Objects<b class="caret"></b></a>
|
|
<ul class="dropdown-menu ">
|
|
<li class="class-depth-1"><a href="Phaser.GameObjectFactory.html">Factory (game.add)</a></li>
|
|
<li class="class-depth-1"><a href="Phaser.GameObjectCreator.html">Creator (game.make)</a></li>
|
|
<li class="class-depth-1"><a href="Phaser.Sprite.html">Sprite</a></li>
|
|
<li class="class-depth-1"><a href="Phaser.Image.html">Image</a></li>
|
|
<li class="class-depth-1"><a href="Phaser.Sound.html">Sound</a></li>
|
|
<li class="class-depth-1"><a href="Phaser.Emitter.html">Emitter</a></li>
|
|
<li class="class-depth-1"><a href="Phaser.Particle.html">Particle</a></li>
|
|
<li class="class-depth-1"><a href="Phaser.Text.html">Text</a></li>
|
|
<li class="class-depth-1"><a href="Phaser.Tween.html">Tween</a></li>
|
|
<li class="class-depth-1"><a href="Phaser.BitmapText.html">BitmapText</a></li>
|
|
<li class="class-depth-1"><a href="Phaser.Tilemap.html">Tilemap</a></li>
|
|
<li class="class-depth-1"><a href="Phaser.BitmapData.html">BitmapData</a></li>
|
|
<li class="class-depth-1"><a href="Phaser.RetroFont.html">RetroFont</a></li>
|
|
<li class="class-depth-1"><a href="Phaser.Button.html">Button</a></li>
|
|
<li class="class-depth-1"><a href="Phaser.Animation.html">Animation</a></li>
|
|
<li class="class-depth-1"><a href="Phaser.Graphics.html">Graphics</a></li>
|
|
<li class="class-depth-1"><a href="Phaser.RenderTexture.html">RenderTexture</a></li>
|
|
<li class="class-depth-1"><a href="Phaser.TileSprite.html">TileSprite</a></li>
|
|
</ul>
|
|
</li>
|
|
|
|
<li class="dropdown">
|
|
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Geometry<b class="caret"></b></a>
|
|
<ul class="dropdown-menu ">
|
|
<li class="class-depth-1"><a href="Phaser.Circle.html">Circle</a></li>
|
|
<li class="class-depth-1"><a href="Phaser.Rectangle.html">Rectangle</a></li>
|
|
<li class="class-depth-1"><a href="Phaser.Point.html">Point</a></li>
|
|
<li class="class-depth-1"><a href="Phaser.Line.html">Line</a></li>
|
|
<li class="class-depth-1"><a href="Phaser.Ellipse.html">Ellipse</a></li>
|
|
<li class="class-depth-1"><a href="Phaser.Polygon.html">Polygon</a></li>
|
|
</ul>
|
|
</li>
|
|
|
|
<li class="dropdown">
|
|
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Physics<b class="caret"></b></a>
|
|
<ul class="dropdown-menu ">
|
|
<li class="class-depth-1"><a href="Phaser.Physics.Arcade.html">Arcade Physics</a></li>
|
|
<li class="class-depth-2"><a href="Phaser.Physics.Arcade.Body.html">Body</a></li>
|
|
<li class="class-depth-1"><a href="Phaser.Physics.P2.html">P2 Physics</a></li>
|
|
<li class="class-depth-2"><a href="Phaser.Physics.P2.Body.html">Body</a></li>
|
|
<li class="class-depth-2"><a href="Phaser.Physics.P2.Spring.html">Spring</a></li>
|
|
<li class="class-depth-2"><a href="Phaser.Physics.P2.CollisionGroup.html">CollisionGroup</a></li>
|
|
<li class="class-depth-2"><a href="Phaser.Physics.P2.ContactMaterial.html">ContactMaterial</a></li>
|
|
<li class="class-depth-1"><a href="Phaser.Physics.Ninja.html">Ninja Physics</a></li>
|
|
<li class="class-depth-2"><a href="Phaser.Physics.Body.html">Body</a></li>
|
|
</ul>
|
|
</li>
|
|
|
|
<li class="dropdown">
|
|
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Input<b class="caret"></b></a>
|
|
<ul class="dropdown-menu ">
|
|
<li class="class-depth-1"><a href="Phaser.InputHandler.html">Input Handler</a></li>
|
|
<li class="class-depth-1"><a href="Phaser.Pointer.html">Pointer</a></li>
|
|
<li class="class-depth-1"><a href="Phaser.Mouse.html">Mouse</a></li>
|
|
<li class="class-depth-1"><a href="Phaser.Keyboard.html">Keyboard</a></li>
|
|
<li class="class-depth-1"><a href="Phaser.Key.html">Key</a></li>
|
|
<li class="class-depth-1"><a href="Phaser.Gamepad.html">Gamepad</a></li>
|
|
</ul>
|
|
</li>
|
|
|
|
<li class="dropdown">
|
|
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Community<b class="caret"></b></a>
|
|
<ul class="dropdown-menu ">
|
|
<li class="class-depth-1"><a href="https://github.com/photonstorm/phaser">Phaser Github</a></li>
|
|
<li class="class-depth-1"><a href="http://examples.phaser.io">Phaser Examples</a></li>
|
|
<li class="class-depth-1"><a href="https://github.com/photonstorm/phaser-plugins">Phaser Plugins</a></li>
|
|
<li class="class-depth-1"><a href="http://www.html5gamedevs.com/forum/14-phaser/">Forum</a></li>
|
|
<li class="class-depth-1"><a href="http://stackoverflow.com/questions/tagged/phaser-framework">Stack Overflow</a></li>
|
|
<li class="class-depth-1"><a href="https://confirmsubscription.com/h/r/369DE48E3E86AF1E">Newsletter</a></li>
|
|
<li class="class-depth-1"><a href="https://twitter.com/photonstorm">Twitter</a></li>
|
|
<li class="class-depth-1"><a href="http://www.html5gamedevs.com/topic/4470-official-phaserio-irc-channel-phaserio-on-freenode/">IRC</a></li>
|
|
<li class="class-depth-1"><a href="https://leanpub.com/u/photonstorm">Phaser Books</a></li>
|
|
<li class="class-depth-1"><a href="https://www.gittip.com/photonstorm/">GitTip</a></li>
|
|
</ul>
|
|
</li>
|
|
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="row-fluid">
|
|
|
|
|
|
<div class="span8">
|
|
|
|
<div id="main">
|
|
|
|
|
|
|
|
<!--<h1 class="page-title">Class: ScaleManager</h1>-->
|
|
<section>
|
|
|
|
<header>
|
|
<h2>
|
|
<span class="ancestors"><a href="Phaser.html">Phaser</a>.</span>
|
|
|
|
ScaleManager
|
|
</h2>
|
|
|
|
<div class="class-description"><p>The ScaleManager object handles the the scaling, resizing, and alignment of the
|
|
Game size and the game Display canvas.</p>
|
|
<p>The Game size is the logical size of the game; the Display canvas has size as an HTML element.</p>
|
|
<p>The calculations of these are heavily influenced by the bounding Parent size which is the computed
|
|
dimenstions of the Display canvas's Parent container/element - the <em>effective CSS rules of the
|
|
canvas's Parent element play an important role</em> in the operation of the ScaleManager. </p>
|
|
<p>The Display canvas - or Game size, depending <a href="Phaser.ScaleManager.html#scaleMode">scaleMode</a> - is updated to best utilize the Parent size.
|
|
When in Fullscreen mode or with <code>parentIsWindow</code> the Parent size is that of the visual viewport (see <a href="Phaser.ScaleManager.html#getParentBounds">getParentBounds</a>).</p>
|
|
<p>Parent and Display canvas containment guidelines:</p>
|
|
<ul>
|
|
<li><p>Style the Parent element (of the game canvas) to control the Parent size and
|
|
thus the Display canvas's size and layout.</p>
|
|
</li>
|
|
<li><p>The Parent element's CSS styles should <em>effectively</em> apply maximum (and minimum) bounding behavior.</p>
|
|
</li>
|
|
<li><p>The Parent element should <em>not</em> apply a padding as this is not accounted for.
|
|
If a padding is required apply it to the Parent's parent or apply a margin to the Parent.</p>
|
|
</li>
|
|
<li><p>The Display canvas layout CSS styles (ie. margins, size) should not be altered/specified as
|
|
they may be updated by the ScaleManager.</p>
|
|
</li>
|
|
</ul></div>
|
|
|
|
</header>
|
|
|
|
<article>
|
|
<div class="container-overview">
|
|
|
|
|
|
|
|
|
|
<dt>
|
|
<h4 class="name "
|
|
id="ScaleManager"><span class="type-signature"></span>new ScaleManager<span class="signature">(game, width, height)</span><span class="type-signature"></span></h4>
|
|
|
|
|
|
</dt>
|
|
<dd>
|
|
|
|
|
|
|
|
<div class="description">
|
|
<p>Create a new ScaleManager object - this is done automatically by <a href="Phaser.Game.html">Phaser.Game</a></p>
|
|
<p>The <code>width</code> and <code>height</code> constructor parameters can either be a number which represents pixels or a string that represents a percentage: e.g. <code>800</code> (for 800 pixels) or <code>"80%"</code> for 80%.</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>
|
|
|
|
|
|
|
<span class="param-type">string</span>
|
|
|
|
|
|
|
|
</td>
|
|
|
|
|
|
|
|
|
|
|
|
<td class="description last"><p>The width of the game. See above.</p></td>
|
|
</tr>
|
|
|
|
|
|
|
|
<tr>
|
|
|
|
<td class="name"><code>height</code></td>
|
|
|
|
|
|
<td class="type">
|
|
|
|
|
|
<span class="param-type">number</span>
|
|
|
|
|
|
|
<span class="param-type">string</span>
|
|
|
|
|
|
|
|
</td>
|
|
|
|
|
|
|
|
|
|
|
|
<td class="description last"><p>The height of the game. See above.</p></td>
|
|
</tr>
|
|
|
|
|
|
</tbody>
|
|
</table>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<dl class="details">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<dt class="tag-source">Source -
|
|
<a href="ScaleManager.js.html">core/ScaleManager.js</a>, <a href="ScaleManager.js.html#sunlight-1-line-44">line 44</a>
|
|
</dt>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</dd>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<h3 class="subsection-title">Members</h3>
|
|
|
|
<dl>
|
|
|
|
<dt>
|
|
<h4 class="name "
|
|
id="EXACT_FIT"><span class="type-signature"><static, constant> </span>EXACT_FIT<span class="type-signature"> :integer</span></h4>
|
|
|
|
|
|
</dt>
|
|
<dd>
|
|
|
|
|
|
|
|
<div class="description">
|
|
<p>A scale mode that stretches content to fill all available space - see <a href="Phaser.ScaleManager.html#scaleMode">scaleMode</a>.</p>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<dl class="details">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<dt class="tag-source">Source -
|
|
<a href="ScaleManager.js.html">core/ScaleManager.js</a>, <a href="ScaleManager.js.html#sunlight-1-line-628">line 628</a>
|
|
</dt>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</dl>
|
|
|
|
|
|
|
|
</dd>
|
|
|
|
|
|
|
|
<dt>
|
|
<h4 class="name "
|
|
id="NO_SCALE"><span class="type-signature"><static, constant> </span>NO_SCALE<span class="type-signature"> :integer</span></h4>
|
|
|
|
|
|
</dt>
|
|
<dd>
|
|
|
|
|
|
|
|
<div class="description">
|
|
<p>A scale mode that prevents any scaling - see <a href="Phaser.ScaleManager.html#scaleMode">scaleMode</a>.</p>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<dl class="details">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<dt class="tag-source">Source -
|
|
<a href="ScaleManager.js.html">core/ScaleManager.js</a>, <a href="ScaleManager.js.html#sunlight-1-line-636">line 636</a>
|
|
</dt>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</dl>
|
|
|
|
|
|
|
|
</dd>
|
|
|
|
|
|
|
|
<dt>
|
|
<h4 class="name "
|
|
id="RESIZE"><span class="type-signature"><static, constant> </span>RESIZE<span class="type-signature"> :integer</span></h4>
|
|
|
|
|
|
</dt>
|
|
<dd>
|
|
|
|
|
|
|
|
<div class="description">
|
|
<p>A scale mode that causes the Game size to change - see <a href="Phaser.ScaleManager.html#scaleMode">scaleMode</a>.</p>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<dl class="details">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<dt class="tag-source">Source -
|
|
<a href="ScaleManager.js.html">core/ScaleManager.js</a>, <a href="ScaleManager.js.html#sunlight-1-line-652">line 652</a>
|
|
</dt>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</dl>
|
|
|
|
|
|
|
|
</dd>
|
|
|
|
|
|
|
|
<dt>
|
|
<h4 class="name "
|
|
id="SHOW_ALL"><span class="type-signature"><static, constant> </span>SHOW_ALL<span class="type-signature"> :integer</span></h4>
|
|
|
|
|
|
</dt>
|
|
<dd>
|
|
|
|
|
|
|
|
<div class="description">
|
|
<p>A scale mode that shows the entire game while maintaining proportions - see <a href="Phaser.ScaleManager.html#scaleMode">scaleMode</a>.</p>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<dl class="details">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<dt class="tag-source">Source -
|
|
<a href="ScaleManager.js.html">core/ScaleManager.js</a>, <a href="ScaleManager.js.html#sunlight-1-line-644">line 644</a>
|
|
</dt>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</dl>
|
|
|
|
|
|
|
|
</dd>
|
|
|
|
|
|
|
|
<dt>
|
|
<h4 class="name "
|
|
id="USER_SCALE"><span class="type-signature"><static, constant> </span>USER_SCALE<span class="type-signature"> :integer</span></h4>
|
|
|
|
|
|
</dt>
|
|
<dd>
|
|
|
|
|
|
|
|
<div class="description">
|
|
<p>A scale mode that allows a custom scale factor - see <a href="Phaser.ScaleManager.html#scaleMode">scaleMode</a>.</p>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<dl class="details">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<dt class="tag-source">Source -
|
|
<a href="ScaleManager.js.html">core/ScaleManager.js</a>, <a href="ScaleManager.js.html#sunlight-1-line-660">line 660</a>
|
|
</dt>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</dl>
|
|
|
|
|
|
|
|
</dd>
|
|
|
|
|
|
|
|
<dt>
|
|
<h4 class="name "
|
|
id="aspectRatio"><span class="type-signature"><readonly> </span>aspectRatio<span class="type-signature"> :number</span></h4>
|
|
|
|
|
|
</dt>
|
|
<dd>
|
|
|
|
|
|
|
|
<div class="description">
|
|
<p>The aspect ratio of the scaled Display canvas.</p>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<dl class="details">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<dt class="tag-source">Source -
|
|
<a href="ScaleManager.js.html">core/ScaleManager.js</a>, <a href="ScaleManager.js.html#sunlight-1-line-394">line 394</a>
|
|
</dt>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</dl>
|
|
|
|
|
|
|
|
</dd>
|
|
|
|
|
|
|
|
<dt>
|
|
<h4 class="name "
|
|
id="boundingParent"><span class="type-signature"><readonly> </span>boundingParent<span class="type-signature"> :DOMElement</span></h4>
|
|
|
|
|
|
</dt>
|
|
<dd>
|
|
|
|
|
|
|
|
<div class="description">
|
|
<p>The DOM element that is considered the Parent bounding element, if any.</p>
|
|
<p>This <code>null</code> if <code>parentIsWindow</code> is true or if fullscreen mode is entered and <code>fullScreenTarget</code> is specified.
|
|
It will also be null if there is no game canvas or if the game canvas has no parent.</p>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<dl class="details">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<dt class="tag-source">Source -
|
|
<a href="ScaleManager.js.html">core/ScaleManager.js</a>, <a href="ScaleManager.js.html#sunlight-1-line-2145">line 2145</a>
|
|
</dt>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</dl>
|
|
|
|
|
|
|
|
</dd>
|
|
|
|
|
|
|
|
<dt>
|
|
<h4 class="name "
|
|
id="bounds"><span class="type-signature"><readonly> </span>bounds<span class="type-signature"> :<a href="Phaser.Rectangle.html">Phaser.Rectangle</a></span></h4>
|
|
|
|
|
|
</dt>
|
|
<dd>
|
|
|
|
|
|
|
|
<div class="description">
|
|
<p>The bounds of the scaled game. The x/y will match the offset of the canvas element and the width/height the scaled width and height.</p>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<dl class="details">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<dt class="tag-source">Source -
|
|
<a href="ScaleManager.js.html">core/ScaleManager.js</a>, <a href="ScaleManager.js.html#sunlight-1-line-387">line 387</a>
|
|
</dt>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</dl>
|
|
|
|
|
|
|
|
</dd>
|
|
|
|
|
|
|
|
<dt>
|
|
<h4 class="name "
|
|
id="compatibility"><span class="type-signature"><internal> </span>compatibility<span class="type-signature"></span></h4>
|
|
|
|
|
|
</dt>
|
|
<dd>
|
|
|
|
|
|
|
|
<div class="description">
|
|
<p>Various compatibility settings.
|
|
The <code>(auto)</code> value indicates the setting is configured based on device and runtime information.</p>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<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>Argument</th>
|
|
|
|
|
|
|
|
<th>Default</th>
|
|
|
|
|
|
<th class="last">Description</th>
|
|
</tr>
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
|
|
<tr>
|
|
|
|
<td class="name"><code>supportsFullscreen</code></td>
|
|
|
|
|
|
<td class="type">
|
|
|
|
|
|
<span class="param-type">boolean</span>
|
|
|
|
|
|
|
|
</td>
|
|
|
|
|
|
<td class="attributes">
|
|
|
|
<optional><br>
|
|
|
|
|
|
|
|
</td>
|
|
|
|
|
|
|
|
<td class="default">
|
|
|
|
(auto)
|
|
|
|
</td>
|
|
|
|
|
|
<td class="description last"><p>True only if fullscreen support will be used. (Changing to fullscreen still might not work.)</p></td>
|
|
</tr>
|
|
|
|
|
|
|
|
<tr>
|
|
|
|
<td class="name"><code>orientationFallback</code></td>
|
|
|
|
|
|
<td class="type">
|
|
|
|
|
|
<span class="param-type">boolean</span>
|
|
|
|
|
|
|
|
</td>
|
|
|
|
|
|
<td class="attributes">
|
|
|
|
<optional><br>
|
|
|
|
|
|
|
|
</td>
|
|
|
|
|
|
|
|
<td class="default">
|
|
|
|
(auto)
|
|
|
|
</td>
|
|
|
|
|
|
<td class="description last"><p>See <a href="Phaser.DOM.html#getScreenOrientation">Phaser.DOM.getScreenOrientation</a>.</p></td>
|
|
</tr>
|
|
|
|
|
|
|
|
<tr>
|
|
|
|
<td class="name"><code>noMargins</code></td>
|
|
|
|
|
|
<td class="type">
|
|
|
|
|
|
<span class="param-type">boolean</span>
|
|
|
|
|
|
|
|
</td>
|
|
|
|
|
|
<td class="attributes">
|
|
|
|
<optional><br>
|
|
|
|
|
|
|
|
</td>
|
|
|
|
|
|
|
|
<td class="default">
|
|
|
|
false
|
|
|
|
</td>
|
|
|
|
|
|
<td class="description last"><p>If true then the Display canvas's margins will not be updated anymore: existing margins must be manually cleared. Disabling margins prevents automatic canvas alignment/centering, possibly in fullscreen.</p></td>
|
|
</tr>
|
|
|
|
|
|
|
|
<tr>
|
|
|
|
<td class="name"><code>scrollTo</code></td>
|
|
|
|
|
|
<td class="type">
|
|
|
|
|
|
<span class="param-type"><a href="Phaser.Point.html">Phaser.Point</a></span>
|
|
|
|
|
|
|
|
</td>
|
|
|
|
|
|
<td class="attributes">
|
|
|
|
<optional><br>
|
|
|
|
|
|
|
|
<nullable><br>
|
|
|
|
</td>
|
|
|
|
|
|
|
|
<td class="default">
|
|
|
|
(auto)
|
|
|
|
</td>
|
|
|
|
|
|
<td class="description last"><p>If specified the window will be scrolled to this position on every refresh.</p></td>
|
|
</tr>
|
|
|
|
|
|
|
|
<tr>
|
|
|
|
<td class="name"><code>forceMinimumDocumentHeight</code></td>
|
|
|
|
|
|
<td class="type">
|
|
|
|
|
|
<span class="param-type">boolean</span>
|
|
|
|
|
|
|
|
</td>
|
|
|
|
|
|
<td class="attributes">
|
|
|
|
<optional><br>
|
|
|
|
|
|
|
|
</td>
|
|
|
|
|
|
|
|
<td class="default">
|
|
|
|
false
|
|
|
|
</td>
|
|
|
|
|
|
<td class="description last"><p>If enabled the document elements minimum height is explicity set on updates.</p></td>
|
|
</tr>
|
|
|
|
|
|
|
|
<tr>
|
|
|
|
<td class="name"><code>canExpandParent</code></td>
|
|
|
|
|
|
<td class="type">
|
|
|
|
|
|
<span class="param-type">boolean</span>
|
|
|
|
|
|
|
|
</td>
|
|
|
|
|
|
<td class="attributes">
|
|
|
|
<optional><br>
|
|
|
|
|
|
|
|
</td>
|
|
|
|
|
|
|
|
<td class="default">
|
|
|
|
true
|
|
|
|
</td>
|
|
|
|
|
|
<td class="description last"><p>If enabled then SHOW_ALL and USER_SCALE modes can try and expand the parent element. It may be necessary for the parent element to impose CSS width/height restrictions.</p></td>
|
|
</tr>
|
|
|
|
|
|
</tbody>
|
|
</table>
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<dt class="important tag-deprecated">Internal:</dt>
|
|
<dd class="tag-deprecated"><ul>
|
|
|
|
<li>This member is <em>internal (protected)</em> and may be modified or removed in the future.</li>
|
|
|
|
</ul></dd>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<dt class="tag-source">Source -
|
|
<a href="ScaleManager.js.html">core/ScaleManager.js</a>, <a href="ScaleManager.js.html#sunlight-1-line-446">line 446</a>
|
|
</dt>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</dl>
|
|
|
|
|
|
|
|
</dd>
|
|
|
|
|
|
|
|
<dt>
|
|
<h4 class="name "
|
|
id="currentScaleMode"><span class="type-signature"><internal, readonly> </span>currentScaleMode<span class="type-signature"> :number</span></h4>
|
|
|
|
|
|
</dt>
|
|
<dd>
|
|
|
|
|
|
|
|
<div class="description">
|
|
<p>Returns the current scale mode - for normal or fullscreen operation.</p>
|
|
<p>See <a href="Phaser.ScaleManager.html#scaleMode">scaleMode</a> for the different modes allowed.</p>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<dl class="details">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<dt class="important tag-deprecated">Internal:</dt>
|
|
<dd class="tag-deprecated"><ul>
|
|
|
|
<li>This member is <em>internal (protected)</em> and may be modified or removed in the future.</li>
|
|
|
|
</ul></dd>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<dt class="tag-source">Source -
|
|
<a href="ScaleManager.js.html">core/ScaleManager.js</a>, <a href="ScaleManager.js.html#sunlight-1-line-2275">line 2275</a>
|
|
</dt>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</dl>
|
|
|
|
|
|
|
|
</dd>
|
|
|
|
|
|
|
|
<dt>
|
|
<h4 class="name "
|
|
id="dom"><span class="type-signature"><internal, readonly> </span>dom<span class="type-signature"> :<a href="Phaser.DOM.html">Phaser.DOM</a></span></h4>
|
|
|
|
|
|
</dt>
|
|
<dd>
|
|
|
|
|
|
|
|
<div class="description">
|
|
<p>Provides access to some cross-device DOM functions.</p>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<dl class="details">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<dt class="important tag-deprecated">Internal:</dt>
|
|
<dd class="tag-deprecated"><ul>
|
|
|
|
<li>This member is <em>internal (protected)</em> and may be modified or removed in the future.</li>
|
|
|
|
</ul></dd>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<dt class="tag-source">Source -
|
|
<a href="ScaleManager.js.html">core/ScaleManager.js</a>, <a href="ScaleManager.js.html#sunlight-1-line-60">line 60</a>
|
|
</dt>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</dl>
|
|
|
|
|
|
|
|
</dd>
|
|
|
|
|
|
|
|
<dt>
|
|
<h4 class="name toc-deprecated"
|
|
id="enterFullScreen"><span class="type-signature"></span>enterFullScreen<span class="type-signature"> :<a href="Phaser.Signal.html">Phaser.Signal</a></span></h4>
|
|
|
|
|
|
</dt>
|
|
<dd>
|
|
|
|
<dt class="important deprecated-notice">
|
|
This method is <em>deprecated</em> and should not be used. It may be removed in the future.
|
|
</dt>
|
|
|
|
|
|
|
|
<div class="description">
|
|
<p>This signal is dispatched when the browser enters fullscreen mode, if supported.</p>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<dl class="details">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<dt class="important tag-deprecated">Deprecated:</dt>
|
|
<dd class="tag-deprecated"><ul>
|
|
|
|
|
|
<li>2.2.0 - Use <a href="Phaser.ScaleManager.html#onFullScreenChange">onFullScreenChange</a></li>
|
|
</ul></dd>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<dt class="tag-source">Source -
|
|
<a href="ScaleManager.js.html">core/ScaleManager.js</a>, <a href="ScaleManager.js.html#sunlight-1-line-327">line 327</a>
|
|
</dt>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</dl>
|
|
|
|
|
|
|
|
</dd>
|
|
|
|
|
|
|
|
<dt>
|
|
<h4 class="name "
|
|
id="enterIncorrectOrientation"><span class="type-signature"></span>enterIncorrectOrientation<span class="type-signature"> :<a href="Phaser.Signal.html">Phaser.Signal</a></span></h4>
|
|
|
|
|
|
</dt>
|
|
<dd>
|
|
|
|
|
|
|
|
<div class="description">
|
|
<p>This signal is dispatched when the browser enters an incorrect orientation, as defined by <code>forceOrientation</code>.</p>
|
|
<p>This is signaled from <code>preUpdate</code> (or <code>pauseUpdate</code>) <em>even when</em> the game is paused.</p>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<dl class="details">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<dt class="tag-source">Source -
|
|
<a href="ScaleManager.js.html">core/ScaleManager.js</a>, <a href="ScaleManager.js.html#sunlight-1-line-240">line 240</a>
|
|
</dt>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</dl>
|
|
|
|
|
|
|
|
</dd>
|
|
|
|
|
|
|
|
<dt>
|
|
<h4 class="name toc-deprecated"
|
|
id="enterLandscape"><span class="type-signature"></span>enterLandscape<span class="type-signature"> :<a href="Phaser.Signal.html">Phaser.Signal</a></span></h4>
|
|
|
|
|
|
</dt>
|
|
<dd>
|
|
|
|
<dt class="important deprecated-notice">
|
|
This method is <em>deprecated</em> and should not be used. It may be removed in the future.
|
|
</dt>
|
|
|
|
|
|
|
|
<div class="description">
|
|
<p>This signal is dispatched when the browser enters landscape orientation, having been in portrait.</p>
|
|
<p>This is signaled from <code>preUpdate</code> (or <code>pauseUpdate</code>) <em>even when</em> the game is paused.</p>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<dl class="details">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<dt class="important tag-deprecated">Deprecated:</dt>
|
|
<dd class="tag-deprecated"><ul>
|
|
|
|
|
|
<li>2.2.0 - Use <a href="Phaser.ScaleManager.html#onOrientationChange">onOrientationChange</a></li>
|
|
</ul></dd>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<dt class="tag-source">Source -
|
|
<a href="ScaleManager.js.html">core/ScaleManager.js</a>, <a href="ScaleManager.js.html#sunlight-1-line-219">line 219</a>
|
|
</dt>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</dl>
|
|
|
|
|
|
|
|
</dd>
|
|
|
|
|
|
|
|
<dt>
|
|
<h4 class="name toc-deprecated"
|
|
id="enterPortrait"><span class="type-signature"></span>enterPortrait<span class="type-signature"> :<a href="Phaser.Signal.html">Phaser.Signal</a></span></h4>
|
|
|
|
|
|
</dt>
|
|
<dd>
|
|
|
|
<dt class="important deprecated-notice">
|
|
This method is <em>deprecated</em> and should not be used. It may be removed in the future.
|
|
</dt>
|
|
|
|
|
|
|
|
<div class="description">
|
|
<p>This signal is dispatched when the browser enters portrait orientation, having been in landscape.</p>
|
|
<p>This is signaled from <code>preUpdate</code> (or <code>pauseUpdate</code>) <em>even when</em> the game is paused.</p>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<dl class="details">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<dt class="important tag-deprecated">Deprecated:</dt>
|
|
<dd class="tag-deprecated"><ul>
|
|
|
|
|
|
<li>2.2.0 - Use <a href="Phaser.ScaleManager.html#onOrientationChange">onOrientationChange</a></li>
|
|
</ul></dd>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<dt class="tag-source">Source -
|
|
<a href="ScaleManager.js.html">core/ScaleManager.js</a>, <a href="ScaleManager.js.html#sunlight-1-line-230">line 230</a>
|
|
</dt>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</dl>
|
|
|
|
|
|
|
|
</dd>
|
|
|
|
|
|
|
|
<dt>
|
|
<h4 class="name "
|
|
id="forceLandscape"><span class="type-signature"><internal, readonly> </span>forceLandscape<span class="type-signature"> :boolean</span></h4>
|
|
|
|
|
|
</dt>
|
|
<dd>
|
|
|
|
|
|
|
|
<div class="description">
|
|
<p>If true, the game should only run in a landscape orientation.
|
|
Change with <code>forceOrientation</code>.</p>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<dl class="details">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<dt class="important tag-deprecated">Internal:</dt>
|
|
<dd class="tag-deprecated"><ul>
|
|
|
|
<li>This member is <em>internal (protected)</em> and may be modified or removed in the future.</li>
|
|
|
|
</ul></dd>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<dt class="tag-default">Default Value:</dt>
|
|
<dd class="tag-default"><ul class="dummy"><li>false</li></ul></dd>
|
|
|
|
|
|
|
|
<dt class="tag-source">Source -
|
|
<a href="ScaleManager.js.html">core/ScaleManager.js</a>, <a href="ScaleManager.js.html#sunlight-1-line-138">line 138</a>
|
|
</dt>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</dl>
|
|
|
|
|
|
|
|
</dd>
|
|
|
|
|
|
|
|
<dt>
|
|
<h4 class="name "
|
|
id="forcePortrait"><span class="type-signature"><internal, readonly> </span>forcePortrait<span class="type-signature"> :boolean</span></h4>
|
|
|
|
|
|
</dt>
|
|
<dd>
|
|
|
|
|
|
|
|
<div class="description">
|
|
<p>If true, the game should only run in a portrait
|
|
Change with <code>forceOrientation</code>.</p>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<dl class="details">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<dt class="important tag-deprecated">Internal:</dt>
|
|
<dd class="tag-deprecated"><ul>
|
|
|
|
<li>This member is <em>internal (protected)</em> and may be modified or removed in the future.</li>
|
|
|
|
</ul></dd>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<dt class="tag-default">Default Value:</dt>
|
|
<dd class="tag-default"><ul class="dummy"><li>false</li></ul></dd>
|
|
|
|
|
|
|
|
<dt class="tag-source">Source -
|
|
<a href="ScaleManager.js.html">core/ScaleManager.js</a>, <a href="ScaleManager.js.html#sunlight-1-line-148">line 148</a>
|
|
</dt>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</dl>
|
|
|
|
|
|
|
|
</dd>
|
|
|
|
|
|
|
|
<dt>
|
|
<h4 class="name toc-deprecated"
|
|
id="fullScreenFailed"><span class="type-signature"></span>fullScreenFailed<span class="type-signature"> :<a href="Phaser.Signal.html">Phaser.Signal</a></span></h4>
|
|
|
|
|
|
</dt>
|
|
<dd>
|
|
|
|
<dt class="important deprecated-notice">
|
|
This method is <em>deprecated</em> and should not be used. It may be removed in the future.
|
|
</dt>
|
|
|
|
|
|
|
|
<div class="description">
|
|
<p>This signal is dispatched when the browser fails to enter fullscreen mode;
|
|
or if the device does not support fullscreen mode and <code>startFullScreen</code> is invoked.</p>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<dl class="details">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<dt class="important tag-deprecated">Deprecated:</dt>
|
|
<dd class="tag-deprecated"><ul>
|
|
|
|
|
|
<li>2.2.0 - Use <a href="Phaser.ScaleManager.html#onFullScreenError">onFullScreenError</a></li>
|
|
</ul></dd>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<dt class="tag-source">Source -
|
|
<a href="ScaleManager.js.html">core/ScaleManager.js</a>, <a href="ScaleManager.js.html#sunlight-1-line-346">line 346</a>
|
|
</dt>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</dl>
|
|
|
|
|
|
|
|
</dd>
|
|
|
|
|
|
|
|
<dt>
|
|
<h4 class="name "
|
|
id="fullScreenScaleMode"><span class="type-signature"></span>fullScreenScaleMode<span class="type-signature"> :integer</span></h4>
|
|
|
|
|
|
</dt>
|
|
<dd>
|
|
|
|
|
|
|
|
<div class="description">
|
|
<p>The scaling method used by the ScaleManager when in fullscreen.</p>
|
|
<p>See <a href="Phaser.ScaleManager.html#scaleMode">scaleMode</a> for the different modes allowed.</p>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<dl class="details">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<dt class="tag-source">Source -
|
|
<a href="ScaleManager.js.html">core/ScaleManager.js</a>, <a href="ScaleManager.js.html#sunlight-1-line-2234">line 2234</a>
|
|
</dt>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</dl>
|
|
|
|
|
|
|
|
</dd>
|
|
|
|
|
|
|
|
<dt>
|
|
<h4 class="name "
|
|
id="fullScreenTarget"><span class="type-signature"></span>fullScreenTarget<span class="type-signature"> :DOMElement</span></h4>
|
|
|
|
|
|
</dt>
|
|
<dd>
|
|
|
|
|
|
|
|
<div class="description">
|
|
<p>If specified, this is the DOM element on which the Fullscreen API enter request will be invoked.
|
|
The target element must have the correct CSS styling and contain the Display canvas.</p>
|
|
<p>The elements style will be modified (ie. the width and height might be set to 100%)
|
|
but it will not be added to, removed from, or repositioned within the DOM.
|
|
An attempt is made to restore relevant style changes when fullscreen mode is left.</p>
|
|
<p>For pre-2.2.0 behavior set <code>game.scale.fullScreenTarget = game.canvas</code>.</p>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<dl class="details">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<dt class="tag-default">Default Value:</dt>
|
|
<dd class="tag-default"><ul class="dummy"><li>null</li></ul></dd>
|
|
|
|
|
|
|
|
<dt class="tag-source">Source -
|
|
<a href="ScaleManager.js.html">core/ScaleManager.js</a>, <a href="ScaleManager.js.html#sunlight-1-line-265">line 265</a>
|
|
</dt>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</dl>
|
|
|
|
|
|
|
|
</dd>
|
|
|
|
|
|
|
|
<dt>
|
|
<h4 class="name "
|
|
id="game"><span class="type-signature"><internal, readonly> </span>game<span class="type-signature"> :<a href="Phaser.Game.html">Phaser.Game</a></span></h4>
|
|
|
|
|
|
</dt>
|
|
<dd>
|
|
|
|
|
|
|
|
<div class="description">
|
|
<p>A reference to the currently running game.</p>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<dl class="details">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<dt class="important tag-deprecated">Internal:</dt>
|
|
<dd class="tag-deprecated"><ul>
|
|
|
|
<li>This member is <em>internal (protected)</em> and may be modified or removed in the future.</li>
|
|
|
|
</ul></dd>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<dt class="tag-source">Source -
|
|
<a href="ScaleManager.js.html">core/ScaleManager.js</a>, <a href="ScaleManager.js.html#sunlight-1-line-52">line 52</a>
|
|
</dt>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</dl>
|
|
|
|
|
|
|
|
</dd>
|
|
|
|
|
|
|
|
<dt>
|
|
<h4 class="name "
|
|
id="grid"><span class="type-signature"></span>grid<span class="type-signature"> :<a href="Phaser.FlexGrid.html">Phaser.FlexGrid</a></span></h4>
|
|
|
|
|
|
</dt>
|
|
<dd>
|
|
|
|
|
|
|
|
<div class="description">
|
|
<p><em>EXPERIMENTAL:</em> A responsive grid on which you can align game objects.</p>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<dl class="details">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<dt class="tag-source">Source -
|
|
<a href="ScaleManager.js.html">core/ScaleManager.js</a>, <a href="ScaleManager.js.html#sunlight-1-line-67">line 67</a>
|
|
</dt>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</dl>
|
|
|
|
|
|
|
|
</dd>
|
|
|
|
|
|
|
|
<dt>
|
|
<h4 class="name "
|
|
id="height"><span class="type-signature"><readonly> </span>height<span class="type-signature"> :number</span></h4>
|
|
|
|
|
|
</dt>
|
|
<dd>
|
|
|
|
|
|
|
|
<div class="description">
|
|
<p>Target height (in pixels) of the Display canvas.</p>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<dl class="details">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<dt class="tag-source">Source -
|
|
<a href="ScaleManager.js.html">core/ScaleManager.js</a>, <a href="ScaleManager.js.html#sunlight-1-line-81">line 81</a>
|
|
</dt>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</dl>
|
|
|
|
|
|
|
|
</dd>
|
|
|
|
|
|
|
|
<dt>
|
|
<h4 class="name "
|
|
id="incorrectOrientation"><span class="type-signature"><internal, readonly> </span>incorrectOrientation<span class="type-signature"> :boolean</span></h4>
|
|
|
|
|
|
</dt>
|
|
<dd>
|
|
|
|
|
|
|
|
<div class="description">
|
|
<p>True if the <code>forceLandscape</code> or <code>forcePortrait</code> are set and do not agree with the browser orientation.</p>
|
|
<p>This value is not updated immediately.</p>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<dl class="details">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<dt class="important tag-deprecated">Internal:</dt>
|
|
<dd class="tag-deprecated"><ul>
|
|
|
|
<li>This member is <em>internal (protected)</em> and may be modified or removed in the future.</li>
|
|
|
|
</ul></dd>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<dt class="tag-source">Source -
|
|
<a href="ScaleManager.js.html">core/ScaleManager.js</a>, <a href="ScaleManager.js.html#sunlight-1-line-159">line 159</a>
|
|
</dt>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</dl>
|
|
|
|
|
|
|
|
</dd>
|
|
|
|
|
|
|
|
<dt>
|
|
<h4 class="name "
|
|
id="isFullScreen"><span class="type-signature"><readonly> </span>isFullScreen<span class="type-signature"> :boolean</span></h4>
|
|
|
|
|
|
</dt>
|
|
<dd>
|
|
|
|
|
|
|
|
<div class="description">
|
|
<p>Returns true if the browser is in fullscreen mode, otherwise false.</p>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<dl class="details">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<dt class="tag-source">Source -
|
|
<a href="ScaleManager.js.html">core/ScaleManager.js</a>, <a href="ScaleManager.js.html#sunlight-1-line-2359">line 2359</a>
|
|
</dt>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</dl>
|
|
|
|
|
|
|
|
</dd>
|
|
|
|
|
|
|
|
<dt>
|
|
<h4 class="name "
|
|
id="isLandscape"><span class="type-signature"><readonly> </span>isLandscape<span class="type-signature"> :boolean</span></h4>
|
|
|
|
|
|
</dt>
|
|
<dd>
|
|
|
|
|
|
|
|
<div class="description">
|
|
<p>Returns true if the browser is in landscape mode.</p>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<dl class="details">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<dt class="tag-source">Source -
|
|
<a href="ScaleManager.js.html">core/ScaleManager.js</a>, <a href="ScaleManager.js.html#sunlight-1-line-2391">line 2391</a>
|
|
</dt>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</dl>
|
|
|
|
|
|
|
|
</dd>
|
|
|
|
|
|
|
|
<dt>
|
|
<h4 class="name "
|
|
id="isPortrait"><span class="type-signature"><readonly> </span>isPortrait<span class="type-signature"> :boolean</span></h4>
|
|
|
|
|
|
</dt>
|
|
<dd>
|
|
|
|
|
|
|
|
<div class="description">
|
|
<p>Returns true if the browser is in portrait mode.</p>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<dl class="details">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<dt class="tag-source">Source -
|
|
<a href="ScaleManager.js.html">core/ScaleManager.js</a>, <a href="ScaleManager.js.html#sunlight-1-line-2376">line 2376</a>
|
|
</dt>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</dl>
|
|
|
|
|
|
|
|
</dd>
|
|
|
|
|
|
|
|
<dt>
|
|
<h4 class="name toc-deprecated"
|
|
id="leaveFullScreen"><span class="type-signature"></span>leaveFullScreen<span class="type-signature"> :<a href="Phaser.Signal.html">Phaser.Signal</a></span></h4>
|
|
|
|
|
|
</dt>
|
|
<dd>
|
|
|
|
<dt class="important deprecated-notice">
|
|
This method is <em>deprecated</em> and should not be used. It may be removed in the future.
|
|
</dt>
|
|
|
|
|
|
|
|
<div class="description">
|
|
<p>This signal is dispatched when the browser leaves fullscreen mode.</p>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<dl class="details">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<dt class="important tag-deprecated">Deprecated:</dt>
|
|
<dd class="tag-deprecated"><ul>
|
|
|
|
|
|
<li>2.2.0 - Use <a href="Phaser.ScaleManager.html#onFullScreenChange">onFullScreenChange</a></li>
|
|
</ul></dd>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<dt class="tag-source">Source -
|
|
<a href="ScaleManager.js.html">core/ScaleManager.js</a>, <a href="ScaleManager.js.html#sunlight-1-line-336">line 336</a>
|
|
</dt>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</dl>
|
|
|
|
|
|
|
|
</dd>
|
|
|
|
|
|
|
|
<dt>
|
|
<h4 class="name "
|
|
id="leaveIncorrectOrientation"><span class="type-signature"></span>leaveIncorrectOrientation<span class="type-signature"> :<a href="Phaser.Signal.html">Phaser.Signal</a></span></h4>
|
|
|
|
|
|
</dt>
|
|
<dd>
|
|
|
|
|
|
|
|
<div class="description">
|
|
<p>This signal is dispatched when the browser leaves an incorrect orientation, as defined by <code>forceOrientation</code>.</p>
|
|
<p>This is signaled from <code>preUpdate</code> (or <code>pauseUpdate</code>) <em>even when</em> the game is paused.</p>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<dl class="details">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<dt class="tag-source">Source -
|
|
<a href="ScaleManager.js.html">core/ScaleManager.js</a>, <a href="ScaleManager.js.html#sunlight-1-line-250">line 250</a>
|
|
</dt>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</dl>
|
|
|
|
|
|
|
|
</dd>
|
|
|
|
|
|
|
|
<dt>
|
|
<h4 class="name "
|
|
id="margin"><span class="type-signature"><internal, readonly> </span>margin<span class="type-signature"> :Bounds-like</span></h4>
|
|
|
|
|
|
</dt>
|
|
<dd>
|
|
|
|
|
|
|
|
<div class="description">
|
|
<p>The Display canvas is aligned by adjusting the margins; the last margins are stored here.</p>
|
|
</div>
|
|
|
|
|
|
|
|
<h5>Type:</h5>
|
|
<ul>
|
|
<li>
|
|
|
|
<span class="param-type">Bounds-like</span>
|
|
|
|
|
|
</li>
|
|
</ul>
|
|
|
|
|
|
|
|
<dl class="details">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<dt class="important tag-deprecated">Internal:</dt>
|
|
<dd class="tag-deprecated"><ul>
|
|
|
|
<li>This member is <em>internal (protected)</em> and may be modified or removed in the future.</li>
|
|
|
|
</ul></dd>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<dt class="tag-source">Source -
|
|
<a href="ScaleManager.js.html">core/ScaleManager.js</a>, <a href="ScaleManager.js.html#sunlight-1-line-380">line 380</a>
|
|
</dt>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</dl>
|
|
|
|
|
|
|
|
</dd>
|
|
|
|
|
|
|
|
<dt>
|
|
<h4 class="name "
|
|
id="maxHeight"><span class="type-signature"><internal, readonly> </span>maxHeight<span class="type-signature"> :number</span></h4>
|
|
|
|
|
|
</dt>
|
|
<dd>
|
|
|
|
|
|
|
|
<div class="description">
|
|
<p>Maximum height the canvas should be scaled to (in pixels).
|
|
If null it will scale to whatever height the browser can handle.
|
|
Change with <code>setMinMax</code>.</p>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<dl class="details">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<dt class="important tag-deprecated">Internal:</dt>
|
|
<dd class="tag-deprecated"><ul>
|
|
|
|
<li>This member is <em>internal (protected)</em> and may be modified or removed in the future.</li>
|
|
|
|
</ul></dd>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<dt class="tag-source">Source -
|
|
<a href="ScaleManager.js.html">core/ScaleManager.js</a>, <a href="ScaleManager.js.html#sunlight-1-line-119">line 119</a>
|
|
</dt>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</dl>
|
|
|
|
|
|
|
|
</dd>
|
|
|
|
|
|
|
|
<dt>
|
|
<h4 class="name toc-deprecated"
|
|
id="maxIterations"><span class="type-signature"><internal> </span>maxIterations<span class="type-signature"> :number</span></h4>
|
|
|
|
|
|
</dt>
|
|
<dd>
|
|
|
|
<dt class="important deprecated-notice">
|
|
This method is <em>deprecated</em> and should not be used. It may be removed in the future.
|
|
</dt>
|
|
|
|
|
|
|
|
<div class="description">
|
|
<p>The maximum number of times a canvas will be resized (in a row) in order to fill the browser.</p>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<dl class="details">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<dt class="important tag-deprecated">Deprecated / Internal:</dt>
|
|
<dd class="tag-deprecated"><ul>
|
|
|
|
<li>This member is <em>internal (protected)</em> and may be modified or removed in the future.</li>
|
|
|
|
<li><em>Deprecated:</em> 2.2.0 - This is not used anymore as reflow iterations are "automatic".</li>
|
|
</ul></dd>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<dt class="tag-source">Source -
|
|
<a href="ScaleManager.js.html">core/ScaleManager.js</a>, <a href="ScaleManager.js.html#sunlight-1-line-182">line 182</a>
|
|
</dt>
|
|
|
|
|
|
|
|
|
|
|
|
<dt class="tag-see">See:</dt>
|
|
<dd class="tag-see">
|
|
<ul>
|
|
<li>refresh</li>
|
|
</ul>
|
|
</dd>
|
|
|
|
|
|
|
|
</dl>
|
|
|
|
|
|
|
|
</dd>
|
|
|
|
|
|
|
|
<dt>
|
|
<h4 class="name "
|
|
id="maxWidth"><span class="type-signature"><internal, readonly> </span>maxWidth<span class="type-signature"> :number</span></h4>
|
|
|
|
|
|
</dt>
|
|
<dd>
|
|
|
|
|
|
|
|
<div class="description">
|
|
<p>Maximum width the canvas should be scaled to (in pixels).
|
|
If null it will scale to whatever width the browser can handle.
|
|
Change with <code>setMinMax</code>.</p>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<dl class="details">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<dt class="important tag-deprecated">Internal:</dt>
|
|
<dd class="tag-deprecated"><ul>
|
|
|
|
<li>This member is <em>internal (protected)</em> and may be modified or removed in the future.</li>
|
|
|
|
</ul></dd>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<dt class="tag-source">Source -
|
|
<a href="ScaleManager.js.html">core/ScaleManager.js</a>, <a href="ScaleManager.js.html#sunlight-1-line-100">line 100</a>
|
|
</dt>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</dl>
|
|
|
|
|
|
|
|
</dd>
|
|
|
|
|
|
|
|
<dt>
|
|
<h4 class="name "
|
|
id="minHeight"><span class="type-signature"><internal, readonly> </span>minHeight<span class="type-signature"> :number</span></h4>
|
|
|
|
|
|
</dt>
|
|
<dd>
|
|
|
|
|
|
|
|
<div class="description">
|
|
<p>Minimum height the canvas should be scaled to (in pixels).
|
|
Change with <code>setMinMax</code>.</p>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<dl class="details">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<dt class="important tag-deprecated">Internal:</dt>
|
|
<dd class="tag-deprecated"><ul>
|
|
|
|
<li>This member is <em>internal (protected)</em> and may be modified or removed in the future.</li>
|
|
|
|
</ul></dd>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<dt class="tag-source">Source -
|
|
<a href="ScaleManager.js.html">core/ScaleManager.js</a>, <a href="ScaleManager.js.html#sunlight-1-line-109">line 109</a>
|
|
</dt>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</dl>
|
|
|
|
|
|
|
|
</dd>
|
|
|
|
|
|
|
|
<dt>
|
|
<h4 class="name "
|
|
id="minWidth"><span class="type-signature"><internal, readonly> </span>minWidth<span class="type-signature"> :number</span></h4>
|
|
|
|
|
|
</dt>
|
|
<dd>
|
|
|
|
|
|
|
|
<div class="description">
|
|
<p>Minimum width the canvas should be scaled to (in pixels).
|
|
Change with <code>setMinMax</code>.</p>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<dl class="details">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<dt class="important tag-deprecated">Internal:</dt>
|
|
<dd class="tag-deprecated"><ul>
|
|
|
|
<li>This member is <em>internal (protected)</em> and may be modified or removed in the future.</li>
|
|
|
|
</ul></dd>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<dt class="tag-source">Source -
|
|
<a href="ScaleManager.js.html">core/ScaleManager.js</a>, <a href="ScaleManager.js.html#sunlight-1-line-90">line 90</a>
|
|
</dt>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</dl>
|
|
|
|
|
|
|
|
</dd>
|
|
|
|
|
|
|
|
<dt>
|
|
<h4 class="name "
|
|
id="offset"><span class="type-signature"><internal, readonly> </span>offset<span class="type-signature"> :<a href="Phaser.Point.html">Phaser.Point</a></span></h4>
|
|
|
|
|
|
</dt>
|
|
<dd>
|
|
|
|
|
|
|
|
<div class="description">
|
|
<p>The offset coordinates of the Display canvas from the top-left of the browser window.
|
|
The is used internally by Phaser.Pointer (for Input) and possibly other types.</p>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<dl class="details">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<dt class="important tag-deprecated">Internal:</dt>
|
|
<dd class="tag-deprecated"><ul>
|
|
|
|
<li>This member is <em>internal (protected)</em> and may be modified or removed in the future.</li>
|
|
|
|
</ul></dd>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<dt class="tag-source">Source -
|
|
<a href="ScaleManager.js.html">core/ScaleManager.js</a>, <a href="ScaleManager.js.html#sunlight-1-line-128">line 128</a>
|
|
</dt>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</dl>
|
|
|
|
|
|
|
|
</dd>
|
|
|
|
|
|
|
|
<dt>
|
|
<h4 class="name "
|
|
id="onFullScreenChange"><span class="type-signature"></span>onFullScreenChange<span class="type-signature"> :<a href="Phaser.Signal.html">Phaser.Signal</a></span></h4>
|
|
|
|
|
|
</dt>
|
|
<dd>
|
|
|
|
|
|
|
|
<div class="description">
|
|
<p>This signal is dispatched when the browser enters or leaves fullscreen mode, if supported.</p>
|
|
<p>The signal is supplied with a single argument: <code>scale</code> (the ScaleManager). Use <code>scale.isFullScreen</code> to determine
|
|
if currently running in Fullscreen mode.</p>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<dl class="details">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<dt class="tag-source">Source -
|
|
<a href="ScaleManager.js.html">core/ScaleManager.js</a>, <a href="ScaleManager.js.html#sunlight-1-line-307">line 307</a>
|
|
</dt>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</dl>
|
|
|
|
|
|
|
|
</dd>
|
|
|
|
|
|
|
|
<dt>
|
|
<h4 class="name "
|
|
id="onFullScreenError"><span class="type-signature"></span>onFullScreenError<span class="type-signature"> :<a href="Phaser.Signal.html">Phaser.Signal</a></span></h4>
|
|
|
|
|
|
</dt>
|
|
<dd>
|
|
|
|
|
|
|
|
<div class="description">
|
|
<p>This signal is dispatched when the browser fails to enter fullscreen mode;
|
|
or if the device does not support fullscreen mode and <code>startFullScreen</code> is invoked.</p>
|
|
<p>The signal is supplied with a single argument: <code>scale</code> (the ScaleManager).</p>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<dl class="details">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<dt class="tag-source">Source -
|
|
<a href="ScaleManager.js.html">core/ScaleManager.js</a>, <a href="ScaleManager.js.html#sunlight-1-line-318">line 318</a>
|
|
</dt>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</dl>
|
|
|
|
|
|
|
|
</dd>
|
|
|
|
|
|
|
|
<dt>
|
|
<h4 class="name "
|
|
id="onFullScreenInit"><span class="type-signature"></span>onFullScreenInit<span class="type-signature"> :<a href="Phaser.Signal.html">Phaser.Signal</a></span></h4>
|
|
|
|
|
|
</dt>
|
|
<dd>
|
|
|
|
|
|
|
|
<div class="description">
|
|
<p>This signal is dispatched when fullscreen mode is ready to be initialized but
|
|
before the fullscreen request.</p>
|
|
<p>The signal is passed two arguments: <code>scale</code> (the ScaleManager), and an object in the form <code>{targetElement: DOMElement}</code>.</p>
|
|
<p>The <code>targetElement</code> is the <a href="Phaser.ScaleManager.html#fullScreenTarget">fullScreenTarget</a> element,
|
|
if such is assigned, or a new element created by <a href="Phaser.ScaleManager.html#createFullScreenTarget">createFullScreenTarget</a>.</p>
|
|
<p>Custom CSS styling or resets can be applied to <code>targetElement</code> as required.</p>
|
|
<p>If <code>targetElement</code> is <em>not</em> the same element as Phaser.ScaleManager.fullScreenTarget:
|
|
- After initialization the Display canvas is moved onto the <code>targetElement</code> for
|
|
the duration of the fullscreen mode, and restored to it's original DOM location when fullscreen is exited.
|
|
- The <code>targetElement</code> is moved/reparanted within the DOM and may have its CSS styles updated.</p>
|
|
<p>The behavior of a pre-assigned target element is covered in <a href="Phaser.ScaleManager.html#fullScreenTarget">fullScreenTarget</a>.</p>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<dl class="details">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<dt class="tag-source">Source -
|
|
<a href="ScaleManager.js.html">core/ScaleManager.js</a>, <a href="ScaleManager.js.html#sunlight-1-line-296">line 296</a>
|
|
</dt>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</dl>
|
|
|
|
|
|
|
|
</dd>
|
|
|
|
|
|
|
|
<dt>
|
|
<h4 class="name "
|
|
id="onOrientationChange"><span class="type-signature"></span>onOrientationChange<span class="type-signature"> :<a href="Phaser.Signal.html">Phaser.Signal</a></span></h4>
|
|
|
|
|
|
</dt>
|
|
<dd>
|
|
|
|
|
|
|
|
<div class="description">
|
|
<p>This signal is dispatched when the orientation changes <em>or</em> the validity of the current orientation changes.</p>
|
|
<p>The signal is supplied with the following arguments:
|
|
- <code>scale</code> - the ScaleManager object
|
|
- <code>prevOrientation</code>, a string - The previous orientation as per <a href="Phaser.ScaleManager.html#screenOrientation">screenOrientation</a>.
|
|
- <code>wasIncorrect</code>, a boolean - True if the previous orientation was last determined to be incorrect.</p>
|
|
<p>Access the current orientation and validity with <code>scale.screenOrientation</code> and <code>scale.incorrectOrientation</code>.
|
|
Thus the following tests can be done:</p>
|
|
<pre><code>// The orientation itself changed:
|
|
scale.screenOrientation !== prevOrientation
|
|
// The orientation just became incorrect:
|
|
scale.incorrectOrientation && !wasIncorrect</code></pre>
|
|
<p>It is possible that this signal is triggered after <code>forceOrientation</code> so the orientation
|
|
correctness changes even if the orientation itself does not change.</p>
|
|
<p>This is signaled from <code>preUpdate</code> (or <code>pauseUpdate</code>) <em>even when</em> the game is paused.</p>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<dl class="details">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<dt class="tag-source">Source -
|
|
<a href="ScaleManager.js.html">core/ScaleManager.js</a>, <a href="ScaleManager.js.html#sunlight-1-line-208">line 208</a>
|
|
</dt>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</dl>
|
|
|
|
|
|
|
|
</dd>
|
|
|
|
|
|
|
|
<dt>
|
|
<h4 class="name "
|
|
id="onSizeChange"><span class="type-signature"></span>onSizeChange<span class="type-signature"> :<a href="Phaser.Signal.html">Phaser.Signal</a></span></h4>
|
|
|
|
|
|
</dt>
|
|
<dd>
|
|
|
|
|
|
|
|
<div class="description">
|
|
<p>This signal is dispatched when the size of the Display canvas changes <em>or</em> the size of the Game changes.
|
|
When invoked this is done <em>after</em> the Canvas size/position have been updated.</p>
|
|
<p>This signal is <em>only</em> called when a change occurs and a reflow may be required.
|
|
For example, if the canvas does not change sizes because of CSS settings (such as min-width)
|
|
then this signal will <em>not</em> be triggered.</p>
|
|
<p>Use this to handle responsive game layout options.</p>
|
|
<p>This is signaled from <code>preUpdate</code> (or <code>pauseUpdate</code>) <em>even when</em> the game is paused.</p>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<dl class="details">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<dt class="tag-source">Source -
|
|
<a href="ScaleManager.js.html">core/ScaleManager.js</a>, <a href="ScaleManager.js.html#sunlight-1-line-518">line 518</a>
|
|
</dt>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<dt class="tag-todo">To Do:</dt>
|
|
<dd class="tag-todo">
|
|
<ul>
|
|
<li>Formalize the arguments, if any, supplied to this signal.</li>
|
|
</ul>
|
|
</dd>
|
|
|
|
</dl>
|
|
|
|
|
|
|
|
</dd>
|
|
|
|
|
|
|
|
<dt>
|
|
<h4 class="name toc-deprecated"
|
|
id="orientation"><span class="type-signature"><readonly> </span>orientation<span class="type-signature"> :integer</span></h4>
|
|
|
|
|
|
</dt>
|
|
<dd>
|
|
|
|
<dt class="important deprecated-notice">
|
|
This method is <em>deprecated</em> and should not be used. It may be removed in the future.
|
|
</dt>
|
|
|
|
|
|
|
|
<div class="description">
|
|
<p>The <em>last known</em> orientation value of the game. A value of 90 is landscape and 0 is portrait.</p>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<dl class="details">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<dt class="important tag-deprecated">Deprecated:</dt>
|
|
<dd class="tag-deprecated"><ul>
|
|
|
|
|
|
<li>2.2.0 - Use `ScaleManager.screenOrientation` instead.</li>
|
|
</ul></dd>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<dt class="tag-source">Source -
|
|
<a href="ScaleManager.js.html">core/ScaleManager.js</a>, <a href="ScaleManager.js.html#sunlight-1-line-2406">line 2406</a>
|
|
</dt>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</dl>
|
|
|
|
|
|
|
|
</dd>
|
|
|
|
|
|
|
|
<dt>
|
|
<h4 class="name "
|
|
id="pageAlignHorizontally"><span class="type-signature"></span>pageAlignHorizontally<span class="type-signature"> :boolean</span></h4>
|
|
|
|
|
|
</dt>
|
|
<dd>
|
|
|
|
|
|
|
|
<div class="description">
|
|
<p>If true then the Display canvas will be horizontally-aligned <em>in the parent container</em>.</p>
|
|
<p>To align across the page the Display canvas should be added directly to page;
|
|
or the parent container should itself be aligned.</p>
|
|
<p>This is not applicable for the <code>RESIZE</code> scaling mode.</p>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<dl class="details">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<dt class="tag-default">Default Value:</dt>
|
|
<dd class="tag-default"><ul class="dummy"><li>false</li></ul></dd>
|
|
|
|
|
|
|
|
<dt class="tag-source">Source -
|
|
<a href="ScaleManager.js.html">core/ScaleManager.js</a>, <a href="ScaleManager.js.html#sunlight-1-line-2295">line 2295</a>
|
|
</dt>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</dl>
|
|
|
|
|
|
|
|
</dd>
|
|
|
|
|
|
|
|
<dt>
|
|
<h4 class="name "
|
|
id="pageAlignVertically"><span class="type-signature"></span>pageAlignVertically<span class="type-signature"> :boolean</span></h4>
|
|
|
|
|
|
</dt>
|
|
<dd>
|
|
|
|
|
|
|
|
<div class="description">
|
|
<p>If true then the Display canvas will be vertically-aligned <em>in the parent container</em>.</p>
|
|
<p>To align across the page the Display canvas should be added directly to page;
|
|
or the parent container should itself be aligned.</p>
|
|
<p>This is not applicable for the <code>RESIZE</code> scaling mode.</p>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<dl class="details">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<dt class="tag-default">Default Value:</dt>
|
|
<dd class="tag-default"><ul class="dummy"><li>false</li></ul></dd>
|
|
|
|
|
|
|
|
<dt class="tag-source">Source -
|
|
<a href="ScaleManager.js.html">core/ScaleManager.js</a>, <a href="ScaleManager.js.html#sunlight-1-line-2327">line 2327</a>
|
|
</dt>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</dl>
|
|
|
|
|
|
|
|
</dd>
|
|
|
|
|
|
|
|
<dt>
|
|
<h4 class="name "
|
|
id="parentIsWindow"><span class="type-signature"><readonly> </span>parentIsWindow<span class="type-signature"> :boolean</span></h4>
|
|
|
|
|
|
</dt>
|
|
<dd>
|
|
|
|
|
|
|
|
<div class="description">
|
|
<p>If the parent container of the game is the browser window (ie. document.body), rather than a div, this should set to <code>true</code>.</p>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<dl class="details">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<dt class="tag-source">Source -
|
|
<a href="ScaleManager.js.html">core/ScaleManager.js</a>, <a href="ScaleManager.js.html#sunlight-1-line-474">line 474</a>
|
|
</dt>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</dl>
|
|
|
|
|
|
|
|
</dd>
|
|
|
|
|
|
|
|
<dt>
|
|
<h4 class="name "
|
|
id="parentNode"><span class="type-signature"><readonly> </span>parentNode<span class="type-signature"> :DOMElement</span></h4>
|
|
|
|
|
|
</dt>
|
|
<dd>
|
|
|
|
|
|
|
|
<div class="description">
|
|
<p>The <em>original</em> DOM element for the parent of the Display canvas.
|
|
This may be different in fullscreen - see <code>createFullScreenTarget</code>.</p>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<dl class="details">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<dt class="tag-source">Source -
|
|
<a href="ScaleManager.js.html">core/ScaleManager.js</a>, <a href="ScaleManager.js.html#sunlight-1-line-483">line 483</a>
|
|
</dt>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</dl>
|
|
|
|
|
|
|
|
</dd>
|
|
|
|
|
|
|
|
<dt>
|
|
<h4 class="name "
|
|
id="parentScaleFactor"><span class="type-signature"><readonly> </span>parentScaleFactor<span class="type-signature"> :<a href="Phaser.Point.html">Phaser.Point</a></span></h4>
|
|
|
|
|
|
</dt>
|
|
<dd>
|
|
|
|
|
|
|
|
<div class="description">
|
|
<p>The scale of the game in relation to its parent container.</p>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<dl class="details">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<dt class="tag-source">Source -
|
|
<a href="ScaleManager.js.html">core/ScaleManager.js</a>, <a href="ScaleManager.js.html#sunlight-1-line-490">line 490</a>
|
|
</dt>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</dl>
|
|
|
|
|
|
|
|
</dd>
|
|
|
|
|
|
|
|
<dt>
|
|
<h4 class="name "
|
|
id="scaleFactor"><span class="type-signature"><readonly> </span>scaleFactor<span class="type-signature"> :<a href="Phaser.Point.html">Phaser.Point</a></span></h4>
|
|
|
|
|
|
</dt>
|
|
<dd>
|
|
|
|
|
|
|
|
<div class="description">
|
|
<p>The <em>current</em> scale factor based on the game dimensions vs. the scaled dimensions.</p>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<dl class="details">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<dt class="tag-source">Source -
|
|
<a href="ScaleManager.js.html">core/ScaleManager.js</a>, <a href="ScaleManager.js.html#sunlight-1-line-363">line 363</a>
|
|
</dt>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</dl>
|
|
|
|
|
|
|
|
</dd>
|
|
|
|
|
|
|
|
<dt>
|
|
<h4 class="name "
|
|
id="scaleFactorInversed"><span class="type-signature"><internal, readonly> </span>scaleFactorInversed<span class="type-signature"> :<a href="Phaser.Point.html">Phaser.Point</a></span></h4>
|
|
|
|
|
|
</dt>
|
|
<dd>
|
|
|
|
|
|
|
|
<div class="description">
|
|
<p>The <em>current</em> inversed scale factor. The displayed dimensions divided by the game dimensions.</p>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<dl class="details">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<dt class="important tag-deprecated">Internal:</dt>
|
|
<dd class="tag-deprecated"><ul>
|
|
|
|
<li>This member is <em>internal (protected)</em> and may be modified or removed in the future.</li>
|
|
|
|
</ul></dd>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<dt class="tag-source">Source -
|
|
<a href="ScaleManager.js.html">core/ScaleManager.js</a>, <a href="ScaleManager.js.html#sunlight-1-line-371">line 371</a>
|
|
</dt>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</dl>
|
|
|
|
|
|
|
|
</dd>
|
|
|
|
|
|
|
|
<dt>
|
|
<h4 class="name "
|
|
id="scaleMode"><span class="type-signature"></span>scaleMode<span class="type-signature"> :integer</span></h4>
|
|
|
|
|
|
</dt>
|
|
<dd>
|
|
|
|
|
|
|
|
<div class="description">
|
|
<p>The scaling method used by the ScaleManager when not in fullscreen.</p>
|
|
<p><dl>
|
|
<dt><a href="Phaser.ScaleManager.html#NO_SCALE">Phaser.ScaleManager.NO_SCALE</a></dt>
|
|
<dd>
|
|
The Game display area will not be scaled - even if it is too large for the canvas/screen.
|
|
This mode <em>ignores</em> any applied scaling factor and displays the canvas at the Game size.
|
|
</dd>
|
|
<dt><a href="Phaser.ScaleManager.html#EXACT_FIT">Phaser.ScaleManager.EXACT_FIT</a></dt>
|
|
<dd>
|
|
The Game display area will be <em>stretched</em> to fill the entire size of the canvas's parent element and/or screen.
|
|
Proportions are not mainted.
|
|
</dd>
|
|
<dt><a href="Phaser.ScaleManager.html#SHOW_ALL">Phaser.ScaleManager.SHOW_ALL</a></dt>
|
|
<dd>
|
|
Show the entire game display area while <em>maintaining</em> the original aspect ratio.
|
|
</dd>
|
|
<dt><a href="Phaser.ScaleManager.html#RESIZE">Phaser.ScaleManager.RESIZE</a></dt>
|
|
<dd>
|
|
The dimensions of the game display area are changed to match the size of the parent container.
|
|
That is, this mode <em>changes the Game size</em> to match the display size.
|
|
<p>
|
|
Any manually set Game size (see <code>setGameSize</code>) is ignored while in effect.
|
|
</dd>
|
|
<dt><a href="Phaser.ScaleManager.html#USER_SCALE">Phaser.ScaleManager.USER_SCALE</a></dt>
|
|
<dd>
|
|
The game Display is scaled according to the user-specified scale set by <a href="Phaser.ScaleManager.html#setUserScale">setUserScale</a>.
|
|
<p>
|
|
This scale can be adjusted in the <a href="Phaser.ScaleManager.html#setResizeCallback">resize callback</a>
|
|
for flexible custom-sizing needs.
|
|
</dd>
|
|
</dl></p>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<dl class="details">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<dt class="tag-source">Source -
|
|
<a href="ScaleManager.js.html">core/ScaleManager.js</a>, <a href="ScaleManager.js.html#sunlight-1-line-2170">line 2170</a>
|
|
</dt>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</dl>
|
|
|
|
|
|
|
|
</dd>
|
|
|
|
|
|
|
|
<dt>
|
|
<h4 class="name "
|
|
id="screenOrientation"><span class="type-signature"><readonly> </span>screenOrientation<span class="type-signature"> :string</span></h4>
|
|
|
|
|
|
</dt>
|
|
<dd>
|
|
|
|
|
|
|
|
<div class="description">
|
|
<p>The <em>last known</em> orientation of the screen, as defined in the Window Screen Web API.
|
|
See <a href="Phaser.DOM.html#getScreenOrientation">Phaser.DOM.getScreenOrientation</a> for possible values.</p>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<dl class="details">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<dt class="tag-source">Source -
|
|
<a href="ScaleManager.js.html">core/ScaleManager.js</a>, <a href="ScaleManager.js.html#sunlight-1-line-356">line 356</a>
|
|
</dt>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</dl>
|
|
|
|
|
|
|
|
</dd>
|
|
|
|
|
|
|
|
<dt>
|
|
<h4 class="name "
|
|
id="sourceAspectRatio"><span class="type-signature"><readonly> </span>sourceAspectRatio<span class="type-signature"> :number</span></h4>
|
|
|
|
|
|
</dt>
|
|
<dd>
|
|
|
|
|
|
|
|
<div class="description">
|
|
<p>The aspect ratio of the original game dimensions.</p>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<dl class="details">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<dt class="tag-source">Source -
|
|
<a href="ScaleManager.js.html">core/ScaleManager.js</a>, <a href="ScaleManager.js.html#sunlight-1-line-401">line 401</a>
|
|
</dt>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</dl>
|
|
|
|
|
|
|
|
</dd>
|
|
|
|
|
|
|
|
<dt>
|
|
<h4 class="name "
|
|
id="trackParentInterval"><span class="type-signature"><internal> </span>trackParentInterval<span class="type-signature"> :integer</span></h4>
|
|
|
|
|
|
</dt>
|
|
<dd>
|
|
|
|
|
|
|
|
<div class="description">
|
|
<p>The maximum time (in ms) between dimension update checks for the Canvas's parent element (or window).
|
|
Update checks normally happen quicker in response to other events.</p>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<dl class="details">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<dt class="important tag-deprecated">Internal:</dt>
|
|
<dd class="tag-deprecated"><ul>
|
|
|
|
<li>This member is <em>internal (protected)</em> and may be modified or removed in the future.</li>
|
|
|
|
</ul></dd>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<dt class="tag-default">Default Value:</dt>
|
|
<dd class="tag-default"><ul class="dummy"><li>2000</li></ul></dd>
|
|
|
|
|
|
|
|
<dt class="tag-source">Source -
|
|
<a href="ScaleManager.js.html">core/ScaleManager.js</a>, <a href="ScaleManager.js.html#sunlight-1-line-501">line 501</a>
|
|
</dt>
|
|
|
|
|
|
|
|
|
|
|
|
<dt class="tag-see">See:</dt>
|
|
<dd class="tag-see">
|
|
<ul>
|
|
<li><a href="Phaser.ScaleManager.html#refresh">refresh</a></li>
|
|
</ul>
|
|
</dd>
|
|
|
|
|
|
|
|
</dl>
|
|
|
|
|
|
|
|
</dd>
|
|
|
|
|
|
|
|
<dt>
|
|
<h4 class="name "
|
|
id="width"><span class="type-signature"><readonly> </span>width<span class="type-signature"> :number</span></h4>
|
|
|
|
|
|
</dt>
|
|
<dd>
|
|
|
|
|
|
|
|
<div class="description">
|
|
<p>Target width (in pixels) of the Display canvas.</p>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<dl class="details">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<dt class="tag-source">Source -
|
|
<a href="ScaleManager.js.html">core/ScaleManager.js</a>, <a href="ScaleManager.js.html#sunlight-1-line-74">line 74</a>
|
|
</dt>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</dl>
|
|
|
|
|
|
|
|
</dd>
|
|
|
|
|
|
|
|
<dt>
|
|
<h4 class="name "
|
|
id="windowConstraints"><span class="type-signature"></span>windowConstraints<span class="type-signature"></span></h4>
|
|
|
|
|
|
</dt>
|
|
<dd>
|
|
|
|
|
|
|
|
<div class="description">
|
|
<p>The edges on which to constrain the game Display/canvas in <em>addition</em> to the restrictions of the parent container.</p>
|
|
<p>The properties are strings and can be '', 'visual', 'layout', or 'layout-soft'.
|
|
- If 'visual', the edge will be constrained to the Window / displayed screen area
|
|
- If 'layout', the edge will be constrained to the CSS Layout bounds
|
|
- An invalid value is treated as 'visual'</p>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<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>bottom</code></td>
|
|
|
|
|
|
<td class="type">
|
|
|
|
|
|
<span class="param-type">string</span>
|
|
|
|
|
|
|
|
</td>
|
|
|
|
|
|
|
|
|
|
|
|
<td class="description last"></td>
|
|
</tr>
|
|
|
|
|
|
|
|
<tr>
|
|
|
|
<td class="name"><code>right</code></td>
|
|
|
|
|
|
<td class="type">
|
|
|
|
|
|
<span class="param-type">string</span>
|
|
|
|
|
|
|
|
</td>
|
|
|
|
|
|
|
|
|
|
|
|
<td class="description last"></td>
|
|
</tr>
|
|
|
|
|
|
</tbody>
|
|
</table>
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<dt class="tag-default">Default Value:</dt>
|
|
<dd class="tag-default"><ul class="dummy"><li>{right: 'layout', bottom: ''}</li></ul></dd>
|
|
|
|
|
|
|
|
<dt class="tag-source">Source -
|
|
<a href="ScaleManager.js.html">core/ScaleManager.js</a>, <a href="ScaleManager.js.html#sunlight-1-line-424">line 424</a>
|
|
</dt>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</dl>
|
|
|
|
|
|
|
|
</dd>
|
|
|
|
</dl>
|
|
|
|
|
|
|
|
<h3 class="subsection-title">Methods</h3>
|
|
|
|
<dl>
|
|
|
|
<dt>
|
|
<h4 class="name toc-deprecated"
|
|
id="checkOrientation"><span class="type-signature"><internal, static> </span>checkOrientation<span class="signature">()</span><span class="type-signature"></span></h4>
|
|
|
|
|
|
</dt>
|
|
<dd>
|
|
|
|
<dt class="important deprecated-notice">
|
|
This method is <em>deprecated</em> and should not be used. It may be removed in the future.
|
|
</dt>
|
|
|
|
|
|
|
|
<div class="description">
|
|
<p>window.orientationchange event handler.</p>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<dl class="details">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<dt class="important tag-deprecated">Deprecated / Internal:</dt>
|
|
<dd class="tag-deprecated"><ul>
|
|
|
|
<li>This member is <em>internal (protected)</em> and may be modified or removed in the future.</li>
|
|
|
|
<li><em>Deprecated:</em> 2.2.0 - This method is INTERNAL: avoid using it directly.</li>
|
|
</ul></dd>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<dt class="tag-source">Source -
|
|
<a href="ScaleManager.js.html">core/ScaleManager.js</a>, <a href="ScaleManager.js.html#sunlight-1-line-2087">line 2087</a>
|
|
</dt>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</dd>
|
|
|
|
|
|
|
|
<dt>
|
|
<h4 class="name toc-deprecated"
|
|
id="checkOrientationState"><span class="type-signature"><internal, static> </span>checkOrientationState<span class="signature">()</span><span class="type-signature"> → {boolean}</span></h4>
|
|
|
|
|
|
</dt>
|
|
<dd>
|
|
|
|
<dt class="important deprecated-notice">
|
|
This method is <em>deprecated</em> and should not be used. It may be removed in the future.
|
|
</dt>
|
|
|
|
|
|
|
|
<div class="description">
|
|
<p>Checks if the browser is in the correct orientation for the game, dependent upon <code>forceLandscape</code> and <code>forcePortrait</code>, and updates the state.</p>
|
|
<p>The appropriate event is dispatched if the orientation became valid or invalid.</p>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<h5>Returns:</h5>
|
|
<div class="returns">
|
|
|
|
|
|
|
|
<div class="returns-type">
|
|
|
|
<span class="param-type">boolean</span>
|
|
|
|
-
|
|
</div>
|
|
|
|
<div class="returns-desc param-desc">
|
|
<p>True if the orientation state changed (consider a refresh)</p>
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<dl class="details">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<dt class="important tag-deprecated">Deprecated / Internal:</dt>
|
|
<dd class="tag-deprecated"><ul>
|
|
|
|
<li>This member is <em>internal (protected)</em> and may be modified or removed in the future.</li>
|
|
|
|
<li><em>Deprecated:</em> 2.2.0 - This is only for backward compatibility of user code.</li>
|
|
</ul></dd>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<dt class="tag-source">Source -
|
|
<a href="ScaleManager.js.html">core/ScaleManager.js</a>, <a href="ScaleManager.js.html#sunlight-1-line-2123">line 2123</a>
|
|
</dt>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</dd>
|
|
|
|
|
|
|
|
<dt>
|
|
<h4 class="name toc-deprecated"
|
|
id="checkResize"><span class="type-signature"><internal, static> </span>checkResize<span class="signature">()</span><span class="type-signature"></span></h4>
|
|
|
|
|
|
</dt>
|
|
<dd>
|
|
|
|
<dt class="important deprecated-notice">
|
|
This method is <em>deprecated</em> and should not be used. It may be removed in the future.
|
|
</dt>
|
|
|
|
|
|
|
|
<div class="description">
|
|
<p>window.resize event handler.</p>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<dl class="details">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<dt class="important tag-deprecated">Deprecated / Internal:</dt>
|
|
<dd class="tag-deprecated"><ul>
|
|
|
|
<li>This member is <em>internal (protected)</em> and may be modified or removed in the future.</li>
|
|
|
|
<li><em>Deprecated:</em> 2.2.0 - This method is INTERNAL: avoid using it directly.</li>
|
|
</ul></dd>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<dt class="tag-source">Source -
|
|
<a href="ScaleManager.js.html">core/ScaleManager.js</a>, <a href="ScaleManager.js.html#sunlight-1-line-2078">line 2078</a>
|
|
</dt>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</dd>
|
|
|
|
|
|
|
|
<dt>
|
|
<h4 class="name toc-deprecated"
|
|
id="setSize"><span class="type-signature"><internal, static> </span>setSize<span class="signature">()</span><span class="type-signature"></span></h4>
|
|
|
|
|
|
</dt>
|
|
<dd>
|
|
|
|
<dt class="important deprecated-notice">
|
|
This method is <em>deprecated</em> and should not be used. It may be removed in the future.
|
|
</dt>
|
|
|
|
|
|
|
|
<div class="description">
|
|
<p>Updates the size/position of the Display canvas based on internal state.</p>
|
|
<p>Do not call this directly. To "refresh" the layout use <a href="Phaser.ScaleManager.html#refresh">refresh</a>.
|
|
To precisely control the scaling/size, apply appropriate rules to the bounding Parent container or
|
|
use the <a href="Phaser.ScaleManager.html#scaleMode">USER_SCALE scale mode</a>.</p>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<dl class="details">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<dt class="important tag-deprecated">Deprecated / Internal:</dt>
|
|
<dd class="tag-deprecated"><ul>
|
|
|
|
<li>This member is <em>internal (protected)</em> and may be modified or removed in the future.</li>
|
|
|
|
<li><em>Deprecated:</em> 2.2.0 - This method is INTERNAL: avoid using it directly.</li>
|
|
</ul></dd>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<dt class="tag-source">Source -
|
|
<a href="ScaleManager.js.html">core/ScaleManager.js</a>, <a href="ScaleManager.js.html#sunlight-1-line-2109">line 2109</a>
|
|
</dt>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</dd>
|
|
|
|
|
|
|
|
<dt>
|
|
<h4 class="name "
|
|
id="boot"><span class="type-signature"><internal> </span>boot<span class="signature">()</span><span class="type-signature"></span></h4>
|
|
|
|
|
|
</dt>
|
|
<dd>
|
|
|
|
|
|
|
|
<div class="description">
|
|
<p>Start the ScaleManager.</p>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<dl class="details">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<dt class="important tag-deprecated">Internal:</dt>
|
|
<dd class="tag-deprecated"><ul>
|
|
|
|
<li>This member is <em>internal (protected)</em> and may be modified or removed in the future.</li>
|
|
|
|
</ul></dd>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<dt class="tag-source">Source -
|
|
<a href="ScaleManager.js.html">core/ScaleManager.js</a>, <a href="ScaleManager.js.html#sunlight-1-line-665">line 665</a>
|
|
</dt>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</dd>
|
|
|
|
|
|
|
|
<dt>
|
|
<h4 class="name "
|
|
id="createFullScreenTarget"><span class="type-signature"><internal> </span>createFullScreenTarget<span class="signature">()</span><span class="type-signature"></span></h4>
|
|
|
|
|
|
</dt>
|
|
<dd>
|
|
|
|
|
|
|
|
<div class="description">
|
|
<p>Creates a fullscreen target. This is called automatically as as needed when entering
|
|
fullscreen mode and the resulting element is supplied to <code>onFullScreenInit</code>.</p>
|
|
<p>Use <a href="Phaser.ScaleManager.html#onFullScreenInit">onFullScreenInit</a> to customize the created object.</p>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<dl class="details">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<dt class="important tag-deprecated">Internal:</dt>
|
|
<dd class="tag-deprecated"><ul>
|
|
|
|
<li>This member is <em>internal (protected)</em> and may be modified or removed in the future.</li>
|
|
|
|
</ul></dd>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<dt class="tag-source">Source -
|
|
<a href="ScaleManager.js.html">core/ScaleManager.js</a>, <a href="ScaleManager.js.html#sunlight-1-line-1727">line 1727</a>
|
|
</dt>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</dd>
|
|
|
|
|
|
|
|
<dt>
|
|
<h4 class="name "
|
|
id="destroy"><span class="type-signature"><internal> </span>destroy<span class="signature">()</span><span class="type-signature"></span></h4>
|
|
|
|
|
|
</dt>
|
|
<dd>
|
|
|
|
|
|
|
|
<div class="description">
|
|
<p>Destroys the ScaleManager and removes any event listeners.
|
|
This should probably only be called when the game is destroyed.</p>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<dl class="details">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<dt class="important tag-deprecated">Internal:</dt>
|
|
<dd class="tag-deprecated"><ul>
|
|
|
|
<li>This member is <em>internal (protected)</em> and may be modified or removed in the future.</li>
|
|
|
|
</ul></dd>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<dt class="tag-source">Source -
|
|
<a href="ScaleManager.js.html">core/ScaleManager.js</a>, <a href="ScaleManager.js.html#sunlight-1-line-2045">line 2045</a>
|
|
</dt>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</dd>
|
|
|
|
|
|
|
|
<dt>
|
|
<h4 class="name "
|
|
id="forceOrientation"><span class="type-signature"></span>forceOrientation<span class="signature">(forceLandscape, <span class="optional">forcePortrait</span>)</span><span class="type-signature"></span></h4>
|
|
|
|
|
|
</dt>
|
|
<dd>
|
|
|
|
|
|
|
|
<div class="description">
|
|
<p>Force the game to run in only one orientation.</p>
|
|
<p>This enables generation of incorrect orientation signals and affects resizing but does not otherwise rotate or lock the 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">
|
|
|
|
<optional><br>
|
|
|
|
|
|
|
|
|
|
|
|
</td>
|
|
|
|
|
|
|
|
<td class="default">
|
|
|
|
false
|
|
|
|
</td>
|
|
|
|
|
|
<td class="description last"><p>true if the game should run in portrait mode only.</p></td>
|
|
</tr>
|
|
|
|
|
|
</tbody>
|
|
</table>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<dl class="details">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<dt class="tag-source">Source -
|
|
<a href="ScaleManager.js.html">core/ScaleManager.js</a>, <a href="ScaleManager.js.html#sunlight-1-line-1156">line 1156</a>
|
|
</dt>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</dd>
|
|
|
|
|
|
|
|
<dt>
|
|
<h4 class="name "
|
|
id="getParentBounds"><span class="type-signature"><internal> </span>getParentBounds<span class="signature">(<span class="optional">target</span>)</span><span class="type-signature"> → {<a href="Phaser.Rectangle.html">Phaser.Rectangle</a>}</span></h4>
|
|
|
|
|
|
</dt>
|
|
<dd>
|
|
|
|
|
|
|
|
<div class="description">
|
|
<p>Returns the computed Parent size/bounds that the Display canvas is allowed/expected to fill.</p>
|
|
<p>If in fullscreen mode or without parent (see <a href="Phaser.ScaleManager.html#parentIsWindow">parentIsWindow</a>),
|
|
this will be the bounds of the visual viewport itself.</p>
|
|
<p>This function takes the <code>windowConstraints</code> into consideration - if the parent is partially outside
|
|
the viewport then this function may return a smaller than expected size.</p>
|
|
<p>Values are rounded to the nearest pixel.</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>target</code></td>
|
|
|
|
|
|
<td class="type">
|
|
|
|
|
|
<span class="param-type"><a href="Phaser.Rectangle.html">Phaser.Rectangle</a></span>
|
|
|
|
|
|
|
|
</td>
|
|
|
|
|
|
<td class="attributes">
|
|
|
|
<optional><br>
|
|
|
|
|
|
|
|
|
|
|
|
</td>
|
|
|
|
|
|
|
|
<td class="default">
|
|
|
|
(new Rectangle)
|
|
|
|
</td>
|
|
|
|
|
|
<td class="description last"><p>The rectangle to update; a new one is created as needed.</p></td>
|
|
</tr>
|
|
|
|
|
|
</tbody>
|
|
</table>
|
|
|
|
|
|
|
|
|
|
<h5>Returns:</h5>
|
|
<div class="returns">
|
|
|
|
|
|
|
|
<div class="returns-type">
|
|
|
|
<span class="param-type"><a href="Phaser.Rectangle.html">Phaser.Rectangle</a></span>
|
|
|
|
-
|
|
</div>
|
|
|
|
<div class="returns-desc param-desc">
|
|
<p>The established parent bounds.</p>
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<dl class="details">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<dt class="important tag-deprecated">Internal:</dt>
|
|
<dd class="tag-deprecated"><ul>
|
|
|
|
<li>This member is <em>internal (protected)</em> and may be modified or removed in the future.</li>
|
|
|
|
</ul></dd>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<dt class="tag-source">Source -
|
|
<a href="ScaleManager.js.html">core/ScaleManager.js</a>, <a href="ScaleManager.js.html#sunlight-1-line-1408">line 1408</a>
|
|
</dt>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</dd>
|
|
|
|
|
|
|
|
<dt>
|
|
<h4 class="name "
|
|
id="parseConfig"><span class="type-signature"><internal> </span>parseConfig<span class="signature">(config)</span><span class="type-signature"></span></h4>
|
|
|
|
|
|
</dt>
|
|
<dd>
|
|
|
|
|
|
|
|
<div class="description">
|
|
<p>Load configuration settings.</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>config</code></td>
|
|
|
|
|
|
<td class="type">
|
|
|
|
|
|
<span class="param-type">object</span>
|
|
|
|
|
|
|
|
</td>
|
|
|
|
|
|
|
|
|
|
|
|
<td class="description last"><p>The game configuration object.</p></td>
|
|
</tr>
|
|
|
|
|
|
</tbody>
|
|
</table>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<dl class="details">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<dt class="important tag-deprecated">Internal:</dt>
|
|
<dd class="tag-deprecated"><ul>
|
|
|
|
<li>This member is <em>internal (protected)</em> and may be modified or removed in the future.</li>
|
|
|
|
</ul></dd>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<dt class="tag-source">Source -
|
|
<a href="ScaleManager.js.html">core/ScaleManager.js</a>, <a href="ScaleManager.js.html#sunlight-1-line-753">line 753</a>
|
|
</dt>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</dd>
|
|
|
|
|
|
|
|
<dt>
|
|
<h4 class="name "
|
|
id="preUpdate"><span class="type-signature"><internal> </span>preUpdate<span class="signature">()</span><span class="type-signature"></span></h4>
|
|
|
|
|
|
</dt>
|
|
<dd>
|
|
|
|
|
|
|
|
<div class="description">
|
|
<p>The ScaleManager.preUpdate is called automatically by the core Game loop.</p>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<dl class="details">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<dt class="important tag-deprecated">Internal:</dt>
|
|
<dd class="tag-deprecated"><ul>
|
|
|
|
<li>This member is <em>internal (protected)</em> and may be modified or removed in the future.</li>
|
|
|
|
</ul></dd>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<dt class="tag-source">Source -
|
|
<a href="ScaleManager.js.html">core/ScaleManager.js</a>, <a href="ScaleManager.js.html#sunlight-1-line-1022">line 1022</a>
|
|
</dt>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</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>The <code>refresh</code> methods informs the ScaleManager that a layout refresh is required.</p>
|
|
<p>The ScaleManager automatically queues a layout refresh (eg. updates the Game size or Display canvas layout)
|
|
when the browser is resized, the orientation changes, or when there is a detected change
|
|
of the Parent size. Refreshing is also done automatically when public properties,
|
|
such as <code>scaleMode</code>, are updated or state-changing methods are invoked.</p>
|
|
<p>The <code>refresh</code> method <em>may</em> need to be used in a few (rare) situtations when</p>
|
|
<ul>
|
|
<li>a device change event is not correctly detected; or</li>
|
|
<li>the Parent size changes (and an immediate reflow is desired); or</li>
|
|
<li>the ScaleManager state is updated by non-standard means.</li>
|
|
</ul>
|
|
<p>The queued layout refresh is not immediate but will run promptly in an upcoming <code>preRender</code>.</p>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<dl class="details">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<dt class="tag-source">Source -
|
|
<a href="ScaleManager.js.html">core/ScaleManager.js</a>, <a href="ScaleManager.js.html#sunlight-1-line-1302">line 1302</a>
|
|
</dt>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</dd>
|
|
|
|
|
|
|
|
<dt>
|
|
<h4 class="name "
|
|
id="scaleSprite"><span class="type-signature"><internal> </span>scaleSprite<span class="signature">(sprite, <span class="optional">width</span>, <span class="optional">height</span>, <span class="optional">letterBox</span>)</span><span class="type-signature"> → {<a href="Phaser.Sprite.html">Phaser.Sprite</a>|<a href="Phaser.Image.html">Phaser.Image</a>}</span></h4>
|
|
|
|
|
|
</dt>
|
|
<dd>
|
|
|
|
|
|
|
|
<div class="description">
|
|
<p>Takes a Sprite or Image object and scales it to fit the given dimensions.
|
|
Scaling happens proportionally without distortion to the sprites texture.
|
|
The letterBox parameter controls if scaling will produce a letter-box effect or zoom the
|
|
sprite until it fills the given values. Note that with letterBox set to false the scaled sprite may spill out over either
|
|
the horizontal or vertical sides of the target dimensions. If you wish to stop this you can crop the Sprite.</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>sprite</code></td>
|
|
|
|
|
|
<td class="type">
|
|
|
|
|
|
<span class="param-type"><a href="Phaser.Sprite.html">Phaser.Sprite</a></span>
|
|
|
|
|
|
|
<span class="param-type"><a href="Phaser.Image.html">Phaser.Image</a></span>
|
|
|
|
|
|
|
|
</td>
|
|
|
|
|
|
<td class="attributes">
|
|
|
|
|
|
|
|
|
|
|
|
</td>
|
|
|
|
|
|
|
|
<td class="default">
|
|
|
|
</td>
|
|
|
|
|
|
<td class="description last"><p>The sprite we want to scale.</p></td>
|
|
</tr>
|
|
|
|
|
|
|
|
<tr>
|
|
|
|
<td class="name"><code>width</code></td>
|
|
|
|
|
|
<td class="type">
|
|
|
|
|
|
<span class="param-type">integer</span>
|
|
|
|
|
|
|
|
</td>
|
|
|
|
|
|
<td class="attributes">
|
|
|
|
<optional><br>
|
|
|
|
|
|
|
|
|
|
|
|
</td>
|
|
|
|
|
|
|
|
<td class="default">
|
|
|
|
</td>
|
|
|
|
|
|
<td class="description last"><p>The target width that we want to fit the sprite in to. If not given it defaults to ScaleManager.width.</p></td>
|
|
</tr>
|
|
|
|
|
|
|
|
<tr>
|
|
|
|
<td class="name"><code>height</code></td>
|
|
|
|
|
|
<td class="type">
|
|
|
|
|
|
<span class="param-type">integer</span>
|
|
|
|
|
|
|
|
</td>
|
|
|
|
|
|
<td class="attributes">
|
|
|
|
<optional><br>
|
|
|
|
|
|
|
|
|
|
|
|
</td>
|
|
|
|
|
|
|
|
<td class="default">
|
|
|
|
</td>
|
|
|
|
|
|
<td class="description last"><p>The target height that we want to fit the sprite in to. If not given it defaults to ScaleManager.height.</p></td>
|
|
</tr>
|
|
|
|
|
|
|
|
<tr>
|
|
|
|
<td class="name"><code>letterBox</code></td>
|
|
|
|
|
|
<td class="type">
|
|
|
|
|
|
<span class="param-type">boolean</span>
|
|
|
|
|
|
|
|
</td>
|
|
|
|
|
|
<td class="attributes">
|
|
|
|
<optional><br>
|
|
|
|
|
|
|
|
|
|
|
|
</td>
|
|
|
|
|
|
|
|
<td class="default">
|
|
|
|
false
|
|
|
|
</td>
|
|
|
|
|
|
<td class="description last"><p>True if we want the <code>fitted</code> mode. Otherwise, the function uses the <code>zoom</code> mode.</p></td>
|
|
</tr>
|
|
|
|
|
|
</tbody>
|
|
</table>
|
|
|
|
|
|
|
|
|
|
<h5>Returns:</h5>
|
|
<div class="returns">
|
|
|
|
|
|
|
|
<div class="returns-type">
|
|
|
|
<span class="param-type"><a href="Phaser.Sprite.html">Phaser.Sprite</a></span>
|
|
|
|
|
|
|
<span class="param-type"><a href="Phaser.Image.html">Phaser.Image</a></span>
|
|
|
|
-
|
|
</div>
|
|
|
|
<div class="returns-desc param-desc">
|
|
<p>The scaled sprite.</p>
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<dl class="details">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<dt class="important tag-deprecated">Internal:</dt>
|
|
<dd class="tag-deprecated"><ul>
|
|
|
|
<li>This member is <em>internal (protected)</em> and may be modified or removed in the future.</li>
|
|
|
|
</ul></dd>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<dt class="tag-source">Source -
|
|
<a href="ScaleManager.js.html">core/ScaleManager.js</a>, <a href="ScaleManager.js.html#sunlight-1-line-1981">line 1981</a>
|
|
</dt>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</dd>
|
|
|
|
|
|
|
|
<dt>
|
|
<h4 class="name "
|
|
id="setGameSize"><span class="type-signature"></span>setGameSize<span class="signature">(width, height)</span><span class="type-signature"></span></h4>
|
|
|
|
|
|
</dt>
|
|
<dd>
|
|
|
|
|
|
|
|
<div class="description">
|
|
<p>Set the actual Game size.
|
|
Use this instead of directly changing <code>game.width</code> or <code>game.height</code>.</p>
|
|
<p>The actual physical display (Canvas element size) depends on various settings including
|
|
- Scale mode
|
|
- Scaling factor
|
|
- Size of Canvas's parent element or CSS rules such as min-height/max-height;
|
|
- The size of the Window</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>width</code></td>
|
|
|
|
|
|
<td class="type">
|
|
|
|
|
|
<span class="param-type">integer</span>
|
|
|
|
|
|
|
|
</td>
|
|
|
|
|
|
|
|
|
|
|
|
<td class="description last"><p><em>Game width</em>, in pixels.</p></td>
|
|
</tr>
|
|
|
|
|
|
|
|
<tr>
|
|
|
|
<td class="name"><code>height</code></td>
|
|
|
|
|
|
<td class="type">
|
|
|
|
|
|
<span class="param-type">integer</span>
|
|
|
|
|
|
|
|
</td>
|
|
|
|
|
|
|
|
|
|
|
|
<td class="description last"><p><em>Game height</em>, in pixels.</p></td>
|
|
</tr>
|
|
|
|
|
|
</tbody>
|
|
</table>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<dl class="details">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<dt class="tag-source">Source -
|
|
<a href="ScaleManager.js.html">core/ScaleManager.js</a>, <a href="ScaleManager.js.html#sunlight-1-line-878">line 878</a>
|
|
</dt>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</dd>
|
|
|
|
|
|
|
|
<dt>
|
|
<h4 class="name "
|
|
id="setMinMax"><span class="type-signature"></span>setMinMax<span class="signature">(minWidth, minHeight, <span class="optional">maxWidth</span>, <span class="optional">maxHeight</span>)</span><span class="type-signature"></span></h4>
|
|
|
|
|
|
</dt>
|
|
<dd>
|
|
|
|
|
|
|
|
<div class="description">
|
|
<p>Set the min and max dimensions for the Display canvas.</p>
|
|
<p><em>Note:</em> The min/max dimensions are only applied in some cases
|
|
- When the device is not in an incorrect orientation; or
|
|
- The scale mode is EXACT_FIT when not in fullscreen</p>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<h5>Parameters:</h5>
|
|
|
|
|
|
<table class="params table table-striped">
|
|
<thead>
|
|
<tr>
|
|
|
|
<th>Name</th>
|
|
|
|
|
|
<th>Type</th>
|
|
|
|
|
|
<th>Argument</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="attributes">
|
|
|
|
|
|
|
|
|
|
|
|
</td>
|
|
|
|
|
|
|
|
|
|
<td class="description last"><p>The minimum width the game is allowed to scale down to.</p></td>
|
|
</tr>
|
|
|
|
|
|
|
|
<tr>
|
|
|
|
<td class="name"><code>minHeight</code></td>
|
|
|
|
|
|
<td class="type">
|
|
|
|
|
|
<span class="param-type">number</span>
|
|
|
|
|
|
|
|
</td>
|
|
|
|
|
|
<td class="attributes">
|
|
|
|
|
|
|
|
|
|
|
|
</td>
|
|
|
|
|
|
|
|
|
|
<td class="description last"><p>The minimum height the game is allowed to scale down to.</p></td>
|
|
</tr>
|
|
|
|
|
|
|
|
<tr>
|
|
|
|
<td class="name"><code>maxWidth</code></td>
|
|
|
|
|
|
<td class="type">
|
|
|
|
|
|
<span class="param-type">number</span>
|
|
|
|
|
|
|
|
</td>
|
|
|
|
|
|
<td class="attributes">
|
|
|
|
<optional><br>
|
|
|
|
|
|
|
|
|
|
|
|
</td>
|
|
|
|
|
|
|
|
|
|
<td class="description last"><p>The maximum width the game is allowed to scale up to; only changed if specified.</p></td>
|
|
</tr>
|
|
|
|
|
|
|
|
<tr>
|
|
|
|
<td class="name"><code>maxHeight</code></td>
|
|
|
|
|
|
<td class="type">
|
|
|
|
|
|
<span class="param-type">number</span>
|
|
|
|
|
|
|
|
</td>
|
|
|
|
|
|
<td class="attributes">
|
|
|
|
<optional><br>
|
|
|
|
|
|
|
|
|
|
|
|
</td>
|
|
|
|
|
|
|
|
|
|
<td class="description last"><p>The maximum height the game is allowed to scale up to; only changed if specified.</p></td>
|
|
</tr>
|
|
|
|
|
|
</tbody>
|
|
</table>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<dl class="details">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<dt class="tag-source">Source -
|
|
<a href="ScaleManager.js.html">core/ScaleManager.js</a>, <a href="ScaleManager.js.html#sunlight-1-line-990">line 990</a>
|
|
</dt>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<dt class="tag-todo">To Do:</dt>
|
|
<dd class="tag-todo">
|
|
<ul>
|
|
<li>These values are only sometimes honored.</li>
|
|
</ul>
|
|
</dd>
|
|
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</dd>
|
|
|
|
|
|
|
|
<dt>
|
|
<h4 class="name "
|
|
id="setResizeCallback"><span class="type-signature"></span>setResizeCallback<span class="signature">(callback, context)</span><span class="type-signature"></span></h4>
|
|
|
|
|
|
</dt>
|
|
<dd>
|
|
|
|
|
|
|
|
<div class="description">
|
|
<p>Sets the callback that will be invoked before sizing calculations.</p>
|
|
<p>This is the appropriate place to call <code>setUserScale</code> if needing custom dynamic scaling.</p>
|
|
<p>The callback is supplied with two arguments <code>scale</code> and <code>parentBounds</code> where <code>scale</code> is the ScaleManager
|
|
and <code>parentBounds</code>, a Phaser.Rectangle, is the size of the Parent element.</p>
|
|
<p>This callback
|
|
- May be invoked even though the parent container or canvas sizes have not changed
|
|
- Unlike <code>onSizeChange</code>, it runs <em>before</em> the canvas is guaranteed to be updated
|
|
- Will be invoked from <code>preUpdate</code>, <em>even when</em> the game is paused </p>
|
|
<p>See <code>onSizeChange</code> for a better way of reacting to layout updates.</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>callback</code></td>
|
|
|
|
|
|
<td class="type">
|
|
|
|
|
|
<span class="param-type">function</span>
|
|
|
|
|
|
|
|
</td>
|
|
|
|
|
|
|
|
|
|
|
|
<td class="description last"><p>The callback that will be called each time a window.resize event happens or if set, the parent container resizes.</p></td>
|
|
</tr>
|
|
|
|
|
|
|
|
<tr>
|
|
|
|
<td class="name"><code>context</code></td>
|
|
|
|
|
|
<td class="type">
|
|
|
|
|
|
<span class="param-type">object</span>
|
|
|
|
|
|
|
|
</td>
|
|
|
|
|
|
|
|
|
|
|
|
<td class="description last"><p>The context in which the callback will be called.</p></td>
|
|
</tr>
|
|
|
|
|
|
</tbody>
|
|
</table>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<dl class="details">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<dt class="tag-source">Source -
|
|
<a href="ScaleManager.js.html">core/ScaleManager.js</a>, <a href="ScaleManager.js.html#sunlight-1-line-930">line 930</a>
|
|
</dt>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</dd>
|
|
|
|
|
|
|
|
<dt>
|
|
<h4 class="name toc-deprecated"
|
|
id="setScreenSize"><span class="type-signature"><internal> </span>setScreenSize<span class="signature">()</span><span class="type-signature"></span></h4>
|
|
|
|
|
|
</dt>
|
|
<dd>
|
|
|
|
<dt class="important deprecated-notice">
|
|
This method is <em>deprecated</em> and should not be used. It may be removed in the future.
|
|
</dt>
|
|
|
|
|
|
|
|
<div class="description">
|
|
<p>Updates the size of the Game or the size/position of the Display canvas based on internal state.</p>
|
|
<p>Do not call this directly. To "refresh" the layout use <a href="Phaser.ScaleManager.html#refresh">refresh</a>.
|
|
To precisely control the scaling/size, apply appropriate rules to the bounding Parent container or
|
|
use the <a href="Phaser.ScaleManager.html#scaleMode">USER_SCALE scale mode</a>.</p>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<dl class="details">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<dt class="important tag-deprecated">Deprecated / Internal:</dt>
|
|
<dd class="tag-deprecated"><ul>
|
|
|
|
<li>This member is <em>internal (protected)</em> and may be modified or removed in the future.</li>
|
|
|
|
<li><em>Deprecated:</em> 2.2.0 - This method is INTERNAL: avoid using it directly.</li>
|
|
</ul></dd>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<dt class="tag-source">Source -
|
|
<a href="ScaleManager.js.html">core/ScaleManager.js</a>, <a href="ScaleManager.js.html#sunlight-1-line-2096">line 2096</a>
|
|
</dt>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</dd>
|
|
|
|
|
|
|
|
<dt>
|
|
<h4 class="name "
|
|
id="setupScale"><span class="type-signature"><internal> </span>setupScale<span class="signature">(width, height)</span><span class="type-signature"></span></h4>
|
|
|
|
|
|
</dt>
|
|
<dd>
|
|
|
|
|
|
|
|
<div class="description">
|
|
<p>Calculates and sets the game dimensions based on the given width and height.</p>
|
|
<p>This should <em>not</em> be called when in fullscreen 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>width</code></td>
|
|
|
|
|
|
<td class="type">
|
|
|
|
|
|
<span class="param-type">number</span>
|
|
|
|
|
|
|
<span class="param-type">string</span>
|
|
|
|
|
|
|
|
</td>
|
|
|
|
|
|
|
|
|
|
|
|
<td class="description last"><p>The width of the game.</p></td>
|
|
</tr>
|
|
|
|
|
|
|
|
<tr>
|
|
|
|
<td class="name"><code>height</code></td>
|
|
|
|
|
|
<td class="type">
|
|
|
|
|
|
<span class="param-type">number</span>
|
|
|
|
|
|
|
<span class="param-type">string</span>
|
|
|
|
|
|
|
|
</td>
|
|
|
|
|
|
|
|
|
|
|
|
<td class="description last"><p>The height of the game.</p></td>
|
|
</tr>
|
|
|
|
|
|
</tbody>
|
|
</table>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<dl class="details">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<dt class="important tag-deprecated">Internal:</dt>
|
|
<dd class="tag-deprecated"><ul>
|
|
|
|
<li>This member is <em>internal (protected)</em> and may be modified or removed in the future.</li>
|
|
|
|
</ul></dd>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<dt class="tag-source">Source -
|
|
<a href="ScaleManager.js.html">core/ScaleManager.js</a>, <a href="ScaleManager.js.html#sunlight-1-line-779">line 779</a>
|
|
</dt>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</dd>
|
|
|
|
|
|
|
|
<dt>
|
|
<h4 class="name "
|
|
id="setUserScale"><span class="type-signature"></span>setUserScale<span class="signature">(hScale, vScale, <span class="optional">hTrim</span>, <span class="optional">vTrim</span>)</span><span class="type-signature"></span></h4>
|
|
|
|
|
|
</dt>
|
|
<dd>
|
|
|
|
|
|
|
|
<div class="description">
|
|
<p>Set a User scaling factor used in the USER_SCALE scaling mode.</p>
|
|
<p>The target canvas size is computed by:</p>
|
|
<pre><code>canvas.width = (game.width * hScale) - hTrim
|
|
canvas.height = (game.height * vScale) - vTrim</code></pre>
|
|
<p>This method can be used in the <a href="Phaser.ScaleManager.html#setResizeCallback">resize callback</a>.</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>hScale</code></td>
|
|
|
|
|
|
<td class="type">
|
|
|
|
|
|
<span class="param-type">number</span>
|
|
|
|
|
|
|
|
</td>
|
|
|
|
|
|
<td class="attributes">
|
|
|
|
|
|
|
|
|
|
|
|
</td>
|
|
|
|
|
|
|
|
<td class="default">
|
|
|
|
</td>
|
|
|
|
|
|
<td class="description last"><p>Horizontal scaling factor.</p></td>
|
|
</tr>
|
|
|
|
|
|
|
|
<tr>
|
|
|
|
<td class="name"><code>vScale</code></td>
|
|
|
|
|
|
<td class="type">
|
|
|
|
|
|
<span class="param-type">numer</span>
|
|
|
|
|
|
|
|
</td>
|
|
|
|
|
|
<td class="attributes">
|
|
|
|
|
|
|
|
|
|
|
|
</td>
|
|
|
|
|
|
|
|
<td class="default">
|
|
|
|
</td>
|
|
|
|
|
|
<td class="description last"><p>Vertical scaling factor.</p></td>
|
|
</tr>
|
|
|
|
|
|
|
|
<tr>
|
|
|
|
<td class="name"><code>hTrim</code></td>
|
|
|
|
|
|
<td class="type">
|
|
|
|
|
|
<span class="param-type">integer</span>
|
|
|
|
|
|
|
|
</td>
|
|
|
|
|
|
<td class="attributes">
|
|
|
|
<optional><br>
|
|
|
|
|
|
|
|
|
|
|
|
</td>
|
|
|
|
|
|
|
|
<td class="default">
|
|
|
|
0
|
|
|
|
</td>
|
|
|
|
|
|
<td class="description last"><p>Horizontal trim, applied after scaling.</p></td>
|
|
</tr>
|
|
|
|
|
|
|
|
<tr>
|
|
|
|
<td class="name"><code>vTrim</code></td>
|
|
|
|
|
|
<td class="type">
|
|
|
|
|
|
<span class="param-type">integer</span>
|
|
|
|
|
|
|
|
</td>
|
|
|
|
|
|
<td class="attributes">
|
|
|
|
<optional><br>
|
|
|
|
|
|
|
|
|
|
|
|
</td>
|
|
|
|
|
|
|
|
<td class="default">
|
|
|
|
0
|
|
|
|
</td>
|
|
|
|
|
|
<td class="description last"><p>Vertical trim, applied after scaling.</p></td>
|
|
</tr>
|
|
|
|
|
|
</tbody>
|
|
</table>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<dl class="details">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<dt class="tag-source">Source -
|
|
<a href="ScaleManager.js.html">core/ScaleManager.js</a>, <a href="ScaleManager.js.html#sunlight-1-line-906">line 906</a>
|
|
</dt>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</dd>
|
|
|
|
|
|
|
|
<dt>
|
|
<h4 class="name "
|
|
id="startFullScreen"><span class="type-signature"></span>startFullScreen<span class="signature">(<span class="optional">antialias</span>, <span class="optional">allowTrampoline</span>)</span><span class="type-signature"> → {boolean}</span></h4>
|
|
|
|
|
|
</dt>
|
|
<dd>
|
|
|
|
|
|
|
|
<div class="description">
|
|
<p>Start the browsers fullscreen mode - this <em>must</em> be called from a user input Pointer or Mouse event.</p>
|
|
<p>The Fullscreen API must be supported by the browser for this to work - it is not the same as setting
|
|
the game size to fill the browser window. See <code>compatibility.supportsFullScreen</code> to check if the current
|
|
device is reported to support fullscreen mode.</p>
|
|
<p>The <code>fullScreenFailed</code> signal will be dispatched if the fullscreen change request failed or the game does not support the Fullscreen API.</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>antialias</code></td>
|
|
|
|
|
|
<td class="type">
|
|
|
|
|
|
<span class="param-type">boolean</span>
|
|
|
|
|
|
|
|
</td>
|
|
|
|
|
|
<td class="attributes">
|
|
|
|
<optional><br>
|
|
|
|
|
|
|
|
|
|
|
|
</td>
|
|
|
|
|
|
|
|
<td class="default">
|
|
|
|
</td>
|
|
|
|
|
|
<td class="description last"><p>Changes the anti-alias feature of the canvas before jumping in to fullscreen (false = retain pixel art, true = smooth art). If not specified then no change is made. Only works in CANVAS mode.</p></td>
|
|
</tr>
|
|
|
|
|
|
|
|
<tr>
|
|
|
|
<td class="name"><code>allowTrampoline</code></td>
|
|
|
|
|
|
<td class="type">
|
|
|
|
|
|
<span class="param-type">boolean</span>
|
|
|
|
|
|
|
|
</td>
|
|
|
|
|
|
<td class="attributes">
|
|
|
|
<optional><br>
|
|
|
|
|
|
|
|
|
|
|
|
</td>
|
|
|
|
|
|
|
|
<td class="default">
|
|
|
|
undefined
|
|
|
|
</td>
|
|
|
|
|
|
<td class="description last"><p>Internal argument. If <code>false</code> click trampolining is suppressed.</p></td>
|
|
</tr>
|
|
|
|
|
|
</tbody>
|
|
</table>
|
|
|
|
|
|
|
|
|
|
<h5>Returns:</h5>
|
|
<div class="returns">
|
|
|
|
|
|
|
|
<div class="returns-type">
|
|
|
|
<span class="param-type">boolean</span>
|
|
|
|
-
|
|
</div>
|
|
|
|
<div class="returns-desc param-desc">
|
|
<p>Returns true if the device supports fullscreen mode and fullscreen mode was attempted to be started. (It might not actually start, wait for the signals.)</p>
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<dl class="details">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<dt class="tag-source">Source -
|
|
<a href="ScaleManager.js.html">core/ScaleManager.js</a>, <a href="ScaleManager.js.html#sunlight-1-line-1748">line 1748</a>
|
|
</dt>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</dd>
|
|
|
|
|
|
|
|
<dt>
|
|
<h4 class="name "
|
|
id="stopFullScreen"><span class="type-signature"></span>stopFullScreen<span class="signature">()</span><span class="type-signature"> → {boolean}</span></h4>
|
|
|
|
|
|
</dt>
|
|
<dd>
|
|
|
|
|
|
|
|
<div class="description">
|
|
<p>Stops / exits fullscreen mode, if active.</p>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<h5>Returns:</h5>
|
|
<div class="returns">
|
|
|
|
|
|
|
|
<div class="returns-type">
|
|
|
|
<span class="param-type">boolean</span>
|
|
|
|
-
|
|
</div>
|
|
|
|
<div class="returns-desc param-desc">
|
|
<p>Returns true if the browser supports fullscreen mode and fullscreen mode will be exited.</p>
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<dl class="details">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<dt class="tag-source">Source -
|
|
<a href="ScaleManager.js.html">core/ScaleManager.js</a>, <a href="ScaleManager.js.html#sunlight-1-line-1833">line 1833</a>
|
|
</dt>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</dd>
|
|
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
</article>
|
|
|
|
</section>
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
<div class="clearfix"></div>
|
|
<footer>
|
|
|
|
|
|
<span class="copyright">
|
|
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 Dec 04 2014 11:32:52 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( {
|
|
anchorName : function(i, heading, prefix) {
|
|
return $(heading).attr("id") || ( prefix + i );
|
|
},
|
|
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> |