mirror of
https://github.com/troisjs/trois.git
synced 2024-11-24 04:12:02 +08:00
resize (troisjs/troisjs.github.io#2)
This commit is contained in:
parent
795dd0c343
commit
b4fc933bb5
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user