Drawing a 3D Mesh (javascript)

Hi, I am trying to make it to where you can drag with the mouse to make a shape, and then it fills in the 2D outline with a 3D mesh. I took a look at the Mesh class from the documentation, but it doesn’t really help me at all. (Here’s an example of what I’m trying to do: Unity Asset Store - The Best Assets for Game Making)

Any help is greatly appreciated, thanks!
EDIT: Sorry, forgot to say, I want to be able to do this during runtime.

If that asset does exactly what you’re trying to do, why not… …buy that asset?