Link

VglSpriteMaterial

A material for a use with a VglSprite component, corresponding THREE.SpriteMaterial.

Properties of VglMaterial are also available as mixin.

props

  • color color (optional) default: '#fff'

    CSS style color of the material.

  • map name (optional)

    The texture map of the material.

computed properties

  • inst

    The THREE.SpriteMaterial instance.

Example

<template>
  <div>
    <vgl-renderer antialias>
      <vgl-scene>
        <vgl-texture
          name="tex"
          src="/img/star.gif"
        />
        <vgl-sprite-material
          name="spm"
          map="tex"
        />
        <vgl-sprite material="spm" />
      </vgl-scene>
      <vgl-perspective-camera orbit-position="20 1 1" />
    </vgl-renderer>

    <aside class="control-panel">
      <label>No effect<input type="range"></label>
    </aside>
  </div>
</template>