Comments (8)
anybody?
from virtualsky.
Sorry. I've been cycling from Liverpool to Istanbul for the past two months. I'm not really sure what you mean by "clicked body"? Could you provide a little more context? Thanks.
from virtualsky.
Oh.. long long journey
By 'body' i meant celestial body (a star or a planet). I want to get the ra and dec values and may be other info regarding the body when the user clicks on it.
from virtualsky.
Not without quite a bit of work is the simple answer. The 'stars' and 'planets' you see on the screen are drawn pixels. There isn't currently a lookup mechanism to go backwards from pixel position to object.
from virtualsky.
oh i see. it's because of the canvas ? If you are planning on something like that it would be really nice/. this is a really good plugin. 🤘
from virtualsky.
I am in need for this feature ! Are you actively working on it ?
For now, I worded out finding the ra,dec coordinates from mouse/touch coordinates for all projections. I'll open a PR once it's cleaned up
from virtualsky.
There is now a click
callback which can be used e.g.
'callback': {
'click': function(e){
// The event includes e.x, e.y, e.ra, e.dec.
// Get the nearest object based on the x/y cursor position
e.nearest = e.data.sky.nearestObject(e.x,e.y);
console.log(e.nearest);
}
}
from virtualsky.
Long press is probably broken :
a43ab23#r34608949
from virtualsky.
Related Issues (20)
- Can I use "city" instead of coordinates? HOT 1
- How to show selected star ?
- Mod operation not needed, HOT 1
- React Component HOT 1
- Ability to add moving pointer
- Can you get back the current coordinates after the user pans/zooms?
- LookUp service HOT 4
- draw satellite orbit HOT 6
- runing problem HOT 5
- Thumbnails not appearing when moused over on Messier Objects HOT 2
- How do I use the library in my Vuejs app?? HOT 1
- How to know when planetarium is ready? HOT 2
- Add custom ground HOT 3
- jumping Jupiter HOT 1
- German language problem HOT 3
- Labels and lines not shown in android webview element HOT 1
- clarification on terms of use HOT 3
- Panning in `stereo` projection HOT 2
- Coordinates Discrepancy HOT 1
- Extra files (json etc) path not found HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from virtualsky.