mirror of
https://github.com/photonstorm/phaser
synced 2024-12-22 19:13:37 +00:00
1 line
No EOL
15 KiB
JSON
1 line
No EOL
15 KiB
JSON
{"class":{"name":"Phaser.Game","extends":"","static":false,"constructor":true,"parameters":[{"name":"width","type":["number","string"],"help":"The width of your game in game pixels. If given as a string the value must be between 0 and 100 and will be used as the percentage width of the parent container, or the browser window if no parent is given.","optional":true,"default":"800"},{"name":"height","type":["number","string"],"help":"The height of your game in game pixels. If given as a string the value must be between 0 and 100 and will be used as the percentage height of the parent container, or the browser window if no parent is given.","optional":true,"default":"600"},{"name":"renderer","type":["number"],"help":"Which renderer to use: Phaser.AUTO will auto-detect, Phaser.WEBGL, Phaser.CANVAS or Phaser.HEADLESS (no rendering at all).","optional":true,"default":"Phaser.AUTO"},{"name":"parent","type":["string","HTMLElement"],"help":"The DOM element into which this games canvas will be injected. Either a DOM ID (string) or the element itself.","optional":true,"default":"''"},{"name":"state","type":["object"],"help":"The default state object. A object consisting of Phaser.State functions (preload, create, update, render) or null.","optional":true,"default":"null"},{"name":"transparent","type":["boolean"],"help":"Use a transparent canvas background or not.","optional":true,"default":"false"},{"name":"antialias","type":["boolean"],"help":"Draw all image textures anti-aliased or not. The default is for smooth textures, but disable if your game features pixel art.","optional":true,"default":"true"},{"name":"physicsConfig","type":["object"],"help":"A physics configuration object to pass to the Physics world on creation.","optional":true,"default":"null"}],"help":"This is where the magic happens. The Game object is the heart of your game,\\nproviding quick access to common functions and handling the boot process.\\n\"Hell, there are no rules here - we're trying to accomplish something.\"\\nThomas A. Edison"},"consts":[],"methods":{"public":[{"name":"destroy","static":false,"returns":null,"help":"Nukes the entire game from orbit.","line":752,"public":true,"protected":false,"private":false,"parameters":[],"inherited":false,"inheritedFrom":""},{"name":"disableStep","static":false,"returns":null,"help":"Disables core game loop stepping.","line":727,"public":true,"protected":false,"private":false,"parameters":[],"inherited":false,"inheritedFrom":""},{"name":"enableStep","static":false,"returns":null,"help":"Enable core game loop stepping. When enabled you must call game.step() directly (perhaps via a DOM button?)\\nCalling step will advance the game loop by one frame. This is extremely useful for hard to track down errors!","line":714,"public":true,"protected":false,"private":false,"parameters":[],"inherited":false,"inheritedFrom":""},{"name":"step","static":false,"returns":null,"help":"When stepping is enabled you must call this function directly (perhaps via a DOM button?) to advance the game loop by one frame.\\nThis is extremely useful to hard to track down errors! Use the internal stepCount property to monitor progress.","line":740,"public":true,"protected":false,"private":false,"parameters":[],"inherited":false,"inheritedFrom":""}],"protected":[{"name":"boot","static":false,"returns":null,"help":"Initialize engine sub modules and start the game.","line":421,"public":false,"protected":true,"private":false,"parameters":[],"inherited":false,"inheritedFrom":""},{"name":"focusGain","static":false,"returns":null,"help":"Called by the Stage visibility handler.","line":844,"public":false,"protected":true,"private":false,"parameters":[{"name":"event","type":["object"],"help":"The DOM event that caused the game to pause, if any.","optional":false,"default":null}],"inherited":false,"inheritedFrom":""},{"name":"focusLoss","static":false,"returns":null,"help":"Called by the Stage visibility handler.","line":826,"public":false,"protected":true,"private":false,"parameters":[{"name":"event","type":["object"],"help":"The DOM event that caused the game to pause, if any.","optional":false,"default":null}],"inherited":false,"inheritedFrom":""},{"name":"gamePaused","static":false,"returns":null,"help":"Called by the Stage visibility handler.","line":785,"public":false,"protected":true,"private":false,"parameters":[{"name":"event","type":["object"],"help":"The DOM event that caused the game to pause, if any.","optional":false,"default":null}],"inherited":false,"inheritedFrom":""},{"name":"gameResumed","static":false,"returns":null,"help":"Called by the Stage visibility handler.","line":805,"public":false,"protected":true,"private":false,"parameters":[{"name":"event","type":["object"],"help":"The DOM event that caused the game to pause, if any.","optional":false,"default":null}],"inherited":false,"inheritedFrom":""},{"name":"parseConfig","static":false,"returns":null,"help":"Parses a Game configuration object.","line":346,"public":false,"protected":true,"private":false,"parameters":[],"inherited":false,"inheritedFrom":""},{"name":"setUpRenderer","static":false,"returns":null,"help":"Checks if the device is capable of using the requested renderer and sets it up or an alternative if not.","line":569,"public":false,"protected":true,"private":false,"parameters":[],"inherited":false,"inheritedFrom":""},{"name":"showDebugHeader","static":false,"returns":null,"help":"Displays a Phaser version debug header in the console.","line":507,"public":false,"protected":true,"private":false,"parameters":[],"inherited":false,"inheritedFrom":""},{"name":"update","static":false,"returns":null,"help":"The core game loop.","line":645,"public":false,"protected":true,"private":false,"parameters":[{"name":"time","type":["number"],"help":"The current time as provided by RequestAnimationFrame.","optional":false,"default":null}],"inherited":false,"inheritedFrom":""}],"private":[],"static":[]},"properties":{"public":[{"name":"add","type":["Phaser.GameObjectFactory"],"help":"","inlineHelp":"Reference to the Phaser.GameObjectFactory.","line":112,"default":null,"public":true,"protected":false,"private":false,"readOnly":false},{"name":"antialias","type":["boolean"],"help":"","inlineHelp":"Anti-alias graphics. By default scaled images are smoothed in Canvas and WebGL, set anti-alias to false to disable this globally.","line":69,"default":"true","public":true,"protected":false,"private":false,"readOnly":false},{"name":"cache","type":["Phaser.Cache"],"help":"","inlineHelp":"Reference to the assets cache.","line":122,"default":null,"public":true,"protected":false,"private":false,"readOnly":false},{"name":"camera","type":["Phaser.Camera"],"help":"","inlineHelp":"A handy reference to world.camera.","line":192,"default":null,"public":true,"protected":false,"private":false,"readOnly":false},{"name":"canvas","type":["HTMLCanvasElement"],"help":"","inlineHelp":"A handy reference to renderer.view, the canvas that the game is being rendered in to.","line":197,"default":null,"public":true,"protected":false,"private":false,"readOnly":false},{"name":"config","type":["object"],"help":"","inlineHelp":"The Phaser.Game configuration object.","line":34,"default":null,"public":true,"protected":false,"private":false,"readOnly":false},{"name":"context","type":["CanvasRenderingContext2D"],"help":"","inlineHelp":"A handy reference to renderer.context (only set for CANVAS games, not WebGL)","line":202,"default":null,"public":true,"protected":false,"private":false,"readOnly":false},{"name":"debug","type":["Phaser.Utils.Debug"],"help":"","inlineHelp":"A set of useful debug utilitie.","line":207,"default":null,"public":true,"protected":false,"private":false,"readOnly":false},{"name":"device","type":["Phaser.Device"],"help":"","inlineHelp":"Contains device information and capabilities.","line":187,"default":null,"public":true,"protected":false,"private":false,"readOnly":false},{"name":"height","type":["number"],"help":"","inlineHelp":"The calculated game height in pixels.","line":57,"default":"600","public":true,"protected":false,"private":false,"readOnly":false},{"name":"id","type":["boolean"],"help":"","inlineHelp":"Is game running or paused?","line":102,"default":"false","public":true,"protected":false,"private":false,"readOnly":false},{"name":"input","type":["Phaser.Input"],"help":"","inlineHelp":"Reference to the input manager","line":127,"default":null,"public":true,"protected":false,"private":false,"readOnly":false},{"name":"isBooted","type":["boolean"],"help":"","inlineHelp":"Whether the game engine is booted, aka available.","line":96,"default":"false","public":true,"protected":false,"private":false,"readOnly":false},{"name":"load","type":["Phaser.Loader"],"help":"","inlineHelp":"Reference to the assets loader.","line":132,"default":null,"public":true,"protected":false,"private":false,"readOnly":false},{"name":"make","type":["Phaser.GameObjectCreator"],"help":"","inlineHelp":"Reference to the GameObject Creator.","line":117,"default":null,"public":true,"protected":false,"private":false,"readOnly":false},{"name":"math","type":["Phaser.Math"],"help":"","inlineHelp":"Reference to the math helper.","line":137,"default":null,"public":true,"protected":false,"private":false,"readOnly":false},{"name":"net","type":["Phaser.Net"],"help":"","inlineHelp":"Reference to the network class.","line":142,"default":null,"public":true,"protected":false,"private":false,"readOnly":false},{"name":"onBlur","type":["Phaser.Signal"],"help":"","inlineHelp":"This event is fired when the game no longer has focus (typically on page hide).","line":248,"default":null,"public":true,"protected":false,"private":false,"readOnly":false},{"name":"onFocus","type":["Phaser.Signal"],"help":"","inlineHelp":"This event is fired when the game has focus (typically on page show).","line":253,"default":null,"public":true,"protected":false,"private":false,"readOnly":false},{"name":"onPause","type":["Phaser.Signal"],"help":"","inlineHelp":"This event is fired when the game pauses.","line":238,"default":null,"public":true,"protected":false,"private":false,"readOnly":false},{"name":"onResume","type":["Phaser.Signal"],"help":"","inlineHelp":"This event is fired when the game resumes from a paused state.","line":243,"default":null,"public":true,"protected":false,"private":false,"readOnly":false},{"name":"parent","type":["string","HTMLElement"],"help":"","inlineHelp":"The Games DOM parent.","line":45,"default":"''","public":true,"protected":false,"private":false,"readOnly":false},{"name":"particles","type":["Phaser.Particles"],"help":"","inlineHelp":"The Particle Manager.","line":212,"default":null,"public":true,"protected":false,"private":false,"readOnly":false},{"name":"paused","type":["boolean"],"help":"The paused state of the Game. A paused game doesn't update any of its subsystems.\\nWhen a game is paused the onPause event is dispatched. When it is resumed the onResume event is dispatched.","inlineHelp":"Gets and sets the paused state of the Game.","line":865,"default":null,"public":true,"protected":false,"private":false,"readOnly":false},{"name":"pendingStep","type":["boolean"],"help":"","inlineHelp":"An internal property used by enableStep, but also useful to query from your own game objects.","line":226,"default":"false","public":true,"protected":false,"private":false,"readOnly":true},{"name":"physics","type":["Phaser.Physics"],"help":"","inlineHelp":"Reference to the physics manager.","line":177,"default":null,"public":true,"protected":false,"private":false,"readOnly":false},{"name":"physicsConfig","type":["object"],"help":"","inlineHelp":"The Phaser.Physics.World configuration object.","line":39,"default":null,"public":true,"protected":false,"private":false,"readOnly":false},{"name":"preserveDrawingBuffer","type":["boolean"],"help":"","inlineHelp":"The value of the preserveDrawingBuffer flag affects whether or not the contents of the stencil buffer is retained after rendering.","line":75,"default":"false","public":true,"protected":false,"private":false,"readOnly":false},{"name":"raf","type":["Phaser.RequestAnimationFrame"],"help":"","inlineHelp":"Automatically handles the core game loop via requestAnimationFrame or setTimeout","line":107,"default":null,"public":true,"protected":false,"private":false,"readOnly":false},{"name":"renderType","type":["number"],"help":"","inlineHelp":"The Renderer this game will use. Either Phaser.AUTO, Phaser.CANVAS or Phaser.WEBGL.","line":85,"default":null,"public":true,"protected":false,"private":false,"readOnly":false},{"name":"renderer","type":["PIXI.CanvasRenderer","PIXI.WebGLRenderer"],"help":"","inlineHelp":"The Pixi Renderer.","line":80,"default":null,"public":true,"protected":false,"private":false,"readOnly":false},{"name":"rnd","type":["Phaser.RandomDataGenerator"],"help":"","inlineHelp":"Instance of repeatable random data generator helper.","line":182,"default":null,"public":true,"protected":false,"private":false,"readOnly":false},{"name":"scale","type":["Phaser.ScaleManager"],"help":"","inlineHelp":"The game scale manager.","line":147,"default":null,"public":true,"protected":false,"private":false,"readOnly":false},{"name":"sound","type":["Phaser.SoundManager"],"help":"","inlineHelp":"Reference to the sound manager.","line":152,"default":null,"public":true,"protected":false,"private":false,"readOnly":false},{"name":"stage","type":["Phaser.Stage"],"help":"","inlineHelp":"Reference to the stage.","line":157,"default":null,"public":true,"protected":false,"private":false,"readOnly":false},{"name":"state","type":["Phaser.StateManager"],"help":"","inlineHelp":"The StateManager.","line":90,"default":null,"public":true,"protected":false,"private":false,"readOnly":false},{"name":"stepCount","type":["number"],"help":"","inlineHelp":"When stepping is enabled this contains the current step cycle.","line":233,"default":"0","public":true,"protected":false,"private":false,"readOnly":true},{"name":"stepping","type":["boolean"],"help":"","inlineHelp":"Enable core loop stepping with Game.enableStep().","line":219,"default":"false","public":true,"protected":false,"private":false,"readOnly":true},{"name":"time","type":["Phaser.Time"],"help":"","inlineHelp":"Reference to the core game clock.","line":162,"default":null,"public":true,"protected":false,"private":false,"readOnly":false},{"name":"transparent","type":["boolean"],"help":"","inlineHelp":"Use a transparent canvas background or not.","line":63,"default":"false","public":true,"protected":false,"private":false,"readOnly":false},{"name":"tweens","type":["Phaser.TweenManager"],"help":"","inlineHelp":"Reference to the tween manager.","line":167,"default":null,"public":true,"protected":false,"private":false,"readOnly":false},{"name":"width","type":["number"],"help":"","inlineHelp":"The calculated game width in pixels.","line":51,"default":"800","public":true,"protected":false,"private":false,"readOnly":false},{"name":"world","type":["Phaser.World"],"help":"","inlineHelp":"Reference to the world.","line":172,"default":null,"public":true,"protected":false,"private":false,"readOnly":false}],"protected":[],"private":[{"name":"_codePaused","type":["boolean"],"help":"","inlineHelp":"Was the game paused via code or a visibility change?","line":265,"default":null,"public":false,"protected":false,"private":true,"readOnly":false},{"name":"_paused","type":["boolean"],"help":"","inlineHelp":"Is game paused?","line":259,"default":null,"public":false,"protected":false,"private":true,"readOnly":false}]}} |