I initially asked for away to calculate the volume of an uploaded file in THREEJS, but the question was flagged due to off topic context.
I’m editing it to say that I’ve found a solution to the question.
Apparently, the mass of a model is density * volume.
All I need to do is get the density of the model material from any density chart and multiply it by my model volume.
Hope this helps someone.
This statement can be very confusing for
three.js users since a material has no density property by default.
Your question was marked as off-topic since it’s purely related to physics.
Oh, I see. I meant to say density from material density chart of material like gold, aluminium, platinum, etc outside threejs.
Yeah, it’s probably unrelated. I initially thought there is threejs function for getting the mass from the model.
You could make your own function for it with that formula getting its density from a csv file or list of keys that show the metal names and corresponding density values.
Where an argument would be the metal name to fetch its key value