Exemple #1
0
 def makeDefault(self, meshSrc="Empty"):
     """Create an Actor with a default set of components, and specified mesh."""
     actor = Actor(self.renderer)
     actor.components['Mesh'] = Mesh.getMesh(meshSrc)  # NOTE Meshes are currently shared, therefore not linked to individual actors
     actor.components['Transform'] = Transform(actor=actor)
     actor.components['Material'] = Material(actor=actor)
     return actor
Exemple #2
0
 def loadResources(self):
     # TODO load meshes even for each component type
     for src in ['Cube.obj', 'CubeEdge.obj', 'SmallSphere.obj', 'Dragon.obj', 'TinySphere.obj']:
         Mesh.getMesh(src)  # ensures this mesh is loaded