.. Generated automatically by doc/tools/makerst.py in Godot's source tree. .. DO NOT EDIT THIS FILE, but the Sprite.xml source instead. .. The source is found in doc/classes or modules//doc_classes. .. _class_Sprite: Sprite ====== **Inherits:** :ref:`Node2D` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` **Category:** Core Brief Description ----------------- General purpose Sprite node. Signals ------- .. _class_Sprite_frame_changed: - **frame_changed** **(** **)** Emitted when the :ref:`frame` changes. .. _class_Sprite_texture_changed: - **texture_changed** **(** **)** Emitted when the :ref:`texture` changes. Member Variables ---------------- .. _class_Sprite_centered: - :ref:`bool` **centered** - If ``true`` texture is centered. Default value: ``true``. .. _class_Sprite_flip_h: - :ref:`bool` **flip_h** - If ``true`` texture is flipped horizontally. Default value: ``false``. .. _class_Sprite_flip_v: - :ref:`bool` **flip_v** - If ``true`` texture is flipped vertically. Default value: ``false``. .. _class_Sprite_frame: - :ref:`int` **frame** - Current frame to display from sprite sheet. :ref:`vframes` or :ref:`hframes` must be greater than 1. .. _class_Sprite_hframes: - :ref:`int` **hframes** - The number of columns in the sprite sheet. .. _class_Sprite_normal_map: - :ref:`Texture` **normal_map** - The normal map gives depth to the Sprite. .. _class_Sprite_offset: - :ref:`Vector2` **offset** - The texture's drawing offset. .. _class_Sprite_region_enabled: - :ref:`bool` **region_enabled** - If ``true`` texture is cut from a larger atlas texture. See ``region_rect``. Default value: ``false``. .. _class_Sprite_region_filter_clip: - :ref:`bool` **region_filter_clip** - If ``true`` the outermost pixels get blurred out. .. _class_Sprite_region_rect: - :ref:`Rect2` **region_rect** - The region of the atlas texture to display. :ref:`region_enabled` must be ``true``. .. _class_Sprite_texture: - :ref:`Texture` **texture** - :ref:`Texture` object to draw. .. _class_Sprite_vframes: - :ref:`int` **vframes** - The number of rows in the sprite sheet. Description ----------- A node that displays a 2D texture. The texture displayed can be a region from a larger atlas texture, or a frame from a sprite sheet animation.