inch-threejs-fontloader

Module that loads path-based font data in for use in extruded geometry text


Keywords
inch, game, threejs, font, typeface.js
License
BSD-3-Clause
Install
npm install inch-threejs-fontloader@1.0.0

Documentation

inch-threejs-fontloader

If you want to use the inch-geometry2d-gltext module you are going to need at least one font.

This module loads the font. But you don’t use this module, you just require the font you want.

All the font loading code is from three.js and typeface.js. The typefaces are also from typeface.js

Usage

This is how you load a font:

require(‘inch-font-helvetiker_regular’)(THREE);

This is how you write your own loader. I assume you’ve gotten your data from somewhere like: typeface.js

"use strict";

var fontData = {};

module.exports = function(THREE) {
    require('inch-threejs-fontloader')(THREE)(fontData);
};```

# Alternatives
Roll your own. Or take a look at using html/css to put text on the page. It’ll be faster and will look nicer.

# The inch Framework
This repository is just one part of the icnh game framework. I wanted a modularised game framework (like [voxel.js](http://voxeljs.com) or [crtrdg](http://crtrdg.com/) but one that follows my needs as a game developer. I’m sure it’s even possible to mix and match the modules from the above into the inch framework.