Link Search Menu Expand Document

You are browsing the documentation for v0.x.
Visit here for the newest version.

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
      camera="camera"
      scene="scene"
    >
      <vgl-scene name="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"
        name="camera"
      />
    </vgl-renderer>
  </div>
</template>