oursin.primitives

Primitive meshes

Functions

create

Creates primitive mesh

delete

Deletes meshes

set_color

Set the color of mesh renderer

set_position

Set the position of mesh renderer

set_scale

Set the scale of mesh renderer

create(mesh_names)[source]

Creates primitive mesh

Parameters

mesh_nameslist of strings

IDs of meshes being created

>>> urn.create(['cube1','cube2'])
delete(mesh_names)[source]

Deletes meshes

Parameters

mesh_nameslist of strings

IDs of meshes being deleted

>>> urn.delete(['cube1'])
set_position(mesh_pos)[source]

Set the position of mesh renderer

Parameters

mesh_posdict {stringlist of three floats}

dictionary of IDs and vertex positions of the mesh

>>> urn.set_position({'cube1': [1, 2, 3]})
set_scale(mesh_scale)[source]

Set the scale of mesh renderer

Parameters

mesh_scaledict {stringlist of three floats}

dictionary of IDs and new scale of mesh

>>> urn.set_scale({'cube1': [3, 3, 3]})
set_color(mesh_color)[source]

Set the color of mesh renderer

Parameters

mesh_colordict {stringstring hex color}

dictionary of IDs and new hex color of mesh

>>> urn.set_color({'cube1': '#FFFFFF'})