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?
You can use RoundedBoxGeometry
from the three.js examples.
const geometry = new RoundedBoxGeometry( 10, 10, 10, 6, 2 );
Import it into your project using a pattern like so:
import { RoundedBoxGeometry } from './threejs/examples/jsm/geometries/RoundedBoxGeometry.js';
three.js r.131
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With