Monday, June 3, 2024
Homepage · 3d
 Popular · Latest · Hot · Upcoming
146
rated 0 times [  149] [ 3]  / answers: 1 / hits: 16490  / 12 Years ago, sun, october 21, 2012, 12:00:00

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?


More From » 3d

 Answers
42

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


[#82454] Friday, October 19, 2012, 12 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
jaquelineh

Total Points: 360
Total Questions: 105
Total Answers: 114

Location: Saint Pierre and Miquelon
Member since Fri, Jan 28, 2022
2 Years ago
;