ARnft-threejs icon indicating copy to clipboard operation
ARnft-threejs copied to clipboard

OBJ + MTL file

Open cychong24 opened this issue 3 years ago • 1 comments

Hi, I am facing problem in loading OBJ & MTL 3D model using ARnft. Is there any example for this case? As i know using addModel function can only apply to glTF model or glb model. image

cychong24 avatar Apr 09 '22 12:04 cychong24

Hi @cychong24 i moved the issue to ARnft-threejs tracker issue because the question belong to it. And yes i can confrim to you that addModel can only load glTF type of models. It will be nice to add more types of 3d models. In the meantime i think you can use such workaround:

let nftAddTJS = new ARnftThreejs.NFTaddTJS(nft.uuid);
let url = "path/to/some.OBJ"
 const loader = new OBJLoader();
        loader.load(url, (obj) => {
            nftAddTJS.add(obj);
        });

I have not tested the code but i will post a live example when i have time.

kalwalt avatar Apr 09 '22 16:04 kalwalt