io prim color #82

Merged
ksenia_mikhailova merged 2 commits from bx-1480-calc into dev 2024-10-02 11:37:37 +03:00
3 changed files with 5 additions and 4 deletions
Showing only changes of commit 80171408cc - Show all commits

View File

@ -25,8 +25,8 @@ const { scene: verh } = await useGLTF('/models_exp/verh.glb')
const lamelle_color = use_lamelle_color()
const pillar_color = use_pillar_color()
set_material(planki, getColorHexFromRal(lamelle_color.value), undefined, false);
[stolb, verh, krepleniye_planok].map(el => set_material(el, getColorHexFromRal(pillar_color.value), undefined, false))
set_material(planki, getColorHexFromRal(lamelle_color.value));
[stolb, verh, krepleniye_planok].map(el => set_material(el, getColorHexFromRal(pillar_color.value)))
</script>
<template>

View File

@ -146,12 +146,13 @@ const setPillar = () => {
let arr = [top, pillar_outer, pillar_inner, bottom]
arr.map(el => {
set_material({ children: [el] }, getColorHexFromRal(pillar_color.value))
set_material({ children: [el] }, getColorHexFromRal(pillar_color.value), undefined, true)
})
set_material(
{ children: [arr[2]] },
getColorHexFromRal(pillar_color.value),
{ pattern: pillar_pattern.value, count: lamelles_count.value },
true
)
pillar.value = arr.map(el => el.clone())
}

View File

@ -79,7 +79,7 @@ export const set_material = (
scene: any,
color: any,
pattern: { pattern: patternIds, count: number } | undefined = undefined,
noise_material: boolean = true,
noise_material: boolean = false,
) => {
let c = color
const material = noiseMaterial.clone()