diff --git a/components/calcModels.vue b/components/calcModels.vue
index 2dfa424..878f93b 100644
--- a/components/calcModels.vue
+++ b/components/calcModels.vue
@@ -24,7 +24,6 @@ const controlsState = reactive({
-
diff --git a/components/calcValues.vue b/components/calcValues.vue
index c391e21..0d2c799 100644
--- a/components/calcValues.vue
+++ b/components/calcValues.vue
@@ -8,13 +8,13 @@ const extra_section = useState('section_count', () => 0)
const parametric = {
length: {
- min: 400,
+ min: 1000,
max: 2400,
- step: 50,
+ step: 1,
},
total_length: {
- min: 0.4,
- step: 0.01,
+ min: 1,
+ step: 0.1,
},
height: {
min: 675,
diff --git a/components/model/fence.vue b/components/model/fence.vue
index 0de6406..a0ac0c9 100644
--- a/components/model/fence.vue
+++ b/components/model/fence.vue
@@ -21,7 +21,7 @@ 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
+ const r = (fence_section.value * 0.5 + pillar_size * 4) + ((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
@@ -36,7 +36,7 @@ watch(fence_section, () => {
})
-
+
@@ -65,9 +65,9 @@ watch(fence_section, () => {
-
+
-
+
diff --git a/components/model/item.vue b/components/model/item.vue
index eef7834..f163cbe 100644
--- a/components/model/item.vue
+++ b/components/model/item.vue
@@ -29,8 +29,10 @@ const getMaterial = () => {
const material = getMaterial()
function shadows_and_pos(scene: any) {
scene.children.forEach((el: any) => {
- el.castShadow = true
- el.receiveShadow = true
+ if (el.isMesh) {
+ el.castShadow = true
+ el.receiveShadow = true
+ }
if (props.removePos) {
el.translateX(-el.position.x)
el.translateY(-el.position.y)
@@ -99,7 +101,7 @@ watch(targetExplosion, () => {
-
+
\ No newline at end of file
diff --git a/components/model/parametric.vue b/components/model/parametric.vue
index 73a845f..ccc9a93 100644
--- a/components/model/parametric.vue
+++ b/components/model/parametric.vue
@@ -4,21 +4,20 @@ import { useTexture } from '@tresjs/core'
import { useGLTF } from '@tresjs/cientos'
const section_count = useState('section_count')
-const { renderer } = useTresContext()
+const { scene, renderer, camera } = 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_NormalGL.jpg',
aoMap: '/texture/Ground039_4K-JPG_AmbientOcclusion.jpg',
- // metalnessMap: '/textures/myMetalnessTexture.jpg',
- // matcap: '/textures/myMatcapTexture.jpg',
+ metalnessMap: '/texture/Ground039_4K-JPG_Color.jpg',
+ // matcap: '/textures/Ground039_4K-JPG_Color.jpg',
// alphaMap: '/textures/myAlphaMapTexture.jpg'
})
const repeat = 5
@@ -37,13 +36,20 @@ 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 { seekAll } = useSeek()
+watch(section_count, () => {
+ const fences = seekAll(scene.value, 'name', 'fence')
+ if (fences.length > (section_count.value as number)) {
+ fences[fences.length - 1].remove()
+ // renderer.value.render(scene.value, camera.value)
+ }
+})
-
-
+
+
-
+