There used to be a randomPointsInBufferGeometry function in three.js/examples/jsm/utils/GeometryUtils.js, as mentioned by loowee in this post but it’s no longer there.

I’ve looked around in other files, but couldn’t find it. Did I just miss it or has it been removed? If so, is there a reason I should be aware of?

Is there any similar function to randomly fill a volume (not a surface) with points?


Approach 1: How fill a loaded STL mesh ( NOT SIMPLE SHAPES LIKE CUBE ETC) with random particles and animate with this geometry bound in three.js - #6 by prisoner849 . Awfully slow, imperfect.
Approach 2: Three-mesh-bvh: A plugin for fast geometry raycasting and spatial queries! . Fast, perfect, awesome, easy-to-use.
Used the second one here: Sand Nefertiti (three-mesh-bvh)