fix extra count

This commit is contained in:
Kseninia Mikhaylova 2024-06-20 11:05:41 +03:00
parent 5b42db0fe4
commit eb97e54501
3 changed files with 8 additions and 13 deletions

View File

@ -100,17 +100,17 @@ const total_txt = computed(() => {
bar = parseFloat(bar)
guide = parseFloat(guide)
const sections = section_count.value as number
const extra_mm = extra_section.value as number
const length_mm = fence_section.value as number
const extra_m = extra_section.value as number * 0.001
const length_m = fence_section.value as number
const lam_count = lamelles_count.value as number
const prices = {
pillar: mortgage + pillar,
lamella: rivets * 2 + lamella * length_mm,
lamella_extra: rivets * 2 + lamella * extra_mm,
lamella: rivets * 2 + lamella * length_m,
lamella_extra: rivets * 2 + lamella * extra_m,
guide: guide * lam_count * 0.115,
top: bar * length_mm,
top_extra: bar * extra_mm
top: bar * length_m,
top_extra: bar * extra_m
}
const extra = {

View File

@ -98,7 +98,7 @@ watch([section_count, fence_section, extra_section], () => {
<TresGroup name="lam_fastening_two">
<template v-for="(n, i) in lamelles_count">
<TresGroup :position-y="(lSize * i)" :scale="[-1, 1, 1]" :position-x="pillar_two_pos">
<ModelItem :model="props.models.fastening" :remove-pos="true" />
<ModelItem :model="props.models.fastening" />
</TresGroup>
</template>
</TresGroup>

View File

@ -1,7 +1,7 @@
<script setup lang="ts">
import { useGLTF } from '@tresjs/cientos'
import { Vector3 } from 'three';
const props = defineProps(['modelUrl', 'model', 'position', 'removePos', 'target', 'color', 'map'])
const props = defineProps(['modelUrl', 'model', 'position', 'target', 'color', 'map'])
let scene: any
if (props.modelUrl) {
@ -17,11 +17,6 @@ const target = ref(props.target ? new Vector3(...props.target) : new Vector3(0,
function shadows_and_pos(scene: any) {
scene.children.forEach((el: any) => {
if (props.removePos) {
el.translateX(-el.position.x)
el.translateY(-el.position.y)
el.translateZ(-el.position.z)
}
shadows_and_pos(el)
})
}