shuding / cobe

5kB WebGL globe lib.
https://cobe.vercel.app
MIT License
3.25k stars 176 forks source link

Offset options not working #48

Closed zernonia closed 2 years ago

zernonia commented 2 years ago

Based on doc, there's the offset options, but it doesn't seems to work.

Change offset x and y value. Globe stays the same position https://codesandbox.io/s/dark-hooks-ed5k19?file=/src/App.js

shuding commented 2 years ago

The unit is pixel so try something like [100, 100] :)

zernonia commented 2 years ago

Thanks for the swift response, unfortunatately seems like still not working. https://codesandbox.io/s/dark-hooks-ed5k19?file=/src/App.js

Also, I was confused by the playground's offsetX & offsetY, I thought the value should be relative from -1 to 1

image

ZachSaucier commented 1 year ago

It seems to work for me. However, the pixel values seem to be scaled to I had to use larger values than I was first expecting to get the desired results.