Just starting out with three.js and looking for some help,
I want to place a simple mesh at a random position relative to the coordinates of another mesh, like this:
I want the small yellow box to be positioned randomly above the letter M.emphasized text
I attempted the following code snippet
var points = THREE.GeometryUtils.randomPointsInGeometry( geometry, nPoints );
const cube2 = new THREE.Mesh(cube, jaune);
cube2.position.set(1, 0, 0);
scene.add(cube2);
Unfortunately, it doesn't seem to work. Apologies in advance if it's a basic mistake ;)