Package

io.scalajs.dom.html

phaser

Permalink

package phaser

phaser package object

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. phaser
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type Members

  1. class Animation extends Object

    Permalink

    An Animation instance contains a single animation and the controls to play it.

    An Animation instance contains a single animation and the controls to play it.

    It is created by the AnimationManager, consists of Animation.Frame objects and belongs to a single Game Object such as a Sprite.

    Annotations
    @RawJSType() @native() @JSName( "Phaser.Animation" )
    See also

    https://phaser.io/docs/2.6.2/Phaser.Animation.html

  2. class AnimationManager extends Object

    Permalink

    The Animation Manager is used to add, play and update Phaser Animations.

    The Animation Manager is used to add, play and update Phaser Animations. Any Game Object such as Phaser.Sprite that supports animation contains a single AnimationManager instance.

    Annotations
    @RawJSType() @native() @JSName( "Phaser.AnimationManager" )
    See also

    https://phaser.io/docs/2.6.2/Phaser.AnimationManager.html

  3. class ArraySet[T] extends Object

    Permalink

    ArraySet is a Set data structure (items must be unique within the set) that also maintains order.

    ArraySet is a Set data structure (items must be unique within the set) that also maintains order. This allows specific items to be easily added or removed from the Set.

    Item equality (and uniqueness) is determined by the behavior of Array.indexOf.

    This used primarily by the Input subsystem.

    Annotations
    @RawJSType() @native() @JSName( "Phaser.ArraySet" )
    See also

    http://phaser.io/docs/2.6.2/Phaser.ArraySet.html

  4. class AudioSprite extends Object

    Permalink

    Audio Sprites are a combination of audio files and a JSON configuration.

    Audio Sprites are a combination of audio files and a JSON configuration. The JSON follows the format of that created by https://github.com/tonistiigi/audiosprite.

    Annotations
    @RawJSType() @native() @JSName( "Phaser.AudioSprite" )
  5. class BitmapData extends Object

    Permalink
    Annotations
    @RawJSType() @native() @JSName( "Phaser.BitmapData" )
  6. class BitmapText extends Object with DisplayObjectContainer with Core with Angle with AutoCull with Bounds with Destroy with FixedToCamera with InputEnabled with InWorld with LifeSpan with PhysicsBody with Reset

    Permalink

    BitmapText objects work by taking a texture file and an XML or JSON file that describes the font structure.

    BitmapText objects work by taking a texture file and an XML or JSON file that describes the font structure. It then generates a new Sprite object for each letter of the text, proportionally spaced out and aligned to match the font structure.

    BitmapText objects are less flexible than Text objects, in that they have less features such as shadows, fills and the ability to use Web Fonts, however you trade this flexibility for rendering speed. You can also create visually compelling BitmapTexts by processing the font texture in an image editor, applying fills and any other effects required.

    To create multi-line text insert \r, \n or \r\n escape codes into the text string.

    If you are having performance issues due to the volume of sprites being rendered, and do not require the text to be constantly updating, you can use BitmapText.generateTexture to create a static texture from this BitmapText.

    Annotations
    @RawJSType() @native() @JSName( "Phaser.BitmapText" )
    See also

    https://phaser.io/docs/2.6.2/Phaser.BitmapText.html

  7. class Bullet extends phaser.Phaser.Sprite

    Permalink

    Create a new Bullet object.

    Create a new Bullet object. Bullets are used by the Phaser.Weapon class, and are normal Sprites, with a few extra properties in the data object to handle Weapon specific features.

    Annotations
    @RawJSType() @native() @JSName( "Phaser.Bullet" )
    See also

    http://phaser.io/docs/2.6.2/Phaser.Bullet.html

  8. class Button extends phaser.Phaser.Image

    Permalink

    Create a new Button object.

    Create a new Button object. A Button is a special type of Sprite that is set-up to handle Pointer events automatically.

    The four states a Button responds to are:

    'Over' - when the Pointer moves over the Button. This is also commonly known as 'hover'. 'Out' - when the Pointer that was previously over the Button moves out of it. 'Down' - when the Pointer is pressed down on the Button. I.e. touched on a touch enabled device or clicked with the mouse. 'Up' - when the Pointer that was pressed down on the Button is released again. A different texture/frame and activation sound can be specified for any of the states.

    Frames can be specified as either an integer (the frame ID) or a string (the frame name); the same values that can be used with a Sprite constructor.

    Annotations
    @RawJSType() @native() @JSName( "Phaser.Button" )
  9. type ButtonCode = Int

    Permalink
  10. class Cache extends Object

    Permalink

    Phaser has one single cache in which it stores all assets.

    Phaser has one single cache in which it stores all assets.

    The cache is split up into sections, such as images, sounds, video, json, etc. All assets are stored using a unique string-based key as their identifier. Assets stored in different areas of the cache can have the same key, for example 'playerWalking' could be used as the key for both a sprite sheet and an audio file, because they are unique data types.

    The cache is automatically populated by the Phaser.Loader. When you use the loader to pull in external assets such as images they are automatically placed into their respective cache. Most common Game Objects, such as Sprites and Videos automatically query the cache to extract the assets they need on instantiation.

    You can access the cache from within a State via this.cache. From here you can call any public method it has, including adding new entries to it, deleting them or querying them.

    Understand that almost without exception when you get an item from the cache it will return a reference to the item stored in the cache, not a copy of it. Therefore if you retrieve an item and then modify it, the original object in the cache will also be updated, even if you don't put it back into the cache again.

    By default when you change State the cache is not cleared, although there is an option to clear it should your game require it. In a typical game set-up the cache is populated once after the main game has loaded and then used as an asset store.

    Annotations
    @RawJSType() @native() @JSName( "Phaser.Cache" )
    See also

    https://phaser.io/docs/2.6.2/Phaser.Cache.html

  11. class Callbacks extends Object

    Permalink

    Callbacks Object

    Callbacks Object

    Annotations
    @RawJSType() @ScalaJSDefined()
  12. class Camera extends Object

    Permalink

    A Camera is your view into the game world.

    A Camera is your view into the game world. It has a position and size and renders only those objects within its field of view. The game automatically creates a single Stage sized camera on boot. Move the camera around the world with Phaser.Camera.x/y

    Annotations
    @RawJSType() @native() @JSName( "Phaser.Camera" )
  13. class Canvas extends Object

    Permalink

    The Canvas class handles everything related to creating the canvas DOM tag that Phaser will use, including styles, offset and aspect ratio.

    The Canvas class handles everything related to creating the canvas DOM tag that Phaser will use, including styles, offset and aspect ratio.

    Annotations
    @RawJSType() @native() @JSName( "Phaser.Canvas" )
    See also

    http://phaser.io/docs/2.6.2/Phaser.Canvas.html

  14. class Circle extends Object

    Permalink

    Creates a new Circle object with the center coordinate specified by the x and y parameters and the diameter specified by the diameter parameter.

    Creates a new Circle object with the center coordinate specified by the x and y parameters and the diameter specified by the diameter parameter. If you call this function without parameters, a circle with x, y, diameter and radius properties set to 0 is created.

    Annotations
    @RawJSType() @native() @JSName( "Phaser.Circle" )
  15. class Create extends Object

    Permalink

    Phaser Create

    Phaser Create

    Annotations
    @RawJSType() @native() @JSName( "Phaser.Create" )
  16. trait CursorKeys extends Object

    Permalink

    Phaser Cursor Keys

    Phaser Cursor Keys

    Annotations
    @RawJSType() @native()
  17. class DebugSettings extends Object

    Permalink

    Settings used for debugging and diagnostics.

    Settings used for debugging and diagnostics.

    Annotations
    @RawJSType() @ScalaJSDefined()
  18. class Device extends Object

    Permalink

    Created by ldaniels on 1/29/17.

    Created by ldaniels on 1/29/17.

    Annotations
    @RawJSType() @native() @JSName( "Phaser.Device" )
  19. class DeviceButton extends Object

    Permalink

    Created by ldaniels on 1/30/17.

    Created by ldaniels on 1/30/17.

    Annotations
    @RawJSType() @native() @JSName( "Phaser.DeviceButton" )
  20. class Easing extends Object

    Permalink

    Phaser Easing

    Phaser Easing

    Annotations
    @RawJSType() @native() @JSName( "Phaser.Easing" )
  21. class Ellipse extends Object

    Permalink

    Creates a Ellipse object.

    Creates a Ellipse object. A curve on a plane surrounding two focal points.

    Annotations
    @RawJSType() @native() @JSName( "Phaser.Ellipse" )
    See also

    http://phaser.io/docs/2.6.2/Phaser.Ellipse.html

  22. class Events extends Object

    Permalink

    The Events component is a collection of events fired by the parent Game Object.

    The Events component is a collection of events fired by the parent Game Object.

    Phaser uses what are known as 'Signals' for all event handling. All of the events in this class are signals you can subscribe to, much in the same way you'd "listen" for an event.

    For example to tell when a Sprite has been added to a new group, you can bind a function to the onAddedToGroup signal:

    sprite.events.onAddedToGroup.add(yourFunction, this);

    Where yourFunction is the function you want called when this event occurs.

    For more details about how signals work please see the Phaser.Signal class.

    The Input-related events will only be dispatched if the Sprite has had inputEnabled set to true and the Animation-related events only apply to game objects with animations like Phaser.Sprite.

    Annotations
    @RawJSType() @native() @JSName( "Phaser.Events" )
    See also

    http://phaser.io/docs/2.6.2/Phaser.Events.html

  23. class Frame extends Object

    Permalink

    A Frame is a single frame of an animation and is part of a FrameData collection.

    A Frame is a single frame of an animation and is part of a FrameData collection.

    Annotations
    @RawJSType() @native() @JSName( "Phaser.Frame" )
    See also

    https://phaser.io/docs/2.6.2/Phaser.Frame.html

  24. class FrameData extends Object

    Permalink

    FrameData is a container for Frame objects, which are the internal representation of animation data in Phaser.

    FrameData is a container for Frame objects, which are the internal representation of animation data in Phaser.

    Annotations
    @RawJSType() @native() @JSName( "Phaser.FrameData" )
    See also

    https://phaser.io/docs/2.6.2/Phaser.FrameData.html

  25. class Game extends Object

    Permalink

    This is where the magic happens.

    This is where the magic happens. The Game object is the heart of your game, providing quick access to common functions and handling the boot process.

    Annotations
    @RawJSType() @native() @JSName( "Phaser.Game" )
    See also

    https://phaser.io/docs/2.6.2/Phaser.Game.html

  26. class GameConfigObject extends Object

    Permalink

    Game Config Object

    Game Config Object

    Annotations
    @RawJSType() @ScalaJSDefined()
  27. class GameObjectCreator extends Object

    Permalink

    The GameObjectCreator is a quick way to create common game objects without adding them to the game world.

    The GameObjectCreator is a quick way to create common game objects without adding them to the game world. The object creator can be accessed with game.make.

    Annotations
    @RawJSType() @native() @JSName( "Phaser.GameObjectCreator" )
    See also

    https://phaser.io/docs/2.6.2/Phaser.GameObjectCreator.html

  28. class GameObjectFactory extends Object

    Permalink

    A reference to the GameObjectFactory which can be used to add new objects to the World.

    A reference to the GameObjectFactory which can be used to add new objects to the World.

    Annotations
    @RawJSType() @native() @JSName( "Phaser.GameObjectFactory" )
  29. trait GameState extends AnyRef

    Permalink

    Phaser: Game State

    Phaser: Game State

    Version

    2.6.2

  30. class Gamepad extends Object

    Permalink

    The Gamepad class handles gamepad input and dispatches gamepad events.

    The Gamepad class handles gamepad input and dispatches gamepad events.

    Remember to call gamepad.start().

    HTML5 GAMEPAD API SUPPORT IS AT AN EXPERIMENTAL STAGE! At moment of writing this (end of 2013) only Chrome supports parts of it out of the box. Firefox supports it via prefs flags (about:config, search gamepad). The browsers map the same controllers differently. This class has constants for Windows 7 Chrome mapping of XBOX 360 controller.

    Annotations
    @RawJSType() @native() @JSName( "Phaser.Gamepad" )
    See also

    http://phaser.io/docs/2.6.2/Phaser.Gamepad.html

  31. class Graphics extends pixijs.Graphics with Core with Angle with AutoCull with Bounds with Destroy with FixedToCamera with InputEnabled with InWorld with LifeSpan with PhysicsBody with Reset

    Permalink

    A Graphics object is a way to draw primitives to your game.

    A Graphics object is a way to draw primitives to your game. Primitives include forms of geometry, such as Rectangles, Circles and Polygons. They also include lines, arcs and curves. When you initially create a Graphics object it will be empty. To 'draw' to it you first specify a lineStyle or fillStyle (or both), and then draw a shape.

    Annotations
    @RawJSType() @native() @JSName( "Phaser.Graphics" )
    See also

    http://phaser.io/docs/2.6.2/Phaser.Graphics.html

  32. class Group[T] extends Object with DisplayObjectContainer

    Permalink

    A Group is a container for display objects including Sprites and Images.

    A Group is a container for display objects including Sprites and Images.

    Groups form the logical tree structure of the display/scene graph where local transformations are applied to children. For instance, all children are also moved/rotated/scaled when the group is moved/rotated/scaled.

    In addition, Groups provides support for fast pooling and object recycling.

    Groups are also display objects and can be nested as children within other Groups.

    Annotations
    @RawJSType() @native() @JSName( "Phaser.Group" )
    See also

    http://phaser.io/docs/2.6.2/Phaser.Group.html

  33. implicit final class GroupExtensions[T] extends AnyVal

    Permalink

    Group Extensions

  34. class Image extends pixijs.Sprite with Core with Angle with phaser.Phaser.Component.Animation with AutoCull with Bounds with BringToTop with Crop with Destroy with FixedToCamera with InputEnabled with LifeSpan with LoadTexture with Overlap with Reset with ScaleMinMax with Smoothed

    Permalink

    An Image is a light-weight object you can use to display anything that doesn't need physics or animation.

    An Image is a light-weight object you can use to display anything that doesn't need physics or animation. It can still rotate, scale, crop and receive input events. This makes it perfect for logos, backgrounds, simple buttons and other non-Sprite graphics.

    Annotations
    @RawJSType() @native() @JSName( "Phaser.Image" )
    See also

    http://phaser.io/docs/2.6.2/Phaser.Image.html

  35. class Input extends Object

    Permalink

    Phaser.Input is the Input Manager for all types of Input across Phaser, including mouse, keyboard, touch and MSPointer.

    Phaser.Input is the Input Manager for all types of Input across Phaser, including mouse, keyboard, touch and MSPointer. The Input manager is updated automatically by the core game loop.

    Annotations
    @RawJSType() @native() @JSName( "Phaser.Input" )
    See also

    http://phaser.io/docs/2.6.2/Phaser.Input.html

  36. class InputHandler extends Object

    Permalink

    The Input Handler is bound to a specific Sprite and is responsible for managing all Input events on that Sprite.

    The Input Handler is bound to a specific Sprite and is responsible for managing all Input events on that Sprite.

    Annotations
    @RawJSType() @native()
    See also

    http://phaser.io/docs/2.6.2/Phaser.InputHandler.html

  37. class Key extends Object

    Permalink
    Annotations
    @RawJSType() @native()
  38. trait Keyboard extends Object

    Permalink
    Annotations
    @RawJSType() @native()
  39. class Line extends Object

    Permalink

    Creates a new Line object with a start and an end point.

    Creates a new Line object with a start and an end point.

    Annotations
    @RawJSType() @native() @JSName( "Phaser.Line" )
  40. trait Linear extends Object

    Permalink
    Annotations
    @RawJSType() @native()
  41. trait Loader extends Object

    Permalink
    Annotations
    @RawJSType() @native()
  42. class Math extends Object

    Permalink

    A collection of useful mathematical functions.

    A collection of useful mathematical functions. These are normally accessed through game.math.

    Annotations
    @RawJSType() @native() @JSName( "Phaser.Math" )
    See also

    io.scalajs.dom.html.phaser.utils.Utils

    io.scalajs.dom.html.phaser.utils.ArrayUtils

    https://phaser.io/docs/2.6.2/Phaser.Math.html

  43. class Physics extends Object

    Permalink

    The Physics Manager is responsible for looking after all of the running physics systems.

    The Physics Manager is responsible for looking after all of the running physics systems. Phaser supports 4 physics systems: Arcade Physics, P2, Ninja Physics and Box2D via a commercial plugin.

    Game Objects (such as Sprites) can only belong to 1 physics system, but you can have multiple systems active in a single game.

    For example you could have P2 managing a polygon-built terrain landscape that an vehicle drives over, while it could be firing bullets that use the faster (due to being much simpler) Arcade Physics system.

    Annotations
    @RawJSType() @native() @JSName( "Phaser.Physics" )
    See also

    http://phaser.io/docs/2.6.2/Phaser.Physics.html

  44. class PhysicsConfig extends Object

    Permalink

    Physics Configuration Options

    Physics Configuration Options

    Annotations
    @RawJSType() @ScalaJSDefined()
    See also

    https://github.com/photonstorm/phaser/blob/v2.6.2/src/physics/Physics.js

  45. class Plugin extends Object

    Permalink

    This is a base Plugin template to use for any Phaser plugin development.

    This is a base Plugin template to use for any Phaser plugin development.

    Annotations
    @RawJSType() @native() @JSName( "Phaser.Plugin" )
    See also

    http://phaser.io/docs/2.6.2/Phaser.Plugin.html

  46. class PluginManager extends Object

    Permalink

    The Plugin Manager is responsible for the loading, running and unloading of Phaser Plugins.

    The Plugin Manager is responsible for the loading, running and unloading of Phaser Plugins.

    Annotations
    @RawJSType() @native() @JSName( "Phaser.PluginManager" )
    See also

    http://phaser.io/docs/2.6.2/Phaser.PluginManager.html

  47. class Point extends Object

    Permalink

    A Point object represents a location in a two-dimensional coordinate system, where x represents the horizontal axis and y represents the vertical axis.

    A Point object represents a location in a two-dimensional coordinate system, where x represents the horizontal axis and y represents the vertical axis. The following code creates a point at (0,0):

    var myPoint = new Phaser.Point();

    You can also use them as 2D Vectors and you'll find different vector related methods in this class.

    Annotations
    @RawJSType() @native()
  48. class Pointer extends Object

    Permalink

    A Pointer object is used by the Mouse, Touch and MSPoint managers and represents a single finger on the touch screen.

    A Pointer object is used by the Mouse, Touch and MSPoint managers and represents a single finger on the touch screen.

    Annotations
    @RawJSType() @native() @JSName( "Phaser.Pointer" )
    See also

    http://phaser.io/docs/2.6.2/Phaser.Pointer.html

  49. class PointerMode extends Object

    Permalink

    Enumeration categorizing operational modes of pointers.

    Enumeration categorizing operational modes of pointers.

    PointerType values represent valid bitmasks. For example, a value representing both Mouse and Touch devices can be expressed as PointerMode.CURSOR | PointerMode.CONTACT.

    Values may be added for future mode categorizations.

    Annotations
    @RawJSType() @native() @JSName( "Phaser.PointerMode" )
  50. class Polygon extends Object

    Permalink
    Annotations
    @RawJSType() @native() @JSName( "Phaser.Polygon" )
  51. class QuadTree extends Object

    Permalink

    A QuadTree implementation.

    A QuadTree implementation. The original code was a conversion of the Java code posted to GameDevTuts. However I've tweaked it massively to add node indexing, removed lots of temp. var creation and significantly increased performance as a result.

    Annotations
    @RawJSType() @native() @JSName( "Phaser.QuadTree" )
    Version

    2.6.2

    See also

    http://phaser.io/docs/2.6.2/Phaser.QuadTree.html

  52. trait RandomDataGenerator extends Object

    Permalink
    Annotations
    @RawJSType() @native()
  53. class Rectangle extends Object

    Permalink

    Creates a new Rectangle object with the top-left corner specified by the x and y parameters and with the specified width and height parameters.

    Creates a new Rectangle object with the top-left corner specified by the x and y parameters and with the specified width and height parameters. If you call this function without parameters, a Rectangle with x, y, width, and height properties set to 0 is created.

    Annotations
    @RawJSType() @native()
  54. class RenderTexture extends Object

    Permalink
    Annotations
    @RawJSType() @native() @JSName( "Phaser.RenderTexture" )
  55. class RoundedRectangle extends Object

    Permalink

    The Rounded Rectangle object is an area defined by its position and has nice rounded corners, as indicated by its top-left corner point (x, y) and by its width and its height.

    The Rounded Rectangle object is an area defined by its position and has nice rounded corners, as indicated by its top-left corner point (x, y) and by its width and its height.

    Annotations
    @RawJSType() @native()
  56. class ScaleManager extends Object

    Permalink

    Create a new ScaleManager object - this is done automatically by Phaser.Game

    Create a new ScaleManager object - this is done automatically by Phaser.Game

    The width and height constructor parameters can either be a number which represents pixels or a string that represents a percentage: e.g. 800 (for 800 pixels) or "80%" for 80%.

    Annotations
    @RawJSType() @native() @JSName( "Phaser.ScaleManager" )
    See also

    https://phaser.io/docs/2.6.2/Phaser.ScaleManager.html

  57. class Signal extends Object

    Permalink
    Annotations
    @RawJSType() @native() @JSName( "Phaser.Signal" )
  58. class SignalBinding extends Object

    Permalink
    Annotations
    @RawJSType() @native() @JSName( "Phaser.SignalBinding" )
  59. class SinglePad extends Object

    Permalink

    Created by ldaniels on 2/3/17.

    Created by ldaniels on 2/3/17.

    Annotations
    @RawJSType() @native() @JSName( "Phaser.SinglePad" )
  60. class Sound extends Object

    Permalink

    The Sound class constructor.

    The Sound class constructor.

    Annotations
    @RawJSType() @native() @JSName( "Phaser.Sound" )
  61. class SoundManager extends Object

    Permalink

    The Sound Manager is responsible for playing back audio via either the Legacy HTML Audio tag or via Web Audio if the browser supports it.

    The Sound Manager is responsible for playing back audio via either the Legacy HTML Audio tag or via Web Audio if the browser supports it. Note: On Firefox 25+ on Linux if you have media.gstreamer disabled in about:config then it cannot play back mp3 or m4a files. The audio file type and the encoding of those files are extremely important. Not all browsers can play all audio formats. There is a good guide to what's supported here: http://hpr.dogphilosophy.net/test/

    If you are reloading a Phaser Game on a page that never properly refreshes (such as in an AngularJS project) then you will quickly run out of AudioContext nodes. If this is the case create a global var called PhaserGlobal on the window object before creating the game. The active AudioContext will then be saved to window.PhaserGlobal.audioContext when the Phaser game is destroyed, and re-used when it starts again.

    Mobile warning: There are some mobile devices (certain iPad 2 and iPad Mini revisions) that cannot play 48000 Hz audio. When they try to play the audio becomes extremely distorted and buzzes, eventually crashing the sound system. The solution is to use a lower encoding rate such as 44100 Hz. Sometimes the audio context will be created with a sampleRate of 48000. If this happens and audio distorts you should re-create the context.

    Annotations
    @RawJSType() @native() @JSName( "Phaser.SoundManager" )
  62. class Sprite extends pixijs.Sprite with Core with Angle with phaser.Phaser.Component.Animation with AutoCull with Bounds with BringToTop with Crop with Delta with Destroy with FixedToCamera with Health with InCamera with InputEnabled with InWorld with LifeSpan with LoadTexture with Overlap with PhysicsBody with Reset with ScaleMinMax with Smoothed

    Permalink

    Sprites are the lifeblood of your game, used for nearly everything visual.

    Sprites are the lifeblood of your game, used for nearly everything visual. At its most basic a Sprite consists of a set of coordinates and a texture that is rendered to the canvas. They also contain additional properties allowing for physics motion (via Sprite.body), input handling (via Sprite.input), events (via Sprite.events), animation (via Sprite.animations), camera culling and more. Please see the Examples for use cases.

    Annotations
    @RawJSType() @native() @JSName( "Phaser.Sprite" )
    See also

    http://phaser.io/docs/2.6.2/Phaser.Sprite.html

  63. class State extends Object

    Permalink
    Annotations
    @RawJSType() @native() @JSName( "Phaser.State" )
  64. class StyleOptions extends Object

    Permalink

    Text Style Options

    Text Style Options

    Annotations
    @RawJSType() @ScalaJSDefined()
  65. class Text extends Sprite

    Permalink

    Create a new game object for displaying Text.

    Create a new game object for displaying Text.

    This uses a local hidden Canvas object and renders the type into it. It then makes a texture from this for rendering to the view. Because of this you can only display fonts that are currently loaded and available to the browser: fonts must be pre-loaded.

    Annotations
    @RawJSType() @native() @JSName( "Phaser.Text" )
  66. class Texture extends Object

    Permalink
    Annotations
    @RawJSType() @native() @JSName( "Phaser.Texture" )
  67. class TileSprite extends Object

    Permalink
    Annotations
    @RawJSType() @native() @JSName( "Phaser.TileSprite" )
  68. class Tilemap extends Object

    Permalink

    Creates a new Phaser.Tilemap object.

    Creates a new Phaser.Tilemap object. The map can either be populated with data from a Tiled JSON file or from a CSV file.

    Tiled is a free software package specifically for creating tile maps, and is available from http://www.mapeditor.org

    To do this pass the Cache key as the first parameter. When using Tiled data you need only provide the key. When using CSV data you must provide the key and the tileWidth and tileHeight parameters. If creating a blank tilemap to be populated later, you can either specify no parameters at all and then use Tilemap.create or pass the map and tile dimensions here.

    Note that all Tilemaps use a base tile size to calculate dimensions from, but that a TilemapLayer may have its own unique tile size that overrides it.

    A Tile map is rendered to the display using a TilemapLayer. It is not added to the display list directly itself. A map may have multiple layers. You can perform operations on the map data such as copying, pasting, filling and shuffling the tiles around.

    Annotations
    @RawJSType() @native() @JSName( "Phaser.Tilemap" )
    See also

    http://phaser.io/docs/2.6.2/Phaser.Tilemap.html

  69. class TilemapLayer extends phaser.Phaser.Sprite

    Permalink

    A TilemapLayer is a Phaser.Image/Sprite that renders a specific TileLayer of a Tilemap.

    A TilemapLayer is a Phaser.Image/Sprite that renders a specific TileLayer of a Tilemap.

    Since a TilemapLayer is a Sprite it can be moved around the display, added to other groups or display objects, etc.

    By default TilemapLayers have fixedToCamera set to true. Changing this will break Camera follow and scrolling behavior.

    Annotations
    @RawJSType() @native() @JSName( "Phaser.TilemapLayer" )
    See also

    http://phaser.io/docs/2.6.2/Phaser.TilemapLayer.html

  70. class Time extends Object

    Permalink

    This is the core internal game clock.

    This is the core internal game clock.

    It manages the elapsed time and calculation of elapsed values, used for game object motion and tweens, and also handles the standard Timer pool.

    To create a general timed event, use the master Phaser.Timer accessible through events.

    Annotations
    @RawJSType() @native() @JSName( "Phaser.Time" )
  71. class Timer extends Object

    Permalink

    A Timer is a way to create and manage timer events that wait for a specific duration and then run a callback.

    A Timer is a way to create and manage timer events that wait for a specific duration and then run a callback. Many different timer events, with individual delays, can be added to the same Timer.

    All Timer delays are in milliseconds (there are 1000 ms in 1 second); so a delay value of 250 represents a quarter of a second.

    Timers are based on real life time, adjusted for game pause durations. That is, timer events are based on elapsed game time and do not take physics time or slow motion into account.

    Annotations
    @RawJSType() @native() @JSName( "Phaser.Timer" )
  72. class TimerEvent extends Object

    Permalink

    A TimerEvent is a single event that is processed by a Phaser.Timer.

    A TimerEvent is a single event that is processed by a Phaser.Timer.

    It consists of a delay, which is a value in milliseconds after which the event will fire. When the event fires it calls a specific callback with the specified arguments.

    TimerEvents are removed by their parent timer once finished firing or repeating.

    Use Phaser.Timer#add, Phaser.Timer#repeat, or Phaser.Timer#loop methods to create a new event.

    Annotations
    @RawJSType() @native() @JSName( "Phaser.TimerEvent" )
  73. class Tween extends Object

    Permalink
    Annotations
    @RawJSType() @native() @JSName( "Phaser.Tween" )
  74. class Video extends Object

    Permalink

    A Video object that takes a previously loaded Video from the Phaser Cache and handles playback of it.

    A Video object that takes a previously loaded Video from the Phaser Cache and handles playback of it.

    Alternatively it takes a getUserMedia feed from an active webcam and streams the contents of that to the Video instead (see startMediaStream method)

    The video can then be applied to a Sprite as a texture. If multiple Sprites share the same Video texture and playback changes (i.e. you pause the video, or seek to a new time) then this change will be seen across all Sprites simultaneously.

    Due to a bug in IE11 you cannot play a video texture to a Sprite in WebGL. For IE11 force Canvas mode.

    If you need each Sprite to be able to play a video fully independently then you will need one Video object per Sprite. Please understand the obvious performance implications of doing this, and the memory required to hold videos in RAM.

    On some mobile browsers such as iOS Safari, you cannot play a video until the user has explicitly touched the screen. This works in the same way as audio unlocking. Phaser will handle the touch unlocking for you, however unlike with audio it's worth noting that every single Video needs to be touch unlocked, not just the first one. You can use the changeSource method to try and work around this limitation, but see the method help for details.

    Small screen devices, especially iPod and iPhone will launch the video in its own native video player, outside of the Safari browser. There is no way to avoid this, it's a device imposed limitation.

    Note: On iOS if you need to detect when the user presses the 'Done' button (before the video ends) then you need to add your own event listener

    Annotations
    @RawJSType() @native()
    See also

    http://phaser.io/docs/2.6.2/Phaser.Video.html

  75. class Weapon extends Object

    Permalink

    The Weapon Plugin provides the ability to easily create a bullet pool and manager.

    The Weapon Plugin provides the ability to easily create a bullet pool and manager.

    Weapons fire Phaser.Bullet objects, which are essentially Sprites with a few extra properties. The Bullets are enabled for Arcade Physics. They do not currently work with P2 Physics.

    The Bullets are created inside of Weapon.bullets, which is a Phaser.Group instance. Anything you can usually do with a Group, such as move it around the display list, iterate it, etc can be done to the bullets Group too.

    Bullets can have textures and even animations. You can control the speed at which they are fired, the firing rate, the firing angle, and even set things like gravity for them.

    A small example, assumed to be running from within a Phaser.State create method.

    Annotations
    @RawJSType() @native() @JSName( "Phaser.Weapon" )
    See also

    http://phaser.io/docs/2.6.2/Phaser.Weapon.html

  76. class World extends Object

    Permalink

    A game has only one world.

    A game has only one world. The world is an abstract place in which all game objects live. It is not bound by stage limits and can be any size. You look into the world via cameras. All game objects live within the world at world-based coordinates. By default a world is created the same size as your Stage.

    Annotations
    @RawJSType() @native()

Value Members

  1. object Animation extends Object

    Permalink

    Animation Singleton

    Animation Singleton

    Annotations
    @native() @JSName( "Phaser.Animation" )
  2. object Cache extends Object

    Permalink
    Annotations
    @native() @JSName( "Phaser.Cache" )
  3. object Canvas extends Object

    Permalink

    Canvas Singleton

    Canvas Singleton

    Annotations
    @native() @JSName( "Phaser.Canvas" )
  4. object CursorKeys extends Object with CursorKeys

    Permalink

    CursorKeys Singleton

    CursorKeys Singleton

    Annotations
    @native() @JSName( "Phaser.CursorKeys" )
  5. object Easing extends Object

    Permalink

    Phaser Easing Singleton

    Phaser Easing Singleton

    Annotations
    @native() @JSName( "Phaser.Easing" )
  6. object Ellipse extends Object

    Permalink

    Ellipse Singleton

    Ellipse Singleton

    Annotations
    @native() @JSName( "Phaser.Ellipse" )
  7. object Group extends Object

    Permalink

    Group Singleton

    Group Singleton

    Annotations
    @native() @JSName( "Phaser.Group" )
  8. object Input extends Object

    Permalink
    Annotations
    @native() @JSName( "Phaser.Input" )
  9. object Keyboard extends Object with Keyboard

    Permalink
    Annotations
    @native() @JSName( "Phaser.Keyboard" )
  10. object Math extends Math

    Permalink

    Phaser Math Singleton

    Phaser Math Singleton

    Annotations
    @native() @JSName( "Phaser.Math" )
  11. object Phaser extends Object

    Permalink

    phaser - A fast, free and fun HTML5 Game Framework for Desktop and Mobile web browsers.

    phaser - A fast, free and fun HTML5 Game Framework for Desktop and Mobile web browsers.

    Annotations
    @native() @JSName( "Phaser" )
    Version

    2.6.2

    See also

    https://www.npmjs.com/package/phaser

  12. object Physics extends Object

    Permalink

    Physics Singleton

    Physics Singleton

    Annotations
    @native() @JSName( "Phaser.Physics" )
  13. object Point extends Object

    Permalink

    Point Singleton

    Point Singleton

    Annotations
    @native()
  14. object Pointer extends Object

    Permalink

    Pointer Singleton

    Pointer Singleton

    Annotations
    @native() @JSName( "Phaser.Pointer" )
  15. object PointerMode extends Object

    Permalink

    Pointer Mode Singleton

    Pointer Mode Singleton

    Annotations
    @native() @JSName( "Phaser.PointerMode" )
  16. object Rectangle extends Object

    Permalink
    Annotations
    @native()
  17. object Tilemap extends Object

    Permalink

    Tilemap Singleton

    Tilemap Singleton

    Annotations
    @native() @JSName( "Phaser.Tilemap" )
  18. object Timer extends Object

    Permalink

    Timer Singleton

    Timer Singleton

    Annotations
    @native() @JSName( "Phaser.Timer" )
  19. object Weapon extends Object

    Permalink

    Weapon Singleton

    Weapon Singleton

    Annotations
    @native() @JSName( "Phaser.Weapon" )
  20. package component

    Permalink
  21. package physics

    Permalink
  22. package utils

    Permalink

Inherited from AnyRef

Inherited from Any

Ungrouped