Hacker News new | ask | show | jobs
Gravity.js (valentinvichnal.github.io)
103 points by valentinvichnal 3628 days ago
17 comments

Awesome, a little confusing how to interact with it (it wasn't clear to me what the arrow keys were moving for a bit). Might be better with some controls/brief tutorial message.

First time I've seen Playcanvas too, looks neat!

Thank you, I will try to come up with some advanced movement in the future which is connected to the camera because this one isn't really good. Control keys: https://github.com/valentinvichnal/gravity.js#controls
That would explain why I couldn't figure out how to use it on mobile.
No New Zealand on the map - Typical north-hemisphere neo imperialism :)
Another success for Clan McGillicuddy's defence strategy.

To be clear, to all the non-fun foreigners, there is no New Zealand.

Move right along, nothing to see here....

You're not fooling anybody. I'm coming to visit your beautiful country whether you like it or not!

Suck it New Zealand people.

How do you know? I was trying to rotate the scene in a usual 'arcball' fashion but I'm not able to see southern hemisphere.
No UK, Japan or Antarctica either.
> Typical north-hemisphere neo imperialism :)

Where's my Iceland then!?

This is really cool, big fan of the lo-poly look. I just wish the camera didn't have so much (random?) movement. And maybe a way to change which way the balls fall from and also their size/weight?
It took me a while to figure out, but the camera centers around the white ball. If you use the arrows you are controlling the white ball, not the camera. Spacebar seems to make it go "up".
Ok whoa, this just got way cooler. Hold the left and right arrows alternately for a bit each side, you can build up a pretty big orbit..
Thanks, the low-poly planet models was created by others but they are really cool. The controls can be frustrating because I use velocity for the movement and it is connected to the ball not the camera.
Gravity WebGL experiment in the Solar System

Source: https://github.com/valentinvichnal/gravity.js

How does this work? Arrow keys don't do anything.

All I see is this: https://api.url2png.com/v6/P4DF2F8BC83648/af98f60a5846961e02...

and nothing to interact with.

This didn't load correctly, try it with a different browser.
Did, it didn't work. If it helps, I am behind a corporate firewall.
Here's a screenshot, in case it's helpful: http://imgur.com/JOdJDZs
Perhaps playcanvas needs different port than 80 so a firewall could block it.
doesn't work w uBlock
Your browser needs WebGL support.
I see on your github that the assets for the planets & background come from https://playcanvas.com/project/375395/overview/into-deep-spa...

Is this a common asset pack?

I believe they are the creators, I don't know how to import these assets to your project but you can fork their project and use the models.
Do you have also this glitchy background when you open the webpage on mac & chrome?
Anyone know how playcanvas handles antialiasing? Their scenes are beautiful.
PlayCanvas is built on WebGL which leverages hardware antialiasing by default.
Loving the music. I have it in a minimized tab, playing in the background.
It is Stellardrone, they have many Space Ambient kind music all for free you should check out: https://stellardrone.bandcamp.com/
Controls are bad but nevertheless I find it amazing, sweet soundtrack!
Simply beautiful. What are your plans for the library?
Thank you, nothing special just some minor changes to make this scene more realistic.
I'm kinda disappointed that Jupiter is so small.
Yes planet sizes aren't realistic but I will change it.
Didn't know play canvas was this capable
Yes its awesome, I really like their editor.
Work of art!
Gorgeous!
Thanks! :)
wish you could make the sun and planets size to actual scale :)