Classes
- AnimatedSprite
- BitmapText
- Container
- Culler
- Graphics
- HTMLText
- Mesh
- MeshPlane
- MeshRope
- MeshSimple
- NineSliceSprite
- PlaneGeometry
- RopeGeometry
- Sprite
- Text
- TextStyle
- TilingSprite
Interface Definitions
-
Base destroy options.
Properties:
Name Type Description childrenboolean Destroy children recursively.
-
Constructor options use for Container instances.
- See:
Properties:
Name Type Description alphanumber anglenumber blendModeBLEND_MODES boundsAreaRectangle childrenContainer[] isRenderGroupboolean parentContainer pivotPointData positionPointData renderableboolean rotationnumber scalePointData skewPointData tintcolor.ColorSource viewT visibleboolean xnumber ynumber -
Properties:
Name Type Description texturecore The Texture of the frame.
timenumber The duration of the frame, in milliseconds.
-
Options for the Graphics.
Properties:
Name Type Description contextGraphicsContext The GraphicsContext to use.
fillStyleFillStyleInputs The fill style to use.
strokeStyleFillStyleInputs The stroke style to use.
-
Options for the scene.MeshPlane constructor.
Properties:
Name Type Description texturecore The texture to use on the plane.
verticesXnumber The number of vertices in the x-axis
verticesYnumber The number of vertices in the y-axis
-
Options for the PIXI.MeshRope constructor.
Properties:
Name Type Description pointsPointLike[] An array of points that determine the rope.
texturecore The texture to use on the rope.
textureScalenumber Rope texture scale, if zero then the rope texture is stretched. Positive values scale rope texture keeping its aspect ratio. You can reduce alpha channel artifacts by providing a larger texture and downsampling here. If set to zero, texture will be stretched instead.
-
Options for the NineSliceSprite constructor.
Properties:
Name Type Description bottomHeightnumber Height of the bottom horizontal bar (D)
leftWidthnumber Width of the left vertical bar (A)
rightWidthnumber Width of the right vertical bar (B)
texturecore The texture to use on the NineSlicePlane.
topHeightnumber Height of the top horizontal bar (C)
-
Options for the PlaneGeometry constructor.
Properties:
Name Type Description heightnumber Height of plane
verticesXnumber Number of vertices on x-axis
verticesYnumber Number of vertices on y-axis
widthnumber Width of plane
-
Options for the PlaneGeometry constructor.
Properties:
Name Type Description pointsPointLike[] An array of points that determine the rope.
textureScalenumber Rope texture scale, if zero then the rope texture is stretched. By default the rope texture will be stretched to match rope length. If textureScale is positive this value will be treated as a scaling factor and the texture will preserve its aspect ratio instead. To create a tiling rope set baseTexture.wrapMode to 'repeat' and use a power of two texture, then set textureScale=1 to keep the original texture pixel size. In order to reduce alpha channel artifacts provide a larger texture and downsample - i.e. set textureScale=0.5 to scale it down twice.
widthnumber The width (i.e., thickness) of the rope.
-
Options for the scene.Sprite constructor.
-
Generic interface for TextStyle options.
Properties:
Name Type Description align'left' | 'center' | 'right' | 'justify' Alignment for multiline text, does not affect single line text
breakWordsboolean Indicates if lines can be wrapped within words, it needs wordWrap to be set to true
dropShadowboolean | scene.TextDropShadow Set a drop shadow for the text
fillstring | Array<string> | number | Array<number> | CanvasGradient | CanvasPattern A canvas fillstyle that will be used on the text e.g., 'red', '#00FF00'. Can be an array to create a gradient, e.g.,
['#000000','#FFFFFF']MDNfontFamilystring | string[] The font family, can be a single font name, or a list of names where the first is the preferred font.
fontSizenumber | string The font size (as a number it converts to px, but as a string, equivalents are '26px','20pt','160%' or '1.6em')
fontStyle'normal' | 'italic' | 'oblique' The font style.
fontVariant'normal' | 'small-caps' The font variant.
fontWeight'normal' | 'bold' | 'bolder' | 'lighter' | '100' | '200' | '300' | '400' | '500' | '600' | '700' | '800' | '900' The font weight.
leadingnumber The height of the line, a number that represents the vertical space that a letter uses.
letterSpacingnumber The amount of spacing between letters, default is 0
lineHeightnumber The line height, a number that represents the vertical space that a letter uses
paddingnumber Occasionally some fonts are cropped. Adding some padding will prevent this from happening by adding padding to all sides of the text.
strokeFillStyleInputs A canvas fillstyle that will be used on the text stroke, e.g., 'blue', '#FCFF00'
textBaseline'alphabetic' | 'top' | 'hanging' | 'middle' | 'ideographic' | 'bottom' The baseline of the text that is rendered.
whiteSpace'normal' | 'pre' | 'pre-line' Determines whether newlines & spaces are collapsed or preserved "normal" (collapse, collapse), "pre" (preserve, preserve) | "pre-line" (preserve, collapse). It needs wordWrap to be set to true.
wordWrapboolean Indicates if word wrap should be used
wordWrapWidthnumber The width at which text will wrap, it needs wordWrap to be set to true
-
Texture destroy options.
Properties:
Name Type Description textureboolean Destroy the texture as well.
textureSourceboolean Destroy the texture source as well.
-
Options for the scene.TilingSprite constructor.
Properties:
Name Type Default Description anchorPointData {x: 0, y: 0} The anchor point of the sprite
tilePositionPointData {x: 0, y: 0} The offset of the image that is being tiled.
tileRotationnumber 0 The rotation of the image that is being tiled.
tileScalePointData {x: 1, y: 1} Scaling of the image that is being tiled.
-
Options for the scene.TilingSprite constructor.
Properties:
Name Type Default Description applyAnchorToTextureboolean false heightnumber 256 The height of the tiling sprite.
texturecore Texture.WHITE The texture to use for the sprite.
widthnumber 256 The width of the tiling sprite. #
Type Definitions
Options for the Mesh constructor.
A drop shadow effect.
Properties:
| Name | Type | Description |
|---|---|---|
alpha |
number |
Set alpha for the drop shadow |
angle |
number |
Set a angle of the drop shadow |
blur |
number |
Set a shadow blur radius |
color |
color.ColorSource |
A fill style to be used on the e.g., 'red', '#00FF00' |
distance |
number |
Set a distance of the drop shadow |
Options for the scene.Text class.
Properties:
| Name | Type | Description |
|---|---|---|
anchor |
PointLike |
The anchor point of the text. |