class SimpleModel
A Model containing a single simple geometry.
class SimpleModel extends Object3D
Inheritance Object3D –> SimpleModel
| Name | Description |
|---|---|
| Constructors | |
| SimpleModel() | Creates a new SimpleModel. |
| Properties | |
| color | Base-color of the material of the model. |
| metalness | Metalness factor of the material of the model. |
| roughness | Roughness factor of the material of the model. |
| Methods | |
| createBox | Create a Box shaped geometry for the model. |
| createSphere | Create a Sphere shaped geometry for the model. |
| createPlane | Create a Plane shaped geometry for the model. |
| getColor | Get the value of .color. |
| setColor | Set the value of .color. |
| setColorTexture | Set a texture image as the base color map of the model. |
Constructors
SimpleModel()
Creates a new SimpleModel.
Properties
See the base Object3D class for common properties.
color
.color: Object
Base-color of the material of the model.
Read-only. Use the method .setColor to modify this property.
metalness
.metalness: Number
Metalness factor of the material of the model.
Readable and writable.
roughness
.roughness: Number
Roughness factor of the material of the model.
Readable and writable.
Methods
See the base Object3D class for common methods.
createBox()
.createBox(width: Number, height: Number, depth: Number): undefined
Create a Box shaped geometry for the model.
Parameters
width: width of the Box
height: height of the Box
depth: depth of the Box
createSphere()
.createSphere(radius: Number, widthSegments: Number, heightSegments: Number): undefined
Create a Sphere shaped geometry for the model.
Parameters
radius: radius of the Sphere
widthSegments: number of width segments of the triangulated Sphere.
heightSegments: number of height segments of the triangulated Sphere.
createPlane()
.createPlane(width: Number, height: Number): undefined
Create a Plane shaped geometry for the model.
Parameters
width: width of the Plane
height: height of the Plane
getColor()
.getColor(color: Vector3) : Vector3
Copy the value of .color into color.
setColor()
.setColor(color: Vector3): undefined
Set the value of .color according to color.
.setColor(r: Number, g: Number, b: Number ): undefined
set the value of .color according to the r, g, b values.
setColorTexture()
.setColorTexture(image: Image): undefined
Set a texture image as the base color map of the model.
.setColorTexture(target: GLRenderTarget): undefined
Use a rendering result as the base color map of the model.
.setColorTexture(mmcamera: MMCamera): undefined
Usa a web-camera image source as the base color map of the model.
.setColorTexture(mmlazyvideo: MMLazyVideo): undefined
Usa a video-file image source as the base color map of the model.
.setColorTexture(mmvideo: MMVideo): undefined
Usa a video-file player as the base color map of the model.