Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
957466c
chore: bump deps
charlieforward9 Jan 19, 2025
e63204f
chore: bump deps
charlieforward9 Jan 19, 2025
03a2f0f
refactor: replace deck instance with props in MapboxOverlay
charlieforward9 Jan 23, 2025
8c419bf
New Website
chrisgervang Feb 3, 2025
02ffe2f
links
chrisgervang Feb 3, 2025
0e6eeae
Delete README.md
chrisgervang Feb 3, 2025
621f594
fix kepler
chrisgervang Feb 4, 2025
465f103
website action
chrisgervang Feb 4, 2025
fcfd2d9
pull latest changes in and bump
charlieforward9 Feb 4, 2025
cf8a4ea
pull latest changes in and bump
charlieforward9 Feb 4, 2025
9e69a10
chore: apply suggestions
charlieforward9 Feb 9, 2025
5e8d373
Merge branch 'master' of https://github.com/visgl/hubble.gl
charlieforward9 Feb 9, 2025
290b99c
chore: resolve comments, warnings
charlieforward9 Feb 10, 2025
485e7db
chore: bump to deck9.1
charlieforward9 Feb 10, 2025
fdb6e24
fix: build error
charlieforward9 Feb 10, 2025
256fe24
Merge branch 'master' into pr/285
chrisgervang Feb 10, 2025
a6f0a4c
yarn and lint
chrisgervang Feb 10, 2025
fce220c
set next version
chrisgervang Feb 10, 2025
d2ea066
add missing peer to fix test [ 'full' | 'dist' | 'bench' | 'ci' | 'co…
chrisgervang Feb 10, 2025
69c4da2
mapbox as peer, remove loader resolution
chrisgervang Feb 10, 2025
93f7f59
wip refactor: improve types, bump example decks
charlieforward9 Feb 11, 2025
6334935
chore: pin yarn version
charlieforward9 Feb 11, 2025
4967fc8
wip chore: bump & test examples
charlieforward9 Feb 24, 2025
5e79461
fix: #277
charlieforward9 Feb 24, 2025
5bbf88a
feat: add types to react quick animation component
charlieforward9 Feb 24, 2025
093ab76
refactor(Animator): remove
charlieforward9 Feb 26, 2025
b7ce53a
refactor(encoders): remove archive format, standardize zip
charlieforward9 Feb 26, 2025
b011b98
minor: animator refactor
charlieforward9 Feb 26, 2025
c4e99fe
minor: linting, formatting
charlieforward9 Feb 26, 2025
52af878
refactor(keyframes): remove unused features field
charlieforward9 Feb 27, 2025
57d31c3
chore(examples): bump / migrate, depend on local repo
charlieforward9 Feb 27, 2025
cc61f96
refactor(keyframes): remove kepler keyframe features
charlieforward9 Feb 27, 2025
547d5e8
Apply suggestions from code review
chrisgervang Mar 17, 2025
b299616
Merge branch 'master' into pr/285
chrisgervang Mar 20, 2025
20d76c7
Merge branch 'master' into pr/285
chrisgervang Mar 20, 2025
b6ac51f
Disable node tests
chrisgervang Mar 20, 2025
00272be
Enable headless browser tests
chrisgervang Mar 20, 2025
9807328
Use deck 9.1 in scripting
chrisgervang Mar 20, 2025
3204ff6
audit html
chrisgervang Mar 20, 2025
46b66a5
Remove packageManager
chrisgervang Mar 20, 2025
57fc004
Fix website build
chrisgervang Mar 20, 2025
dcd38a2
Revert "Remove packageManager"
chrisgervang Mar 20, 2025
7bbed20
add packageManager to website
chrisgervang Mar 20, 2025
1a069de
define clear color in views for each example
chrisgervang Mar 20, 2025
c339bf9
use browser tests in CI instead of node tests
chrisgervang Mar 20, 2025
0f61f3d
hack around dev-tools running node tests in CI
chrisgervang Mar 20, 2025
fa014a0
restore lint in ci
chrisgervang Mar 20, 2025
46193b3
TODO
chrisgervang Mar 20, 2025
877c8da
old docs
chrisgervang Mar 20, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
- name: Run tests
run: |
yarn lint
yarn lint
yarn test ci
- name: Coveralls
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ coverage/
.cache/

tsconfig.tsbuildinfo
tsconfig.build.tsbuildinfo

*/**/yarn.lock
!website/yarn.lock
Expand Down
2 changes: 1 addition & 1 deletion .ocularrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ const config = {
},

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

entry: {
Expand Down
12 changes: 12 additions & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
# Introduction

<p align="center">
<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>
<br />
Looking for an old version?
<a href="https://github.com/visgl/hubble.gl/blob/1.4-release/docs/README.md">
<img src="https://img.shields.io/badge/hubble.gl-v1.4-green.svg?style=flat-square" />
</a>
<a href="https://github.com/visgl/hubble.gl/blob/1.3-release/docs/README.md">
<img src="https://img.shields.io/badge/hubble.gl-v1.3-green.svg?style=flat-square" />
</a>
</p>

Hubble.gl is a JavaScript library for animating and video encoding WebGL data visualizations.

- **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.
Expand Down
2 changes: 1 addition & 1 deletion docs/api-reference/keyframe/keyframes.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class CameraKeyFrames extends Keyframes {
}

// It can be used directly too.
new Keyframes({timings, keyframes, easings = linear, interpolators = 'linear'})
new Keyframes({ timings, keyframes, easings = linear, interpolators = 'linear'})
```

## Constructor
Expand Down
12 changes: 7 additions & 5 deletions examples/get-started/pure-js/app.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* global document, URL */
import {Deck} from '@deck.gl/core';
import {Deck, MapView} from '@deck.gl/core';
import {GeoJsonLayer, ArcLayer} from '@deck.gl/layers';
import {DeckAdapter, DeckAnimation, AnimationManager, WebMEncoder} from '@hubble.gl/core';
import {easeInOut} from 'popmotion';
Expand Down Expand Up @@ -82,6 +82,12 @@ export const deck = new Deck({
deck.setProps({viewState});
},
controller: true,
views: new MapView({
// most video formats don't fully support transparency
clear: {
color: [255, 255, 255, 1]
}
}),
layers: [
new GeoJsonLayer({
id: 'base-map',
Expand Down Expand Up @@ -118,10 +124,6 @@ export const deck = new Deck({
getWidth: 1
})
],
// most video formats don't fully support transparency
parameters: {
clearColor: [255, 255, 255, 1]
},
// retina displays will double resolution
useDevicePixels: false
});
Expand Down
4 changes: 2 additions & 2 deletions examples/get-started/pure-js/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@
},
"dependencies": {
"@hubble.gl/core": "^1.4.0",
"deck.gl": "^8.9",
"deck.gl": "^9.1",
"popmotion": "9.3.1"
},
"devDependencies": {
"vite": "^4.0.0"
"vite": "^6.2.0"
}
}
27 changes: 16 additions & 11 deletions examples/get-started/scripting/index.html
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
<html>
<head>
<!-- deck.gl standalone bundle -->
<script src="https://unpkg.com/deck.gl@8.9.35/dist.min.js"></script>
<script src="https://unpkg.com/deck.gl@9.1/dist.min.js"></script>
<script src="https://unpkg.com/[email protected]/dist.min.js"></script>
<script src='https://api.tiles.mapbox.com/mapbox-gl-js/v0.53.1/mapbox-gl.js'></script>
<link href='https://api.tiles.mapbox.com/mapbox-gl-js/v0.53.1/mapbox-gl.css' rel='stylesheet' />
<style>
body {margin: 0; padding: 0; font-family: Helvetica, Arial, sans-serif;}
#geo, #non-geo {position: absolute; width: 50vw; height: 50vh;}
Expand All @@ -14,21 +12,26 @@
z-index: 1;
top: 0;
right: 0;
background-color: #FFF;
background-color: #fff;
margin: 24px;
padding: 10px 24px;
box-shadow: rgba(0, 0, 0, 0.16) 0px 1px 4px;
min-width: 300px;
}
.render-result h3 { font-size: 16px; margin: 8px 0; }
#re-render { margin-top: 8px; }
.render-result h3 {
font-size: 16px;
margin: 8px 0;
}
#re-render {
margin-top: 8px;
}
#result {
display: none;
}
</style>
</head>
<body>
<div id="non-geo" ></div>
<div id="non-geo"></div>
<div class="render-result">
<h3 id="render-status">Rendering video...</h3>
<div id="result">
Expand Down Expand Up @@ -104,12 +107,14 @@ <h3 id="render-status">Rendering video...</h3>
const nonGeoExample = new deck.DeckGL({
container: document.getElementById('non-geo'),
mapbox: false /* disable map */,
views: [new deck.OrbitView()],
views: new deck.OrbitView({
// most video formats don't fully support transparency
clear: {
color: [255, 255, 255, 1]
}
}),
initialViewState: {distance: 1, fov: 50, rotationX: 10, rotationOrbit: 160, zoom: 3.5},
controller: false,
parameters: {
clearColor: [255, 255, 255, 1]
},
// retina displays will double resolution
useDevicePixels: false
});
Expand Down
1 change: 1 addition & 0 deletions examples/website/basic-basemap-mapbox-legacy/app.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ const DeckGLOverlay = forwardRef((props, ref) => {
setRef(ref, deck._deck);
return null;
});
DeckGLOverlay.displayName = 'DeckGLOverlay';

const Container = ({children}) => (
<div
Expand Down
1 change: 1 addition & 0 deletions examples/website/basic-basemap-mapbox-legacy/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
<meta charset="utf-8">
<title>hubble.gl Example</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link href="https://api.tiles.mapbox.com/mapbox-gl-js/v1.13.0/mapbox-gl.css" rel="stylesheet" />
<style>
body {margin: 0; font-family: sans-serif; width: 100vw; height: 100vh; overflow: hidden;}
#app {width: 100%; height: 100%;}
Expand Down
3 changes: 2 additions & 1 deletion examples/website/basic-basemap-mapbox/app.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import React, {useState, useRef, useEffect, forwardRef} from 'react';
import {createRoot} from 'react-dom/client';
import {BasicControls, useHubbleGl, useDeckAnimation} from '@hubble.gl/react';
import {MapboxOverlay} from '@deck.gl/mapbox';
import Map, {useControl} from 'react-map-gl';
import {Map, useControl} from 'react-map-gl/mapbox';
import {PolygonLayer} from '@deck.gl/layers';
import {easeInOut} from 'popmotion';
import {setRef} from './set-ref';
Expand Down Expand Up @@ -80,6 +80,7 @@ const DeckGLOverlay = forwardRef((props, ref) => {
setRef(ref, deck._deck);
return null;
});
DeckGLOverlay.displayName = 'DeckGLOverlay';

const Container = ({children}) => (
<div
Expand Down
33 changes: 17 additions & 16 deletions examples/website/basic-basemap-mapbox/index.html
Original file line number Diff line number Diff line change
@@ -1,19 +1,20 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>hubble.gl Example</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<style>
body {margin: 0; font-family: sans-serif; width: 100vw; height: 100vh; overflow: hidden;}
#app {width: 100%; height: 100%;}
</style>
</head>
<body>
<div id="app"></div>
</body>
<script type="module">
import {renderToDOM} from './app.jsx';
renderToDOM(document.getElementById('app'));
</script>
<head>
<link href="https://api.mapbox.com/mapbox-gl-js/v3.10.0/mapbox-gl.css" rel="stylesheet" />
<meta charset="utf-8" />
<title>hubble.gl Example</title>
<meta name="viewport" content="width=device-width, initial-scale=1" />
<style>
body {margin: 0; font-family: sans-serif; width: 100vw; height: 100vh; overflow: hidden;}
#app {width: 100%; height: 100%;}
</style>
</head>
<body>
<div id="app"></div>
</body>
<script type="module">
import {renderToDOM} from './app.jsx';
renderToDOM(document.getElementById('app'));
</script>
</html>
10 changes: 5 additions & 5 deletions examples/website/basic-basemap-mapbox/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@
"build": "vite build"
},
"dependencies": {
"deck.gl": "^8.9",
"deck.gl": "^9.1",
"hubble.gl": "^1.4.0",
"mapbox-gl": "^3.10.0",
"popmotion": "9.3.1",
"react": "^18.3.0",
"react-dom": "^18.3.0",
"react-map-gl": "^7.1.8",
"mapbox-gl": "^2.0.0",
"popmotion": "9.3.1"
"react-map-gl": "^8.0.1"
},
"devDependencies": {
"vite": "^4.0.0"
"vite": "^6.2.0"
}
}
8 changes: 4 additions & 4 deletions examples/website/basic-basemap/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@
"build": "vite build"
},
"dependencies": {
"deck.gl": "^8.9",
"deck.gl": "^9.1",
"hubble.gl": "^1.4.0",
"maplibre-gl": "^3.6.2",
"popmotion": "9.3.1",
"react": "^18.3.0",
"react-dom": "^18.3.0",
"react-map-gl": "^7.1.8",
"maplibre-gl": "^3.6.2",
"popmotion": "9.3.1"
"react-map-gl": "^7.1.8"
},
"devDependencies": {
"vite": "^4.0.0"
Expand Down
20 changes: 13 additions & 7 deletions examples/website/camera/app.jsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import React, {useState, useRef, useEffect} from 'react';
import {createRoot} from 'react-dom/client';
import DeckGL from '@deck.gl/react';
import {DeckGL} from '@deck.gl/react';
import {useHubbleGl, BasicControls} from '@hubble.gl/react';
import {vignette, fxaa} from '@luma.gl/shadertools';
import {vignette, fxaa} from '@luma.gl/effects';
import {PostProcessEffect, MapView} from '@deck.gl/core';
import {deckAnimation} from './layers';
import {easeInOut} from 'popmotion';
import {deckAnimation} from './layers';

const INITIAL_VIEW_STATE = {
longitude: -122.435,
Expand Down Expand Up @@ -108,12 +108,18 @@ export default function App() {
<Container>
<div style={{position: 'relative'}}>
<DeckGL
ref={ref => deckRef.current = ref?.deck}
ref={ref => (deckRef.current = ref?.deck)}
style={{position: 'unset'}}
views={new MapView({farZMultiplier: 3})}
views={
new MapView({
farZMultiplier: 3,
clear: {
color: [61 / 255, 20 / 255, 76 / 255, 1]
}
})
Comment on lines +114 to +119
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This doesn't seem to be working yet
Screenshot 2025-03-20 at 12 29 43 PM

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah Ive struggled to get that working, but as I integrate it into my codebase, Ill have much more time to learn and explore its internals.

Let me know when the release goes live. Thanks!

}
parameters={{
depthTest: false,
clearColor: [61 / 255, 20 / 255, 76 / 255, 1]
depthTest: false
// blend: true,
// blendEquation: GL.FUNC_ADD,
// blendFunc: [GL.SRC_ALPHA, GL.ONE_MINUS_SRC_ALPHA]
Expand Down
7 changes: 4 additions & 3 deletions examples/website/camera/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,12 @@
"build": "vite build"
},
"dependencies": {
"@luma.gl/effects": "9.1.4",
"deck.gl": "^9.1",
"hubble.gl": "^1.4.0",
"deck.gl": "^8.9",
"popmotion": "9.3.1",
"react": "^18.3.0",
"react-dom": "^18.3.0",
"popmotion": "9.3.1"
"react-dom": "^18.3.0"
},
"devDependencies": {
"vite": "^4.0.0"
Expand Down
10 changes: 7 additions & 3 deletions examples/website/quick-start/app.jsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import React from 'react';
import {createRoot} from 'react-dom/client';
import {MapView} from '@deck.gl/core';
import {ScatterplotLayer, TextLayer} from '@deck.gl/layers';
import {QuickAnimation, hold, useDeckAnimation} from 'hubble.gl';
import {anticipate, easeIn, reverseEasing} from 'popmotion';
Expand Down Expand Up @@ -91,9 +92,12 @@ export default function App() {
resolution={RESOLUTION}
animation={animation}
deckProps={{
parameters: {
clearColor: [255, 255, 255, 1]
}
views: new MapView({
// most video formats don't fully support transparency
clear: {
color: [255, 255, 255, 1]
}
})
}}
timecode={TIMECODE}
/>
Expand Down
10 changes: 7 additions & 3 deletions examples/website/quick-start/quick-start-after.jsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React, {useMemo} from 'react';
import {MapView} from '@deck.gl/core';
import {ScatterplotLayer, TextLayer} from '@deck.gl/layers';
import {QuickAnimation, hold, DeckAnimation} from 'hubble.gl';
import {anticipate, easeIn, reverseEasing} from 'popmotion';
Expand Down Expand Up @@ -76,9 +77,12 @@ export default function App() {
resolution={RESOLUTION}
animation={animation}
deckProps={{
parameters: {
clearColor: [255, 255, 255, 1]
}
views: new MapView({
// most video formats don't fully support transparency
clear: {
color: [255, 255, 255, 1]
}
})
}}
timecode={TIMECODE}
/>
Expand Down
10 changes: 7 additions & 3 deletions examples/website/quick-start/quick-start-before.jsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React from 'react';
import {MapView} from '@deck.gl/core';
import {ScatterplotLayer, TextLayer} from '@deck.gl/layers';
import DeckGL from '@deck.gl/react';

Expand Down Expand Up @@ -32,9 +33,12 @@ export default function App() {
width={640}
height={480}
layers={layers}
parameters={{
clearColor: [255, 255, 255, 1]
}}
views={new MapView({
// most video formats don't fully support transparency
clear: {
color: [255, 255, 255, 1]
}
})}
/>
);
}
Loading
Loading