new-file-wizard.rst 1.1 KB

123456789101112131415161718192021222324252627
  1. .. include:: ../_header.rst
  2. Create a new Animations file
  3. ````````````````````````````
  4. To create an Animations file, open the `New File dialog <../workbench/new-file-dialog.html>`_ and select the **Animations File** option:
  5. .. image:: ../images/animations-new-file-1.webp
  6. :alt: Select create a new animations file.
  7. It opens the **New Animations File** dialog and asks for the name of the file and the location:
  8. .. image:: ../images/animations-new-file-2.webp
  9. :alt: Select name and location.
  10. The file is created and opened in the |AnimationsEditor|_.
  11. In the majority of the cases, you want to add the animations file to an |AssetPackFile|_. To do this, select the file in the |FilesView|_ and the |InspectorView|_ will show you the option to add the animations to an |AssetPackFile|_:
  12. .. image:: ../images/animations-add-to-pack-file.webp
  13. :alt: Import animation file into the Asset Pack file.
  14. Also, you can load the animations file using the `Animations Loader <https://photonstorm.github.io/phaser3-docs/Phaser.Loader.LoaderPlugin#animation>`_:
  15. .. code::
  16. this.load.animation("playerAnimations", "assets/animations.json");