0.1.0 • Published 5 years ago

webgl-ui-system-font v0.1.0

Weekly downloads
6
License
BSD-3-Clause
Repository
github
Last release
5 years ago

webgl-ui-system-font

Text implementation for webgl-ui that can generate glyphs from system fonts. The constructor takes a WebGL context as its only argument, so that it can generate the textures necessary to render text.

To use with webgl-ui surfaces:

import {FontImplementation} from 'webgl-ui-system-font';
import {Surface} from 'webgl-ui';

const canvas = document.getElementById('canvas');
const gl = canvas.getContext('webgl');
const surface = new Surface(gl);
surface.useTextImplementation(new FontImplementation(gl));