GithubHelp home page GithubHelp logo

starmapjs's Introduction

StarmapJS

This is a fairly well-featured SVG starmap for The Ur-Quan Masters and Project 6014.

As this was written a long time ago, the code is rather horrible. Have fun! ;)

The tool is available here (raw.githack.com; version that tracks the master branch of this repo) as well as here (mooses.nl; older version).

How to run locally

Simply clone this repo, then run a webserver locally from within the src folder, e.g. via:

cd src
npx http-server -c-1 -p 8081

Changelog

1.07

If no biological hazard data is available for a planet (because there are no biological signs at all), a grey '-' label is now shown, instead of nothing.

1.06

?

starmapjs's People

Contributors

jorisvddonk avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

starmapjs's Issues

Make styling the starmap easier

Currently, a lot of colors are hard-coded. It would be cool if it was a bit easier to colorize the starmap, maybe using CSS.
(Note: CSS styling may bork on browsers older than IE9, since RaphaelJS doesn't render using SVG for those browsers)

Use d3.js for SVG-data binding.

d3.js is a great library for JavaScript visualizations. It greatly simplifies the process of binding data to the DOM and doing updates/additions/removals of data nodes (e.g. stars in StarmapJS).

If we use d3.js, the code will probably get a lot cleaner. Furthermore, using d3.js probably means that I can do even fancier and more useful visualizations, and it would allow for other people to contribute to StarmapJS by either writing new visualizations or writing data-adapters that allow other starmap dataformats to be loaded..

Add a legend when colorizing using starmap data

The starmap can be colorized using various data (bio units, mineral value), but no legend is displayed which makes it hard to understand the starmap. A legend would fix this.

Optionally, make the legend 'dynamic' and editable (sliders?) so that users can specify which value ranges map to which color(s).

Performance improvement: merge the various JavaScript arrays

Currently, several JS arrays are used for the starmap data: the "Planetary Database" array and the "Star positions/colors" array. Whenever a star is drawn, the entire Planetary Database gets processed for extra information (for the modal dialogs). Performance can be increased by merging the two arrays and by implementing 'lazy loading' for the modal dialogs.

Scrolling Star Details Page

When you click on a star, then you see the planets and their specs. However, if I don't move and keep my mouse on the scroll bar (if there is one), then it disappears permanently (i.e. can't scroll at all) unless you reopen the star details. I'm not sure if it's just a problem with Google Chrome, or Mac (both of which I'm using).

Performance improvement: hide/show Spheres of Influence instead of re-rendering

Currently, the entire starmap is re-parsed and re-rendered when changing the Spheres of Influence to be displayed. This is very ineffective and slow. A better solution would be to 'render' all possible Sphere of Influence permutations and then hide/show them based on the user's settings. If the user then changes the display settings for the SoIs, the only thing that has to be done is to change the SoI visibilities, rather than reparsing and redrawing the entire starmap.

Upgrade to Bootstrap 2.3.1

Bootstrap 2.0.2 is quite old, and may contain bugs. Upgrading to Bootstrap 2.3.1 would probably be a good idea.

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.