fix extra count
This commit is contained in:
parent
5b42db0fe4
commit
eb97e54501
|
@ -100,17 +100,17 @@ const total_txt = computed(() => {
|
||||||
bar = parseFloat(bar)
|
bar = parseFloat(bar)
|
||||||
guide = parseFloat(guide)
|
guide = parseFloat(guide)
|
||||||
const sections = section_count.value as number
|
const sections = section_count.value as number
|
||||||
const extra_mm = extra_section.value as number
|
const extra_m = extra_section.value as number * 0.001
|
||||||
const length_mm = fence_section.value as number
|
const length_m = fence_section.value as number
|
||||||
const lam_count = lamelles_count.value as number
|
const lam_count = lamelles_count.value as number
|
||||||
|
|
||||||
const prices = {
|
const prices = {
|
||||||
pillar: mortgage + pillar,
|
pillar: mortgage + pillar,
|
||||||
lamella: rivets * 2 + lamella * length_mm,
|
lamella: rivets * 2 + lamella * length_m,
|
||||||
lamella_extra: rivets * 2 + lamella * extra_mm,
|
lamella_extra: rivets * 2 + lamella * extra_m,
|
||||||
guide: guide * lam_count * 0.115,
|
guide: guide * lam_count * 0.115,
|
||||||
top: bar * length_mm,
|
top: bar * length_m,
|
||||||
top_extra: bar * extra_mm
|
top_extra: bar * extra_m
|
||||||
}
|
}
|
||||||
|
|
||||||
const extra = {
|
const extra = {
|
||||||
|
|
|
@ -98,7 +98,7 @@ watch([section_count, fence_section, extra_section], () => {
|
||||||
<TresGroup name="lam_fastening_two">
|
<TresGroup name="lam_fastening_two">
|
||||||
<template v-for="(n, i) in lamelles_count">
|
<template v-for="(n, i) in lamelles_count">
|
||||||
<TresGroup :position-y="(lSize * i)" :scale="[-1, 1, 1]" :position-x="pillar_two_pos">
|
<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>
|
</TresGroup>
|
||||||
</template>
|
</template>
|
||||||
</TresGroup>
|
</TresGroup>
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { useGLTF } from '@tresjs/cientos'
|
import { useGLTF } from '@tresjs/cientos'
|
||||||
import { Vector3 } from 'three';
|
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
|
let scene: any
|
||||||
if (props.modelUrl) {
|
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) {
|
function shadows_and_pos(scene: any) {
|
||||||
scene.children.forEach((el: 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)
|
shadows_and_pos(el)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue