问题
I want to simulate 3D text being "drawn out" or "built" inside my scene. The idea is to take the final score from a game and display it dynamically at the end of the game. If you don't know what I mean, imagine somebody graffiti-ing/tagging some numbers on a wall. The numbers don't "pop" in like they would if you typed them, but are constructed by building up each number.
Reference for graffiti-ing
I'm pretty sure that I want to use TextGeometry
for this but I have absolutely no idea how I would go about making it appear dynamically and there aren't really any examples of this
My only thought would be to hide each vertex in the TextGeometry and then make each vertex visible with a delay in between but I have no idea if that is anywhere near the right way to do it.
I know that it's possible to animate a line being drawn, but I'm going to need to use TextGeometry
as I am using a specific font
This JSFiddle is a great example of what I want, but with text instead of a line.
I don't have any code for this as I have no idea where to start, thanks in advanced for your suggestions, any links/references/code examples are appreciated!
来源:https://stackoverflow.com/questions/50275697/three-js-dynamically-build-draw-textgeometry