Секции
@@ -250,7 +243,7 @@ const goal = (target: string, params: object) => {
-
-
+
+
\ No newline at end of file
diff --git a/components/model/fence.vue b/components/model/fence.vue
index 1a8a206..af92bd8 100644
--- a/components/model/fence.vue
+++ b/components/model/fence.vue
@@ -9,7 +9,6 @@ const fence_section = use_fence_section()
const section_count = use_section_count()
const extra_section = use_extra_section()
const remove_pillar = use_remove_pillar()
-const max_size = use_max_size()
const lSize = lamelle_height.value
const bSize = 0.0235
diff --git a/components/model/line.vue b/components/model/line.vue
index c6b54b3..9acfbe5 100644
--- a/components/model/line.vue
+++ b/components/model/line.vue
@@ -20,6 +20,8 @@ const { scene } = useTresContext()
const section_count = use_section_count()
const extra_section = use_extra_section()
+const fence_section = use_fence_section()
+const max_size = use_max_size()
const total = ref((section_count.value + ~~(!!extra_section.value)))
const position = ref(new Vector3())
@@ -29,12 +31,11 @@ const count_pos = () => {
const line = seekByName(scene.value, `line_${props.number}`)
const line_size = new Vector3()
const line_pos = new Vector3()
- const line_lpos = new Vector3()
+
if (line && line.children.length) {
line.updateMatrixWorld()
new Box3().expandByObject(line).getSize(line_size)
line.getWorldPosition(line_pos)
- console.log(`line_${props.number}`, line, line_size, line_pos)
}
const line1 = seekByName(scene.value, `line_1`);
const line1_size = new Vector3()
@@ -42,7 +43,6 @@ const count_pos = () => {
if (line1) {
new Box3().expandByObject(line1).getSize(line1_size)
line1.getWorldPosition(line1_pos)
- console.log('first', line1, line1_size, line1_pos)
}
const k = ((line1_size.x / props.count) - line1_size.z) * 0.5
switch (props.number) {
@@ -64,7 +64,7 @@ const count_pos = () => {
onMounted(() => {
count_pos()
})
-watch(() => [props.count, section_count.value, extra_section.value], count_pos)
+watch(() => [props.count, fence_section.value, section_count.value, extra_section.value], count_pos)
import {
PCFSoftShadowMap,
- EquirectangularReflectionMapping,
CineonToneMapping,
- Euler,
Mesh,
- Group,
Object3D,
} from 'three';
-import { GainMapLoader, } from '@monogrid/gainmap-js'
//@ts-ignore
import { useGLTF, } from '@tresjs/cientos'
import { getColorHexFromRal, type ralTypes } from '../ral';
-import { degToRad, radToDeg } from 'three/src/math/MathUtils.js';
const pillar_color = use_pillar_color()
const lamelle_color = use_lamelle_color()
const section_count = use_section_count()
const lamelle_count = use_lamelles_count()
const extra_section = use_extra_section()
-const max_size = use_max_size()
const { scene, renderer, camera } = useTresContext()
renderer.value.toneMapping = CineonToneMapping
@@ -29,7 +23,6 @@ renderer.value.shadowMap.enabled = true
renderer.value.shadowMap.type = PCFSoftShadowMap
const { scene: top_model } = await useGLTF('/models_one/verh_100.glb', { draco: true })
-// const { scene: fence_model } = await useGLTF('/models_one/fence.glb', { draco: true })
const { scene: model_fence_top } = await useGLTF('/fence_one/top.glb')
const { scene: model_fence_center } = await useGLTF('/fence_one/center.glb')
const { scene: model_fence_bottom } = await useGLTF('/fence_one/bottom.glb')
@@ -98,7 +91,6 @@ const size = ref(Math.ceil(total.value / 4))
const count = ref((total.value >= 4) ? size.value : total.value)
watch(() => [section_count.value, extra_section.value], () => {
- console.log('parametric line clear')
total.value = (section_count.value + ~~(!!extra_section.value))
size.value = Math.ceil(total.value / 4);
count.value = (total.value >= 4) ? size.value : total.value;