Mesh
</> ursina.mesh
Initialization
copy Mesh(
vertices =None,
triangles =None,
colors =None,
uvs =None,
normals =None,
static=True,
mode ='triangle' ,
thickness =1 ,
render_points_in_3 d=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)) -> (0,1,2,3,4,5). Or with quads: ((0,1,2,3),) -> (0,1,2,2,3,0).
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()
copy serialize(vertex_decimal_limit=4 , color_decimal_limit=4 , uv_decimal_limit=4 , normal_decimal_limit=4 )
generate_normals()
copy generate_normals(smooth=True, regenerate=True)
colorize()
copy 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()
copy project_uvs(aspect_ratio=1 , direction=Vec3 .forward)
clear()
copy clear(regenerate=True)
save()
copy save(name='' , folder: Path=Func(getattr, application, 'm..., flip_faces=False, vertex_decimal_limit=5 , color_decimal_limit=4 )