pygfx.objects.Text

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

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).

  • name (str) – The name of the text object for inspection and debugging.

Examples

Hello text

Hello text

Text contrast

Text contrast

Multiple Fonts

Multiple Fonts

Text snake

Text snake

Lightmap

Lightmap

Transparency 1

Transparency 1

Ambient occlusion

Ambient occlusion

Transparency 2

Transparency 2

Text waterfall

Text waterfall

Toon Rendering 2

Toon Rendering 2

Text align

Text align

Text outline always behind text itself

Text outline always behind text itself

Transparency

Transparency

Text anchor

Text anchor

Text justification

Text justification

Text size

Text size

Culling

Culling

Points with different markers

Points with different markers

Pytorch Integration

Pytorch Integration