mpetroff / pannellum

Pannellum is a lightweight, free, and open source panorama viewer for the web.
https://pannellum.org/
MIT License
4.15k stars 710 forks source link

Library loades less tiles in both direction x and y #1178

Open farshaadmahmoudi opened 9 months ago

farshaadmahmoudi commented 9 months ago

the problem is that in every zoom level that I try to load Pannellum, it loads one tile less than exist tile count in both x and y direction for example i have to 22 matrix tile for zoom level 1 but it loads only (0,0) tile and for zoom level 2 that has 55 matrix it loads like .... 0 1 2 3 4 0 [ ] 1 [ ] 2 [ ] 3 [ ] 4 [ _ ] I will attach my configuration and code sample thank you for this powerful library test1.zip

mpetroff commented 9 months ago

I don't know how you generated your tiles, but they don't match the output of Pannellum's generate.py script or Pannellum's expected input format.

For starters, Pannellum expects five zoom levels for your cube resolution of 4736px, with a single tile of 296px width for the first zoom level. You're providing two tiles with a total width of 640px, instead. The resolution of each zoom level changes by a factor of two, but that isn't the case for your tiles.