You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hey folks, just spent a few hours scratching my head trying to figure out how to get this to work. Here's some code that works in ES6 with the latest three.js build ("three": "^0.147.0").
First of all, you have to include the following dependency at the top of your file:
import { RoundedBoxGeometry } from "three/examples/jsm/geometries/RoundedBoxGeometry.js";
Then, to create a RoundedBoxGeometry, you have to write the following code:
let geometry_1 = new RoundedBoxGeometry(50, 50, 50, 10, 10);
let material_1 = new THREE.MeshPhongMaterial({ color: 0x00ff00 });
let cube_1 = new THREE.Mesh(geometry_1, material_1);
scene.add(cube_1)
Here's what you'll get:
Hope this helps!
The text was updated successfully, but these errors were encountered:
Hey folks, just spent a few hours scratching my head trying to figure out how to get this to work. Here's some code that works in ES6 with the latest three.js build ("three": "^0.147.0").
First of all, you have to include the following dependency at the top of your file:
Then, to create a RoundedBoxGeometry, you have to write the following code:
Here's what you'll get:
Hope this helps!
The text was updated successfully, but these errors were encountered: