From f022fab129f464ab01ae5efb91ed0f3419329f75 Mon Sep 17 00:00:00 2001 From: Kseninia Mikhaylova Date: Tue, 17 Sep 2024 10:46:59 +0300 Subject: [PATCH] pkg --- nuxt.config.ts | 1 + utils/material.ts | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/nuxt.config.ts b/nuxt.config.ts index e946173..eb555f3 100644 --- a/nuxt.config.ts +++ b/nuxt.config.ts @@ -45,6 +45,7 @@ export default defineNuxtConfig({ vite: { assetsInclude: ['**/*.glb', '**/*.gltf'], build: { + target: 'esnext' // minify: 'esbuild' // minify: false }, diff --git a/utils/material.ts b/utils/material.ts index 83e91a3..b9a6cdf 100644 --- a/utils/material.ts +++ b/utils/material.ts @@ -12,7 +12,11 @@ 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/tile1.png'); +const get_texture = async () => { + const texture = await useLoader(TextureLoader, '/fence_one/tile1.png'); + return texture +} +const texture = await get_texture() texture.wrapT = RepeatWrapping; export const set_material = (scene: any, color: any, count: number | undefined = undefined) => {