Remix.run Logo
Show HN: Flight-Viz – 10K flights on a 3D globe in 3.5MB of Rust+WASM(flight-viz.com)
70 points by coolwulf 12 hours ago | 37 comments

I built a real-time flight tracker that renders 10,000+ aircraft on an interactive 3D globe, entirely in the browser using Rust compiled to WebAssembly.

ab_testing 21 minutes ago | parent | next [-]

How are you getting that real time flight data from . Is there a free source for this ?

moci 26 minutes ago | parent | prev | next [-]

It seems there is very little flight data from China.

whywhywhywhy 6 hours ago | parent | prev | next [-]

Zooming on a mouse wheel on windows is nearly unusable, it goes from whole of europe to town level in one mouse wheel notch.

stingrae 6 hours ago | parent | next [-]

im on a mac and had the same issue.

other bugs: when i pan around (while zoomed far in), the planes arent in a fixed position on the map, they shift with the pan

ux bug: when i zoom in, it zooms into the middle of the browser window instead of where my cursor is.

coolwulf 5 hours ago | parent | next [-]

I just modified zooming algo a lit, now it should improve your user experience.

coolwulf 6 hours ago | parent | prev | next [-]

I will take a look to fix these bugs.

coolwulf 5 hours ago | parent | prev [-]

also fixed the parallelex problem of route trail vs. the plane icon

coolwulf 6 hours ago | parent | prev [-]

I am on Mac. Will try to get on a Windows box to test this

ge96 9 hours ago | parent | prev | next [-]

Why is there almost no traffic in places like South America (other than Brazil) and Africa? Data set or reality? Not much in China/Russia either.

coolwulf 9 hours ago | parent [-]

The current data is from OpenSky, mainly north america and EU.

c0nsumer 2 hours ago | parent | prev | next [-]

When zooming in and it switches to the lighter color tiles, the icons basically become invisible.

coolwulf 2 hours ago | parent [-]

the airline flight number attached to the icon is in dark color and should be visible, also could switch to satelite view when zoom in, which is dark color

aduffy 8 hours ago | parent | prev | next [-]

There's something a little off about the projection logic when you drop into the Leaflet view, you'll notice that when you pan around after zooming the planes shift their location.

Very cool demo though!

coolwulf 7 hours ago | parent | next [-]

Need to check my calculations. Thanks for noticing it.

coolwulf 4 hours ago | parent | prev [-]

This is fixed now.

coolwulf 6 hours ago | parent | prev | next [-]

For people having problems navigating, you can search flifht number on the left search bar. When click on the flight number, the view will jump over.

concensure 5 hours ago | parent | prev | next [-]

Did you pay for flight api? Getting comprehensive real time flight data is quite a monetary challenge

coolwulf 4 hours ago | parent [-]

I registered on OpenSky and using their API

christophilus 6 hours ago | parent | prev | next [-]

Makes the divide between the developed and developing world very clear.

Edit: can’t be right. I think this is a dataset problem. China and Brazil should have more dots.

coolwulf 6 hours ago | parent [-]

opensky database is limited. I need to find some data source for China and south America

maxwg 9 hours ago | parent | prev | next [-]

Impressive. The planes should probably scale up a bit as you zoom though, they become impossible to spot.

I'm surprised all the flights in the world can be represented in a <500KB api call

coolwulf 6 hours ago | parent [-]

try change to satellite view it will be more visible

ddoolin 9 hours ago | parent | prev | next [-]

When you zoom in to the street map level, the planes are practically invisible with their color and thin borders. Pretty neat though, that's a lot to load and keep smooth.

coolwulf 7 hours ago | parent [-]

If you switch to satelite view, the planes will be very visible.

paulnsorensen 8 hours ago | parent | prev | next [-]

Wow. I won't give you a feature request :) just appreciation.

It really puts into perspective the magnitude of air traffic when you have this visualization.

Glubker 7 hours ago | parent | prev | next [-]

Really cool! Curious to know how you made it render everything so fast with barely any loading.

Good work.

coolwulf 7 hours ago | parent [-]

:P just optimize to the extreme

lwansbrough 9 hours ago | parent | prev | next [-]

Could probably extrapolate positions based on heading and speed, to do some fake "real time" positions.

Levitating 7 hours ago | parent | prev | next [-]

The wasm file (flight_viz_bg.wasm) was 10.94 MB as reported by firefox.

coolwulf 6 hours ago | parent [-]

I changed a higher resolution image and that is why now it is a little bigger...

pstomi 10 hours ago | parent | prev | next [-]

It render extremely fast on my side (firefox, macOS). Which UI stack are you using? Is it egui?

coolwulf 10 hours ago | parent [-]

It's mainly eGui + WebGPU

amelius 9 hours ago | parent | prev [-]

Can you add pinch zoom?

coolwulf 9 hours ago | parent [-]

Currently I developed this for desktop browser, so it might not work well on mobile. But I will improve and update it.

pohl 8 hours ago | parent | next [-]

You should be able to do pinch zoom support for laptops with a trackpad, too. I think it would be

window.addEventListener('wheel', ... )

Fantastic work!

amelius 7 hours ago | parent | prev [-]

Ok, I'm on desktop now. And I notice another "issue". When I use my mouse wheel to zoom, the point that my mouse cursor is on is not stationary. This makes it hard to zoom in on e.g. a specific aircraft or landmark.

coolwulf 7 hours ago | parent [-]

I can take a look. The current zoom is zooming to screen center. Maybe I should change it to cursor location.