Link Search Menu Expand Document

VglMeshDepthMaterial

A material for drawing geometry by depth, corresponding THREE.MeshDepthMaterial. This material is not affected by lights.

Properties of VglMaterial are also available as mixin.

props

  • fog boolean (optional)

    Whether the material is affected by fog.

  • map name (optional)

    The color map of the material.

computed properties

  • inst

    The THREE.MeshDepthMaterial instance.

Example

<template>
  <div>
    <vgl-renderer antialias>
      <vgl-scene>
        <vgl-torus-knot-geometry name="geo" />
        <vgl-mesh-depth-material name="mat" />
        <vgl-mesh
          geometry="geo"
          material="mat"
        />
      </vgl-scene>
      <vgl-perspective-camera
        orbit-position="5 1 0.5"
        near="3"
        far="7"
      />
    </vgl-renderer>
  </div>
</template>