dev #84
|
@ -44,7 +44,7 @@ watch(fence_section, ()=>{
|
||||||
</template>
|
</template>
|
||||||
<Loader />
|
<Loader />
|
||||||
<Stats />
|
<Stats />
|
||||||
<TresCanvas shadows>
|
<TresCanvas>
|
||||||
<TresPerspectiveCamera v-bind="cameraStat" ref="camera" />
|
<TresPerspectiveCamera v-bind="cameraStat" ref="camera" />
|
||||||
<OrbitControls v-bind="controlsState" make-default />
|
<OrbitControls v-bind="controlsState" make-default />
|
||||||
<TresGroup :position-y="-0.5">
|
<TresGroup :position-y="-0.5">
|
||||||
|
|
|
@ -148,7 +148,6 @@ const goal = (target: string, params: object) => {
|
||||||
(nuxtApp.$metrika as any).reachGoal(target, params || {})
|
(nuxtApp.$metrika as any).reachGoal(target, params || {})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
const show_extra = ref(false)
|
|
||||||
const calc_table = computed(() => {
|
const calc_table = computed(() => {
|
||||||
return [
|
return [
|
||||||
{
|
{
|
||||||
|
@ -233,16 +232,10 @@ const calc_table = computed(() => {
|
||||||
<div class="col-span-12 xl:col-span-6 xl:col-start-4 grid calc_table">
|
<div class="col-span-12 xl:col-span-6 xl:col-start-4 grid calc_table">
|
||||||
<div class="grid grid-cols-4 relative">
|
<div class="grid grid-cols-4 relative">
|
||||||
<template v-for="item in calc_table">
|
<template v-for="item in calc_table">
|
||||||
<div class="col-span-3 calc_table-maincell">{{ show_extra && item.extra_name ? item.extra_name :
|
<div class="col-span-3 calc_table-maincell">{{
|
||||||
item.name }}</div>
|
item.name }}</div>
|
||||||
<div class="col-span-1 calc_table-maincell">{{ show_extra ? item.extra : item.value }}</div>
|
<div class="col-span-1 calc_table-maincell">{{ item.value }}</div>
|
||||||
</template>
|
</template>
|
||||||
<span class="text-ioprim absolute top-0 right-0 text-2xl cursor-pointer"
|
|
||||||
v-if="form_state.extra_section" title="Дополнительная секция"
|
|
||||||
@click="() => show_extra = !show_extra">
|
|
||||||
<Icon name="mdi:page-first" v-if="show_extra" />
|
|
||||||
<Icon name="mdi:page-last" v-else />
|
|
||||||
</span>
|
|
||||||
</div>
|
</div>
|
||||||
<button @click.prevent="toggleModal">Рассчитать</button>
|
<button @click.prevent="toggleModal">Рассчитать</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -34,7 +34,6 @@ const { scene: model_fence_bottom } = await useGLTF('/fence_one/bottom.glb')
|
||||||
const { scene: model_fence_inner } = await useGLTF('/fence_one/inner.glb')
|
const { scene: model_fence_inner } = await useGLTF('/fence_one/inner.glb')
|
||||||
const { scene: fastening_model } = await useGLTF('/models_one/krepleniye_planok (1).glb', { draco: true });
|
const { scene: fastening_model } = await useGLTF('/models_one/krepleniye_planok (1).glb', { draco: true });
|
||||||
const { scene: lamelle_model } = await useGLTF('/models_one/lamel_100.glb', { draco: true });
|
const { scene: lamelle_model } = await useGLTF('/models_one/lamel_100.glb', { draco: true });
|
||||||
const { scene: point_model } = await useGLTF('/models_one/pointer.glb');
|
|
||||||
|
|
||||||
[model_fence_top, model_fence_bottom].map((sc: Object3D) =>
|
[model_fence_top, model_fence_bottom].map((sc: Object3D) =>
|
||||||
sc.traverse((child: Object3D) => {
|
sc.traverse((child: Object3D) => {
|
||||||
|
@ -43,7 +42,6 @@ const { scene: point_model } = await useGLTF('/models_one/pointer.glb');
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
)
|
)
|
||||||
point_model.traverse((el: Object3D) => el.position.set(0, 0, 0))
|
|
||||||
|
|
||||||
const top = ref(top_model)
|
const top = ref(top_model)
|
||||||
const fence = ref(model_fence_center)
|
const fence = ref(model_fence_center)
|
||||||
|
@ -52,7 +50,6 @@ const fence_bottom = ref(model_fence_bottom)
|
||||||
const fence_inner = ref(model_fence_inner)
|
const fence_inner = ref(model_fence_inner)
|
||||||
const fastening = ref(fastening_model)
|
const fastening = ref(fastening_model)
|
||||||
const lamelle = ref(lamelle_model)
|
const lamelle = ref(lamelle_model)
|
||||||
const pointer = ref(point_model)
|
|
||||||
|
|
||||||
if (!pillar_color.value) {
|
if (!pillar_color.value) {
|
||||||
const r = Math.floor(Math.random() * predefPillarColors.length)
|
const r = Math.floor(Math.random() * predefPillarColors.length)
|
||||||
|
@ -67,8 +64,6 @@ set_material(lamelle.value, getColorHexFromRal(lamelle_color.value));
|
||||||
(el: Ref) => { set_material(el.value, getColorHexFromRal(pillar_color.value)) });
|
(el: Ref) => { set_material(el.value, getColorHexFromRal(pillar_color.value)) });
|
||||||
[fence_inner].map(
|
[fence_inner].map(
|
||||||
(el: Ref) => { set_material(el.value, getColorHexFromRal(pillar_color.value), lamelle_count.value) });
|
(el: Ref) => { set_material(el.value, getColorHexFromRal(pillar_color.value), lamelle_count.value) });
|
||||||
set_material(pointer.value, getColorHexFromRal('5012'));
|
|
||||||
|
|
||||||
|
|
||||||
const { seek, seekAll } = useSeek()
|
const { seek, seekAll } = useSeek()
|
||||||
watch(lamelle_color, () => {
|
watch(lamelle_color, () => {
|
||||||
|
@ -159,7 +154,7 @@ onMounted(async () => {
|
||||||
<template>
|
<template>
|
||||||
<TresGroup name="base">
|
<TresGroup name="base">
|
||||||
<template v-for="line in (total >= 4) ? 4 : 1" :key="`${line}_${count}`">
|
<template v-for="line in (total >= 4) ? 4 : 1" :key="`${line}_${count}`">
|
||||||
<ModelLine :models="{ top, fence, fence_top, fence_bottom, fence_inner, fastening, lamelle, pointer }"
|
<ModelLine :models="{ top, fence, fence_top, fence_bottom, fence_inner, fastening, lamelle }"
|
||||||
:number="line" :count="count" />
|
:number="line" :count="count" />
|
||||||
</template>
|
</template>
|
||||||
</TresGroup>
|
</TresGroup>
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="siteblock siteblock_calc bg-white">
|
<div class="siteblock siteblock_calc bg-white">
|
||||||
<LazyCalcValues />
|
<CalcValues />
|
||||||
<Suspense>
|
<Suspense>
|
||||||
<LazyCalcModels />
|
<CalcModels />
|
||||||
</Suspense>
|
</Suspense>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -12,24 +12,24 @@ const set_metaril_func = (scene: any, material: any) => {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
// const texture = await useLoader(TextureLoader, '/fence_one/svg_tile1.svg');
|
// const texture = await useLoader(TextureLoader, '/fence_one/svg_tile1.svg');
|
||||||
const get_texture = async () => {
|
// const get_texture = async () => {
|
||||||
const texture = await useLoader(TextureLoader, '/fence_one/tile1.png');
|
// const texture = await useLoader(TextureLoader, '/fence_one/tile1.png');
|
||||||
return texture
|
// return texture
|
||||||
}
|
// }
|
||||||
const texture = await get_texture()
|
// const texture = await get_texture()
|
||||||
texture.wrapT = RepeatWrapping;
|
// texture.wrapT = RepeatWrapping;
|
||||||
|
|
||||||
export const set_material = (scene: any, color: any, count: number | undefined = undefined) => {
|
export const set_material = (scene: any, color: any, count: number | undefined = undefined) => {
|
||||||
let c = color
|
let c = color
|
||||||
if (count) {
|
// if (count) {
|
||||||
// console.log(texture)
|
// // console.log(texture)
|
||||||
texture.repeat.set(1, count);
|
// texture.repeat.set(1, count);
|
||||||
texture.needsUpdate = true
|
// texture.needsUpdate = true
|
||||||
}
|
// }
|
||||||
|
|
||||||
const material = new MeshStandardMaterial({
|
const material = new MeshStandardMaterial({
|
||||||
color: new Color(c || '#9c9c00'),
|
color: new Color(c || '#9c9c00'),
|
||||||
alphaMap: count ? texture : null,
|
// alphaMap: count ? texture : null,
|
||||||
transparent: true,
|
transparent: true,
|
||||||
opacity: 1,
|
opacity: 1,
|
||||||
roughness: 0.2,
|
roughness: 0.2,
|
||||||
|
|
Loading…
Reference in New Issue