phaser/v2/resources/docgen/output/Phaser.Camera.json

1 line
10 KiB
JSON
Raw Normal View History

{"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