This commit is contained in:
Kseninia Mikhaylova 2024-09-20 16:52:40 +03:00
parent f76f7ebf21
commit 767bcb6c47
3 changed files with 7 additions and 6 deletions

View File

@ -22,7 +22,7 @@ const controlsState = reactive({
const cameraStat = reactive({
position: [-4, 2, 8],
aspect: 1920 / 600,
fov: 40,
// fov: 40,
})
const pointLight = ref()

View File

@ -1,7 +1,7 @@
<script setup lang="ts">
import { BufferGeometry, Matrix4, Vector2, Vector3 } from 'three';
const props = defineProps(['index', 'models', 'last_element'])
const props = defineProps(['index', 'models', 'last_element', 'first_element'])
const lamelle_height = use_lamelle_height()
const lamelles_count = use_lamelles_count()
@ -19,7 +19,7 @@ const pillar_one_pos = ref(fence_section.value * -0.5 - 0.015)
const pillar_two_pos = ref(fence_section.value * 0.5 + pillar_size + bSize - 0.01)
const scale_koef = 1
const show_pillar_one = ref(props.index == 1)
const show_pillar_one = ref(props.first_element)
const show_pillar_two = ref(true)
const getExtraValue = () => (extra_section.value && props.last_element) ? extra_section.value * 0.001 : false

View File

@ -44,7 +44,7 @@ const count_pos = () => {
line1.getWorldPosition(line1_pos)
console.log('first', line1, line1_size, line1_pos)
}
const k = 12 * line1_size.z
const k = ((line1_size.x / props.count) ) * 0.5
switch (props.number) {
case 1: break;
case 2:
@ -73,7 +73,8 @@ watch(() => [props.count, section_count.value, extra_section.value], count_pos)
<template v-if="(i + (props.number - 1) * props.count) <= total"
:key="(i + (props.number - 1) * props.count)">
<ModelFence :index="i" :models="props.models"
:last_element="(i + (props.number - 1) * props.count) == total" />
:last_element="(i + (props.number - 1) * props.count) == total"
:first_element="i == 1 && props.count == 1" />
</template>
</template>
</TresGroup>