mirror of
https://github.com/photonstorm/phaser
synced 2024-12-21 10:33:35 +00:00
1 line
19 KiB
JSON
1 line
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":[{"na
|