phaser/v2/resources/docgen/output/Phaser.Camera.json
2016-11-23 00:17:46 +00:00

1 line
No EOL
10 KiB
JSON
Executable file

{"class":{"name":"Phaser.Camera","extends":"","static":false,"constructor":true,"parameters":[{"name":"game","type":["Phaser.Game"],"help":"Game reference to the currently running game.","optional":false,"default":null},{"name":"id","type":["number"],"help":"Not being used at the moment, will be when Phaser supports multiple camera","optional":false,"default":null},{"name":"x","type":["number"],"help":"Position of the camera on the X axis","optional":false,"default":null},{"name":"y","type":["number"],"help":"Position of the camera on the Y axis","optional":false,"default":null},{"name":"width","type":["number"],"help":"The width of the view rectangle","optional":false,"default":null},{"name":"height","type":["number"],"help":"The height of the view rectangle","optional":false,"default":null}],"help":"A Camera is your view into the game world. It has a position and size and renders only those objects within its field of view.\\nThe game automatically creates a single Stage sized camera on boot. Move the camera around the world with Phaser.Camera.x\/y"},"consts":[{"name":"FOLLOW_LOCKON","type":"number","help":"","line":123},{"name":"FOLLOW_PLATFORMER","type":"number","help":"","line":129},{"name":"FOLLOW_TOPDOWN","type":"number","help":"","line":135},{"name":"FOLLOW_TOPDOWN_TIGHT","type":"number","help":"","line":141}],"methods":{"public":[{"name":"checkWorldBounds","static":false,"returns":null,"help":"Method called to ensure the camera doesn't venture outside of the game world.","line":311,"public":true,"protected":false,"private":false,"parameters":[],"inherited":false,"inheritedFrom":""},{"name":"focusOn","static":false,"returns":null,"help":"Move the camera focus on a display object instantly.","line":204,"public":true,"protected":false,"private":false,"parameters":[{"name":"displayObject","type":["any"],"help":"The display object to focus the camera on. Must have visible x\/y properties.","optional":false,"default":null}],"inherited":false,"inheritedFrom":""},{"name":"focusOnXY","static":false,"returns":null,"help":"Move the camera focus on a location instantly.","line":216,"public":true,"protected":false,"private":false,"parameters":[{"name":"x","type":["number"],"help":"X position.","optional":false,"default":null},{"name":"y","type":["number"],"help":"Y position.","optional":false,"default":null}],"inherited":false,"inheritedFrom":""},{"name":"follow","static":false,"returns":null,"help":"Tells this camera which sprite to follow.","line":151,"public":true,"protected":false,"private":false,"parameters":[{"name":"target","type":["Phaser.Sprite","Phaser.Image","Phaser.Text"],"help":"The object you want the camera to track. Set to null to not follow anything.","optional":false,"default":null},{"name":"style","type":["number"],"help":"Leverage one of the existing \"deadzone\" presets. If you use a custom deadzone, ignore this parameter and manually specify the deadzone after calling follow().","optional":true,"default":null}],"inherited":false,"inheritedFrom":""},{"name":"reset","static":false,"returns":null,"help":"Resets the camera back to 0,0 and un-follows any object it may have been tracking.","line":382,"public":true,"protected":false,"private":false,"parameters":[],"inherited":false,"inheritedFrom":""},{"name":"setBoundsToWorld","static":false,"returns":null,"help":"Update the Camera bounds to match the game world.","line":298,"public":true,"protected":false,"private":false,"parameters":[],"inherited":false,"inheritedFrom":""},{"name":"setPosition","static":false,"returns":null,"help":"A helper function to set both the X and Y properties of the camera at once\\nwithout having to use game.camera.x and game.camera.y.","line":351,"public":true,"protected":false,"private":false,"parameters":[{"name":"x","type":["number"],"help":"X position.","optional":false,"default":null},{"name":"y","type":["number"],"help":"Y position.","optional":false,"default":null}],"inherited":false,"inheritedFrom":""},{"name":"setSize","static":false,"returns":null,"help":"Sets the size of the view rectangle given the width and height in parameters.","line":370,"public":true,"protected":false,"private":false,"parameters":[{"name":"width","type":["number"],"help":"The desired width.","optional":false,"default":null},{"name":"height","type":["number"],"help":"The desired height.","optional":false,"default":null}],"inherited":false,"inheritedFrom":""},{"name":"unfollow","static":false,"returns":null,"help":"Sets the Camera follow target to null, stopping it from following an object if it's doing so.","line":193,"public":true,"protected":false,"private":false,"parameters":[],"inherited":false,"inheritedFrom":""},{"name":"update","static":false,"returns":null,"help":"Update focusing and scrolling.","line":226,"public":true,"protected":false,"private":false,"parameters":[],"inherited":false,"inheritedFrom":""}],"protected":[],"private":[{"name":"updateTarget","static":false,"returns":null,"help":"Internal method","line":253,"public":false,"protected":false,"private":true,"parameters":[],"inherited":false,"inheritedFrom":""}],"static":[]},"properties":{"public":[{"name":"_targetPosition","type":["Phaser.Point"],"help":"","inlineHelp":"Internal point used to calculate target position","line":115,"default":null,"public":true,"protected":false,"private":false,"readOnly":false},{"name":"atLimit","type":["boolean"],"help":"","inlineHelp":"Whether this camera is flush with the World Bounds or not.","line":80,"default":null,"public":true,"protected":false,"private":false,"readOnly":false},{"name":"bounds","type":["Phaser.Rectangle"],"help":"The Camera is bound to this Rectangle and cannot move outside of it. By default it is enabled and set to the size of the World.\\nThe Rectangle can be located anywhere in the world and updated as often as you like. If you don't wish the Camera to be bound\\nat all then set this to null. The values can be anything and are in World coordinates, with 0,0 being the center of the world.","inlineHelp":"The Rectangle in which the Camera is bounded. Set to null to allow for movement anywhere.","line":58,"default":null,"public":true,"protected":false,"private":false,"readOnly":false},{"name":"deadzone","type":["Phaser.Rectangle"],"help":"","inlineHelp":"Moving inside this Rectangle will not cause the camera to move.","line":63,"default":null,"public":true,"protected":false,"private":false,"readOnly":false},{"name":"displayObject","type":["PIXI.DisplayObject"],"help":"","inlineHelp":"The display object to which all game objects are added. Set by World.boot","line":105,"default":null,"public":true,"protected":false,"private":false,"readOnly":false},{"name":"game","type":["Phaser.Game"],"help":"","inlineHelp":"A reference to the currently running Game.","line":25,"default":null,"public":true,"protected":false,"private":false,"readOnly":false},{"name":"height","type":["number"],"help":"The Cameras height. By default this is the same as the Game size and should not be adjusted for now.","inlineHelp":"Gets or sets the cameras height.","line":487,"default":null,"public":true,"protected":false,"private":false,"readOnly":false},{"name":"id","type":["number"],"help":"","inlineHelp":"Reserved for future multiple camera set-ups.","line":36,"default":"0","public":true,"protected":false,"private":false,"readOnly":false},{"name":"position","type":["Phaser.Point"],"help":"The Cameras position. This value is automatically clamped if it falls outside of the World bounds.","inlineHelp":"Gets or sets the cameras xy position using Phaser.Point object.","line":445,"default":null,"public":true,"protected":false,"private":false,"readOnly":false},{"name":"roundPx","type":["boolean"],"help":"","inlineHelp":"If a Camera has roundPx set to `true` it will call `view.floor` as part of its update loop, keeping its boundary to integer values. Set this to `false` to disable this from happening.","line":75,"default":"true","public":true,"protected":false,"private":false,"readOnly":false},{"name":"scale","type":["Phaser.Point"],"help":"","inlineHelp":"The scale of the display object to which all game objects are added. Set by World.boot","line":110,"default":null,"public":true,"protected":false,"private":false,"readOnly":false},{"name":"screenView","type":["Phaser.Rectangle"],"help":"","inlineHelp":"Used by Sprites to work out Camera culling.","line":50,"default":null,"public":true,"protected":false,"private":false,"readOnly":false},{"name":"target","type":["Phaser.Sprite"],"help":"","inlineHelp":"If the camera is tracking a Sprite, this is a reference to it, otherwise null.","line":86,"default":"null","public":true,"protected":false,"private":false,"readOnly":false},{"name":"view","type":["Phaser.Rectangle"],"help":"Camera view.\\nThe view into the world we wish to render (by default the game dimensions).\\nThe x\/y values are in world coordinates, not screen coordinates, the width\/height is how many pixels to render.\\nObjects outside of this view are not rendered if set to camera cull.","inlineHelp":"","line":45,"default":null,"public":true,"protected":false,"private":false,"readOnly":false},{"name":"visible","type":["boolean"],"help":"","inlineHelp":"Whether this camera is visible or not.","line":69,"default":"true","public":true,"protected":false,"private":false,"readOnly":false},{"name":"width","type":["number"],"help":"The Cameras width. By default this is the same as the Game size and should not be adjusted for now.","inlineHelp":"Gets or sets the cameras width.","line":470,"default":null,"public":true,"protected":false,"private":false,"readOnly":false},{"name":"world","type":["Phaser.World"],"help":"","inlineHelp":"A reference to the game world.","line":30,"default":null,"public":true,"protected":false,"private":false,"readOnly":false},{"name":"x","type":["number"],"help":"The Cameras x coordinate. This value is automatically clamped if it falls outside of the World bounds.","inlineHelp":"Gets or sets the cameras x position.","line":399,"default":null,"public":true,"protected":false,"private":false,"readOnly":false},{"name":"y","type":["number"],"help":"The Cameras y coordinate. This value is automatically clamped if it falls outside of the World bounds.","inlineHelp":"Gets or sets the cameras y position.","line":422,"default":null,"public":true,"protected":false,"private":false,"readOnly":false}],"protected":[],"private":[{"name":"edge","type":["number"],"help":"","inlineHelp":"Edge property.","line":93,"default":"0","public":false,"protected":false,"private":true,"readOnly":false},{"name":"position","type":["Phaser.Point"],"help":"","inlineHelp":"Current position of the camera in world.","line":100,"default":"new Phaser.Point()","public":false,"protected":false,"private":true,"readOnly":false}]}}