Properties:
color
(type: color) — default: whitecoords
(type: coord[]) — array of polyhedrons’ centeredgeForm
(type: object) — default: {}
, object with the following properties:
color
(type: color) — edges’ color, default: blackshowEdges
(type: bool) — default: true
edgeLength
(type: number) — default: 1
opacity
(type: number) — default: 1
subType
(type: string) — it can be one of the following: 'tetrahedron'
, 'octahedron'
, 'dodecahedron'
, or 'icosahedron'
Draw polyhedrons.
{
"type": "uniformPolyhedron",
"color": [1, 0.5, 0.5],
"coords": [
[[0, 0, 0]]
],
"opacity": 0.5, // 50% of opacity
"subType": "tetrahedron"
}
{
"type": "uniformPolyhedron",
"color": [1, 0.5, 1],
"coords": [
[[0, 0, 0]]
],
"edgeForm": { "showEdges": false },
"subType": "octahedron"
}
{
"type": "uniformPolyhedron",
"color": [0.5, 0.5, 1],
"coords": [
[[0, 0, 0]],
[[2, 2, 2]],
],
"edgeForm": { "showEdges": false },
"opacity": 0.7, // 70% of opacity
"subType": "dodecahedron"
}
{
"type": "uniformPolyhedron",
"color": [0, 1, 0.4],
"coords": [
[[0, 0, 0]]
],
"edgeForm": { "showEdges": false },
"subType": "icosahedron"
}
{
"type": "uniformPolyhedron",
"color": [1, 1, 1],
"coords": [
[[0, 0, 0]]
],
"edgeForm": { "showEdges": false },
"edgeLength": 10,
"subType": "dodecahedron"
}