From b4fc933bb50fb796046bdc8170f0d81b05c93da5 Mon Sep 17 00:00:00 2001 From: Kevin Levron Date: Fri, 5 Mar 2021 08:27:56 +0100 Subject: [PATCH] resize (troisjs/troisjs.github.io#2) --- src/core/useThree.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/core/useThree.js b/src/core/useThree.js index 9cd7f04..dc982e9 100644 --- a/src/core/useThree.js +++ b/src/core/useThree.js @@ -102,11 +102,11 @@ export default function useThree() { } } - if (conf.width && conf.height) { - setSize(conf.width, conf.height); - } else if (conf.resize) { + if (conf.resize) { onResize(); window.addEventListener('resize', onResize); + } else { + setSize(conf.width | 300, conf.height | 150); } conf.mouse_move = conf.mouse_move || conf.mouse_over;