Creating a cube with rounded corners in Three.js

2019-04-20 09:09发布

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?

2条回答
啃猪蹄的小仙女
2楼-- · 2019-04-20 09:17

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

查看更多
冷血范
3楼-- · 2019-04-20 09:30

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

查看更多
登录 后发表回答