mirror of
https://github.com/photonstorm/phaser
synced 2024-12-02 17:41:06 +00:00
1 line
No EOL
14 KiB
JSON
Executable file
1 line
No EOL
14 KiB
JSON
Executable file
{"class":{"name":"Phaser.TilemapLayer","extends":"","static":false,"constructor":true,"parameters":[{"name":"game","type":["Phaser.Game"],"help":"Game reference to the currently running game.","optional":false,"default":null},{"name":"tilemap","type":["Phaser.Tilemap"],"help":"The tilemap to which this layer belongs.","optional":false,"default":null},{"name":"index","type":["number"],"help":"The layer index within the map that this TilemapLayer represents.","optional":false,"default":null},{"name":"width","type":["number"],"help":"Width of the renderable area of the layer.","optional":false,"default":null},{"name":"height","type":["number"],"help":"Height of the renderable area of the layer.","optional":false,"default":null}],"help":"A Tilemap Layer is a set of map data combined with a Tileset in order to render that data to the game."},"consts":[],"methods":{"public":[{"name":"getRayCastTiles","static":false,"returns":{"types":["array Phaser.Tile"],"help":"An array of Phaser.Tiles."},"help":"Gets all tiles that intersect with the given line.","line":399,"public":true,"protected":false,"private":false,"parameters":[{"name":"line","type":["Phaser.Line"],"help":"The line used to determine which tiles to return.","optional":false,"default":null},{"name":"stepRate","type":["number"],"help":"How many steps through the ray will we check? If undefined or null it uses TilemapLayer.rayStepRate.","optional":true,"default":null},{"name":"collides","type":["boolean"],"help":"If true only return tiles that collide on one or more faces.","optional":true,"default":"false"},{"name":"interestingFace","type":["boolean"],"help":"If true only return tiles that have interesting faces.","optional":true,"default":"false"}],"inherited":false,"inheritedFrom":""},{"name":"getTileX","static":false,"returns":{"types":["Phaser.Tile"],"help":"The tile with specific properties."},"help":"Convert a pixel value to a tile coordinate.","line":347,"public":true,"protected":false,"private":false,"parameters":[{"name":"x","type":["number"],"help":"X position of the point in target tile.","optional":false,"default":null}],"inherited":false,"inheritedFrom":""},{"name":"getTileXY","static":false,"returns":{"types":["Phaser.Point","object"],"help":"A Point object with its x and y properties set."},"help":"Convert a pixel value to a tile coordinate.","line":379,"public":true,"protected":false,"private":false,"parameters":[{"name":"x","type":["number"],"help":"X position of the point in target tile.","optional":false,"default":null},{"name":"y","type":["number"],"help":"Y position of the point in target tile.","optional":false,"default":null},{"name":"point","type":["Phaser.Point","object"],"help":"The Point object to set the x and y values on.","optional":false,"default":null}],"inherited":false,"inheritedFrom":""},{"name":"getTileY","static":false,"returns":{"types":["Phaser.Tile"],"help":"The tile with specific properties."},"help":"Convert a pixel value to a tile coordinate.","line":362,"public":true,"protected":false,"private":false,"parameters":[{"name":"y","type":["number"],"help":"Y position of the point in target tile.","optional":false,"default":null}],"inherited":false,"inheritedFrom":""},{"name":"getTiles","static":false,"returns":{"types":["array Phaser.Tile"],"help":"An array of Phaser.Tiles."},"help":"Get all tiles that exist within the given area, defined by the top-left corner, width and height. Values given are in pixels, not tiles.","line":446,"public":true,"protected":false,"private":false,"parameters":[{"name":"x","type":["number"],"help":"X position of the top left corner.","optional":false,"default":null},{"name":"y","type":["number"],"help":"Y position of the top left corner.","optional":false,"default":null},{"name":"width","type":["number"],"help":"Width of the area to get.","optional":false,"default":null},{"name":"height","type":["number"],"help":"Height of the area to get.","optional":false,"default":null},{"name":"collides","type":["boolean"],"help":"If true only return tiles that collide on one or more faces.","optional":true,"default":"false"},{"name":"interestingFace","type":["boolean"],"help":"If true only return tiles that have interesting faces.","optional":true,"default":"false"}],"inherited":false,"inheritedFrom":""},{"name":"postUpdate","static":false,"returns":null,"help":"Automatically called by World.postUpdate. Handles cache updates.","line":213,"public":true,"protected":false,"private":false,"parameters":[],"inherited":false,"inheritedFrom":""},{"name":"render","static":false,"returns":null,"help":"Renders the tiles to the layer canvas and pushes to the display.","line":512,"public":true,"protected":false,"private":false,"parameters":[],"inherited":false,"inheritedFrom":""},{"name":"renderDebug","static":false,"returns":null,"help":"Renders a collision debug overlay on-top of the canvas. Called automatically by render when debug = true.","line":630,"public":true,"protected":false,"private":false,"parameters":[],"inherited":false,"inheritedFrom":""},{"name":"resizeWorld","static":false,"returns":null,"help":"Sets the world size to match the size of this layer.","line":244,"public":true,"protected":false,"private":false,"parameters":[],"inherited":false,"inheritedFrom":""},{"name":"updateMax","static":false,"returns":null,"help":"Internal function to update maximum values.","line":498,"public":true,"protected":false,"private":false,"parameters":[],"inherited":false,"inheritedFrom":""}],"protected":[],"private":[{"name":"_fixX","static":false,"returns":{"types":["number"],"help":"x coordinate in scrollFactor-adjusted dimensions"},"help":"Take an x coordinate that doesn't account for scrollFactorX and 'fix' it\\ninto a scrolled local space. Used primarily internally","line":259,"public":false,"protected":false,"private":true,"parameters":[{"name":"x","type":["number"],"help":"x coordinate in camera space","optional":false,"default":null}],"inherited":false,"inheritedFrom":""},{"name":"_fixY","static":false,"returns":{"types":["number"],"help":"y coordinate in scrollFactor-adjusted dimensions"},"help":"Take a y coordinate that doesn't account for scrollFactorY and 'fix' it\\ninto a scrolled local space. Used primarily internally","line":304,"public":false,"protected":false,"private":true,"parameters":[{"name":"y","type":["number"],"help":"y coordinate in camera space","optional":false,"default":null}],"inherited":false,"inheritedFrom":""},{"name":"_unfixX","static":false,"returns":{"types":["number"],"help":"x coordinate in camera space"},"help":"Take an x coordinate that _does_ account for scrollFactorX and 'unfix' it\\nback to camera space. Used primarily internally","line":284,"public":false,"protected":false,"private":true,"parameters":[{"name":"x","type":["number"],"help":"x coordinate in scrollFactor-adjusted dimensions","optional":false,"default":null}],"inherited":false,"inheritedFrom":""},{"name":"_unfixY","static":false,"returns":{"types":["number"],"help":"y coordinate in camera space"},"help":"Take a y coordinate that _does_ account for scrollFactorY and 'unfix' it\\nback to camera space. Used primarily internally","line":329,"public":false,"protected":false,"private":true,"parameters":[{"name":"y","type":["number"],"help":"y coordinate in scrollFactor-adjusted dimensions","optional":false,"default":null}],"inherited":false,"inheritedFrom":""}],"static":[]},"properties":{"public":[{"name":"baseTexture","type":["PIXI.BaseTexture"],"help":"","inlineHelp":"Required Pixi var.","line":53,"default":null,"public":true,"protected":false,"private":false,"readOnly":false},{"name":"cameraOffset","type":["Phaser.Point"],"help":"","inlineHelp":"If this object is fixed to the camera then use this Point to specify how far away from the Camera x\/y it's rendered.","line":88,"default":null,"public":true,"protected":false,"private":false,"readOnly":false},{"name":"canvas","type":["HTMLCanvasElement"],"help":"","inlineHelp":"The canvas to which this TilemapLayer draws.","line":43,"default":null,"public":true,"protected":false,"private":false,"readOnly":false},{"name":"collisionHeight","type":["number"],"help":"","inlineHelp":"The height of the collision tiles.","line":794,"default":null,"public":true,"protected":false,"private":false,"readOnly":false},{"name":"collisionWidth","type":["number"],"help":"","inlineHelp":"The width of the collision tiles.","line":774,"default":null,"public":true,"protected":false,"private":false,"readOnly":false},{"name":"context","type":["CanvasRenderingContext2D"],"help":"","inlineHelp":"The 2d context of the canvas.","line":48,"default":null,"public":true,"protected":false,"private":false,"readOnly":false},{"name":"debug","type":["boolean"],"help":"","inlineHelp":"If set to true the collideable tile edges path will be rendered. Only works when game is running in Phaser.CANVAS mode.","line":100,"default":"false","public":true,"protected":false,"private":false,"readOnly":false},{"name":"debugAlpha","type":["number"],"help":"","inlineHelp":"If debug is true then the tileset is rendered with this alpha level, to make the tile edges clearer.","line":106,"default":"0.5","public":true,"protected":false,"private":false,"readOnly":false},{"name":"debugCallbackColor","type":["string"],"help":"","inlineHelp":"If debug is true this is the color used to outline the edges of tiles that have collision callbacks. Provide in hex or rgb\/rgba string format.","line":130,"default":"'rgba(255, 0, 0, 1)'","public":true,"protected":false,"private":false,"readOnly":false},{"name":"debugColor","type":["string"],"help":"","inlineHelp":"If debug is true this is the color used to outline the edges of collidable tiles. Provide in hex or rgb\/rgba string format.","line":112,"default":"'rgba(0, 255, 0, 1)'","public":true,"protected":false,"private":false,"readOnly":false},{"name":"debugFill","type":["boolean"],"help":"","inlineHelp":"If true the debug tiles are filled with debugFillColor AND stroked around.","line":118,"default":"false","public":true,"protected":false,"private":false,"readOnly":false},{"name":"debugFillColor","type":["string"],"help":"","inlineHelp":"If debugFill is true this is the color used to fill the tiles. Provide in hex or rgb\/rgba string format.","line":124,"default":"'rgba(0, 255, 0, 0.2)'","public":true,"protected":false,"private":false,"readOnly":false},{"name":"dirty","type":["boolean"],"help":"","inlineHelp":"Flag controlling when to re-render the layer.","line":151,"default":null,"public":true,"protected":false,"private":false,"readOnly":false},{"name":"fixedToCamera","type":["boolean"],"help":"An object that is fixed to the camera ignores the position of any ancestors in the display list and uses its x\/y coordinates as offsets from the top left of the camera.","inlineHelp":"Fixes this object to the Camera.","line":83,"default":"true","public":true,"protected":false,"private":false,"readOnly":false},{"name":"game","type":["Phaser.Game"],"help":"","inlineHelp":"A reference to the currently running Game.","line":23,"default":null,"public":true,"protected":false,"private":false,"readOnly":false},{"name":"index","type":["number"],"help":"","inlineHelp":"The index of this layer within the Tilemap.","line":33,"default":null,"public":true,"protected":false,"private":false,"readOnly":false},{"name":"layer","type":["object"],"help":"","inlineHelp":"The layer object within the Tilemap that this layer represents.","line":38,"default":null,"public":true,"protected":false,"private":false,"readOnly":false},{"name":"map","type":["Phaser.Tilemap"],"help":"","inlineHelp":"The Tilemap to which this layer is bound.","line":28,"default":null,"public":true,"protected":false,"private":false,"readOnly":false},{"name":"name","type":["string"],"help":"","inlineHelp":"The name of the layer.","line":70,"default":null,"public":true,"protected":false,"private":false,"readOnly":false},{"name":"rayStepRate","type":["number"],"help":"","inlineHelp":"When ray-casting against tiles this is the number of steps it will jump. For larger tile sizes you can increase this to improve performance.","line":157,"default":"4","public":true,"protected":false,"private":false,"readOnly":false},{"name":"scrollFactorX","type":["number"],"help":"horizontally, relative to the camera (e.g. scrollFactorX of 0.5 scrolls\\nhalf as quickly as the 'normal' camera-locked layers do)","inlineHelp":"speed at which this layer scrolls","line":138,"default":"1","public":true,"protected":false,"private":false,"readOnly":false},{"name":"scrollFactorY","type":["number"],"help":"vertically, relative to the camera (e.g. scrollFactorY of 0.5 scrolls\\nhalf as quickly as the 'normal' camera-locked layers do)","inlineHelp":"speed at which this layer scrolls","line":146,"default":"1","public":true,"protected":false,"private":false,"readOnly":false},{"name":"scrollX","type":["number"],"help":"","inlineHelp":"Scrolls the map horizontally or returns the current x position.","line":728,"default":null,"public":true,"protected":false,"private":false,"readOnly":false},{"name":"scrollY","type":["number"],"help":"","inlineHelp":"Scrolls the map vertically or returns the current y position.","line":751,"default":null,"public":true,"protected":false,"private":false,"readOnly":false},{"name":"texture","type":["PIXI.Texture"],"help":"","inlineHelp":"Required Pixi var.","line":58,"default":null,"public":true,"protected":false,"private":false,"readOnly":false},{"name":"textureFrame","type":["Phaser.Frame"],"help":"","inlineHelp":"Dimensions of the renderable area.","line":63,"default":null,"public":true,"protected":false,"private":false,"readOnly":false},{"name":"tileColor","type":["string"],"help":"","inlineHelp":"If no tileset is given the tiles will be rendered as rectangles in this color. Provide in hex or rgb\/rgba string format.","line":94,"default":"'rgb(255, 255, 255)'","public":true,"protected":false,"private":false,"readOnly":false},{"name":"type","type":["number"],"help":"","inlineHelp":"The const type of this object.","line":76,"default":"Phaser.TILEMAPLAYER","public":true,"protected":false,"private":false,"readOnly":false},{"name":"wrap","type":["boolean"],"help":"","inlineHelp":"Flag controlling if the layer tiles wrap at the edges. Only works if the World size matches the Map size.","line":163,"default":"false","public":true,"protected":false,"private":false,"readOnly":false}],"protected":[],"private":[{"name":"_mc","type":["object"],"help":"","inlineHelp":"Local map data and calculation cache.","line":169,"default":null,"public":false,"protected":false,"private":true,"readOnly":false},{"name":"_results","type":["array"],"help":"","inlineHelp":"Local render loop var to help avoid gc spikes.","line":198,"default":null,"public":false,"protected":false,"private":true,"readOnly":false}]}} |