gpu.js icon indicating copy to clipboard operation
gpu.js copied to clipboard

Leaflet + gpu.js canvas demo doesn't work

Open beharguy opened this issue 3 years ago • 1 comments

Leaflet + gpu.js canvas demo doesn't work

Where does it happen?

When trying to run the demo of Leaflet + gpu.js canvas in chrome Version 100.0.4896.127 (Official Build) (x86_64) on my mac Leaflet + gpu.js canvas

How do we replicate the issue?

  1. Go to Leaflet + gpu.js canvas
  2. See the following error "map = TypeError: GPU is not a constructor"

How important is this (1-5)?

1 - Demo only

Expected behavior (i.e. solution)

The demo should work and show the leaflet map. The line that assign the GPU into the gpu var is broken: let gpu = new GPU({mode: "gpu"}) It should be let gpu = new GPU.GPU({mode: "gpu"}) An example of the solution for the demo in the following link Leaflet + gpu.js canvas

Other Comments

Great library :)

beharguy avatar Sep 03 '22 18:09 beharguy

Just stumbled upon this, there was just a reference to the GPU constructor missing, this fork should be working: https://observablehq.com/d/883dfa8b2ed01f30

chrispahm avatar Nov 16 '23 13:11 chrispahm