simvx.core.nodes_3d.text

Text3D – depth-tested MSDF text billboard at a 3D world position.

Module Contents

Classes

Text3D

Text that floats at a 3D world position as a depth-tested billboard.

API

class simvx.core.nodes_3d.text.Text3D(**kwargs)[source]

Bases: simvx.core.nodes_3d.node3d.Node3D

Text that floats at a 3D world position as a depth-tested billboard.

Rendered by the graphics backend’s Billboard2DPass (design §5.2) as a camera-facing run of MSDF glyph quads, depth-tested against the 3D scene so the label is correctly occluded by (and occludes) geometry – unlike a plain screen-space overlay. Symmetric with Text2D / Sprite3D.

font_scale is the text-size multiplier (the canonical font_scale * 16 logical-pixel unit shared with the whole text family); pixel_size maps those logical pixels to world units, so the on-screen size scales with both the node’s distance from the camera and pixel_size.

Example::

label = self.add_child(Text3D(text="Boss", position=(0, 2, -5)))
label.font_scale = 2.0

Initialization

text

‘Property(…)’

font_scale

‘Property(…)’

pixel_size

‘Property(…)’

colour

‘Colour(…)’

alignment

‘Property(…)’

billboard

‘Property(…)’

offset

‘Property(…)’

property pixel_offset: simvx.core.math.types.Vec2[source]

Offset from the anchor in logical pixels ((0, 0) when unset).

on_draw(renderer) None[source]

Emit a depth-tested MSDF text billboard for the renderer (design §5.2).

position

‘_SpatialVecProperty(…)’

rotation

‘Property(…)’

scale

‘_SpatialVecProperty(…)’

render_layer

‘Property(…)’

property rotation_degrees: simvx.core.math.types.Vec3
property world_position: simvx.core.math.types.Vec3
property world_rotation: simvx.core.math.types.Quat
property world_scale: simvx.core.math.types.Vec3
property forward: simvx.core.math.types.Vec3
property right: simvx.core.math.types.Vec3
property up: simvx.core.math.types.Vec3
translate(offset: tuple[float, float, float] | numpy.ndarray)
translate_global(offset: tuple[float, float, float] | numpy.ndarray)
rotate(axis: tuple[float, float, float] | numpy.ndarray, angle: float)
rotate_x(angle: float)
rotate_y(angle: float)
rotate_z(angle: float)
look_at(target: tuple[float, float, float] | numpy.ndarray, up=None)
face_along(forward: tuple[float, float, float] | numpy.ndarray, up: tuple[float, float, float] | numpy.ndarray | None = None) None
set_render_layer(index: int, enabled: bool = True) None
is_on_render_layer(index: int) bool
wrap_bounds(bounds: tuple[float, float, float] | numpy.ndarray, margin: float = 1.0)
strict_errors: ClassVar[bool]

True

script_error_raised

‘Signal(…)’

dynamic: bool

False

classmethod __init_subclass__(**kwargs)
property name: str
property update_mode: simvx.core.descriptors.UpdateMode
property visible: bool
reset_error() None
add_child(node: simvx.core.node.Node) simvx.core.node.Node
remove_child(node: simvx.core.node.Node)
reparent(new_parent: simvx.core.node.Node)
get_node(path: str) simvx.core.node.Node
get_node_or_none(path: str) simvx.core.node.Node | None
find(target, *, direct: bool = False)
find_all(target, *, direct: bool = False)
walk(*, include_self: bool = True) collections.abc.Iterator[simvx.core.node.Node]
property path: str
add_to_group(group: str)
remove_from_group(group: str)
is_in_group(group: str) bool
on_ready() None
on_enter_tree() None
on_exit_tree() None
on_update(dt: float) None
on_fixed_update(dt: float) None
on_picked(event: simvx.core.events.InputEvent) None
on_unhandled_input(event: simvx.core.events.TreeInputEvent) None
start_coroutine(gen: simvx.core.descriptors.Coroutine) simvx.core.descriptors.CoroutineHandle
stop_coroutine(gen_or_handle)
queue_redraw() None
property render_dirty: bool
clear_children()
destroy()
call_deferred(method: collections.abc.Callable[..., Any], *args: Any) None
property app
property tree: simvx.core.scene_tree.SceneTree
property physics
property physics_2d
__getitem__(key: str)
classmethod get_properties() dict[str, simvx.core.descriptors.Property]
__repr__()