vue项目中使用three.js加载gltf文件时提示Unexpected token ‘<‘, “<!DOCTYPE “... is not valid JSON的解决办法
解决方式:将gltf文件放在public文件夹下constloader=newGLTFLoader();letthat=this;loader.load('/models/gltf/scene.gltf',gltf=>{console.log('geggegeg',gltf);varmodel=gltf.scene;that.scene.add(model);})