From 0d36ecff2e84b558b94d666f17a442fad7091261 Mon Sep 17 00:00:00 2001 From: Tosuke <1848228664@qq.com> Date: Sun, 5 Nov 2023 01:59:32 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E4=BF=AE=E5=A4=8D=E6=B8=B2=E6=9F=93?= =?UTF-8?q?=E5=99=A8=E5=A4=A7=E5=B0=8F=E4=B8=8E=E6=8C=82=E8=BD=BD=E7=BB=84?= =?UTF-8?q?=E4=BB=B6=E5=A4=A7=E5=B0=8F=E4=B8=8D=E7=AC=A6=E7=9A=84=E9=97=AE?= =?UTF-8?q?=E9=A2=98=F0=9F=91=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- examples/vue/src/App.vue | 3 ++- src/scene/index.ts | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/examples/vue/src/App.vue b/examples/vue/src/App.vue index 9114d28..c7afee8 100644 --- a/examples/vue/src/App.vue +++ b/examples/vue/src/App.vue @@ -1,5 +1,5 @@ diff --git a/src/scene/index.ts b/src/scene/index.ts index 08b2844..13d4e8b 100644 --- a/src/scene/index.ts +++ b/src/scene/index.ts @@ -52,6 +52,7 @@ export const init = (params: InitParams): InitReturns => { // TODO:下述方法后续移入 utils 中, index 中做到尽量不额外创建函数 // 挂载 const mountTo = (element: HTMLElement) => { + renderer.setSize(element.offsetWidth,element.offsetHeight) element.appendChild(renderer.domElement); };