Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/gamestdio/three-text2d
Render texture from canvas into THREE's Mesh or Sprite.
https://github.com/gamestdio/three-text2d
threejs
Last synced: 9 days ago
JSON representation
Render texture from canvas into THREE's Mesh or Sprite.
- Host: GitHub
- URL: https://github.com/gamestdio/three-text2d
- Owner: gamestdio
- License: mit
- Created: 2016-01-05T17:22:06.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2021-12-14T14:27:16.000Z (almost 3 years ago)
- Last Synced: 2024-09-20T06:11:15.316Z (about 2 months ago)
- Topics: threejs
- Language: TypeScript
- Homepage: http://gamestdio.github.io/three-text2d/
- Size: 482 KB
- Stars: 255
- Watchers: 18
- Forks: 66
- Open Issues: 13
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
three-text2d
===Render texture from canvas into THREE's Mesh or Sprite.
Usage
---**Mesh**
```javascript
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**
```javascript
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