This commit is contained in:
parent
2af002ee2b
commit
5cb7d19f3f
|
@ -15,6 +15,7 @@ const set_metaril_func = (scene: any, material: any) => {
|
||||||
const uvAttribute = el.geometry.getAttribute('uv');
|
const uvAttribute = el.geometry.getAttribute('uv');
|
||||||
const uvs = [];
|
const uvs = [];
|
||||||
|
|
||||||
|
if (uvAttribute) {
|
||||||
for (let i = 0; i < uvAttribute.count; i++) {
|
for (let i = 0; i < uvAttribute.count; i++) {
|
||||||
uvs.push(uvAttribute.getX(i), uvAttribute.getY(i));
|
uvs.push(uvAttribute.getX(i), uvAttribute.getY(i));
|
||||||
}
|
}
|
||||||
|
@ -33,9 +34,7 @@ const set_metaril_func = (scene: any, material: any) => {
|
||||||
material.normalMap.wrapT = RepeatWrapping;
|
material.normalMap.wrapT = RepeatWrapping;
|
||||||
material.normalMap.repeat.set(surfaceWidth, surfaceHeight);
|
material.normalMap.repeat.set(surfaceWidth, surfaceHeight);
|
||||||
material.normalMap.needsUpdate = true
|
material.normalMap.needsUpdate = true
|
||||||
|
}
|
||||||
console.log(`Ширина текстуры на поверхности: ${surfaceWidth * 128}`);
|
|
||||||
console.log(`Высота текстуры на поверхности: ${surfaceHeight * 128}`);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (el.material) el.material = material
|
if (el.material) el.material = material
|
||||||
|
|
Loading…
Reference in New Issue