three-bmfont-text

Multipage Fonts

See the test-multi.js for a full example.

Specify a multipage option when updating your text geometry.

var geom = createText({ multipage: true, ... })
geom.update('foobar')

You also need to make sure your BMFont tool is exporting the pages field correctly.

Shader

This module exports shaders/multipage for convenience. Options:

This will generate a new shader with N number of texture samplers. Some devices may not support 8 or more active textures.

Note: RawShaderMaterial is required in order to support a wide range of ThreeJS versions.

var Shader = require('three-bmfont-text/shaders/multipage')

var material = new THREE.RawShaderMaterial(Shader({
  textures: fontAtlasPages,
  opacity: 0.25,
  color: 0xff0000
}))