dev #90

Merged
ksenia_mikhailova merged 20 commits from dev into main 2025-03-20 14:15:19 +03:00
3 changed files with 30 additions and 17 deletions
Showing only changes of commit 92535f6f17 - Show all commits

View File

@ -29,14 +29,15 @@ const { scene: aristo_planki } = await useGLTF('/models_aristo_exp/planki.glb')
const { scene: aristo_stolb } = await useGLTF('/models_aristo_exp/stolb.glb')
const { scene: aristo_verh } = await useGLTF('/models_aristo_exp/verh.glb')
const kosynka = ref(standart_kosynka)
const krepleniye_planok = ref(standart_krepleniye_planok)
const osnova_stolba = ref(standart_osnova_stolba)
const planki = ref(standart_planki)
const stolb = ref(standart_stolb)
const verh = ref(standart_verh)
const kosynka = ref()
const krepleniye_planok = ref()
const osnova_stolba = ref()
const planki = ref()
const stolb = ref()
const verh = ref()
watch(() => globalFenceType.value?.type, (t) => {
const setModels = () => {
const t = globalFenceType.value?.type || 'aristo'
if (t == 'aristo') {
kosynka.value = aristo_kosynka
krepleniye_planok.value = aristo_krepleniye_planok
@ -53,6 +54,12 @@ watch(() => globalFenceType.value?.type, (t) => {
stolb.value = standart_stolb
verh.value = standart_verh
}
}
setModels()
watch(() => globalFenceType.value?.type, (t) => {
setModels()
set_material(planki.value, getColorHexFromRal(lamelle_color.value));
[stolb, verh, krepleniye_planok].map(el => set_material(el.value, getColorHexFromRal(pillar_color.value)))
})
@ -67,7 +74,8 @@ set_material(planki.value, getColorHexFromRal(lamelle_color.value));
</script>
<template>
<Suspense>
<TresGroup :position-y="-3.5" :scale="2" :key="globalFenceType?.type">
<TresGroup :position-y="globalFenceType && globalFenceType.type == 'aristo' ? -2 : -3.5" :scale="2"
:key="globalFenceType?.type">
<ModelItem :model="kosynka" :target="explosion_state ? targetExplosion.kosynka : [0, 0, 0]" />
<ModelItem :model="krepleniye_planok"
:target="explosion_state ? targetExplosion.krepleniye_planok : [0, 0, 0]" />

View File

@ -32,7 +32,7 @@ onMounted(async () => {
const newEnvMap = exrCubeRenderTarget ? exrCubeRenderTarget.texture : null;
scene.value.environment = newEnvMap
scene.value.environmentIntensity = 0.7
scene.value.environmentIntensity = 1.25
scene.value.environmentRotation.z = 0.25
result.renderTarget.texture.dispose();
})

View File

@ -50,9 +50,6 @@ const advantagesText = computed(() => {
const { data: advData } = await apiFetch<ApiAdvantageType[]>(`advantage/`)
const setCalcData = (id: number) => {
openTab.value = id
}
watch(openTab, () => {
if (!openTab.value) return
if (!calculators.value) return
@ -70,7 +67,7 @@ watch(openTab, () => {
</script>
<template>
<div>
<Modal :calcData="calculators.find(el => el.id == openTab)" />
<Modal :calcData="(calculators || []).find(el => el.id == openTab)" />
<div class="siteblock bg-white" :id="about?.slug" v-if="about">
<div class="container">
<h1 class="siteblock-title">{{ about?.title }}</h1>
@ -119,9 +116,17 @@ watch(openTab, () => {
<div class="flex col-span-full gap-2 justify-center">
<template v-for="item in calculators">
<div class="flex items-center gap-2">
<label class="rounded p-2 cursor-pointe peer-checked:bg-ioprim-100">
<input type="radio" :value="item.id" v-model="openTab">
<label class="rounded p-2 cursor-pointer flex gap-2" :for="item.id.toString()">
<input type="radio" :id="item.id.toString()" :value="item.id" v-model="openTab"
:checked="openTab == item.id">
<span :class="[
'text-2xl font-bold bg-clip-text text-transparent drop-shadow-xs',
openTab == item.id
? 'bg-gradient-to-r from-yellow-400 via-orange-500 to-red-600'
: 'bg-gradient-to-r from-slate-400 to-slate-600'
]">
{{ item.title }}
</span>
</label>
</div>
</template>