gpujs / gpu.js

GPU Accelerated JavaScript
https://gpu.rocks
MIT License
15.12k stars 655 forks source link

Leaflet + gpu.js canvas demo doesn't work #777

Open beharguy opened 2 years ago

beharguy commented 2 years ago

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 :)

chrispahm commented 10 months ago

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