text3d
A block of text drawn in the 3D pass on a quad, pixels_per_unit font pixels per world unit; billboard turns it to the camera.
ในหน้านี้
3d · render · 56 properties · 3D
A block of text drawn in the 3D pass on a quad, pixels_per_unit font pixels per world unit; billboard turns it to the camera.
In a scene, text3d is the node key that applies it. A script reaches each property below as a field on node.text3d: reading one asks the running component, and assigning one leaves the rest alone. The whole table is node.text3d.get() and node.text3d.set(table).
Properties
| property | type | default | description |
|---|---|---|---|
alpha_cutoff |
float | 0 |
Drop a pixel fainter than this and draw the rest opaque, as a material's [surface] alpha_cutoff does; zero blends every pixel Range 0–1. |
billboard |
bool | true |
Turn to face the camera every frame; off leaves it in the node's own plane |
bitmap_font |
string | — | A project-relative AngelCode .fnt naming a bitmap face; empty shapes with the project's vector fonts |
cast_shadow |
bool | true |
Whether it casts a shadow from the lights that cast. With alpha_cutoff above zero the shadow keeps the glyphs' shapes; at zero each glyph shadows as its whole quad |
color |
color | [1,1,1,1] |
Tint, as channel floats or #rrggbb / #rrggbbaa |
depth_test |
bool | true |
Let the scene hide it; off draws it over everything drawn before it and leaves the depth as it was |
dot_color |
color | [0,0,0,0] |
The vertex dots' colour; an alpha of zero takes the node's own. Not drawn on a block with a material, whose layers draw through Balaur's own pipeline |
dot_size |
float | 0 |
Size of a dot drawn on every vertex; zero draws none. Not drawn on a block with a material, whose layers draw through Balaur's own pipeline. Not on WebGL2 At least 0. |
dot_sizing |
enum | world |
What dot_size counts: world is pixels at one world unit from the camera, thinning with distance, screen is pixels One of world, screen. |
double_sided |
bool | true |
Draw the back of the quad as well as the front |
draw_surface |
bool | true |
Whether the surface draws; off leaves the wireframe and the dots alone |
font_family |
enum | ui |
Which of the project's font chains to shape with One of ui, heading, mono, icon. |
font_features |
list | [] |
OpenType features: a tag turns one on (smcp), tag=0 turns one off (liga=0), tag=n picks an alternate |
font_name |
string | — | A face by family name, tried before the chain. A project face measures; a face only the system has draws but is measured as the chain |
font_size |
float | 32 |
Height in font pixels, before pixels_per_unit sizes it in the world At least 1. |
font_stretch |
enum | normal |
How wide a face is picked among the faces its family ships; nothing is stretched that no face draws One of ultra_condensed, extra_condensed, condensed, semi_condensed, normal, semi_expanded, expanded, extra_expanded, ultra_expanded. |
font_style |
enum | normal |
Upright, the family's italic face, or the upright face slanted; a family with no italic is slanted either way One of normal, italic, oblique. |
font_weight |
int | 400 |
Stroke weight, 400 regular and 700 bold Range 100–900. |
hinting |
enum | auto |
Snap outlines to the pixel grid; auto takes the face's import setting One of auto, on, off. |
letter_spacing |
float | 0 |
Extra space between glyphs, in font pixels |
light_layers |
int | -1 |
Light-layer bitmask; a light3d lights this when their masks share a bit. -1 is every layer |
line_break |
enum | word_or_glyph |
Where a wrapped line may break: between words with a too-long word cut anywhere, between words only, or anywhere One of word_or_glyph, word, glyph. |
line_height |
float | 0 |
Baseline to baseline as a multiple of the size; zero takes the default At least 0. |
markup |
bool | false |
Read the text as markup: bold, italic, colour, alignment, wave and inline images |
material |
asset · material |
— | The material every layer draws with, reading the glyph atlas as its texture; empty takes an inherited material component, else the built-in one. On text2d a material replaces alpha_cutoff |
max_height |
float | 0 |
Font pixels the lines stop at; zero has no limit At least 0. |
max_lines |
int | 0 |
The most lines a block keeps; zero keeps every line At least 0. |
max_width |
float | 0 |
Font pixels the lines wrap at; zero runs the text on one line At least 0. |
monospace_width |
float | 0 |
Font pixels a monospace face's advance is set to; zero keeps its own At least 0. |
outline_color |
color | [0,0,0,1] |
The outline's colour |
outline_size |
float | 0 |
Font pixels the outline reaches around the glyphs; zero draws none At least 0. |
overline |
bool | false |
A line over the glyphs |
overline_color |
color | [0,0,0,0] |
The overline's colour; alpha 0 takes the glyphs' own |
pixel_snap |
bool | false |
Rasterise on whole pixels with no subpixel offset, for a pixel face |
pixels_per_unit |
float | 100 |
Font pixels to one world unit, sizing the block the way a sprite is sized At least 0.01. |
receive_shadows |
bool | true |
Whether shadows land on it; off lights it as if nothing stood between it and every light |
render_layers |
int | -1 |
Layer bitmask; a camera3d draws this when their render_layers share a bit. -1 is every layer |
segmentation_id |
int | 0 |
The id render.snap_aov("segmentation") colours this node by; nodes sharing one share a colour. Zero takes one of its own, from 1 up At least 0. |
shadow_color |
color | [0,0,0,0.5] |
The shadow's colour |
shadow_offset_x |
float | 0 |
Font pixels the shadow is moved along x; zero with y draws none |
shadow_offset_y |
float | 0 |
Font pixels the shadow is moved along y |
shaping |
enum | complex |
Complex shaping joins scripts that need it and falls back to another face; simple does neither and is faster One of complex, simple. |
snap_advances |
bool | false |
Round each glyph's advance to a whole pixel; the layout then depends on the size it is drawn at |
strikethrough |
bool | false |
A line through the glyphs |
strikethrough_color |
color | [0,0,0,0] |
The strikethrough's colour; alpha 0 takes the glyphs' own |
tab_width |
int | 8 |
Spaces between tab stops Range 1–64. |
text |
string | — | The text drawn; text_key wins over it |
text_align |
enum | center |
Where the block sits across the node's origin, and its lines within it: start and end follow the text's direction, left and right do not, justify stretches every full line One of start, center, end, left, right, justify. |
text_key |
string | — | A key in the project's strings, re-read every frame so a language change shows at once |
truncate |
bool | false |
End a block cut short with an ellipsis; needs max_width, and cuts at max_lines or max_height when either is set, else at one line |
truncate_at |
enum | end |
Which part of a cut line the ellipsis stands in for One of end, start, middle. |
underline |
enum | none |
A line under the glyphs, once or twice One of none, single, double. |
underline_color |
color | [0,0,0,0] |
The underline's colour; alpha 0 takes the glyphs' own |
wireframe_color |
color | [0,0,0,0] |
The wireframe's colour; an alpha of zero takes the node's own. Not drawn on a block with a material, whose layers draw through Balaur's own pipeline |
wireframe_sizing |
enum | world |
What wireframe_width counts: world is pixels at one world unit from the camera, thinning with distance, screen is pixels One of world, screen. |
wireframe_width |
float | 0 |
Width of a line drawn along every triangle edge; zero draws none. Not drawn on a block with a material, whose layers draw through Balaur's own pipeline. Not on WebGL2 At least 0. |
Asset types this component references: material.