Enumerationmigueldeicaza.swiftgodot 0.45.0SwiftGodot
DrawFlags
Label3D.swift:13enum DrawFlags
Cases
case shaded
If set, lights in the environment affect the label.
case doubleSided
If set, text can be seen from the back as well. If not, the text is invisible when looking at it from behind.
case disableDepthTest
Disables the depth test, so this object is drawn on top of all others. However, objects drawn after it in the draw order may cover it.
case fixedSize
Label is scaled by depth so that it always appears the same size on screen.
case max
Represents the size of the
DrawFlags
enum.
Other members in extension
View members
Hide members
This section is hidden by default because it contains too many (35) members.
Types
Type members
Instance members
var alphaAntialiasingEdge: Double
Threshold at which antialiasing will be applied on the alpha channel.
var alphaAntialiasingMode: BaseMaterial3D.AlphaAntiAliasing
The type of alpha antialiasing to apply. See
BaseMaterial3D.AlphaAntiAliasing
.var alphaCut: Label3D.AlphaCutMode
The alpha cutting mode to use for the sprite. See
AlphaCutMode
for possible values.var alphaHashScale: Double
The hashing scale for Alpha Hash. Recommended values between
0
and2
.var alphaScissorThreshold: Double
Threshold at which the alpha scissor will discard values.
var autowrapMode: TextServer.AutowrapMode
If set to something other than
TextServer/AutowrapMode/autowrapOff
, the text gets wrapped inside the node’s bounding rectangle. If you resize the node, it will change its height automatically to show all the text. To see how each mode behaves, seeTextServer.AutowrapMode
.var billboard: BaseMaterial3D.BillboardMode
The billboard mode to use for the label. See
BaseMaterial3D.BillboardMode
for possible values.var doubleSided: Bool
If
true
, text can be seen from the back as well, iffalse
, it is invisible when looking at it from behind.var fixedSize: Bool
If
true
, the label is rendered at the same size regardless of distance.var font: Font?
Font configuration used to display text.
var fontSize: Int32
Font size of the
Label3D
’s text. To make the font look more detailed when up close, increasefontSize
while decreasingpixelSize
at the same time.var horizontalAlignment: HorizontalAlignment
Controls the text’s horizontal alignment. Supports left, center, right, and fill, or justify. Set it to one of the
HorizontalAlignment
constants.var justificationFlags: TextServer.JustificationFlag
Line fill alignment rules. For more info see
TextServer.JustificationFlag
.var language: String
Language code used for line-breaking and text shaping algorithms, if left empty current locale is used instead.
var lineSpacing: Double
Vertical space between lines in multiline
Label3D
.var modulate: Color
Text
Color
of theLabel3D
.var noDepthTest: Bool
If
true
, depth testing is disabled and the object will be drawn in render order.var offset: Vector2
The text drawing offset (in pixels).
var outlineModulate: Color
The tint of text outline.
var outlineRenderPriority: Int32
Sets the render priority for the text outline. Higher priority objects will be sorted in front of lower priority objects.
var outlineSize: Int32
Text outline size.
var pixelSize: Double
The size of one pixel’s width on the label to scale it in 3D. To make the font look more detailed when up close, increase
fontSize
while decreasingpixelSize
at the same time.var renderPriority: Int32
Sets the render priority for the text. Higher priority objects will be sorted in front of lower priority objects.
var shaded: Bool
If
true
, theLight3D
in theEnvironment
has effects on the label.var structuredTextBidiOverride: TextServer.StructuredTextParser
Set BiDi algorithm override for the structured text.
var structuredTextBidiOverrideOptions: GArray
Set additional options for BiDi override.
var text: String
The text to display on screen.
var textDirection: TextServer.Direction
Base text writing direction.
var textureFilter: BaseMaterial3D.TextureFilter
Filter flags for the texture. See
BaseMaterial3D.TextureFilter
for options.var uppercase: Bool
If
true
, all the text displays as UPPERCASE.var verticalAlignment: VerticalAlignment
Controls the text’s vertical alignment. Supports top, center, bottom. Set it to one of the
VerticalAlignment
constants.var width: Double
Text width (in pixels), used for autowrap and fill alignment.
func generateTriangleMesh(
) -> TriangleMesh? Returns a
TriangleMesh
with the label’s vertices following its current configuration (such as itspixelSize
).
Citizens in SwiftGodot
Conformances
protocol CaseIterable
A type that provides a collection of all of its values.
protocol CustomDebugStringConvertible
A type with a customized textual representation suitable for debugging purposes.
protocol Equatable
A type that can be compared for value equality.
protocol Hashable
A type that can be hashed into a
Hasher
to produce an integer hash value.protocol RawRepresentable<RawValue>
A type that can be converted to and from an associated raw value.
Type members
Instance members
var debugDescription: String
A textual representation of this instance, suitable for debugging
Type features
static func != (lhs: Self, rhs: Self
) -> Bool Returns a Boolean value indicating whether two values are not equal.