mirror of
https://github.com/photonstorm/phaser
synced 2024-12-18 17:16:03 +00:00
1 line
36 KiB
JSON
1 line
36 KiB
JSON
|
{"class":{"name":"Phaser.Cache","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 game only has one instance of a Cache and it is used to store all externally loaded assets such as images, sounds\\nand data files as a result of Loader calls. Cached items use string based keys for look-up."},"consts":[{"name":"BINARY","type":"number","help":"","line":186},{"name":"BITMAPDATA","type":"number","help":"","line":192},{"name":"BITMAPFONT","type":"number","help":"","line":198},{"name":"CANVAS","type":"number","help":"","line":144},{"name":"IMAGE","type":"number","help":"","line":150},{"name":"JSON","type":"number","help":"","line":204},{"name":"PHYSICS","type":"number","help":"","line":174},{"name":"SOUND","type":"number","help":"","line":162},{"name":"TEXT","type":"number","help":"","line":168},{"name":"TEXTURE","type":"number","help":"","line":156},{"name":"TILEMAP","type":"number","help":"","line":180},{"name":"XML","type":"number","help":"","line":210}],"methods":{"public":[{"name":"addBinary","static":false,"returns":null,"help":"Add a binary object in to the cache.","line":235,"public":true,"protected":false,"private":false,"parameters":[{"name":"key","type":["string"],"help":"Asset key for this binary data.","optional":false,"default":null},{"name":"binaryData","type":["object"],"help":"The binary object to be addded to the cache.","optional":false,"default":null}],"inherited":false,"inheritedFrom":""},{"name":"addBitmapData","static":false,"returns":{"types":["Phaser.BitmapData"],"help":"The BitmapData object to be addded to the cache."},"help":"Add a BitmapData object in to the cache.","line":250,"public":true,"protected":false,"private":false,"parameters":[{"name":"key","type":["string"],"help":"Asset key for this BitmapData.","optional":false,"default":null},{"name":"bitmapData","type":["Phaser.BitmapData"],"help":"The BitmapData object to be addded to the cache.","optional":false,"default":null},{"name":"frameData","type":["Phaser.FrameData"],"help":"Optional FrameData set associated with the given BitmapData.","optional":true,"default":null}],"inherited":false,"inheritedFrom":""},{"name":"addBitmapFont","static":false,"returns":null,"help":"Add a new Bitmap Font to the Cache.","line":363,"public":true,"protected":false,"private":false,"parameters":[{"name":"key","type":["string"],"help":"The unique key by which you will reference this object.","optional":false,"default":null},{"name":"url","type":["string"],"help":"URL of this font xml file.","optional":false,"default":null},{"name":"data","type":["object"],"help":"Extra font data.","optional":false,"default":null},{"name":"xmlData","type":["object"],"help":"Texture atlas frames data.","optional":false,"default":null},{"name":"xSpacing","type":["number"],"help":"If you'd like to add additional horizontal spacing between the characters then set the pixel value here.","optional":true,"default":"0"},{"name":"ySpacing","type":["number"],"help":"If you'd like to add additional vertical spacing between the lines then set the pixel value here.","optional":true,"default":"0"}],"inherited":false,"inheritedFrom":""},{"name":"addCanvas","static":false,"returns":null,"help":"Add a new canvas object in to the cache.","line":222,"public":true,"protected":false,"private":false,"parameters":[{"name":"key","type":["string"],"help":"Asset key for this canvas.","optional":false,"default":null},{"name":"canvas","type":["HTMLCanvasElement"],"help":"Canvas DOM element.","optional":false,"default":null},{"name":"context","type":["CanvasRenderingContext2D"],"help":"Render context of this canvas.","optional":false,"default":null}],"inherited":false,"inheritedFrom":""},{"name":"addImage","static":false,"returns":null,"help":"Adds an Image file into the Cache. The file must have already been loaded, typically via Phaser.Loader.","line":491,"public":true,"protected":false,"private":false,"parameters":[{"name":"key","type":["string"],"help":"The uniq
|