Three.js - Dynamically “build/draw” TextGeometry

青春壹個敷衍的年華 提交于 2020-01-06 06:56:09

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!