Link Search Menu Expand Document

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

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

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