I've been using the STL Loader in three.js to import objects from Blender, but I'm facing an issue where the textures are not appearing. I suspect it has something to do with the MeshBasicMaterial of the object. I attempted to switch it to Phong material, but then the object just turned black.
This led me to wonder, instead of changing the material, why can't I retain the textures/features from Blender when loading the object from STL Loader to three.js? Is there a way to preserve the texture? Are there any tutorials available for this?
Thanks in advance!
EDIT:
Here is a snippet of the code where I exported the Blender object with textures to a three.js .js file. The object loads in the viewer but appears black without any textures. I'm unsure how to fix this issue. I followed an example that utilized an inn for texture (hence the name, which I haven't changed yet).
var Viewport = function ( signals ) {
...
// Remaining code remains the same
...