How do I make a TextGeometry multiline? How do I put it inside a square so it wraps like html text does inside a div?

前端 未结 4 1471
情书的邮戳
情书的邮戳 2021-01-11 23:13

I\'m making some 3D text using WebGL, three.js, and THREE.TextGeometry. It\'s working fine so far. I\'m able to create a single line o

4条回答
  •  南笙
    南笙 (楼主)
    2021-01-11 23:40

    Following up on the previous post. You can also break lines with \n and text geometry will respect it. This however, doesn't solve the "html-like wrapping"

    i.e

    let text = `first line. \n second line. \n third line.`;
    

提交回复
热议问题