SpriteBase3D

Inherits: GeometryInstance < VisualInstance < Spatial < Node < Object

Inherited By: AnimatedSprite3D, Sprite3D

Category: Core

Brief Description

2D Sprite node in 3D environment.

Member Functions

Rect2 get_item_rect ( ) const

Member Variables

  • AlphaCutMode alpha_cut
  • Axis axis - The direction in which the front of the texture faces.
  • bool centered - If true texture will be centered. Default value: true.
  • bool double_sided - If true texture can be seen from the back as well, if false, it is invisible when looking at it from behind. Default value: true.
  • bool flip_h - If true texture is flipped horizontally. Default value: false.
  • bool flip_v - If true texture is flipped vertically. Default value: false.
  • Color modulate - A color value that gets multiplied on, could be used for mood-coloring or to simulate the color of light.
  • Vector2 offset - The texture’s drawing offset.
  • float opacity - The objects visibility on a scale from 0 fully invisible to 1 fully visible.
  • float pixel_size - The size of one pixel’s width on the Sprite to scale it in 3D.
  • bool shaded - If true the Light in the Environment has effects on the Sprite. Default value: false.
  • bool transparent - If true the texture’s transparency and the opacity are used to make those parts of the Sprite invisible. Default value: true.

Enums

enum AlphaCutMode

  • ALPHA_CUT_DISABLED = 0
  • ALPHA_CUT_DISCARD = 1
  • ALPHA_CUT_OPAQUE_PREPASS = 2

enum DrawFlags

  • FLAG_TRANSPARENT = 0 — If set, the texture’s transparency and the opacity are used to make those parts of the Sprite invisible.
  • FLAG_SHADED = 1 — If set, the Light in the Environment has effects on the Sprite.
  • FLAG_DOUBLE_SIDED = 2 — If set, texture can be seen from the back as well, if not, it is invisible when looking at it from behind.
  • FLAG_MAX = 3 — Used internally to mark the end of the Flags section.

Description

A node that displays 2D texture information in a 3D environment.

Member Function Description

  • Rect2 get_item_rect ( ) const