mirror of
https://github.com/photonstorm/phaser
synced 2024-12-21 02:23:29 +00:00
1 line
No EOL
19 KiB
JSON
1 line
No EOL
19 KiB
JSON
{"class":{"name":"Phaser.Utils.Debug","extends":"","static":false,"constructor":true,"parameters":[{"name":"game","type":["Phaser.Game"],"help":"A reference to the currently running game.","optional":false,"default":null}],"help":"A collection of methods for displaying debug information about game objects.\\nIf your game is running in WebGL then Debug will create a Sprite that is placed at the top of the Stage display list and bind a canvas texture\\nto it, which must be uploaded every frame. Be advised: this is expenive.\\nIf your game is using a Canvas renderer then the debug information is literally drawn on the top of the active game canvas and no Sprite is used."},"consts":[],"methods":{"public":[{"name":"body","static":false,"returns":null,"help":"Render a Sprites Physics body if it has one set. Note this only works for Arcade and\\nNinja (AABB, circle only) Physics.\\nTo display a P2 body you should enable debug mode on the body when creating it.","line":739,"public":true,"protected":false,"private":false,"parameters":[{"name":"sprite","type":["Phaser.Sprite"],"help":"The sprite whos body will be rendered.","optional":false,"default":null},{"name":"color","type":["string"],"help":"color of the debug info to be rendered. (format is css color string).","optional":true,"default":"'rgba(0,255,0,0.4)'"},{"name":"filled","type":["boolean"],"help":"Render the objected as a filled (default, true) or a stroked (false)","optional":true,"default":"true"}],"inherited":false,"inheritedFrom":""},{"name":"bodyInfo","static":false,"returns":null,"help":"Render a Sprites Physic Body information.","line":772,"public":true,"protected":false,"private":false,"parameters":[{"name":"sprite","type":["Phaser.Sprite"],"help":"The sprite to be rendered.","optional":false,"default":null},{"name":"x","type":["number"],"help":"X position of the debug info to be rendered.","optional":false,"default":null},{"name":"y","type":["number"],"help":"Y position of the debug info to be rendered.","optional":false,"default":null},{"name":"color","type":["string"],"help":"color of the debug info to be rendered. (format is css color string).","optional":true,"default":"'rgb(255,255,255)'"}],"inherited":false,"inheritedFrom":""},{"name":"box2dBody","static":false,"returns":null,"help":"Renders 'debug draw' data for the given Box2D body.\\nThis uses the standard debug drawing feature of Box2D, so colors will be decided by the Box2D engine.","line":818,"public":true,"protected":false,"private":false,"parameters":[{"name":"sprite","type":["Phaser.Sprite"],"help":"The sprite whos body will be rendered.","optional":false,"default":null},{"name":"color","type":["string"],"help":"color of the debug info to be rendered. (format is css color string).","optional":true,"default":"'rgb(0,255,0)'"}],"inherited":false,"inheritedFrom":""},{"name":"box2dWorld","static":false,"returns":null,"help":"Renders 'debug draw' data for the Box2D world if it exists.\\nThis uses the standard debug drawing feature of Box2D, so colors will be decided by\\nthe Box2D engine.","line":799,"public":true,"protected":false,"private":false,"parameters":[],"inherited":false,"inheritedFrom":""},{"name":"cameraInfo","static":false,"returns":null,"help":"Render camera information including dimensions and location.","line":284,"public":true,"protected":false,"private":false,"parameters":[{"name":"camera","type":["Phaser.Camera"],"help":"The Phaser.Camera to show the debug information for.","optional":false,"default":null},{"name":"x","type":["number"],"help":"X position of the debug info to be rendered.","optional":false,"default":null},{"name":"y","type":["number"],"help":"Y position of the debug info to be rendered.","optional":false,"default":null},{"name":"color","type":["string"],"help":"color of the debug info to be rendered. (format is css color string).","optional":true,"default":"'rgb(255,255,255)'"}],"inherited":false,"inheritedFrom":""},{"name":"geom","static":false,"returns":null,"help":"Renders a Rectangle.","line":635,"public":true,"protected":false,"private":false,"parameters":[{"name":"object","type":["Phaser.Rectangle","object"],"help":"The geometry object to render.","optional":false,"default":null},{"name":"color","type":["string"],"help":"Color of the debug info to be rendered (format is css color string).","optional":true,"default":null},{"name":"filled","type":["boolean"],"help":"Render the objected as a filled (default, true) or a stroked (false)","optional":true,"default":"true"}],"inherited":false,"inheritedFrom":""},{"name":"inputInfo","static":false,"returns":null,"help":"Render debug information about the Input object.","line":429,"public":true,"protected":false,"private":false,"parameters":[{"name":"x","type":["number"],"help":"X position of the debug info to be rendered.","optional":false,"default":null},{"name":"y","type":["number"],"help":"Y position of the debug info to be rendered.","optional":false,"default":null},{"name":"color","type":["string"],"help":"color of the debug info to be rendered. (format is css color string).","optional":true,"default":"'rgb(255,255,255)'"}],"inherited":false,"inheritedFrom":""},{"name":"key","static":false,"returns":null,"help":"Renders Phaser.Key object information.","line":409,"public":true,"protected":false,"private":false,"parameters":[{"name":"key","type":["Phaser.Key"],"help":"The Key to render the information for.","optional":false,"default":null},{"name":"x","type":["number"],"help":"X position of the debug info to be rendered.","optional":false,"default":null},{"name":"y","type":["number"],"help":"Y position of the debug info to be rendered.","optional":false,"default":null},{"name":"color","type":["string"],"help":"color of the debug info to be rendered. (format is css color string).","optional":true,"default":"'rgb(255,255,255)'"}],"inherited":false,"inheritedFrom":""},{"name":"lineInfo","static":false,"returns":null,"help":"Renders Line information in the given color.","line":532,"public":true,"protected":false,"private":false,"parameters":[{"name":"line","type":["Phaser.Line"],"help":"The Line to display the data for.","optional":false,"default":null},{"name":"x","type":["number"],"help":"X position of the debug info to be rendered.","optional":false,"default":null},{"name":"y","type":["number"],"help":"Y position of the debug info to be rendered.","optional":false,"default":null},{"name":"color","type":["string"],"help":"color of the debug info to be rendered. (format is css color string).","optional":true,"default":"'rgb(255,255,255)'"}],"inherited":false,"inheritedFrom":""},{"name":"pixel","static":false,"returns":null,"help":"Renders a single pixel at the given size.","line":551,"public":true,"protected":false,"private":false,"parameters":[{"name":"x","type":["number"],"help":"X position of the pixel to be rendered.","optional":false,"default":null},{"name":"y","type":["number"],"help":"Y position of the pixel to be rendered.","optional":false,"default":null},{"name":"color","type":["string"],"help":"Color of the pixel (format is css color string).","optional":true,"default":null},{"name":"size","type":["number"],"help":"The 'size' to render the pixel at.","optional":true,"default":"2"}],"inherited":false,"inheritedFrom":""},{"name":"pointer","static":false,"returns":null,"help":"Renders the Pointer.circle object onto the stage in green if down or red if up along with debug text.","line":329,"public":true,"protected":false,"private":false,"parameters":[{"name":"pointer","type":["Phaser.Pointer"],"help":"The Pointer you wish to display.","optional":false,"default":null},{"name":"hideIfUp","type":["boolean"],"help":"Doesn't render the circle if the pointer is up.","optional":true,"default":"false"},{"name":"downColor","type":["string"],"help":"The color the circle is rendered in if down.","optional":true,"default":"'rgba(0,255,0,0.5)'"},{"name":"upColor","type":["string"],"help":"The color the circle is rendered in if up (and hideIfUp is false).","optional":true,"default":"'rgba(255,0,0,0.5)'"},{"name":"color","type":["string"],"help":"color of the debug info to be rendered. (format is css color string).","optional":true,"default":"'rgb(255,255,255)'"}],"inherited":false,"inheritedFrom":""},{"name":"preUpdate","static":false,"returns":null,"help":"Internal method that clears the canvas (if a Sprite) ready for a new debug session.","line":132,"public":true,"protected":false,"private":false,"parameters":[],"inherited":false,"inheritedFrom":""},{"name":"quadTree","static":false,"returns":null,"help":"Visually renders a QuadTree to the display.","line":696,"public":true,"protected":false,"private":false,"parameters":[{"name":"quadtree","type":["Phaser.QuadTree"],"help":"The quadtree to render.","optional":false,"default":null},{"name":"color","type":["string"],"help":"The color of the lines in the quadtree.","optional":false,"default":null}],"inherited":false,"inheritedFrom":""},{"name":"reset","static":false,"returns":null,"help":"Clears the Debug canvas.","line":147,"public":true,"protected":false,"private":false,"parameters":[],"inherited":false,"inheritedFrom":""},{"name":"ropeSegments","static":false,"returns":null,"help":"Renders the Rope's segments. Note: This is really expensive as it has to calculate new segments everytime you call it","line":467,"public":true,"protected":false,"private":false,"parameters":[{"name":"rope","type":["Phaser.Rope"],"help":"The rope to display the segments of.","optional":false,"default":null},{"name":"color","type":["string"],"help":"Color of the debug info to be rendered (format is css color string).","optional":true,"default":null},{"name":"filled","type":["boolean"],"help":"Render the rectangle as a fillRect (default, true) or a strokeRect (false)","optional":true,"default":"true"}],"inherited":false,"inheritedFrom":""},{"name":"soundInfo","static":false,"returns":null,"help":"Render Sound information, including decoded state, duration, volume and more.","line":253,"public":true,"protected":false,"private":false,"parameters":[{"name":"sound","type":["Phaser.Sound"],"help":"The sound object to debug.","optional":false,"default":null},{"name":"x","type":["number"],"help":"X position of the debug info to be rendered.","optional":false,"default":null},{"name":"y","type":["number"],"help":"Y position of the debug info to be rendered.","optional":false,"default":null},{"name":"color","type":["string"],"help":"color of the debug info to be rendered. (format is css color string).","optional":true,"default":"'rgb(255,255,255)'"}],"inherited":false,"inheritedFrom":""},{"name":"spriteBounds","static":false,"returns":null,"help":"Renders the Sprites bounds. Note: This is really expensive as it has to calculate the bounds every time you call it!","line":449,"public":true,"protected":false,"private":false,"parameters":[{"name":"sprite","type":["Phaser.Sprite","Phaser.Image"],"help":"The sprite to display the bounds of.","optional":false,"default":null},{"name":"color","type":["string"],"help":"Color of the debug info to be rendered (format is css color string).","optional":true,"default":null},{"name":"filled","type":["boolean"],"help":"Render the rectangle as a fillRect (default, true) or a strokeRect (false)","optional":true,"default":"true"}],"inherited":false,"inheritedFrom":""},{"name":"spriteCoords","static":false,"returns":null,"help":"Renders the sprite coordinates in local, positional and world space.","line":506,"public":true,"protected":false,"private":false,"parameters":[{"name":"sprite","type":["Phaser.Sprite","Phaser.Image"],"help":"The sprite to display the coordinates for.","optional":false,"default":null},{"name":"x","type":["number"],"help":"X position of the debug info to be rendered.","optional":false,"default":null},{"name":"y","type":["number"],"help":"Y position of the debug info to be rendered.","optional":false,"default":null},{"name":"color","type":["string"],"help":"color of the debug info to be rendered. (format is css color string).","optional":true,"default":"'rgb(255,255,255)'"}],"inherited":false,"inheritedFrom":""},{"name":"spriteInfo","static":false,"returns":null,"help":"Render debug infos (including name, bounds info, position and some other properties) about the Sprite.","line":484,"public":true,"protected":false,"private":false,"parameters":[{"name":"sprite","type":["Phaser.Sprite"],"help":"The Sprite to display the information of.","optional":false,"default":null},{"name":"x","type":["number"],"help":"X position of the debug info to be rendered.","optional":false,"default":null},{"name":"y","type":["number"],"help":"Y position of the debug info to be rendered.","optional":false,"default":null},{"name":"color","type":["string"],"help":"color of the debug info to be rendered. (format is css color string).","optional":true,"default":"'rgb(255,255,255)'"}],"inherited":false,"inheritedFrom":""},{"name":"spriteInputInfo","static":false,"returns":null,"help":"Render Sprite Input Debug information.","line":388,"public":true,"protected":false,"private":false,"parameters":[{"name":"sprite","type":["Phaser.Sprite","Phaser.Image"],"help":"The sprite to display the input data for.","optional":false,"default":null},{"name":"x","type":["number"],"help":"X position of the debug info to be rendered.","optional":false,"default":null},{"name":"y","type":["number"],"help":"Y position of the debug info to be rendered.","optional":false,"default":null},{"name":"color","type":["string"],"help":"color of the debug info to be rendered. (format is css color string).","optional":true,"default":"'rgb(255,255,255)'"}],"inherited":false,"inheritedFrom":""},{"name":"text","static":false,"returns":null,"help":"Render a string of text.","line":668,"public":true,"protected":false,"private":false,"parameters":[{"name":"text","type":["string"],"help":"The line of text to draw.","optional":false,"default":null},{"name":"x","type":["number"],"help":"X position of the debug info to be rendered.","optional":false,"default":null},{"name":"y","type":["number"],"help":"Y position of the debug info to be rendered.","optional":false,"default":null},{"name":"color","type":["string"],"help":"Color of the debug info to be rendered (format is css color string).","optional":true,"default":null},{"name":"font","type":["string"],"help":"The font of text to draw.","optional":true,"default":null}],"inherited":false,"inheritedFrom":""},{"name":"timer","static":false,"returns":null,"help":"Render Timer information.","line":309,"public":true,"protected":false,"private":false,"parameters":[{"name":"timer","type":["Phaser.Timer"],"help":"The Phaser.Timer to show the debug information for.","optional":false,"default":null},{"name":"x","type":["number"],"help":"X position of the debug info to be rendered.","optional":false,"default":null},{"name":"y","type":["number"],"help":"Y position of the debug info to be rendered.","optional":false,"default":null},{"name":"color","type":["string"],"help":"color of the debug info to be rendered. (format is css color string).","optional":true,"default":"'rgb(255,255,255)'"}],"inherited":false,"inheritedFrom":""}],"protected":[{"name":"boot","static":false,"returns":null,"help":"Internal method that boots the debug displayer.","line":108,"public":false,"protected":true,"private":false,"parameters":[],"inherited":false,"inheritedFrom":""},{"name":"line","static":false,"returns":null,"help":"Internal method that outputs a single line of text split over as many columns as needed, one per parameter.","line":222,"public":false,"protected":true,"private":false,"parameters":[],"inherited":false,"inheritedFrom":""},{"name":"start","static":false,"returns":null,"help":"Internal method that resets and starts the debug output values.","line":171,"public":false,"protected":true,"private":false,"parameters":[{"name":"x","type":["number"],"help":"The X value the debug info will start from.","optional":true,"default":"0"},{"name":"y","type":["number"],"help":"The Y value the debug info will start from.","optional":true,"default":"0"},{"name":"color","type":["string"],"help":"The color the debug text will drawn in.","optional":true,"default":"'rgb(255,255,255)'"},{"name":"columnWidth","type":["number"],"help":"The spacing between columns.","optional":true,"default":"0"}],"inherited":false,"inheritedFrom":""},{"name":"stop","static":false,"returns":null,"help":"Internal method that stops the debug output.","line":204,"public":false,"protected":true,"private":false,"parameters":[],"inherited":false,"inheritedFrom":""}],"private":[],"static":[]},"properties":{"public":[{"name":"baseTexture","type":["PIXI.BaseTexture"],"help":"","inlineHelp":"Required Pixi var.","line":37,"default":null,"public":true,"protected":false,"private":false,"readOnly":false},{"name":"canvas","type":["HTMLCanvasElement"],"help":"","inlineHelp":"The canvas to which this BitmapData draws.","line":32,"default":null,"public":true,"protected":false,"private":false,"readOnly":false},{"name":"columnWidth","type":["number"],"help":"","inlineHelp":"The spacing between columns.","line":63,"default":null,"public":true,"protected":false,"private":false,"readOnly":false},{"name":"context","type":["CanvasRenderingContext2D"],"help":"","inlineHelp":"The 2d context of the canvas.","line":52,"default":null,"public":true,"protected":false,"private":false,"readOnly":false},{"name":"currentAlpha","type":["number"],"help":"","inlineHelp":"The current alpha the debug information will be rendered at.","line":91,"default":"1","public":true,"protected":false,"private":false,"readOnly":false},{"name":"currentX","type":["number"],"help":"","inlineHelp":"The current X position the debug information will be rendered at.","line":79,"default":"0","public":true,"protected":false,"private":false,"readOnly":false},{"name":"currentY","type":["number"],"help":"","inlineHelp":"The current Y position the debug information will be rendered at.","line":85,"default":"0","public":true,"protected":false,"private":false,"readOnly":false},{"name":"dirty","type":["boolean"],"help":"","inlineHelp":"Does the canvas need re-rendering?","line":96,"default":null,"public":true,"protected":false,"private":false,"readOnly":false},{"name":"font","type":["string"],"help":"","inlineHelp":"The font that the debug information is rendered in.","line":58,"default":"'14px Courier'","public":true,"protected":false,"private":false,"readOnly":false},{"name":"game","type":["Phaser.Game"],"help":"","inlineHelp":"A reference to the currently running Game.","line":22,"default":null,"public":true,"protected":false,"private":false,"readOnly":false},{"name":"lineHeight","type":["number"],"help":"","inlineHelp":"The line height between the debug text.","line":68,"default":null,"public":true,"protected":false,"private":false,"readOnly":false},{"name":"renderShadow","type":["boolean"],"help":"","inlineHelp":"Should the text be rendered with a slight shadow? Makes it easier to read on different types of background.","line":73,"default":null,"public":true,"protected":false,"private":false,"readOnly":false},{"name":"sprite","type":["PIXI.Sprite"],"help":"","inlineHelp":"If debugging in WebGL mode we need this.","line":27,"default":null,"public":true,"protected":false,"private":false,"readOnly":false},{"name":"texture","type":["PIXI.Texture"],"help":"","inlineHelp":"Required Pixi var.","line":42,"default":null,"public":true,"protected":false,"private":false,"readOnly":false},{"name":"textureFrame","type":["Phaser.Frame"],"help":"","inlineHelp":"Dimensions of the renderable area.","line":47,"default":null,"public":true,"protected":false,"private":false,"readOnly":false}],"protected":[],"private":[]}} |