SpriteBase3D

Inherits: GeometryInstance < VisualInstance < Spatial < Node < Object

Inherited By: AnimatedSprite3D, Sprite3D

2D sprite node in 3D environment.

Description

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

Enumerations

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, lights in the environment affect 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 — Represents the size of the DrawFlags enum.

enum AlphaCutMode:

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

Property Descriptions

Default0
Setterset_alpha_cut_mode(value)
Getterget_alpha_cut_mode()

  • Vector3.Axis axis
Default2
Setterset_axis(value)
Getterget_axis()

The direction in which the front of the texture faces.


Default0
Setterset_billboard_mode(value)
Getterget_billboard_mode()

Defaulttrue
Setterset_centered(value)
Getteris_centered()

If true, texture will be centered.


Defaulttrue
Setterset_draw_flag(value)
Getterget_draw_flag()

If true, texture can be seen from the back as well, if false, it is invisible when looking at it from behind.


Defaultfalse
Setterset_flip_h(value)
Getteris_flipped_h()

If true, texture is flipped horizontally.


Defaultfalse
Setterset_flip_v(value)
Getteris_flipped_v()

If true, texture is flipped vertically.


DefaultColor( 1, 1, 1, 1 )
Setterset_modulate(value)
Getterget_modulate()

A color value that gets multiplied on, could be used for mood-coloring or to simulate the color of light.


DefaultVector2( 0, 0 )
Setterset_offset(value)
Getterget_offset()

The texture’s drawing offset.


Default1.0
Setterset_opacity(value)
Getterget_opacity()

The objects visibility on a scale from 0 fully invisible to 1 fully visible.


Default0.01
Setterset_pixel_size(value)
Getterget_pixel_size()

The size of one pixel’s width on the sprite to scale it in 3D.


Defaultfalse
Setterset_draw_flag(value)
Getterget_draw_flag()

If true, the Light in the Environment has effects on the sprite.


Defaulttrue
Setterset_draw_flag(value)
Getterget_draw_flag()

If true, the texture’s transparency and the opacity are used to make those parts of the sprite invisible.

Method Descriptions



  • Rect2 get_item_rect ( ) const

doradoro's advice! Getters and Setters will be deprecated! Avoid their use!

Disclaimer: This page has been automaticaly and directly extracted from the official Godot Docs website, the 2020-03-07 at 01:41:52. It's the English Stable version because it's what most Godot users should use. The Copyright owners are Juan Linietsky, Ariel Manzur and the Godot community. CC-BY 3.0. Thanks for your patience and generosity.