I’m importing.The glb model is using three, but the model falls apart into the parts it consists of. How can I fix this?
const models = {
pizza: { url: 'models/pizza.glb' },
dodster: { url: 'models/dodster.glb' },
cup: { url: 'models/cup.glb' },
};
const manager = new THREE.LoadingManager();
manager.onLoad = init; // Запуск после загрузки всех моделей
const gltfLoader = new GLTFLoader(manager);
for (const model of Object.values(models)) {
gltfLoader.load(model.url, (gltf) => {
model.gltf = gltf; // Сохраняем загруженную модель в объект
});
}
I tried to download the model for the game, but it’s falling apart