问题
I've been wondering is it possible to do skinning to the 3d text with loaded images as texture? I knew you could do it with cubes and others since most of the sample were showing tutorials how to do it.
What did I tried was map it with THREE. ImageUtils.loadTexture
directed from the path but what did i get is some transparency object. I wonder how to use the same concept such as:
CubeGeometry(width, height, depth, widthSegments, heightSegments, depthSegments, listofmaterials)
in TextGeometry since TextGeometry( text, {parameters} )
.
It might be possible we have to do it for every sides using https://github.com/mrdoob/three.js/issues/1318 as guidelines.
回答1:
Here is an example of 3D text with a texture applied:
http://stemkoski.github.io/Three.js/Text3D-Textures.html
Hope it helps!
回答2:
TextGeometry doesn't provide UV coordinates and if you think a bit it would be really hard to abstract that process and serialize it for any text geometry. Text is yet another form of custom mesh, therefore, you would have to provide textureCoord attribute manually and use ShaderMaterial to sample textures. Hope this helps.
来源:https://stackoverflow.com/questions/16807184/three-js-rendering-3d-text-with-custom-texture