Learning/Three
Three.js 시작하기 06 _모델링 파일 불러오기 (.glb 파일)
.glb 파일을 불러오기 위해서 GLTFLoader를 활용한다. import { GLTFLoader } from "three/examples/jsm/loaders/GLTFLoader"; // ( 이하 생략 ) // GLTF 파일 업로드 const gltfLoader = new GLTFLoader(); // gltfLoader.load("/dancer.glb", (gltf) => { // const charactor = gltf.scene; // charactor.position.y = 0.8; // charactor.scale.set(0.01, 0.01, 0.01); // scene.add(charactor); // }); // 비동기 const gltf = await gltfLoader.loadAsyn..
2024. 1. 14.