traits¶
-
class
pythreejs.traits.
Color
(default_value=traitlets.Undefined, allow_none=False, read_only=None, help=None, config=None, **kwargs)[source]¶ A string holding a valid HTML color such as ‘blue’, ‘#060482’, ‘#A80’
-
default_value
= traitlets.Undefined¶
-
info_text
= 'a valid HTML color'¶
-
-
class
pythreejs.traits.
Euler
(default_value=traitlets.Undefined, **kwargs)[source]¶ A trait for a set of Euler angles.
Expressed as a tuple of tree floats (the angles), and the order as a string. See the three.js docs for futher details.
-
default_value
= (0, 0, 0, 'XYZ')¶
-
info_text
= 'a set of Euler angles'¶
-
-
class
pythreejs.traits.
Face3
(**kwargs)[source]¶ A trait for a named tuple corresponding to a three.js Face3.
Accepts named tuples with the field names: (‘a’, ‘b’, ‘c’, ‘normal’, ‘color’, ‘materialIndex’)
-
info_text
= 'a named tuple representing a Face3'¶
-
-
class
pythreejs.traits.
Matrix3
(trait=<class 'traitlets.traitlets.CFloat'>, default_value=traitlets.Undefined, **kwargs)[source]¶ A trait for a 9-tuple corresponding to a three.js Matrix3.
-
default_value
= (1, 0, 0, 0, 1, 0, 0, 0, 1)¶
-
info_text
= 'a three-by-three matrix (9 element tuple)'¶
-
-
class
pythreejs.traits.
Matrix4
(trait=<class 'traitlets.traitlets.CFloat'>, default_value=traitlets.Undefined, **kwargs)[source]¶ A trait for a 16-tuple corresponding to a three.js Matrix4.
-
default_value
= (1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1)¶
-
info_text
= 'a four-by-four matrix (16 element tuple)'¶
-
-
class
pythreejs.traits.
Uniform
(default_value=traitlets.Undefined, **kwargs)[source]¶ A dict holding uniforms for a ShaderMaterial
-
class
pythreejs.traits.
Uninitialized
[source]¶ Placeholder sentinel used while waiting for a initialization via sync
-
class
pythreejs.traits.
Vector2
(trait=<class 'traitlets.traitlets.CFloat'>, default_value=traitlets.Undefined, **kwargs)[source]¶ A trait for a 2-tuple corresponding to a three.js Vector2.
-
default_value
= (0, 0)¶
-
info_text
= 'a two-element vector'¶
-
-
class
pythreejs.traits.
Vector3
(trait=<class 'traitlets.traitlets.CFloat'>, default_value=traitlets.Undefined, **kwargs)[source]¶ A trait for a 3-tuple corresponding to a three.js Vector3.
-
default_value
= (0, 0, 0)¶
-
info_text
= 'a three-element vector'¶
-
-
class
pythreejs.traits.
Vector4
(trait=<class 'traitlets.traitlets.CFloat'>, default_value=traitlets.Undefined, **kwargs)[source]¶ A trait for a 4-tuple corresponding to a three.js Vector4.
-
default_value
= (0, 0, 0, 0)¶
-
info_text
= 'a four-element vector'¶
-
-
class
pythreejs.traits.
WebGLDataUnion
(default_value=traitlets.Undefined, dtype=None, shape_constraint=None, kw_array=None, kw_widget=None, **kwargs)[source]¶ A trait that accepts either a numpy array, or an NDArrayWidget reference.
Also constrains the use of 64-bit arrays, as this is not supported by WebGL.