class_animatedsprite3d.rst 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157
  1. :github_url: hide
  2. .. DO NOT EDIT THIS FILE!!!
  3. .. Generated automatically from Godot engine sources.
  4. .. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py.
  5. .. XML source: https://github.com/godotengine/godot/tree/master/doc/classes/AnimatedSprite3D.xml.
  6. .. _class_AnimatedSprite3D:
  7. AnimatedSprite3D
  8. ================
  9. **Inherits:** :ref:`SpriteBase3D<class_SpriteBase3D>` **<** :ref:`GeometryInstance3D<class_GeometryInstance3D>` **<** :ref:`VisualInstance3D<class_VisualInstance3D>` **<** :ref:`Node3D<class_Node3D>` **<** :ref:`Node<class_Node>` **<** :ref:`Object<class_Object>`
  10. 2D sprite node in 3D world, that can use multiple 2D textures for animation.
  11. Description
  12. -----------
  13. Animations are created using a :ref:`SpriteFrames<class_SpriteFrames>` resource, which can be configured in the editor via the SpriteFrames panel.
  14. Tutorials
  15. ---------
  16. - :doc:`2D Sprite animation (also applies to 3D) <../tutorials/2d/2d_sprite_animation>`
  17. Properties
  18. ----------
  19. +-----------------------------------------+-------------------------------------------------------------+----------------+
  20. | :ref:`StringName<class_StringName>` | :ref:`animation<class_AnimatedSprite3D_property_animation>` | ``&"default"`` |
  21. +-----------------------------------------+-------------------------------------------------------------+----------------+
  22. | :ref:`int<class_int>` | :ref:`frame<class_AnimatedSprite3D_property_frame>` | ``0`` |
  23. +-----------------------------------------+-------------------------------------------------------------+----------------+
  24. | :ref:`SpriteFrames<class_SpriteFrames>` | :ref:`frames<class_AnimatedSprite3D_property_frames>` | |
  25. +-----------------------------------------+-------------------------------------------------------------+----------------+
  26. | :ref:`bool<class_bool>` | :ref:`playing<class_AnimatedSprite3D_property_playing>` | ``false`` |
  27. +-----------------------------------------+-------------------------------------------------------------+----------------+
  28. Methods
  29. -------
  30. +-------------------------+----------------------------------------------------------------------------------------------------------+
  31. | :ref:`bool<class_bool>` | :ref:`is_playing<class_AnimatedSprite3D_method_is_playing>` **(** **)** |const| |
  32. +-------------------------+----------------------------------------------------------------------------------------------------------+
  33. | void | :ref:`play<class_AnimatedSprite3D_method_play>` **(** :ref:`StringName<class_StringName>` anim=&"" **)** |
  34. +-------------------------+----------------------------------------------------------------------------------------------------------+
  35. | void | :ref:`stop<class_AnimatedSprite3D_method_stop>` **(** **)** |
  36. +-------------------------+----------------------------------------------------------------------------------------------------------+
  37. Signals
  38. -------
  39. .. _class_AnimatedSprite3D_signal_animation_finished:
  40. - **animation_finished** **(** **)**
  41. Emitted when the animation is finished (when it plays the last frame). If the animation is looping, this signal is emitted every time the last frame is drawn.
  42. ----
  43. .. _class_AnimatedSprite3D_signal_frame_changed:
  44. - **frame_changed** **(** **)**
  45. Emitted when :ref:`frame<class_AnimatedSprite3D_property_frame>` changed.
  46. Property Descriptions
  47. ---------------------
  48. .. _class_AnimatedSprite3D_property_animation:
  49. - :ref:`StringName<class_StringName>` **animation**
  50. +-----------+----------------------+
  51. | *Default* | ``&"default"`` |
  52. +-----------+----------------------+
  53. | *Setter* | set_animation(value) |
  54. +-----------+----------------------+
  55. | *Getter* | get_animation() |
  56. +-----------+----------------------+
  57. The current animation from the ``frames`` resource. If this value changes, the ``frame`` counter is reset.
  58. ----
  59. .. _class_AnimatedSprite3D_property_frame:
  60. - :ref:`int<class_int>` **frame**
  61. +-----------+------------------+
  62. | *Default* | ``0`` |
  63. +-----------+------------------+
  64. | *Setter* | set_frame(value) |
  65. +-----------+------------------+
  66. | *Getter* | get_frame() |
  67. +-----------+------------------+
  68. The displayed animation frame's index.
  69. ----
  70. .. _class_AnimatedSprite3D_property_frames:
  71. - :ref:`SpriteFrames<class_SpriteFrames>` **frames**
  72. +----------+--------------------------+
  73. | *Setter* | set_sprite_frames(value) |
  74. +----------+--------------------------+
  75. | *Getter* | get_sprite_frames() |
  76. +----------+--------------------------+
  77. The :ref:`SpriteFrames<class_SpriteFrames>` resource containing the animation(s).
  78. ----
  79. .. _class_AnimatedSprite3D_property_playing:
  80. - :ref:`bool<class_bool>` **playing**
  81. +-----------+-----------+
  82. | *Default* | ``false`` |
  83. +-----------+-----------+
  84. If ``true``, the :ref:`animation<class_AnimatedSprite3D_property_animation>` is currently playing.
  85. Method Descriptions
  86. -------------------
  87. .. _class_AnimatedSprite3D_method_is_playing:
  88. - :ref:`bool<class_bool>` **is_playing** **(** **)** |const|
  89. Returns ``true`` if an animation is currently being played.
  90. ----
  91. .. _class_AnimatedSprite3D_method_play:
  92. - void **play** **(** :ref:`StringName<class_StringName>` anim=&"" **)**
  93. Plays the animation named ``anim``. If no ``anim`` is provided, the current animation is played.
  94. ----
  95. .. _class_AnimatedSprite3D_method_stop:
  96. - void **stop** **(** **)**
  97. Stops the current animation (does not reset the frame counter).
  98. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  99. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  100. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  101. .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
  102. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
  103. .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`