Skip to content
Merged
Show file tree
Hide file tree
Changes from 10 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
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
4 changes: 2 additions & 2 deletions examples/worldview/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
},
"dependencies": {
"deck.gl": "8.2.0",
"@loaders.gl/core": "^2.3.13",
"@loaders.gl/json": "^2.3.13",
"@loaders.gl/core": "^4.3.3",
"@loaders.gl/json": "^4.3.3",
"@reduxjs/toolkit": "^1.5.0",
"d3-request": "^1.0.6",
"global": "^4.3.0",
Expand Down
25 changes: 11 additions & 14 deletions modules/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,28 +35,25 @@
"build-bundle": "ocular-bundle ./bundle.ts"
},
"dependencies": {
"@loaders.gl/core": "^3.0.0",
Copy link
Collaborator

Choose a reason for hiding this comment

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

I'd prefer to use the version of loaders on master since there's an issue with GIF encoding the videos module in later versions, and we're not using anything from the newer version of loaders

Copy link
Contributor Author

Choose a reason for hiding this comment

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

^3.4.13 ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

In order to bump to deck9.1, I need @loaders.gl/core@"^4.2.0", where is the encoding issue discussed?

Copy link
Collaborator

@chrisgervang chrisgervang Feb 10, 2025

Choose a reason for hiding this comment

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

visgl/loaders.gl#2164

A fix was attempted, but it's still an issue. I have a reproduction in #305

Copy link
Collaborator

Choose a reason for hiding this comment

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

It actually still affects this branch too after removing the resolution

"@loaders.gl/video": "^3.0.12",
"@loaders.gl/zip": "^3.0.12",
"@math.gl/core": "^3.6.0",
"@math.gl/web-mercator": "^3.6.2",
"@loaders.gl/core": "^4.3.3",
"@loaders.gl/video": "^4.3.3",
"@loaders.gl/zip": "^4.3.3",
"@math.gl/core": "^4.1.0",
"@math.gl/web-mercator": "^4.1.0",
"downloadjs": "^1.4.7",
"popmotion": "9.3.1",
"probe.gl": "^3.4.0",
"webm-writer": "^1.0.0"
},
"resolutions": {
"@loaders.gl/video": "3.0.12"
},
"peerDependencies": {
"@deck.gl/core": ">=8.3",
"@luma.gl/core": ">=8.3",
"@luma.gl/engine": ">=8.3"
"@deck.gl/core": ">=9.0",
"@luma.gl/core": ">=9.0",
"@luma.gl/engine": ">=9.0"
},
"devDependencies": {
"@deck.gl/core": "^8.9",
"@luma.gl/core": "^8.5.0",
"@luma.gl/engine": "^8.5.0",
"@deck.gl/core": "^9.0",
"@luma.gl/core": "^9.0.0",
"@luma.gl/engine": "^9.0.0",
"@types/tape-catch": "^1.0.2"
}
}
11 changes: 5 additions & 6 deletions modules/core/src/adapters/deck-adapter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,22 +6,22 @@
import {type FrameEncoder, PreviewEncoder, type FormatConfigs} from '../encoders/index';
import {AnimationManager} from '../animations/index';
import {type Timecode, VideoCapture} from '../capture/video-capture';
import type {Deck, Layer, DeckProps} from '@deck.gl/core/typed';
import {Deck, Layer, DeckProps} from '@deck.gl/core';

export default class DeckAdapter {
deck?: Deck;
animationManager: AnimationManager;
shouldAnimate: boolean;
enabled: boolean;
glContext?: WebGLRenderingContext;
glContext?: WebGL2RenderingContext;
videoCapture: VideoCapture;

constructor({
animationManager = undefined,
glContext = undefined
}: {
animationManager?: AnimationManager;
glContext?: WebGLRenderingContext;
glContext?: WebGL2RenderingContext;
}) {
this.animationManager = animationManager || new AnimationManager({});
this.glContext = glContext;
Expand Down Expand Up @@ -65,7 +65,7 @@ export default class DeckAdapter {
}

if (this.glContext) {
props.gl = this.glContext;
props.deviceProps.webgl = this.glContext;
}
return {...extraProps, ...props};
}
Expand Down Expand Up @@ -124,8 +124,7 @@ export default class DeckAdapter {
const areAllLayersLoaded =
this.deck && this.deck.props.layers.every(layer => (layer as Layer).isLoaded);
if (this.videoCapture.isRecording() && areAllLayersLoaded && readyToCapture) {
// @ts-expect-error TODO use getCanvas
const canvas = this.deck.canvas;
const canvas = this.deck.getCanvas();
this.videoCapture.capture(canvas, nextTimeMs => {
this.seek({timeMs: nextTimeMs});
proceedToNextFrame(nextTimeMs);
Expand Down
2 changes: 1 addition & 1 deletion modules/core/src/animations/deck-animation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import {
DeckLayerKeyframeProps
} from '../keyframes/index';
import Animation, {AnimationConstructor} from './animation';
import type {Layer} from '@deck.gl/core/typed';
import type {Layer} from '@deck.gl/core';

function noop() {}

Expand Down
4 changes: 2 additions & 2 deletions modules/main/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@
"@hubble.gl/react": "1.4.0-beta.2"
},
"peerDependencies": {
"react": ">=16.3.0",
"react-dom": ">=16.3.0"
"react": ">=18.3.0",
"react-dom": ">=18.3.0"
},
"peerDependenciesMeta": {
"react": {
Expand Down
17 changes: 9 additions & 8 deletions modules/react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
],
"sideEffects": false,
"dependencies": {
"@loaders.gl/zip": "^3.0.12",
"@loaders.gl/zip": "^4.3.3",
"@turf/helpers": "^5.1.5",
"@turf/transform-translate": "^5.1.5",
"classnames": "^2.2.6",
Expand All @@ -54,18 +54,19 @@
"styled-components": "6.1.8"
},
"peerDependencies": {
"@deck.gl/core": ">=8.3",
"@deck.gl/mapbox": ">=8.3",
"@deck.gl/react": ">=8.3",
"@deck.gl/core": ">=9.0",
"@deck.gl/mapbox": ">=9.0",
"@deck.gl/react": ">=9.0",
"@hubble.gl/core": "^1.4.0",
"@loaders.gl/core": "^3.0.0",
"@loaders.gl/core": "^4.0.0",
"mapbox-gl": "<=3.0.0",
"react": ">=18.2",
"react-dom": ">=18.2"
},
"devDependencies": {
"@deck.gl/core": "^8.9",
"@deck.gl/mapbox": "^8.9",
"@deck.gl/react": "^8.9",
"@deck.gl/core": "^9.0",
"@deck.gl/mapbox": "^9.0",
"@deck.gl/react": "^9.0",
"@types/lodash.get": "^4.4.9",
"@types/lodash.isequal": "^4.5.8",
"@types/react": "^18.3.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import ExportVideoPanel from './export-video-panel';
import {parseSetCameraType, scaleToVideoExport} from './utils';
import {DEFAULT_FILENAME, getResolutionSetting} from './constants';
import type {MapProps} from 'react-map-gl';
import type {DeckProps, MapViewState} from '@deck.gl/core/typed';
import type {DeckProps, MapViewState} from '@deck.gl/core';

const ENCODERS = {
gif: GifEncoder,
Expand All @@ -39,7 +39,7 @@ export type ExportVideoSettings = {

type ExportVideoPanelContainerProps = {
initialState?: Partial<ExportVideoPanelContainerState>;
glContext?: WebGLRenderingContext;
glContext?: WebGL2RenderingContext;

exportVideoWidth: number;
handleClose: () => void;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
/* global window */

import React, {Component, ForwardedRef, RefObject, forwardRef} from 'react';
import DeckGL from '@deck.gl/react/typed';
import DeckGL from '@deck.gl/react';
import ReactMapGL, {type MapProps, type MapRef, useControl} from 'react-map-gl';
import {MapboxOverlay, MapboxOverlayProps} from '@deck.gl/mapbox/typed';
import type {Deck, DeckProps, Layer, MapViewState} from '@deck.gl/core/typed';
import {MapboxOverlay, MapboxOverlayProps} from '@deck.gl/mapbox';
import type {Deck, DeckProps, Layer, MapViewState} from '@deck.gl/core';
import isEqual from 'lodash.isequal';

import {deckStyle, DeckCanvas} from './styled-components';
import {DeckCanvas} from './styled-components';
import {RenderingSpinner} from './rendering-spinner';
import {createKeplerLayers} from '../../kepler-layers';
import {DeckAdapter} from '@hubble.gl/core';
Expand Down Expand Up @@ -52,14 +52,12 @@ const DeckGLOverlay = forwardRef<Deck, MapboxOverlayProps>(
return null;
}
);
DeckGLOverlay.displayName = 'DeckGLOverlay';

export class ExportVideoPanelPreview extends Component<
ExportVideoPanelPreviewProps,
ExportVideoPanelPreviewState
> {
mapRef: RefObject<MapRef>;
deckRef: RefObject<Deck>;

constructor(props: ExportVideoPanelPreviewProps) {
super(props);
const mapStyle = this.props.mapData.mapStyle;
Expand Down Expand Up @@ -101,6 +99,9 @@ export class ExportVideoPanelPreview extends Component<
}
}

mapRef: RefObject<MapRef>;
deckRef: RefObject<Deck>;

_resizeVideo() {
const {exportVideoWidth, resolution, disableBaseMap} = this.props;

Expand Down Expand Up @@ -215,7 +216,7 @@ export class ExportVideoPanelPreview extends Component<
>
<DeckGLOverlay
ref={this.deckRef}
glOptions={{stencil: true}}
deviceProps={{type: 'webgl', webgl: {stencil: true}}}
{...adapter.getProps({deck, extraProps: {...deckProps, layers: deckLayers}})}
/>
</ReactMapGL>
Expand Down
5 changes: 3 additions & 2 deletions modules/react/src/components/export-video/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@
// Copyright (c) vis.gl contributors
import {point} from '@turf/helpers';
import transformTranslate from '@turf/transform-translate';
import {WebMercatorViewport} from '@deck.gl/core'; // importing non-typed module since it's a peer dependency and node errors while testing
import type {MapViewState} from '@deck.gl/core/typed';
import {WebMercatorViewport} from '@deck.gl/core';
import type {MapViewState} from '@deck.gl/core';


export function scaleToVideoExport(
viewState: MapViewState,
Expand Down
7 changes: 2 additions & 5 deletions modules/react/src/components/quick-animation.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,9 @@
// SPDX-License-Identifier: MIT
// Copyright (c) vis.gl contributors
import React, {useState, useRef, useMemo} from 'react';
import DeckGL, {DeckGLRef} from '@deck.gl/react/typed';
import DeckGL, {DeckGLRef} from '@deck.gl/react';
import BasicControls from './basic-controls';
import {useDeckAdapter, useNextFrame} from '../hooks';
import type {MapViewState} from '@deck.gl/core/typed';
import {FormatConfigs} from '@hubble.gl/core';

export const QuickAnimation = ({
Expand Down Expand Up @@ -57,9 +56,7 @@ export const QuickAnimation = ({
ref={deckRef}
style={{position: 'unset'}}
viewState={cameraFrame}
onViewStateChange={({viewState: vs}) => {
setCameraFrame(vs as MapViewState);
}}
onViewStateChange={({viewState: vs}) => setCameraFrame(vs)}
controller={true}
width={resolution.width}
height={resolution.height}
Expand Down
7 changes: 4 additions & 3 deletions modules/react/src/components/render-player.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,14 @@ import styled from 'styled-components';
import {type Encoders, GIF, JPEG, PNG, WEBM} from './encoders';

const parseImages = async (blob: Blob, encoder?: Encoders): Promise<{[name: string]: string}> => {
const images = await parse(blob, ZipLoader);
const images = (await parse(blob, ZipLoader)) as {[name: string]: ArrayBuffer};
const imageUrls: {[name: string]: string} = {};
for (const image in images) {
images[image] = URL.createObjectURL(
imageUrls[image] = URL.createObjectURL(
new Blob([images[image]], {type: encoder === JPEG ? 'image/jpeg' : 'image/png'})
);
}
return images;
return imageUrls;
};

const VideoPlayer = styled.video`
Expand Down
2 changes: 1 addition & 1 deletion modules/react/src/hooks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

import {useState, useCallback, useMemo, RefObject} from 'react';
import {DeckAdapter, DeckAnimation, DeckAnimationConstructor} from '@hubble.gl/core';
import type {Layer, MapViewState, Deck} from '@deck.gl/core/typed';
import type {Layer, MapViewState, Deck} from '@deck.gl/core';
import type {MapRef} from 'react-map-gl';

export function useNextFrame() {
Expand Down
2 changes: 1 addition & 1 deletion modules/react/src/kepler-layers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// Copyright (c) vis.gl contributors

import {createSelector} from 'reselect';
import type {Layer, MapViewState} from '@deck.gl/core/typed';
import type {Layer, MapViewState} from '@deck.gl/core';

/**
* Kepler Layer Creation
Expand Down
2 changes: 1 addition & 1 deletion tsconfig.module.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"build": true,
// "build": true,
"esModuleInterop": true,
"declaration": true,
"declarationMap": true,
Expand Down
Loading