问题
Is it possible to create a cube with rounded corners of custom radius in three.js and then be able to texture that cube with an image?
回答1:
You can round the corners of a cube using the Loop subdivision algorithm implemented in THREE.SubdivisionModifier.
Here it is in action: http://threejs.org/examples/webgl_modifier_subdivision.html.
You can texture this geometry just as you would texture any other geometry.
three.js r.70
回答2:
For a simple and straightforward example of subdivision modifiers on cubes (and other basic geometries), check out
http://stemkoski.github.com/Three.js/Subdivision-Cube.html
来源:https://stackoverflow.com/questions/12994175/creating-a-cube-with-rounded-corners-in-three-js