Mesh
</> ursina.mesh
Initialization
Mesh(
vertices=None,
triangles=None,
colors=None,
uvs=None,
normals=None,
static=True,
mode='triangle',
thickness=1,
render_points_in_3d=True,
vertex_buffer=None,
vertex_buffer_length=None,
vertex_buffer_format=None
)
Getters
indices
Get the vertex indices as a flat list. For example if you have tuples in triangles : -> (0,1,2,3,4,5). Or with quads:
Properties
generated_vertices
render_points_in_3d
thickness
Methods
generate()
Must be called after a mesh's values has been updated in order to update visually
serialize()
serialize(vertex_decimal_limit=4, color_decimal_limit=4, uv_decimal_limit=4, normal_decimal_limit=4)
generate_normals()
generate_normals(smooth=True, regenerate=True)
colorize()
colorize(
left=color.white,
right=color.blue,
down=color.red,
up=color.green,
back=color.white,
forward=color.white,
smooth=True,
world_space=True,
strength=1
)
project_uvs()
project_uvs(aspect_ratio=1, direction=Vec3.forward)
clear()
clear(regenerate=True)
save()
save(name='', folder: Path=Func(getattr, application, 'm..., flip_faces=False, vertex_decimal_limit=5, color_decimal_limit=4)