three-text2d

by gamestdio

gamestdio / three-text2d

Render texture from canvas into THREE's Mesh or Sprite.

213 Stars 55 Forks Last release: over 2 years ago (0.4.1) MIT License 65 Commits 6 Releases

Available items

No Items, yet!

The developer of this repository has not created any items for sale yet. Need a bug fixed? Help with integration? A different license? Create a request here:

three-text2d

Render texture from canvas into THREE's Mesh or Sprite.

Usage

Mesh

import { MeshText2D, textAlign } from 'three-text2d'

var text = new MeshText2D("RIGHT", { align: textAlign.right, font: '30px Arial', fillStyle: '#000000', antialias: true }) scene.add(text)

Sprite

import { SpriteText2D, textAlign } from 'three-text2d'

var sprite = new SpriteText2D("SPRITE", { align: textAlign.center, font: '40px Arial', fillStyle: '#000000' , antialias: false }) scene.add(sprite)

License

MIT

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.