JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 364
  • Score
    100M100P100Q98140F
  • License MIT

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

Package Exports

  • three-text2d

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (three-text2d) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

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