diff --git a/components/calcValues.vue b/components/calcValues.vue index a2306ee..f743167 100644 --- a/components/calcValues.vue +++ b/components/calcValues.vue @@ -66,8 +66,8 @@ const changeParametres = () => { const key_p = key as keyof typeof parametric const key_s = key as keyof typeof form_state if (parametric[key_p].max) { - if (form_state[key_s] > parametric[key_p].max) { - form_state[key_s] = parametric[key_p].max + if ((form_state[key_s] as number) > parametric[key_p].max) { + (form_state[key_s] as number) = parametric[key_p].max } } } @@ -104,7 +104,7 @@ const changeParametres = () => { } if (((full_sections * length) + (full_sections * fence_length) + fence_length) < total_length_mm) { - form_state.extra_section = Math.floor((total_length_mm - fence_length) % length) + form_state.extra_section = total_length_mm - ((full_sections * length) + (full_sections * fence_length) + fence_length + fence_length) } else { form_state.extra_section = 0 } @@ -140,7 +140,7 @@ const toggleModal = () => { const goal = (target: string, params: object) => { const nuxtApp = useNuxtApp() if (nuxtApp.$metrika) { - nuxtApp.$metrika.reachGoal(target, params || {}) + (nuxtApp.$metrika as any).reachGoal(target, params || {}) } } diff --git a/components/expDiagram.vue b/components/expDiagram.vue index e5a8cc6..66193a8 100644 --- a/components/expDiagram.vue +++ b/components/expDiagram.vue @@ -30,18 +30,15 @@ const loadAll = async () => { back_light.value = back.children[0] back_light.value.intensity = back_light.value.intensity * k back_light.value.shadow.bias = -0.01 - // back_light.value.intensity = 250 key_light.value = key.children[0] key_light.value.intensity = key_light.value.intensity * k key_light.value.shadow.bias = -0.01 - // key_light.value.intensity = 250 key_light.value.cast_shadow = true secondary_light.value = secondary.children[0] secondary_light.value.intensity = secondary_light.value.intensity * k secondary_light.value.shadow.bias = -0.01 - // secondary_light.value.intensity = 50 } const changeDistance = (v = 1) => { @@ -63,7 +60,7 @@ onMounted(() => { Загрузка 3D модели - + @@ -76,7 +73,7 @@ onMounted(() => { :position="[key_light.position.x, key_light.position.y, key_light.position.z]" /> - +
diff --git a/composables/useCalc.ts b/composables/useCalc.ts index c5af76f..b164771 100644 --- a/composables/useCalc.ts +++ b/composables/useCalc.ts @@ -17,4 +17,4 @@ export const use_extra_section = () => useState('extra_section', () => 0) export const use_total_length = () => useState('total_length', () => (((min + 104) * n) + 104) * 0.001) export const use_min_length = () => useState('min_length', () => 700) export const use_max_size = () => useState('max_size', () => 20) -export const use_explosion_state = () => useState('explosion_state', () => true) \ No newline at end of file +export const use_explosion_state = () => useState('explosion_state', () => false) \ No newline at end of file