Graphics#fixedToCamera

fixedToCamera : boolean A Game Object that is "fixed" to the camera uses its x/y coordinates as offsets from the top left of the camera during rendering. The values are adjusted at the rendering stage, overriding the Game Objects actual world position. The end result is that the Game Object will appear to be 'fixed' to the camera, regardless of where in the game worldthe camera is viewing. This is useful if for example this Game Object is a UI item that you wish to be visible at all timesrega

AnimationParser.JSONDataPyxel()

<static> JSONDataPyxel(game, json) → {Phaser.FrameData} Parse the JSON data and extract the animation frame data from it. Parameters Name Type Description game Phaser.Game A reference to the currently running game. json object The JSON data from the Texture Atlas. Must be in Pyxel JSON format. Returns Phaser.FrameData - A FrameData object containing the parsed frames. Source code: animation/AnimationParser.js (Line 147)

Image#moveDown()

moveDown() → {PIXI.DisplayObject} Moves this Game Object down one place in its parents display list.This call has no effect if the Game Object is already at the bottom of the display list. If this Game Object hasn't been added to a custom Group then this method will move it one object down within the Game World,because the World is the root Group from which all Game Objects descend. Returns PIXI.DisplayObject - This instance. Inherited From Phaser.Component.BringToTop#moveDown Source

World#moveDown()

moveDown(child) → {any} Moves the given child down one place in this group unless it's already at the bottom. Parameters Name Type Description child any The child to move down in the group. Returns any - The child that was moved. Inherited From Phaser.Group#moveDown Source code: core/Group.js (Line 969)

AnimationParser.spriteSheet()

<static> spriteSheet(game, key, frameWidth, frameHeight, frameMax, margin, spacing) → {Phaser.FrameData} Parse a Sprite Sheet and extract the animation frame data from it. Parameters Name Type Argument Default Description game Phaser.Game A reference to the currently running game. key string | Image The Game.Cache asset key of the Sprite Sheet image or an actual HTML Image element. frameWidth number The fixed width of each frame of the animation. frameHeight number

BitmapData#getPixel()

getPixel(x, y, out) → {object} Get the color of a specific pixel in the context into a color object.If you have drawn anything to the BitmapData since it was created you must call BitmapData.update to refresh the array buffer,otherwise this may return out of date color values, or worse - throw a run-time error as it tries to access an array element that doesn't exist. Parameters Name Type Argument Description x number The x coordinate of the pixel to be set. Must lay within the dimension

Graphics#previousPosition

[readonly] previousPosition : Phaser.Point The position the Game Object was located in the previous frame. Inherited From Phaser.Component.Core#previousPosition Source code: gameobjects/components/Core.js (Line 225)

FrameData#getFrame()

getFrame(index) → {Phaser.Frame} Get a Frame by its numerical index. Parameters Name Type Description index number The index of the frame you want to get. Returns Phaser.Frame - The frame, if found. Source code: animation/FrameData.js (Line 53)

Math#sinCosGenerator()

sinCosGenerator(length, sinAmplitude, cosAmplitude, frequency) → {Object} Generate a sine and cosine table simultaneously and extremely quickly.The parameters allow you to specify the length, amplitude and frequency of the wave.This generator is fast enough to be used in real-time.Code based on research by Franky of scene.at Parameters Name Type Description length number The length of the wave sinAmplitude number The amplitude to apply to the sine table (default 1.0) if you need values b

Physics.Arcade#moveToXY()

moveToXY(displayObject, x, y, speed, maxTime) → {number} Move the given display object towards the x/y coordinates at a steady velocity.If you specify a maxTime then it will adjust the speed (over-writing what you set) so it arrives at the destination in that number of seconds.Timings are approximate due to the way browser timers work. Allow for a variance of +- 50ms.Note: The display object does not continuously track the target. If the target changes location during transit the display obje