Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add interaction events #10

Open
asherccohen opened this issue Dec 29, 2021 · 6 comments
Open

Add interaction events #10

asherccohen opened this issue Dec 29, 2021 · 6 comments
Labels
enhancement New feature or request

Comments

@asherccohen
Copy link

asherccohen commented Dec 29, 2021

Would be nice to add click/hover events so that the globe can be used interactively.

A use case:

  • hover on a location and the name shows up with info
  • click on a location and trigger an action (for example navigate to a different page)

Thanks.
Ps. Awesome lib!

@shuding shuding added the enhancement New feature or request label Dec 31, 2021
@Semmu
Copy link

Semmu commented Jan 4, 2022

i would also include the ability to rotate the globe, seems even more important if location-based interaction stuff is added.

@shuding
Copy link
Owner

shuding commented Jun 26, 2022

I added some examples regarding this:

I think these example can help a lot here. And since this lib is a little bit low-level by its design, I’d like to keep it small but customizable with more examples added to the docs.

@tivsha
Copy link

tivsha commented Jul 28, 2022

Can't figure out how to make it draggable with Vanilla js

@Nithur-M
Copy link

@shuding hey, awesome work with Cobe. Thanks for this. Also, do you have any plan to add hoverable markers? or can you point me the right direction to implement it?

@shuding
Copy link
Owner

shuding commented Dec 11, 2022

@Nithur-M It's gonna be a bit tricky as currently everything is written in shader code, it's tricky to connect the globe coordinates to screen coordinates and mouse positions... I'll think about how we can implement that.

@shuding
Copy link
Owner

shuding commented Dec 11, 2022

Some pointers for people who want to contribute:

Markers need to be implemented as objects with their own shader (use a loop to add them after creating the Phenomenon object), instead of being rendered in the main globe shader. And then, implement some global event callbacks (pointer over, click, etc.).

This will probably fix the #19 issue too!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

5 participants