jeyoder / StuffInSpace

A real-time interactive WebGL visualisation of objects in Earth orbit
http://stuffin.space
817 stars 153 forks source link

How to get this working on a website? #39

Open JonFaull opened 2 years ago

JonFaull commented 2 years ago

Hi, does anybody have any idea how to get this to work on a website? I have it working on my local machine but cant get it to work on a website. Thanks.

thkruz commented 2 years ago

Can you elaborate on the error message you are receiving on your website? Where is it hosted? What services do you have enabled?

My first thought is to verify you have php running on the website. My second thought is to check what version if you do - this is rather old code and the php might not be working still.

We simply need a lot more info than "it isn't working" to help you.

ajmas commented 1 year ago

You can see my fork for an example:

https://github.com/ajmas/ThingsInSpace

The only thing is that data set is a little outdated.

sputnikOS commented 1 year ago

@ajmas how did you get this to run on github pages? I am currently trying to set up this project on pages and cannot for the life of me get it to work properly.

I've been converting the php to JS, but I can't get rid of the following error: Uncaught DOMException: Failed to construct 'Worker': Script at 'file:///C:/DEV/ThingsInSpace/scripts/orbit-calculation-worker.js' cannot be accessed from origin 'null'.

ajmas commented 1 year ago

Take a look at what I have, unless something is broken? There is a link to the GitHub pages deploy.

I think you need to run it from a server, not just from file:///. This is because of the web workers.

BTW I am currently experimenting “modernising” the code to facilitate maintenance, using Vite. I am still working through this. It is turning out to be a little more challenging than I thought.

sputnikOS commented 1 year ago

@ajmas I had the wrong path for some of the assets. DOH! Thank you though!

sputnikOS commented 1 year ago

@ajmas could you possibly take a look at my fork. It's stuck "Downloading..." and I can't determine what's wrong. space stuff

ajmas commented 1 year ago

Your TLE.json is missing. Compare:

sputnikOS commented 1 year ago

@ajmas hey thank you so much for your help. I finally got it running thanks to you. Cheers!