bx-1146-more_calc #44
|
@ -66,8 +66,8 @@ const changeParametres = () => {
|
|||
const key_p = key as keyof typeof parametric
|
||||
const key_s = key as keyof typeof form_state
|
||||
if (parametric[key_p].max) {
|
||||
if (form_state[key_s] > parametric[key_p].max) {
|
||||
form_state[key_s] = parametric[key_p].max
|
||||
if ((form_state[key_s] as number) > parametric[key_p].max) {
|
||||
(form_state[key_s] as number) = parametric[key_p].max
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -104,7 +104,7 @@ const changeParametres = () => {
|
|||
}
|
||||
|
||||
if (((full_sections * length) + (full_sections * fence_length) + fence_length) < total_length_mm) {
|
||||
form_state.extra_section = Math.floor((total_length_mm - fence_length) % length)
|
||||
form_state.extra_section = total_length_mm - ((full_sections * length) + (full_sections * fence_length) + fence_length + fence_length)
|
||||
} else {
|
||||
form_state.extra_section = 0
|
||||
}
|
||||
|
@ -140,7 +140,7 @@ const toggleModal = () => {
|
|||
const goal = (target: string, params: object) => {
|
||||
const nuxtApp = useNuxtApp()
|
||||
if (nuxtApp.$metrika) {
|
||||
nuxtApp.$metrika.reachGoal(target, params || {})
|
||||
(nuxtApp.$metrika as any).reachGoal(target, params || {})
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
|
|
@ -30,18 +30,15 @@ const loadAll = async () => {
|
|||
back_light.value = back.children[0]
|
||||
back_light.value.intensity = back_light.value.intensity * k
|
||||
back_light.value.shadow.bias = -0.01
|
||||
// back_light.value.intensity = 250
|
||||
|
||||
key_light.value = key.children[0]
|
||||
key_light.value.intensity = key_light.value.intensity * k
|
||||
key_light.value.shadow.bias = -0.01
|
||||
// key_light.value.intensity = 250
|
||||
key_light.value.cast_shadow = true
|
||||
|
||||
secondary_light.value = secondary.children[0]
|
||||
secondary_light.value.intensity = secondary_light.value.intensity * k
|
||||
secondary_light.value.shadow.bias = -0.01
|
||||
// secondary_light.value.intensity = 50
|
||||
}
|
||||
|
||||
const changeDistance = (v = 1) => {
|
||||
|
@ -63,7 +60,7 @@ onMounted(() => {
|
|||
Загрузка 3D модели
|
||||
</div>
|
||||
</template>
|
||||
<TresCanvas height="600" preset="realistic">
|
||||
<TresCanvas height="600">
|
||||
<TresPerspectiveCamera :position="[-7, 2, 4]" ref="camera" />
|
||||
<OrbitControls v-bind="controlsState" ref="controls" make-default />
|
||||
<Suspense>
|
||||
|
@ -76,7 +73,7 @@ onMounted(() => {
|
|||
:position="[key_light.position.x, key_light.position.y, key_light.position.z]" />
|
||||
<TresPointLight v-bind="secondary_light" v-if="secondary_light"
|
||||
:position="[secondary_light.position.x, secondary_light.position.y, secondary_light.position.z]" />
|
||||
<TresAmbientLight :intensity="2" />
|
||||
<!-- <TresAmbientLight :intensity="2" /> -->
|
||||
</TresCanvas>
|
||||
</ClientOnly>
|
||||
<div class="canvas-icons">
|
||||
|
|
|
@ -17,4 +17,4 @@ export const use_extra_section = () => useState('extra_section', () => 0)
|
|||
export const use_total_length = () => useState('total_length', () => (((min + 104) * n) + 104) * 0.001)
|
||||
export const use_min_length = () => useState('min_length', () => 700)
|
||||
export const use_max_size = () => useState<number>('max_size', () => 20)
|
||||
export const use_explosion_state = () => useState<boolean>('explosion_state', () => true)
|
||||
export const use_explosion_state = () => useState<boolean>('explosion_state', () => false)
|
Loading…
Reference in New Issue