Debug Text

Published May 01, 2018
Advertisement

Having decent tools to debug the generators is crucial. One of the tools I always like to have is lots of debug rendering features. Putting debug text in the world is a big part of that, so I need ThreeJS to do that for me. ThreeJS has some nice stuff built in but I don't want to add dependencies on font files. My typical workflow right now is loading my generator test bed HTML file from explorer straight into Chrome. Chrome isn't a big fan of loading stuff like fonts from local file storage unless you load chrome with a particular command line argument which is not suited to how I'm working. So to keep it simple no fonts please.

So I decided to just make a simple 'font' defined as line segments and put together a helper to add debug text to the world using ThreeJS LineSegments geometry. And I kinda like the way it looks :)

2112209503_debugtext.PNG.ae2b9e0f5365a41944563ab62a581a2e.PNG

Bonus: Note that the £ is missing here. That's because of an awkward HTML character encoding issue. I need to tell Chrome about the encoding of my JS files. I'll get around to that soon!

1 likes 1 comments

Comments

Rutin

Very neat! :) 

May 01, 2018 02:14 PM
You must log in to join the conversation.
Don't have a GameDev.net account? Sign up!
Profile
Author
Advertisement
Advertisement