Asset Preloader
This node preloads Pixi assets (textures, sounds, etc.) for improved performance and loading management.
The Asset Preloader manages asset loading for optimal performance.
The Asset Preloader node manages the loading of Pixi assets such as textures, sounds, and other resources. It provides progress tracking, error handling, and ensures assets are available before they're needed in your Pixi scene.
Inputs
Assets
| Data | Description |
|---|---|
| Asset List | JSON array of asset URLs to preload |
| Auto Start | Automatically start preloading |
Control
| Signal | Description |
|---|---|
| Start Preloading | Signal to begin preloading |
| Cancel Preloading | Signal to cancel preloading |
Outputs
| Data | Description |
|---|---|
| Is Loading | Boolean indicating loading state |
| Loaded Count | Number of loaded assets |
| Total Count | Total number of assets |
| Load Progress | Loading progress (0-1) |
| Load Error | Error message if loading failed |
| Node Reference | Node reference |
Usage
Asset Preloader nodes are used to manage asset loading in your Pixi scene. They provide:
- Bulk asset loading
- Progress tracking
- Error handling
- Loading state management
- Performance optimization
Asset List Format
The Asset List input accepts a JSON array of asset objects:
[
{
"key": "player-sprite",
"url": "/assets/player.png",
"type": "texture"
},
{
"key": "background-music",
"url": "/assets/music.mp3",
"type": "sound"
},
{
"key": "particle-texture",
"url": "/assets/particle.png",
"type": "texture"
}
]
Performance Tips
- Use Auto Start for immediate loading
- Monitor Load Progress for user feedback
- Handle Load Error for graceful failure
- Group related assets together
- Consider loading priority for critical assets
Example Use Cases
- Game Assets: Preload all game textures and sounds
- UI Resources: Load interface elements and icons
- Level Content: Load level-specific assets
- Performance Optimization: Ensure smooth gameplay experience