phaser/resources/docgen/output/Phaser.Text.json

1 line
39 KiB
JSON
Raw Normal View History

{"class":{"name":"Phaser.Text","extends":"PIXI.Text","static":false,"constructor":true,"parameters":[{"name":"game","type":["Phaser.Game"],"help":"Current game instance.","optional":false,"default":null},{"name":"x","type":["number"],"help":"X position of the new text object.","optional":false,"default":null},{"name":"y","type":["number"],"help":"Y position of the new text object.","optional":false,"default":null},{"name":"text","type":["string"],"help":"The actual text that will be written.","optional":false,"default":null},{"name":"style","type":["object"],"help":"The style object containing style attributes like font, font size ,","optional":false,"default":null}],"help":"Create a new `Text` object. This uses a local hidden Canvas object and renders the type into it. It then makes a texture from this for renderning to the view.\\nBecause of this you can only display fonts that are currently loaded and available to the browser. It won't load the fonts for you.\\nHere is a compatibility table showing the available default fonts across different mobile browsers: http:\/\/www.jordanm.co.uk\/tinytype"},"consts":[],"methods":{"public":[{"name":"addChild","static":false,"returns":{"types":["PIXI.DisplayObject"],"help":"The child that was added."},"help":"Adds a child to the container.","line":93,"public":true,"protected":false,"private":false,"parameters":[{"name":"child","type":["PIXI.DisplayObject"],"help":"The DisplayObject to add to the container","optional":false,"default":null}],"inherited":true,"inheritedFrom":"PIXI.Sprite"},{"name":"addChildAt","static":false,"returns":{"types":["PIXI.DisplayObject"],"help":"The child that was added."},"help":"Adds a child to the container at a specified index. If the index is out of bounds an error will be thrown","line":106,"public":true,"protected":false,"private":false,"parameters":[{"name":"child","type":["PIXI.DisplayObject"],"help":"The child to add","optional":false,"default":null},{"name":"index","type":["number"],"help":"The index to place the child in","optional":false,"default":null}],"inherited":true,"inheritedFrom":"PIXI.Sprite"},{"name":"addColor","static":false,"returns":null,"help":"This method allows you to set specific colors within the Text.\\nIt works by taking a color value, which is a typical HTML string such as `#ff0000` or `rgb(255,0,0)` and a position.\\nThe position value is the index of the character in the Text string to start applying this color to.\\nOnce set the color remains in use until either another color or the end of the string is encountered.\\nFor example if the Text was `Photon Storm` and you did `Text.addColor('#ffff00', 6)` it would color in the word `Storm` in yellow.","line":498,"public":true,"protected":false,"private":false,"parameters":[{"name":"color","type":["string"],"help":"A canvas fillstyle that will be used on the text eg `red`, `#00FF00`, `rgba()`.","optional":false,"default":null},{"name":"position","type":["number"],"help":"The index of the character in the string to start applying this color value from.","optional":false,"default":null}],"inherited":false,"inheritedFrom":""},{"name":"clearColors","static":false,"returns":null,"help":"Clears any previously set color stops.","line":480,"public":true,"protected":false,"private":false,"parameters":[],"inherited":false,"inheritedFrom":""},{"name":"click","static":false,"returns":null,"help":"A callback that is used when the users clicks on the displayObject with their mouse's left button","line":238,"public":true,"protected":false,"private":false,"parameters":[{"name":"interactionData","type":["PIXI.InteractionData"],"help":"","optional":false,"default":null}],"inherited":true,"inheritedFrom":"PIXI.Sprite"},{"name":"destroy","static":false,"returns":null,"help":"","line":231,"public":true,"protected":false,"private":false,"parameters":[{"name":"destroyChildren","type":["boolean"],"help":"Should every child of this object have its destroy method called?","optional":true,"default":"true"}],"inherited":false,"inheritedFrom":""},{"name":"fromFrame","static":true,"returns":{"types":["