diff --git a/components/calcModels.vue b/components/calcModels.vue
index 3ba6ea0..2dfa424 100644
--- a/components/calcModels.vue
+++ b/components/calcModels.vue
@@ -1,6 +1,6 @@
-import { ReinhardToneMapping, PCFShadowMap, RepeatWrapping } from 'three';
-import { useTexture } from '@tresjs/core'
-import { useGLTF } from '@tresjs/cientos'
-
-const props = defineProps(['index'])
+const props = defineProps(['index', 'models'])
const lamelles_count = useState('lamelles_count')
const fence_section = useState('fence_section')
@@ -14,99 +10,85 @@ const lSize = 0.115
const bSize = 0.0235
const pillar_size = 80 * 0.001
-const { renderer } = useTresContext()
-renderer.value.toneMapping = ReinhardToneMapping
-
-renderer.value.shadowMap.enabled = true
-renderer.value.shadowMap.type = PCFShadowMap
-
-const pbrTexture = await useTexture({
- map: '/texture/Ground039_4K-JPG_Color.jpg',
- displacementMap: '/texture/Ground039_4K-JPG_Displacement.jpg',
- roughnessMap: '/texture/Ground039_4K-JPG_Roughness.jpg',
- normalMap: '/texture/Ground039_4K-JPG_NormalDX.jpg',
- aoMap: '/texture/Ground039_4K-JPG_AmbientOcclusion.jpg',
- // metalnessMap: '/textures/myMetalnessTexture.jpg',
- // matcap: '/textures/myMatcapTexture.jpg',
- // alphaMap: '/textures/myAlphaMapTexture.jpg'
-})
-const repeat = 5
-for (const key in pbrTexture) {
- if (Object.prototype.hasOwnProperty.call(pbrTexture, key)) {
- const element = pbrTexture[key];
- if (element && element.wrapS) {
- element.wrapS = RepeatWrapping
- element.wrapT = RepeatWrapping
- element.repeat.x = repeat
- element.repeat.y = repeat
- }
- }
-}
-const { scene: top } = await useGLTF('/models_one/verh_100.glb')
-const { scene: fence } = await useGLTF('/models_one/fence.glb')
-const { scene: fastening } = await useGLTF('/models_one/krepleniye_planok (1).glb')
-const { scene: lamelle } = await useGLTF('/models_one/lamel_100.glb')
-
const pillar_one_pos = ref(fence_section.value * -0.5 - 0.01)
-const pillar_two_pos = ref(fence_section.value * 0.5 + pillar_size + bSize)
+const pillar_two_pos = ref(fence_section.value * 0.5 + pillar_size + bSize - 0.01)
watch(fence_section, () => {
pillar_one_pos.value = fence_section.value * -0.5 - 0.01
- pillar_two_pos.value = fence_section.value * 0.5 + pillar_size + bSize
+ pillar_two_pos.value = fence_section.value * 0.5 + pillar_size + bSize - 0.01
+})
+const scale_koef = 3
+const show_pillar_one = ref(props.index == 1)
+const show_pillar_two = ref(true)
+const make_translate_to_section = () => {
+ const r = (props.index - 1) / 2 * (fence_section.value + pillar_size + bSize) * scale_koef
+ if (props.index % 2 == 0) {
+ show_pillar_two.value = false
+ show_pillar_one.value = true
+ return -1 * r
+ }
+ return r
+}
+const translate_to_section = ref(make_translate_to_section())
+
+watch(fence_section, () => {
+ translate_to_section.value = make_translate_to_section()
})
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/components/model/parametric.vue b/components/model/parametric.vue
index dbd97bc..73a845f 100644
--- a/components/model/parametric.vue
+++ b/components/model/parametric.vue
@@ -1,10 +1,54 @@
-
-
-
+
+
+
+
+
+
+
+
+
-
+
\ No newline at end of file