コード例 #1
0
 def __init__(self, color='pink', transparent=False):
     Mesh.__init__(self,
                   geometry=PlaneGeometry(),
                   material=MeshBasicMaterial(color=color))
     self.material.side = 'DoubleSide'
     if transparent:
         self.material.transparent = transparent
         self.material.opacity = 0.5
コード例 #2
0
 def __init__(self, p1, p2, p3, color='yellow'):
     geometry = BufferGeometry(
         attributes={
             'position':
             BufferAttribute(np.vstack((
                 p1, p2, p3)).reshape(3, 3).astype(np.float32),
                             normalized=False)
         })
     material = MeshBasicMaterial(color=color)
     material.side = 'DoubleSide'
     Mesh.__init__(self, geometry=geometry, material=material)
コード例 #3
0
 def __init__(self, color='red', radius=0.025):
     Mesh.__init__(self,
                   geometry=SphereGeometry(radius=radius),
                   material=MeshLambertMaterial(color=color))