I need help I created drag and drop interface for uploading GLB files while uploading GLB it gives and error of undefined someone guide me where I am wrong
const input = document.querySelector(".dropzone")
const input1 = document.querySelector("#file-input")
creasteDropzone()
function creasteDropzone(){
const drpcntrl = new SimpleDropzone(input,input1)
drpcntrl.on('drop',({filesaa})=> load(filesaa))
}
let rootFile
let rootpath
function load(fileMap){
//console.log(fileMap)
Array.from(fileMap).forEach(([path, filen])=>{
if(filen.name.match(/\.(gltf|glb)$/)){
rootFile = filen
rootpath = path.replace(filen.name,'')
}
})
if (!rootFile) {
this.onError('No .gltf or .glb asset found.');
}
//view(rootFile,rootpath, fileMap)
}