test model #59

Merged
ksenia_mikhailova merged 1 commits from bx-1146-more_calc into dev 2024-07-26 10:34:53 +03:00
2 changed files with 11 additions and 16 deletions
Showing only changes of commit bd1638bb4d - Show all commits

View File

@ -235,13 +235,13 @@ const goal = (target: string, params: object) => {
</div>
</template>
<template v-if="form_state.extra_section">
<div class="col-span-4 calc_table-maincell">Секции</div>
<div class="col-span-4 calc_table-maincell">Дополнительная секция</div>
<div class="col-span-2 calc_table-maincell">1</div>
<div class="col-span-6 sm:col-span-4">
Ламели, RAL {{ lamelle_color }}, {{ getColorNameFromRal(lamelle_color)?.toLowerCase() }}
</div>
<div class="col-span-3 sm:col-span-1">
Доп. {{ 1 * lamelles_count }}</div>
{{ 1 * lamelles_count }}</div>
<div class="col-span-3 sm:col-span-1">{{
`${parseFloat(form_state.extra_section.toString()).toFixed(2)}\xa0мм` }}</div>
</template>

View File

@ -1,6 +1,6 @@
<script setup lang="ts">
import { useGLTF, Text3D } from '@tresjs/cientos'
import { DoubleSide, Vector3 } from 'three';
import { DoubleSide, Object3D, Vector3 } from 'three';
const props = defineProps(['modelUrl', 'model', 'position', 'target', 'parent'])
let scene: any
@ -62,17 +62,12 @@ watch(props, () => {
}, { deep: true })
</script>
<template>
<template v-if="scene.children[0]">
<TresGroup ref="model" :name="scene.children[0].name">
<Suspense>
<primitive :object="scene.children[0]" :position="(props.position || [0, 0, 0])" />
</Suspense>
<Suspense v-if="false">
<Text3D :text="scene.children[0].name"
font='https://raw.githubusercontent.com/Tresjs/assets/main/fonts/FiraCodeRegular.json'>
<TresMeshNormalMaterial color=red />
</Text3D>
</Suspense>
<TresGroup ref="model" :position="(props.position || [0, 0, 0])" :scale="1">
<template v-if="scene.children[0].type == 'Group'">
<TresObject3D v-for="item in scene.children[0].children" v-bind="item" />
</template>
<template v-else>
<TresObject3D v-for="item in (scene.children)" v-bind="item" />
</template>
</TresGroup>
</template>
</template>