Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I attach a text to the vertices of a cube in three.js? Also, Can I add a Text at any point inside the Cube?

Tags:

three.js

I am trying to create a cube using three.js for a project. I need to add text to vertices and at different points inside the cube. Any idea how this can be done?

like image 237
user2101977 Avatar asked Feb 23 '13 09:02

user2101977


1 Answers

For some basic code examples of using Sprite objects in Three.js, check out:

http://stemkoski.github.com/Three.js/Sprites.html

And for an easy way to create images that contain text to use as your sprite textures, check out the sample code at:

http://stemkoski.github.com/Three.js/Texture-From-Canvas.html

I think a combination of these two ideas will achieve what you are looking to do.

like image 157
Stemkoski Avatar answered Sep 22 '22 11:09

Stemkoski