+
@@ -27,14 +42,14 @@ const cameraStat = reactive({
-
+
-
+
-
+
diff --git a/components/calc/values.vue b/components/calc/values.vue
index e7910f3..cd65ad7 100644
--- a/components/calc/values.vue
+++ b/components/calc/values.vue
@@ -19,6 +19,7 @@ const section_count = use_section_count()
const extra_section = use_extra_section()
const total_length = use_total_length()
const min_length = use_min_length()
+const globalFenceType = useGlobalFenceType()
if (!pillar_color.value) {
const r = Math.floor(Math.random() * predefPillarColors.length)
@@ -205,7 +206,8 @@ const calc_table = computed(() => {
:goto_cam="new Vector3(1, 2, -1)" />
diff --git a/components/dropdown/list.vue b/components/dropdown/list.vue
index 2aa0af9..d553083 100644
--- a/components/dropdown/list.vue
+++ b/components/dropdown/list.vue
@@ -1,24 +1,39 @@
diff --git a/components/expDiagram.vue b/components/expDiagram.vue
index 358cf2a..ade97c2 100644
--- a/components/expDiagram.vue
+++ b/components/expDiagram.vue
@@ -3,6 +3,9 @@ import { TresCanvas } from '@tresjs/core'
import { OrbitControls } from '@tresjs/cientos'
import { Vector3 } from 'three';
+const container = ref(null);
+const { isIntersecting, startObserver, stopObserver } = useSceneVisibility();
+
const camera = ref()
const controls = ref()
const controlsState = reactive({
@@ -17,22 +20,6 @@ const explosion_state = use_explosion_state()
const toggleExpState = () => {
explosion_state.value = !explosion_state.value
}
-const back_light = ref()
-const secondary_light = ref()
-const loadAll = async () => {
- const { scene: back } = await useGLTF('/models_light/back_exp.glb')
- const { scene: secondary } = await useGLTF('/models_light/secondary_exp.glb')
-
- const k = 0.03
-
- back_light.value = back.children[0]
- back_light.value.intensity = back_light.value.intensity * k
- back_light.value.shadow.bias = -0.02
-
- secondary_light.value = secondary.children[0]
- secondary_light.value.intensity = secondary_light.value.intensity * k
- secondary_light.value.shadow.bias = -0.01
-}
const changeDistance = (v = 1) => {
if (camera.value && controls.value) {
@@ -41,42 +28,58 @@ const changeDistance = (v = 1) => {
camera.value.position.normalize().multiplyScalar(r)
}
}
-onMounted(() => {
- loadAll()
-})
+
+const renderMode = computed(() => (isIntersecting.value ? 'always' : 'manual'));
+
+onMounted(async () => {
+ if (container.value) {
+ await nextTick()
+ startObserver(container.value);
+ }
+});
+
+onBeforeUnmount(() => {
+ stopObserver();
+});
-
-
-
-
- Загрузка 3D модели
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+ Загрузка 3D модели
+
+
+ {{ renderMode }}
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+