Phaser 4 examples

Loader

  • 80 examples
  • 13 folders

Folders 13

Examples 12

Load Animation JSONDemonstrates how to load animation configuration data from an external JSON file and apply those animations to sprites.Load External ScriptDemonstrates how to load an external JavaScript file and access its global functions within a scene.Load HTML to TextureDemonstrates how to load an external HTML file and convert it into a texture that can be used by Game Objects like Images or Sprites.Load Scene FileDemonstrates how to dynamically load a Scene class from an external JavaScript file using the Loader.Load Scene PluginDemonstrates how to load an external Scene Plugin during the preload phase and access its methods through a custom property on the Scene.Load Texture Atlas (PCT)Demonstrates how to load a texture atlas in the PCT format and display its frames on the screen.Load Texture Atlas (Phaser Format)Demonstrates how to load a texture atlas using the atlasPCT loader and display specific frames from the loaded texture.Load XML Texture AtlasDemonstrates how to load and display frames from a texture atlas that uses an XML data file for frame definitions.Loader 404 HandlingDemonstrates how the loader behaves when assets fail to load due to 404 errors, showing that the game can still proceed to the create state.Loading Assets via Configuration ObjectsDemonstrates loading assets using configuration objects instead of simple arguments, including setting custom XHR properties like headers, credentials, and timeouts.Loading Progress BarCreate a visual progress bar using Graphics and the Loader's progress event to track the loading status of a large asset queue.Scene Pack Files PayloadDemonstrates how to use the 'pack' property in a Scene configuration to load assets before the Scene starts, making them available before the preload function is even called.