TextMesh for ThreeJS that extends Mesh and uses TextGeometry.
npm i @jgtools/textmesh
import TextMesh from "@jgtools/textmesh";
// ...
<script type="module">
import TextMesh from "https://cdn.jsdelivr.net/npm/@jgtools/textmesh@1.0.0/dist/index.min.js";
// ...
</script>
import { FontLoader } from "three/examples/jsm/loaders/FontLoader";
import TextMesh from "@jgtools/textmesh";
const loader = new FontLoader();
const font = await loader.loadAsync("font.json");
const mesh = new TextMesh(font);
mesh.setText("Hello World!");
// use it as a regular Mesh
scene.add(mesh);
// get text as string
const text = mesh.getText();
MIT