Giter Site home page Giter Site logo

How does one compile this app? about jsorrery HOT 9 OPEN

benlk avatar benlk commented on July 17, 2024
How does one compile this app?

from jsorrery.

Comments (9)

onekiloparsec avatar onekiloparsec commented on July 17, 2024

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.

from jsorrery.

mgvez avatar mgvez commented on July 17, 2024

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.

from jsorrery.

onekiloparsec avatar onekiloparsec commented on July 17, 2024

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!

from jsorrery.

onekiloparsec avatar onekiloparsec commented on July 17, 2024

Back from vacations, bit still struggling. :-)

from jsorrery.

srussking avatar srussking commented on July 17, 2024

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)

from jsorrery.

onekiloparsec avatar onekiloparsec commented on July 17, 2024

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.

from jsorrery.

srussking avatar srussking commented on July 17, 2024

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!

from jsorrery.

onekiloparsec avatar onekiloparsec commented on July 17, 2024

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...

from jsorrery.

mgvez avatar mgvez commented on July 17, 2024

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 :(

from jsorrery.

Related Issues (13)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.