visgl / hubble.gl

A client-side JavaScript library for animating data visualizations and rendering videos.
https://hubble.gl
MIT License
142 stars 29 forks source link

Compatibility with deck.gl and luma.gl v9 #277

Open sraimund opened 2 months ago

sraimund commented 2 months ago

Describe the bug/feature I tried the pure JS example with deck.gl and luma.gl updated to their latest versions. The video rendering works, however, the background is black and artifacts appear for pixels close to the background.

Screenshot grafik

To Reproduce

yarn install or npm install with the following package.json of examples/get-started/pure-js

{
  "name": "pure-js-basic",
  "version": "0.0.0",
  "license": "MIT",
  "private": true,
  "scripts": {
    "start": "vite --open",
    "start-local": "vite --config ../../vite.config.local.mjs",
    "build": "vite build"
  },
  "dependencies": {
    "@hubble.gl/core": "^1.3.0",
    "@deck.gl/core": "^9.0.21",
    "@deck.gl/layers": "^9.0.21",
    "popmotion": "9.3.1"
  },
  "overrides": {
    "@hubble.gl/core": {
      "@luma.gl/core": "^9.0.15",
      "@luma.gl/constants": "^9.0.15",
      "@luma.gl/engine": "^9.0.15",
      "@luma.gl/shadertools": "^9.0.15",
      "@luma.gl/webgl": "^9.0.15"
    }
  },
  "resolutions": {
    "@luma.gl/core": "^9.0.15",
    "@luma.gl/constants": "^9.0.15",
    "@luma.gl/engine": "^9.0.15",
    "@luma.gl/shadertools": "^9.0.15",
    "@luma.gl/webgl": "^9.0.15"
  },
  "devDependencies": {
    "vite": "^4.0.0"
  }
}

Expected behavior The video rendering works similarly to the previous versions (i.e., 8) of deck.gl and luma.gl.

Desktop

sraimund commented 1 month ago

Changing

export const deck = new Deck({
  ...
  parameters: {
    clearColor: [255, 255, 255, 1]
  },
});

to

export const deck = new Deck({
  ...
  views: new MapView({
    clear: {
      color: [255, 255, 255, 1]
    }
  }),
});

resolves the problem since the API of deck.gl has changed from v8 to v9 (as discussed here).