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

How does one compile this app? #5

Open
benlk opened this issue Jul 13, 2017 · 9 comments
Open

How does one compile this app? #5

benlk opened this issue Jul 13, 2017 · 9 comments

Comments

@benlk
Copy link

benlk commented Jul 13, 2017

Something using babel and webpack, but I'm not sure what the actual incantation is.

@onekiloparsec
Copy link

I am making some attempts towards this direction too. Clearly, this is the most accurate and complete orrery code we can find. But I am not familiar enough with packaging in js to move a lot forward. What I'd love is to build this as a npm package, to be able to load remote scenario data. Indeed, why stopping at our own solar system while there are hundreds of exo ones known today? And counting.

@mgvez
Copy link
Owner

mgvez commented Jul 27, 2017

Added the lines I use to run the app in the readme.

I did not build the orrery with extendability in mind, so it is not possible to install it through npm. In fact, I built it merely to have a bit of fun, so unfortunately I did not think of other users when I did. I made it available on github because I thought maybe people would want to see how it works, I did not think that some would want to use it! If you fork the project though, it would be super easy to add scenarios. If I have some time I'll try to find a way to make it extendable.

@onekiloparsec
Copy link

That's usually the way good projects start. But the result of jsorrery is great, and could be very useful inside other projects. Maybe there are not so many of them, but what I'm building with https://www.arcsecond.io is precisely one of them.

I'd love to be able to dynamically load secnarii for exoplanets built upon my data source https://api.arcsecond.io

I'm about to leave for some vacations. But once back, I'll be happy to help to make it extendable. Thanks anyway for considering the suggestion!

@onekiloparsec
Copy link

Back from vacations, bit still struggling. :-)

@srussking
Copy link

srussking commented Oct 30, 2017

This is what I am using...
webpack -d --config ./webpack/dev.config.js

I couldn't get the production config working, some sort of node module conflict as I recall, so that's what I am using for now.

Unless you are just trying to get this running, in which case I have been using npm install, then npm start (which is running node server.js)

@onekiloparsec
Copy link

I keep investigating. Running local dev server is one thing, and I am able to do so as well. However, I am looking for a way to publish correctly the package to npm for it to be usable both in a browser and as a node module.

Once this is done, we'll have moved a long way. But another one starts: refactoring the thing to accept dynamically a planet scenario.

@srussking
Copy link

Ah, yes that would be super useful. Currently the project seems very tied to the UI. Sadly I don't have any experience getting an npm package up. Definitely interested in what you come up with though, Good Luck!

@onekiloparsec
Copy link

I spent quite a few hours again today. It seems that a lot of things are wired up together, and without the help of @mgvez I won't go very far, I fear. I am considering a rewrite from a boilerplate, then slowly integrating only the JS code...

@mgvez
Copy link
Owner

mgvez commented Nov 1, 2017

Terribly sorry guys, I am so busy these days that I have zero time for jsOrrery. You're right, the code was not meant to be used in another context, and is tied to the UX. For another project, I needed to get the output of jsOrrery with different scenarios. With the current version, you could:

import { loadScenario } from 'jsorrery/src/JSOrrery';

onScenarioReady = loadScenario({
	//see examples of scenarios in jsorrery
});
onScenarioReady.then(scenario => {
	//scenario is an instance of jsorrery/Universe
});

There would still be work to do in order, for example, to completely detach the scenario from any gui (all calls to GUI from Universe could be called explicitly, if needed, from an external object) and from the DOM (Scene is created and added to the body, but Scene could be modified to keep its canvas as a property, which could then be accessible through Universe by an external scope, and then added wherever you'd like in the DOM)

Sorry again not to be of more help :(

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

No branches or pull requests

4 participants