mirror of
https://github.com/WhitestormJS/whs.js.git
synced 2026-02-01 16:57:32 +00:00
Adds doc for Dodecahedron - #189
Former-commit-id: cd6294158df2e962502f95370260842fa4c22f03
This commit is contained in:
parent
a83020f03e
commit
870fda9df9
@ -6,7 +6,44 @@ import {
|
||||
|
||||
import {MeshComponent} from '../../core/MeshComponent';
|
||||
|
||||
/**
|
||||
* @class Dodecahedron
|
||||
* @category components/meshes
|
||||
* @description In geometry, a dodecahedron is any polyhedron with twelve flat faces. <br/><br/>
|
||||
* The most familiar dodecahedron is the regular dodecahedron, which is a Platonic solid. <br/>
|
||||
* There are also three regular star dodecahedra, which are constructed as stellations of the convex form. <br/>
|
||||
* All of these have icosahedral symmetry, order 120.
|
||||
* Dodecahedron creates Dodecahedron object by it's radius and detail.
|
||||
* @param {Object} [params] - The params.
|
||||
* @extends MeshComponent
|
||||
* @memberof module:components/meshes
|
||||
* @example <caption>Creating a Dodecahedron, and adding to app</caption>
|
||||
* new Dodecahedron({
|
||||
* geometry: {
|
||||
* radius: 2
|
||||
* },
|
||||
*
|
||||
* material: new THREE.MeshBasicMaterial({
|
||||
* color: 0xffffff
|
||||
* }),
|
||||
*
|
||||
* position: {
|
||||
* y: 10
|
||||
* }
|
||||
* }).addTo(app);
|
||||
*/
|
||||
class Dodecahedron extends MeshComponent {
|
||||
/**
|
||||
* Default values for parameters
|
||||
* @member {Object} module:components/meshes.Dodecahedron#defaults
|
||||
* @static
|
||||
* @default <pre>
|
||||
* geometry: {
|
||||
* radius: 1,
|
||||
* detail: 0
|
||||
* }
|
||||
* </pre>
|
||||
*/
|
||||
static defaults = {
|
||||
...MeshComponent.defaults,
|
||||
geometry: {
|
||||
@ -15,6 +52,14 @@ class Dodecahedron extends MeshComponent {
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Instructions
|
||||
* @member {Object} module:components/meshes.Dodecahedron#instructions
|
||||
* @static
|
||||
* @default <pre>
|
||||
* geometry: ['radius', 'detail']
|
||||
* </pre>
|
||||
*/
|
||||
static instructions = {
|
||||
...MeshComponent.instructions,
|
||||
geometry: ['radius', 'detail']
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user