mirror of
https://github.com/photonstorm/phaser
synced 2024-12-22 11:03:23 +00:00
1 line
30 KiB
JSON
1 line
30 KiB
JSON
|
{"class":{"name":"PIXI.Text","extends":"PIXI.Sprite","static":false,"constructor":true,"parameters":[{"name":"text","type":["string"],"help":"The copy that you would like the text to display","optional":false,"default":null},{"name":"[style]","type":["object"],"help":"The style parameters","optional":false,"default":null},{"name":"[style.font]","type":["string"],"help":"default 'bold 20px Arial' The style and size of the font","optional":false,"default":null},{"name":"[style.fill='black']","type":["string","number"],"help":"A canvas fillstyle that will be used on the text e.g 'red', '#00FF00'","optional":false,"default":null},{"name":"[style.align='left']","type":["string"],"help":"Alignment for multiline text ('left', 'center' or 'right'), does not affect single line text","optional":false,"default":null},{"name":"[style.stroke]","type":["string","number"],"help":"A canvas fillstyle that will be used on the text stroke e.g 'blue', '#FCFF00'","optional":false,"default":null},{"name":"[style.strokeThickness=0]","type":["number"],"help":"A number that represents the thickness of the stroke. Default is 0 (no stroke)","optional":false,"default":null},{"name":"[style.wordWrap=false]","type":["boolean"],"help":"Indicates if word wrap should be used","optional":false,"default":null},{"name":"[style.wordWrapWidth=100]","type":["number"],"help":"The width at which text will wrap, it needs wordWrap to be set to true","optional":false,"default":null},{"name":"[style.dropShadow=false]","type":["boolean"],"help":"Set a drop shadow for the text","optional":false,"default":null},{"name":"[style.dropShadowColor='#000000']","type":["string"],"help":"A fill style to be used on the dropshadow e.g 'red', '#00FF00'","optional":false,"default":null},{"name":"[style.dropShadowAngle=Math.PI\/4]","type":["number"],"help":"Set a angle of the drop shadow","optional":false,"default":null},{"name":"[style.dropShadowDistance=5]","type":["number"],"help":"Set a distance of the drop shadow","optional":false,"default":null}],"help":"A Text Object will create a line or multiple lines of text. To split a line you can use '\\n' in your text string,\\nor add a wordWrap property set to true and and wordWrapWidth property with a value in the style object."},"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":"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":"Destroys this text object.","line":497,"public":true,"protected":false,"private":false,"parameters":[{"name":"destroyBaseTexture","type":["boolean"],"help":"whether to destroy the base texture as well","optional":false,"default":null}],"inherited":false,"inheritedFrom":""},{"name":"fromFrame","static":true,"returns":{"types":["PIXI.Sprite"],"help":"A new Sprite using a texture from the texture cache m
|