Pixi Text
This node displays text using system fonts or loaded web fonts in the Pixi scene.
The Pixi Text renders text with various styling options in your Pixi scene.
The Pixi Text node creates a PIXI.Text object that displays text with customizable styling. It supports system fonts, web fonts, and various text formatting options for creating rich text content in your Pixi scene.
Position
| Data | Description |
|---|
| X | Horizontal position |
| Y | Vertical position |
| Data | Description |
|---|
| Rotation | Rotation in radians |
| Scale X | Horizontal scale |
| Scale Y | Vertical scale |
| Pivot X | Horizontal pivot |
| Pivot Y | Vertical pivot |
| Anchor X | Horizontal anchor |
| Anchor Y | Vertical anchor |
Appearance
| Data | Description |
|---|
| Alpha | Transparency |
| Tint | Color tint |
| Visible | Visibility |
| Interactive | Interaction enable |
Text
| Data | Description |
|---|
| Text Content | The text string to display |
Text Style
| Data | Description |
|---|
| Font Family | Font family name |
| Font Size | Font size in pixels |
| Fill Color | Text fill color |
| Align | Text alignment (left, center, right) |
| Font Weight | Font weight |
| Font Style | Font style (normal, italic) |
| Letter Spacing | Character spacing |
Stroke
| Data | Description |
|---|
| Stroke Color | Stroke color |
| Stroke Thickness | Stroke width |
Layout
| Data | Description |
|---|
| Word Wrap | Enable word wrapping |
| Wrap Width | Maximum width for wrapping |
| Line Height | Line spacing |
Drop Shadow
| Data | Description |
|---|
| Enable Drop Shadow | Shadow toggle |
| Shadow Color | Shadow color |
| Shadow Blur | Shadow blur amount |
| Shadow Angle | Shadow angle in radians |
| Shadow Distance | Shadow offset distance |
Animation
| Data | Description |
|---|
| Ticker Enabled | Animation ticker |
| Ticker Speed | Animation speed |
| Animation Type | Animation type |
| Custom Animation Code | Custom animation code |
Outputs
| Signal | Description |
|---|
| Pointer Down | Triggered when pointer is pressed down |
| Pointer Up | Triggered when pointer is released |
| Pointer Tap | Triggered when pointer taps the text |
| Pointer Enter | Triggered when pointer enters the text |
| Pointer Leave | Triggered when pointer leaves the text |
| Pointer Move | Triggered when pointer moves over the text |
| Data | Description |
|---|
| Node Reference | Node reference |
Usage
Pixi Text nodes are used to display text content in your Pixi scene. They support:
- System fonts and web fonts
- Rich text styling (color, size, weight, style)
- Text alignment and wrapping
- Stroke and drop shadow effects
- Interactive events
- Animation capabilities
Font Loading
For web fonts, ensure they are loaded before creating the text node. You can use the Asset Preloader node to preload font files.
- Use system fonts when possible for better performance
- Limit the number of different font families used
- Consider using BitmapText for large amounts of text
- Enable Word Wrap for dynamic text content
- Use appropriate Font Size for your display needs
Example Use Cases
- UI Labels: Button text, form labels, and interface text
- Game Text: Score displays, player names, and game messages
- Dynamic Content: User-generated text and real-time updates
- Decorative Text: Titles, headings, and artistic text elements