pygfx.objects.Text

class pygfx.objects.Text(geometry=None, material=None, *, visible=True, render_order=0, render_mask='auto')

Bases: WorldObject

A text.

See :class:pygfx.TextGeometry for details.

Parameters:
  • geometry (TextGeometry) – The data defining the glyphs that make up the text.

  • material (Material) – The data defining the appearance of the object.

  • visible (bool) – Whether the object is visible.

  • render_order (int) – The render order (when applicable for the renderer’s blend mode).

  • render_mask (str) – Determines the render passes that the object is rendered in. It’s recommended to let the renderer decide, using “auto”.

  • position (Vector) – The position of the object in the world. Default (0, 0, 0).

Examples

Hello text

Hello text

Text contrast

Text contrast

Text snake

Text snake

Lightmap

Lightmap

Ambient occlusion

Ambient occlusion

Text waterfall

Text waterfall

Text align

Text align

Transparency

Transparency

Text anchor

Text anchor

Points with different markers

Points with different markers

Text justification

Text justification

Text size

Text size

Culling

Culling