diff --git a/components/calcValues.vue b/components/calcValues.vue index 6f72d88..e5bcf0f 100644 --- a/components/calcValues.vue +++ b/components/calcValues.vue @@ -17,7 +17,7 @@ const min_length = use_min_length() const parametric = reactive({ length: { min: min_length.value, - max: 2400, + max: 2466, step: 1, }, total_length: { @@ -33,7 +33,7 @@ const parametric = reactive({ }) const form_state = reactive({ length: fence_section.value * 1000, - fence_length: 100, + fence_length: 104, height: 100 + lamelles_count.value * parametric.height.step, total_length: total_length.value, total_length_mm: fence_section.value * 1000, @@ -69,30 +69,29 @@ const changeParametres = () => { if (form_state.total_length_mm < form_state.length) { form_state.length = form_state.total_length_mm } - form_state.total_length_mm = form_state.total_length * 1000 - const total_without_pillar = form_state.total_length_mm - form_state.fence_length - if (form_state.auto_length) { + let { fence_length, total_length_mm, auto_length, length } = form_state + length = parseFloat(length.toString()) + + if (auto_length) { let w = parametric.length.min - const max_sections = Math.ceil(total_without_pillar / parametric.length.min) - const min_sections = Math.ceil(total_without_pillar / parametric.length.max) + const max_sections = Math.ceil(total_length_mm / (parametric.length.min + fence_length)) + const min_sections = Math.ceil(total_length_mm / (parametric.length.max + fence_length)) for (let index = min_sections; index <= max_sections; index++) { - w = (total_without_pillar / index) + form_state.fence_length + w = (total_length_mm - fence_length * (index - 1)) / index if (w >= parametric.length.min && w <= parametric.length.max) { break } } form_state.length = w + length = w } - const section_without_pillar = form_state.length - form_state.fence_length - - form_state.full_sections = Math.floor(total_without_pillar / section_without_pillar) - - if (section_without_pillar * form_state.full_sections !== form_state.full_sections) { - form_state.extra_section = Math.floor(total_without_pillar % section_without_pillar) + form_state.full_sections = Math.floor((total_length_mm - fence_length) / (length + fence_length)) + if (((form_state.full_sections * length) + (form_state.full_sections * fence_length) + fence_length) !== total_length_mm) { + form_state.extra_section = Math.floor((total_length_mm - fence_length) % form_state.length) } else { form_state.extra_section = 0 } @@ -135,7 +134,7 @@ const plurals = {
- + el.slug == 'about') const reviews = (pagesData.value as ApiPagesType[]).find(el => el.slug == 'clients') -const delivery = (pagesData.value as ApiPagesType[]).find(el => el.slug == 'delivery') +const delivery = (pagesData.value as ApiPagesType[]).find(el => el.slug == 'how_to') const advantages = (pagesData.value as ApiPagesType[]).find(el => el.slug == 'advantages') const roubleSign = new Intl.NumberFormat('ru-RU', { diff --git a/public/hdrmaps/kloppenheim_06_4k-gainmap.webp b/public/hdrmaps/kloppenheim_06_4k-gainmap.webp deleted file mode 100644 index 67862d3..0000000 Binary files a/public/hdrmaps/kloppenheim_06_4k-gainmap.webp and /dev/null differ diff --git a/public/hdrmaps/kloppenheim_06_4k.exr b/public/hdrmaps/kloppenheim_06_4k.exr deleted file mode 100644 index ef93ed6..0000000 Binary files a/public/hdrmaps/kloppenheim_06_4k.exr and /dev/null differ diff --git a/public/hdrmaps/kloppenheim_06_4k.json b/public/hdrmaps/kloppenheim_06_4k.json deleted file mode 100644 index 244275b..0000000 --- a/public/hdrmaps/kloppenheim_06_4k.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "gainMapMax": [ - 6.139551352398794, - 6.139551352398794, - 6.139551352398794 - ], - "gainMapMin": [ - 0, - 0, - 0 - ], - "gamma": [ - 1, - 1, - 1 - ], - "hdrCapacityMax": 6.139551352398794, - "hdrCapacityMin": 0, - "offsetHdr": [ - 0.015625, - 0.015625, - 0.015625 - ], - "offsetSdr": [ - 0.015625, - 0.015625, - 0.015625 - ] -} \ No newline at end of file diff --git a/public/hdrmaps/kloppenheim_06_4k.webp b/public/hdrmaps/kloppenheim_06_4k.webp deleted file mode 100644 index 7bb3d78..0000000 Binary files a/public/hdrmaps/kloppenheim_06_4k.webp and /dev/null differ