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?
相关问题
- Is there a limit to how many levels you can nest i
- How to toggle on Order in ReactJS
- void before promise syntax
- Keeping track of variable instances
- Can php detect if javascript is on or not?
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
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