threejs中添加GLTF模型_threejs导入gltf-CSDN博客

网站介绍:文章浏览阅读3.1k次。1、引入GLTF加载器import { GLTFLoader } from 'three/examples/jsm/loaders/GLTFLoader.js';2、加载模型getGltfModel(){ const loader = new GLTFLoader(); loader.load( '模型绝对位置.../model/Unity2GLTF.gltf', function ( gltf ) { let root = gltf.scene this.scene.add( root_threejs导入gltf