Methods
-
CheapArray()
-
Low-budget Float32Array knock-off, suitable for use with P2.js in IE9 Source: http://www.html5gamedevs.com/topic/5988-phaser-12-ie9/ Cameron Foale (http://www.kibibu.com)
- Source:
-
clone() → {Phaser.Frame}
-
Clones this Frame into a new Phaser.Frame object and returns it. Note that all properties are cloned, including the name, index and UUID.
- Source:
Returns:
An exact copy of this Frame object.
- Type
- Phaser.Frame
-
clone() → {Phaser.FrameData}
-
Makes a copy of this FrameData including copies (not references) to all of the Frames it contains.
- Source:
Returns:
A clone of this object, including clones of the Frame objects it contains.
- Type
- Phaser.FrameData
-
createCustomLayer(width, height, children) → {Phaser.FlexLayer}
-
A custom layer is centered on the game and maintains its aspect ratio as it scales up and down.
Parameters:
Name Type Argument Description width
number Width of this layer in pixels.
height
number Height of this layer in pixels.
children
array <optional>
An array of children that are used to populate the FlexLayer.
- Source:
Returns:
The Layer object.
- Type
- Phaser.FlexLayer
-
createFixedLayer(children) → {Phaser.FlexLayer}
-
A fixed layer is centered on the game and is the size of the required dimensions and is never scaled.
Parameters:
Name Type Argument Description children
array <optional>
An array of children that are used to populate the FlexLayer.
- Source:
Returns:
The Layer object.
- Type
- Phaser.FlexLayer
-
createFluidLayer(children) → {Phaser.FlexLayer}
-
A fluid layer is centered on the game and maintains its aspect ratio as it scales up and down.
Parameters:
Name Type Argument Description children
array <optional>
An array of children that are used to populate the FlexLayer.
- Source:
Returns:
The Layer object.
- Type
- Phaser.FlexLayer
-
createFullLayer(children) → {Phaser.FlexLayer}
-
A full layer is placed at 0,0 and extends to the full size of the game. Children are scaled according to the fluid ratios.
Parameters:
Name Type Argument Description children
array <optional>
An array of children that are used to populate the FlexLayer.
- Source:
Returns:
The Layer object.
- Type
- Phaser.FlexLayer
-
debug()
-
Call in the render function to output the bounds rects.
- Source:
-
destroy()
-
Destroys the ScaleManager and removes any event listeners.
- Source:
-
destroy()
-
Removes all events.
- Source:
-
destroy()
-
Destroys this object and the associated event listeners.
- Source:
-
destroy()
-
Destroys this object and associated callback references.
- Source:
-
onResize(width, height)
-
Called when the game container changes dimensions.
Parameters:
Name Type Description width
number The new width of the game container.
height
number The new height of the game container.
- Source:
-
refresh()
-
Updates all internal vars such as the bounds and scale values.
- Source:
-
reset()
-
Resets the layer children references
- Source:
-
setMinMax(minWidth, minHeight, maxWidth, maxHeight)
-
Set the ScaleManager min and max dimensions in one single callback.
Parameters:
Name Type Description minWidth
number The minimum width the game is allowed to scale down to.
minHeight
number The minimum height the game is allowed to scale down to.
maxWidth
number The maximum width the game is allowed to scale up to.
maxHeight
number The maximum height the game is allowed to scale up to.
- Source:
-
setSize(width, height)
-
Sets the core game size. This resets the w/h parameters and bounds.
Parameters:
Name Type Description width
number The new dimensions.
height
number The new dimensions.
- Source:
-
updateDimensions(width, height, resize)
-
Called automatically when the game parent dimensions change.
Parameters:
Name Type Description width
number The new width of the parent container.
height
number The new height of the parent container.
resize
boolean True if the renderer should be resized, otherwise false to just update the internal vars.
- Source: