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); };