Skip to content
Automatic text geometry wrapping in three.js
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
example arguments updated Jan 25, 2016
.gitignore git ignore Jan 28, 2016
README.md Update README.md Jan 25, 2016
TextWrapper.js comment fixed Jan 25, 2016

README.md

threejs-text-wrapper

Text geometry wrapping in three.js

Requires the Three.js TextGeometry, FontUtils, and a typeface.js font to work! You can find all these files and some existing typeface fonts at https://github.com/mrdoob/three.js

Usage

var Wrapper = new TextWrapper();

var input = 'some super long text that needs to wrap';
		
var text = Wrapper.Wrap({ 
	string: input, 
	size: 5, 
	color: 0x0000FF, 
	lineLength: 50, 
	height: .2, 
	coords: {
	     x: 0,
	     y: 0,
	     z: 0
	} 
});

scene.add( text );
You can’t perform that action at this time.