Closed rudrdybo closed 2 years ago
Should be the same as how you load 3D model in three.js.
This gltfloader example could be a good start: https://threejs.org/examples/?q=gltf#webgl_loader_gltf
Should be the same as how you load 3D model in three.js.
This gltfloader example could be a good start: https://threejs.org/examples/?q=gltf#webgl_loader_gltf
Over there, the method (https://github.com/mrdoob/three.js/blob/master/examples/webgl_loader_gltf.html) specifies
<script type="importmap">
{
"imports": {
"three": "../build/three.module.js",
"three/addons/": "./jsm/"
}
}
</script>
to have three
as the name for the three module, which GLTFLoader.js
uses to import it.
This conflicts when in the line const THREE = window.MINDAR.IMAGE.THREE;
the module would again be imported, and causes to have duplicated modules loaded.
I've tried replacing the definition of name to "three": "./mindar-image-three.prod.js"
to use MindAR-three, but for some reason it can't load it properly, throwing errors like
How could I proceed in order to be able to use GLTFLoader.js?
Have a nice day!
I am currently facing issue in adding a 3d model to three.js facemesh example.Please let me know the steps to achieve the same.