This commit is contained in:
Kseninia Mikhaylova 2024-09-03 15:23:58 +03:00
parent 0f3087e20f
commit 5d903de526
1 changed files with 7 additions and 0 deletions

View File

@ -7,6 +7,7 @@ import {
CircleGeometry, MeshBasicMaterial,
Quaternion, AdditiveBlending,
Euler,
SRGBColorSpace,
} from 'three';
import { useTresContext, useSeek, useTexture, useLoop } from '@tresjs/core';
@ -143,6 +144,12 @@ const loadModels = async () => {
)
item.modelFile.children[0].updateMatrixWorld(true)
}
item.modelFile.traverse((el: Mesh) => {
if (el.material && el.material.texture) {
el.material.texture.colorSpace = SRGBColorSpace
}
})
models.value.push(item)
const res = await fetch(`${SERVER_URL}/api/obj/clickable/?source=${element.id}`)