From b6676368e9eadbb726c0e44749a6bc9a5d6dafa0 Mon Sep 17 00:00:00 2001 From: avpeery Date: Tue, 24 May 2022 13:40:20 -0700 Subject: [PATCH 1/6] add ozone video on globe to release tests --- debug/globe-with-video.html | 107 +++++++++++++++++++++++ test/release/index.js | 5 ++ test/release/local_release_page_list.txt | 1 + 3 files changed, 113 insertions(+) create mode 100644 debug/globe-with-video.html diff --git a/debug/globe-with-video.html b/debug/globe-with-video.html new file mode 100644 index 00000000000..26504eafca0 --- /dev/null +++ b/debug/globe-with-video.html @@ -0,0 +1,107 @@ + + + + + + Globe with Video + + + + + + + +
+
Play/pause
+ + + + + + + diff --git a/test/release/index.js b/test/release/index.js index 52200f05d94..d580b0858df 100644 --- a/test/release/index.js +++ b/test/release/index.js @@ -96,6 +96,11 @@ const pages = [ "title": "Video", "url": "./video.html" }, + { + "key": "globe-with-video", + "title": "Globe with Video", + "url": "./globe-with-video.html" + } { "key": "scroll_zoom_blocker", "title": "Gestures", diff --git a/test/release/local_release_page_list.txt b/test/release/local_release_page_list.txt index 58a7501c1bf..5054c0fc96f 100644 --- a/test/release/local_release_page_list.txt +++ b/test/release/local_release_page_list.txt @@ -12,3 +12,4 @@ image-on-globe.html atmosphere.html animate-point-along-route.html filter-features-with-globe.html +globe-with-video.html From a562cbe80f0f68eeef9cc52a054898aa7c18ff2f Mon Sep 17 00:00:00 2001 From: avpeery Date: Tue, 24 May 2022 13:43:29 -0700 Subject: [PATCH 2/6] formatting --- debug/globe-with-video.html | 2 -- 1 file changed, 2 deletions(-) diff --git a/debug/globe-with-video.html b/debug/globe-with-video.html index 26504eafca0..a48363421d2 100644 --- a/debug/globe-with-video.html +++ b/debug/globe-with-video.html @@ -1,5 +1,3 @@ - - From 765c502391511f163c2eca2a03a6cbe358ef4e83 Mon Sep 17 00:00:00 2001 From: avpeery Date: Tue, 24 May 2022 13:44:15 -0700 Subject: [PATCH 3/6] formatting --- debug/globe-with-video.html | 1 - 1 file changed, 1 deletion(-) diff --git a/debug/globe-with-video.html b/debug/globe-with-video.html index a48363421d2..fa76d10f3eb 100644 --- a/debug/globe-with-video.html +++ b/debug/globe-with-video.html @@ -31,7 +31,6 @@
Play/pause
- From 5987cfd5cfab73ee4983e3e915675c9b1d2932b2 Mon Sep 17 00:00:00 2001 From: avpeery Date: Tue, 24 May 2022 14:34:58 -0700 Subject: [PATCH 4/6] fix lint issues --- debug/globe-with-video.html | 10 +++++----- test/release/index.js | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/debug/globe-with-video.html b/debug/globe-with-video.html index fa76d10f3eb..e10d518139f 100644 --- a/debug/globe-with-video.html +++ b/debug/globe-with-video.html @@ -71,15 +71,15 @@ "source": "mapbox-vector", 'source-layer': 'water', 'layout': { - 'line-join': 'round', - 'line-cap': 'round' + 'line-join': 'round', + 'line-cap': 'round' }, 'paint': { - 'line-color': '#FFFFFF', - 'line-width': 1 + 'line-color': '#FFFFFF', + 'line-width': 1 } } - ] + ] }; const map = new mapboxgl.Map({ diff --git a/test/release/index.js b/test/release/index.js index d580b0858df..7ceea7378ef 100644 --- a/test/release/index.js +++ b/test/release/index.js @@ -100,7 +100,7 @@ const pages = [ "key": "globe-with-video", "title": "Globe with Video", "url": "./globe-with-video.html" - } + }, { "key": "scroll_zoom_blocker", "title": "Gestures", From 49cae21886af511e489ae2e1236051aff2318773 Mon Sep 17 00:00:00 2001 From: avpeery Date: Wed, 25 May 2022 23:43:45 -0700 Subject: [PATCH 5/6] simplify play/pause button --- debug/globe-with-video.html | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/debug/globe-with-video.html b/debug/globe-with-video.html index e10d518139f..043ce19773f 100644 --- a/debug/globe-with-video.html +++ b/debug/globe-with-video.html @@ -30,7 +30,7 @@
-
Play/pause
+
Pause
@@ -91,12 +91,14 @@ projection: 'globe' }); -let playing = false; - document.getElementById('playback').addEventListener('click', (e) => { - playing = !playing; - if (playing) map.getSource('video').play(); - else map.getSource('video').pause(); + if (e.target.innerHTML === 'Play') { + e.target.innerHTML = 'Pause'; + map.getSource('video').play(); + } else { + e.target.innerHTML = 'Play'; + map.getSource('video').pause(); + } }); From d72e0729dac06afdd930534ff0bf63ad24826e51 Mon Sep 17 00:00:00 2001 From: avpeery Date: Tue, 31 May 2022 10:34:51 -0700 Subject: [PATCH 6/6] added atmosphere --- debug/globe-with-video.html | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/debug/globe-with-video.html b/debug/globe-with-video.html index 043ce19773f..b4a4bceeaee 100644 --- a/debug/globe-with-video.html +++ b/debug/globe-with-video.html @@ -91,6 +91,17 @@ projection: 'globe' }); +map.on('load', () => { + map.setFog({ + 'range': [0.8, 8], + 'color': 'rgba(13, 13, 13, 1)', + 'horizon-blend': 0.05, + 'high-color': 'rgba(255, 255, 255, 0.5)', + 'space-color': 'rgba(50, 50, 50, 1)', + 'star-intensity': 0.1 + }); +}); + document.getElementById('playback').addEventListener('click', (e) => { if (e.target.innerHTML === 'Play') { e.target.innerHTML = 'Pause';