aframe-text-sprite
A wrapper for THREE.TextSprite.
demo
Try it out!
setup
npm
npm i aframe-text-sprite
ES module
import 'aframe';
import 'aframe-text-sprite';
browser
<script src="https://unpkg.com/aframe/dist/aframe-master.min.js"></script>
<script src="https://unpkg.com/aframe-text-sprite"></script>
properties
property | type | default |
---|
align | 'string' | 'center' |
fillStyle | 'color' | '#fff' |
fog | 'boolean' | false |
fontFamily | 'string' | 'sans-serif' |
fontSize | 'number' | 1 |
fontStyle | 'string' | 'normal' |
fontVariant | 'string' | 'normal' |
fontWeight | 'string' | 'normal' |
lineGap | 'number' | 0.15 |
opacity | 'number' | 1 |
padding | 'number' | 0.25 |
strokeStyle | 'color' | '#000' |
strokeWidth | 'number' | 0 |
text | 'string' | '' |
transparent | 'boolean' | true |