Link Search Menu Expand Document

VglDodecahedronGeometry

A component for generating a dodecahedron geometries, corresponding THREE.DodecahedronGeometry.

Properties of VglGeometry are also available as mixin.

props

  • radius float (optional) default: 1

    Radius of the dodecahedron.

  • detail int (optional)

    Setting this to a value greater than 0 adds vertices making it no longer a dodecahedron.

computed properties

  • inst

    dependencies: radius, detail

Example

<template>
  <div>
    <vgl-renderer antialias>
      <vgl-scene>
        <vgl-dodecahedron-geometry
          name="geo"
          :radius="radius"
          :detail="detail"
        />
        <vgl-mesh-standard-material name="std" />
        <vgl-mesh
          geometry="geo"
          material="std"
        />
        <vgl-ambient-light color="#ffeecc" />
        <vgl-directional-light position="0 1 2" />
      </vgl-scene>
      <vgl-perspective-camera orbit-position="100 1.2 0.5" />
    </vgl-renderer>
    <aside class="control-panel">
      <label>Radius<input
        v-model="radius"
        type="range"
      ></label>
      <label>Detail<input
        v-model="detail"
        type="range"
        max="10"
      ></label>
    </aside>
  </div>
</template>

<script>
export default {
  data: () => ({
    radius: 10,
    detail: 0,
  }),
};
</script>