fence section pos
This commit is contained in:
parent
58f4231907
commit
48065712de
|
@ -21,10 +21,11 @@ const scale_koef = 3
|
||||||
const show_pillar_one = ref(props.index == 1)
|
const show_pillar_one = ref(props.index == 1)
|
||||||
const show_pillar_two = ref(true)
|
const show_pillar_two = ref(true)
|
||||||
const make_translate_to_section = () => {
|
const make_translate_to_section = () => {
|
||||||
const r = (fence_section.value * 0.5 + pillar_size * 4) + ((props.index - 1) / 2) * (fence_section.value + pillar_size + bSize) * scale_koef
|
let r = ((props.index - 1) / 2) * (fence_section.value + pillar_size + bSize) * scale_koef
|
||||||
if (props.index % 2 == 0) {
|
if (props.index % 2 == 0) {
|
||||||
show_pillar_two.value = false
|
show_pillar_two.value = false
|
||||||
show_pillar_one.value = true
|
show_pillar_one.value = true
|
||||||
|
r += (fence_section.value * 0.5 + bSize) * scale_koef
|
||||||
return -1 * r
|
return -1 * r
|
||||||
}
|
}
|
||||||
return r
|
return r
|
||||||
|
@ -65,23 +66,23 @@ watch(fence_section, () => {
|
||||||
</TresGroup>
|
</TresGroup>
|
||||||
</TresGroup>
|
</TresGroup>
|
||||||
|
|
||||||
<TresGroup name="lamelles" :scale-x="fence_section * 10" :position-x="pillar_size * 0.5" :position-z="0.02">
|
<TresGroup name="lamelles" :position-x="pillar_size * 0.5" :position-z="0.02">
|
||||||
<template v-for="(n, i) in lamelles_count">
|
<template v-for="(n, i) in lamelles_count">
|
||||||
<TresGroup :position-y="(lSize * i)">
|
<TresGroup :position-y="(lSize * i)" :scale-x="fence_section * 10">
|
||||||
<ModelItem :model="props.models.lamelle" :color="lamelle_color" />
|
<ModelItem :model="props.models.lamelle" :color="lamelle_color" />
|
||||||
</TresGroup>
|
</TresGroup>
|
||||||
</template>
|
</template>
|
||||||
</TresGroup>
|
</TresGroup>
|
||||||
<TresGroup name="lamelles_fastening_one" :position-x="pillar_one_pos">
|
<TresGroup name="lamelles_fastening_one">
|
||||||
<template v-for="(n, i) in lamelles_count">
|
<template v-for="(n, i) in lamelles_count">
|
||||||
<TresGroup :position-y="(lSize * i)">
|
<TresGroup :position-y="(lSize * i)" :position-x="pillar_one_pos">
|
||||||
<ModelItem :model="props.models.fastening" :color="pillar_color" />
|
<ModelItem :model="props.models.fastening" :color="pillar_color" />
|
||||||
</TresGroup>
|
</TresGroup>
|
||||||
</template>
|
</template>
|
||||||
</TresGroup>
|
</TresGroup>
|
||||||
<TresGroup name="lamelles_fastening_two" :position-x="pillar_two_pos">
|
<TresGroup name="lamelles_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]">
|
<TresGroup :position-y="(lSize * i)" :scale="[-1, 1, 1]" :position-x="pillar_two_pos">
|
||||||
<ModelItem :model="props.models.fastening" :remove-pos="true" :color="pillar_color" />
|
<ModelItem :model="props.models.fastening" :remove-pos="true" :color="pillar_color" />
|
||||||
</TresGroup>
|
</TresGroup>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
@ -49,7 +49,6 @@ watch(section_count, () => {
|
||||||
base?.remove(item)
|
base?.remove(item)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// renderer.value.render(scene.value, camera.value)
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
Loading…
Reference in New Issue