Skip to content

Commit f653adb

Browse files
charlieforward9chrisgervangsraimund
authored
chore: bump to deck 9.1 (#285)
* chore: bump deps * refactor: replace deck instance with props in MapboxOverlay * chore: apply suggestions * chore: resolve comments, warnings * chore: bump to deck9.1 * fix: build error * yarn and lint * mapbox as peer, remove loader resolution * wip refactor: improve types, bump example decks * chore: pin yarn version * wip chore: bump & test examples * fix: #277 Co-authored-by: sraimund <[email protected]> * feat: add types to react quick animation component * minor: linting, formatting * chore(examples): bump / migrate, depend on local repo * Apply suggestions from code review * Disable node tests * Enable headless browser tests * Use deck 9.1 in scripting * audit html * Fix website build * add packageManager to website * define clear color in views for each example * use browser tests in CI instead of node tests * hack around dev-tools running node tests in CI * TODO * old docs --------- Co-authored-by: Chris Gervang <[email protected]> Co-authored-by: sraimund <[email protected]> Co-authored-by: Chris Gervang <[email protected]>
1 parent 9631f51 commit f653adb

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+1596
-963
lines changed

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
2828
- name: Run tests
2929
run: |
30-
yarn lint
30+
yarn lint
3131
yarn test ci
3232
3333
- name: Coveralls

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ coverage/
88
.cache/
99

1010
tsconfig.tsbuildinfo
11+
tsconfig.build.tsbuildinfo
1112

1213
*/**/yarn.lock
1314
!website/yarn.lock

.ocularrc.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ const config = {
2727
},
2828

2929
coverage: {
30-
test: 'browser'
30+
test: 'force-browser-tests' // TODO: revert to 'browser' after resolving https://github.com/visgl/dev-tools/issues/10
3131
},
3232

3333
entry: {

docs/README.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,17 @@
11
# Introduction
22

3+
<p align="center">
4+
<span>These docs are for <a href="https://github.com/visgl/hubble.gl/blob/2.0-release/docs/README.md"><img src="https://img.shields.io/badge/hubble.gl-v2.0-brightgreen.svg?style=flat-square" /></a></span>
5+
<br />
6+
Looking for an old version?
7+
<a href="https://github.com/visgl/hubble.gl/blob/1.4-release/docs/README.md">
8+
<img src="https://img.shields.io/badge/hubble.gl-v1.4-green.svg?style=flat-square" />
9+
</a>
10+
<a href="https://github.com/visgl/hubble.gl/blob/1.3-release/docs/README.md">
11+
<img src="https://img.shields.io/badge/hubble.gl-v1.3-green.svg?style=flat-square" />
12+
</a>
13+
</p>
14+
315
Hubble.gl is a JavaScript library for animating and video encoding WebGL data visualizations.
416

517
- **High Quality Video:** 60+fps framerates, up to 8k resolution, and a variety of formats. Render a quick draft or with loseless encoding. Fine tune timing and look with keyframe markers and render everything in the same app.

docs/api-reference/keyframe/keyframes.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ class CameraKeyFrames extends Keyframes {
1515
}
1616

1717
// It can be used directly too.
18-
new Keyframes({timings, keyframes, easings = linear, interpolators = 'linear'})
18+
new Keyframes({ timings, keyframes, easings = linear, interpolators = 'linear'})
1919
```
2020

2121
## Constructor

examples/get-started/pure-js/app.js

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/* global document, URL */
2-
import {Deck} from '@deck.gl/core';
2+
import {Deck, MapView} from '@deck.gl/core';
33
import {GeoJsonLayer, ArcLayer} from '@deck.gl/layers';
44
import {DeckAdapter, DeckAnimation, AnimationManager, WebMEncoder} from '@hubble.gl/core';
55
import {easeInOut} from 'popmotion';
@@ -82,6 +82,12 @@ export const deck = new Deck({
8282
deck.setProps({viewState});
8383
},
8484
controller: true,
85+
views: new MapView({
86+
// most video formats don't fully support transparency
87+
clear: {
88+
color: [255, 255, 255, 1]
89+
}
90+
}),
8591
layers: [
8692
new GeoJsonLayer({
8793
id: 'base-map',
@@ -118,10 +124,6 @@ export const deck = new Deck({
118124
getWidth: 1
119125
})
120126
],
121-
// most video formats don't fully support transparency
122-
parameters: {
123-
clearColor: [255, 255, 255, 1]
124-
},
125127
// retina displays will double resolution
126128
useDevicePixels: false
127129
});

examples/get-started/pure-js/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@
1010
},
1111
"dependencies": {
1212
"@hubble.gl/core": "^1.4.0",
13-
"deck.gl": "^8.9",
13+
"deck.gl": "^9.1",
1414
"popmotion": "9.3.1"
1515
},
1616
"devDependencies": {
17-
"vite": "^4.0.0"
17+
"vite": "^6.2.0"
1818
}
1919
}

examples/get-started/scripting/index.html

Lines changed: 16 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
<html>
22
<head>
33
<!-- deck.gl standalone bundle -->
4-
<script src="https://unpkg.com/deck.gl@8.9.35/dist.min.js"></script>
4+
<script src="https://unpkg.com/deck.gl@9.1/dist.min.js"></script>
55
<script src="https://unpkg.com/[email protected]/dist.min.js"></script>
6-
<script src='https://api.tiles.mapbox.com/mapbox-gl-js/v0.53.1/mapbox-gl.js'></script>
7-
<link href='https://api.tiles.mapbox.com/mapbox-gl-js/v0.53.1/mapbox-gl.css' rel='stylesheet' />
86
<style>
97
body {margin: 0; padding: 0; font-family: Helvetica, Arial, sans-serif;}
108
#geo, #non-geo {position: absolute; width: 50vw; height: 50vh;}
@@ -14,21 +12,26 @@
1412
z-index: 1;
1513
top: 0;
1614
right: 0;
17-
background-color: #FFF;
15+
background-color: #fff;
1816
margin: 24px;
1917
padding: 10px 24px;
2018
box-shadow: rgba(0, 0, 0, 0.16) 0px 1px 4px;
2119
min-width: 300px;
2220
}
23-
.render-result h3 { font-size: 16px; margin: 8px 0; }
24-
#re-render { margin-top: 8px; }
21+
.render-result h3 {
22+
font-size: 16px;
23+
margin: 8px 0;
24+
}
25+
#re-render {
26+
margin-top: 8px;
27+
}
2528
#result {
2629
display: none;
2730
}
2831
</style>
2932
</head>
3033
<body>
31-
<div id="non-geo" ></div>
34+
<div id="non-geo"></div>
3235
<div class="render-result">
3336
<h3 id="render-status">Rendering video...</h3>
3437
<div id="result">
@@ -104,12 +107,14 @@ <h3 id="render-status">Rendering video...</h3>
104107
const nonGeoExample = new deck.DeckGL({
105108
container: document.getElementById('non-geo'),
106109
mapbox: false /* disable map */,
107-
views: [new deck.OrbitView()],
110+
views: new deck.OrbitView({
111+
// most video formats don't fully support transparency
112+
clear: {
113+
color: [255, 255, 255, 1]
114+
}
115+
}),
108116
initialViewState: {distance: 1, fov: 50, rotationX: 10, rotationOrbit: 160, zoom: 3.5},
109117
controller: false,
110-
parameters: {
111-
clearColor: [255, 255, 255, 1]
112-
},
113118
// retina displays will double resolution
114119
useDevicePixels: false
115120
});

examples/website/basic-basemap-mapbox-legacy/app.jsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ const DeckGLOverlay = forwardRef((props, ref) => {
8080
setRef(ref, deck._deck);
8181
return null;
8282
});
83+
DeckGLOverlay.displayName = 'DeckGLOverlay';
8384

8485
const Container = ({children}) => (
8586
<div

examples/website/basic-basemap-mapbox-legacy/index.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
<meta charset="utf-8">
55
<title>hubble.gl Example</title>
66
<meta name="viewport" content="width=device-width, initial-scale=1">
7+
<link href="https://api.tiles.mapbox.com/mapbox-gl-js/v1.13.0/mapbox-gl.css" rel="stylesheet" />
78
<style>
89
body {margin: 0; font-family: sans-serif; width: 100vw; height: 100vh; overflow: hidden;}
910
#app {width: 100%; height: 100%;}

0 commit comments

Comments
 (0)