Improve resizing window
This commit is contained in:
parent
332daccbe6
commit
25682560ea
1 changed files with 5 additions and 0 deletions
|
@ -43,6 +43,11 @@
|
||||||
<script>
|
<script>
|
||||||
const globe = Globe();
|
const globe = Globe();
|
||||||
|
|
||||||
|
window.addEventListener('resize',function(event){
|
||||||
|
globe.height(event.target.innerHeight);
|
||||||
|
globe.width(event.target.innerWidth);
|
||||||
|
});
|
||||||
|
|
||||||
globe(document.getElementById('globe'));
|
globe(document.getElementById('globe'));
|
||||||
|
|
||||||
globe.backgroundImageUrl('//unpkg.com/three-globe/example/img/night-sky.png');
|
globe.backgroundImageUrl('//unpkg.com/three-globe/example/img/night-sky.png');
|
||||||
|
|
Loading…
Add table
Reference in a new issue