1
0
mirror of https://github.com/troisjs/trois.git synced 2024-11-24 04:12:02 +08:00
This commit is contained in:
Kevin Levron 2021-03-05 08:27:56 +01:00
parent 795dd0c343
commit b4fc933bb5

View File

@ -102,11 +102,11 @@ export default function useThree() {
} }
} }
if (conf.width && conf.height) { if (conf.resize) {
setSize(conf.width, conf.height);
} else if (conf.resize) {
onResize(); onResize();
window.addEventListener('resize', onResize); window.addEventListener('resize', onResize);
} else {
setSize(conf.width | 300, conf.height | 150);
} }
conf.mouse_move = conf.mouse_move || conf.mouse_over; conf.mouse_move = conf.mouse_move || conf.mouse_over;