pygfx.helpers.AxesHelper
- class pygfx.helpers.AxesHelper(size=1.0, thickness=2)
Bases:
Line
A WorldObject to indicate the scene’s axes.
Generates three arrows starting at the local origin and pointing into the direction of the local x, y, and z-axis respectively. Each arrow is colored to represent the respective axis. In particular, the x-axis arrow is blue, the y-axis arrow is green, and the z-axis arrow is red.
- Parameters:
size (float) – The length of the lines in local space.
thickness (float) – The thickness of the lines in (onscreen) pixels.
- set_colors(x, y, z)
Update arrow colors.
- Parameters:
x (int, float, str, tuple) – The color of the x arrow. This is a either a single int or float (gray), a 4-tuple
(r,g,b,a)
of ints or floats, or a hex-coded color string in one of the following formats:#RGB
,#RGBA
,#RRGGBB
,#RRGGBBAA
.y (int, float, str, tuple) – The color of the x arrow. This is a either a single int or float (gray), a 4-tuple
(r,g,b,a)
of ints or floats, or a hex-coded color string in one of the following formats:#RGB
,#RGBA
,#RRGGBB
,#RRGGBBAA
.z (int, float, str, tuple) – The color of the x arrow. This is a either a single int or float (gray), a 4-tuple
(r,g,b,a)
of ints or floats, or a hex-coded color string in one of the following formats:#RGB
,#RGBA
,#RRGGBB
,#RRGGBBAA
.