Compare commits

...

No commits in common. "master" and "gh-pages" have entirely different histories.

29 changed files with 548 additions and 48150 deletions

0
.gitmodules vendored Normal file
View File

View File

@ -1,21 +0,0 @@
# Change Log
**V0.6.1** *(1-16-2018)*
* Moved CHANGELOG over to read CHANGELOG.md from project and parse the markdown in Javascript. Is it overkill? Sure. Do I care? No
* Some design tweaks to improve space usage throughout sidebar, and other things
* Adjustable size on client window
* Add Swap button (Crisha)
**V0.6** *(1-9-2018)*
* Simple websocket client. (Thanks to grapenut@M\*U\*S\*H )
* Best on tablet or desktop I would guess. Mobile might be iffy
**V0.5** *(6/14/2017)*
* Addition of changelog
* Improve responsiveness of design. Could be better.
**V0.2-0.4**
* Additional features that I cannot recall
**V0.1**
* Initial Release

21
LICENSE
View File

@ -1,21 +0,0 @@
The MIT License (MIT)
Copyright (c) 2016 roblevesque
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

View File

@ -1,22 +0,0 @@
# Mapview WebGL
* [Link to WebGL Mapview](http://zen.trekmush.org/ats/webglmapview/webviewgl.htm)
* [Link to issue tracker](https://goo.gl/7uDYCW)
## Introduction
This is an attempt to throw together a webGL version of the Windows based Mapview program so that folks that have a Mac or other Non-Windows machine can still have a map of the game.
This is project is by no means official or complete. It is simply ment as a POC at this point. If there is enough interest in this game-side I may continue to develop it to be a fairly complete alternative to the MapView software.
## Contributing & Comments
Feel free. I am not a JS developer by any stretch so any desire to contribute or any desire to blast me and call me an idiot for doing X, Y or Z, go for it. Contributions can be made at any time. Some projects I'd like to work on are:
* [Interface/UX Improvements](../../issues/1)
* Additional navigation features
* Improvement of route selection, and ability to choose the other routes
* Live game data / Sensor Data (Based on in game token, or something of that sort)
* ~~Embeded client (Maybe??)~~ *Yea so this got taken care of right quick*

Binary file not shown.

Before

Width:  |  Height:  |  Size: 682 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 129 B

156
index.htm
View File

@ -1,156 +0,0 @@
<!doctype html>
<html>
<head>
<title> Map View Web Edition </title>
<script src="js/three.js"></script>
<script src="js/decimal.min.js"></script>
<script src="js/OrbitControls.js"></script>
<script src="js/three-text2d.js"></script>
<script src="js/Detector.js"></script>
<script src="js/mapviewgl.js"></script>
<link href="https://fonts.googleapis.com/css?family=Open+Sans|Raleway:400,700,700i" rel="stylesheet">
<!-- <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous"> -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<link href="styles/styles.css" rel="stylesheet">
<link href="styles/ansi.css" rel="stylesheet">
<script src="https://code.jquery.com/jquery-3.2.1.min.js" integrity="sha256-hwg4gsxgFZhOsEEamdOYGBf13FyQuiTwlAQgxVSNgt4=" crossorigin="anonymous"></script>
<script src="https://code.jquery.com/ui/1.12.1/jquery-ui.min.js" integrity="sha256-VazP97ZCwtekAsvgPBSUwPFKdrwD3unUfSGVYrahUqU=" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/showdown/1.8.6/showdown.min.js" crossorigin="anonymous"></script>
<script src="js/GUI.Utils.js"></script>
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-80748037-1', 'auto');
ga('send', 'pageview');
</script>
</head>
<body>
<div id="container"></div>
<div class="menu-button" id="hotdog"> &#9776; </div>
<div id="controls" class="wvg-controls active">
<div id="wrapper">
<ul class="wvg-navbar">
<li class="wvg-tablink wvg-tab-active" onclick="openTab(event,'Find');">Find</li>
<li class="wvg-tablink" onclick="openTab(event,'Plan');">Plan</li>
<li class="wvg-tablink" onclick="openTab(event,'Intel');">Intel</li>
<li class="wvg-tablink" onclick="openTab(event,'Info');">Info</li>
</ul>
<div class="wvg-tools wvg-first" id="Find">
<span class="tool-header"> Find Object By Name </span>
<span>
<select id="findbyselect">
<option value=''></option>
</select> <br />
<input type="checkbox" name="objtype" id="cbp" value="planets" checked><label for="cbp"> Planets</label> <input type="checkbox" name="objtype" id="cbs" value="stations" > <label for="cbs">Stations</label>
<button id="submitfindbyname" class="btn">Find</button>
</span>
<span class="toolsep"></span>
<span>
<label>Target Data</label>
<p id="findbydata"> </p>
</span>
</div>
<div class="wvg-tools" id="Plan">
<span class="tool-header"> Route Planner </span>
<span>
<label for="pointa">Point A</label>
<select id="pointa" name="Point_A">
<!-- Options will generated in code -->
</select>
<br />
<label for="pointb"> Point B </label>
<select id="pointb" name="Point_B">
<!-- Options will generated in code -->
</select>
<button id="swapab" class="btn">Swap</button>
<br /> <br />
<label for="speed">Travel Speed</label> <br />
<input type="text" id="speed" value="14"> <br />
<select id="speedunit" name="Speed Unit">
<option value='WF'>Warp Factor</option>
<option value='PC/s'>PC/s</option>
<option value='SU/s'>SU/s</option>
</select>
<br />
<button id="calctnd" class="btn">Calculate</button>
</span>
<br />
<br />
<select multiple="multiple" id="route_output" class="select-route-map">
<option> No route calculated </option>
</select>
<span class="calc_data"><br />
From: <b id="cal_start">Empty</b> <br />
To: <b id="cal_end">Empty</b><br />
Distance: <b id="cal_dist">Unknown</b><br />
ETA @ <b id="cal_speed">Unknown</b> : <b id="cal_eta">Unknown</b>
</span>
</div>
<div class="wvg-tools" id="Intel">
<span class="tool-header"> Route Prediction </span>
<span>
<input type="text" class="rpcoord" id="x" value="x" style="width:3vw;">
<input type="text" class="rpcoord" id="y" value="y" style="width:3vw;">
<input type="text" class="rpcoord" id="z" value="z" style="width:3vw;"><br /><br />
<input type="text" class="rpcoord" id="azmuth" value="azmuth" style="width:3.1vw;"><label for='inclination'> mark </label>
<input type="text" class="rpcoord" id="inclination" value="inclination" style="width:3.5vw;"> <br /><br />
<label for="intel_frame">Coordinate Frame</label>
<select id="intel_frame">
<option val="Galactic"> Galactic </option>
</select>
</span>
<span>
Perdicted Destination: <b id="intel_predicted"></b>
<button id="calcpredict" class="btn">Predict</button>
</span>
</div>
<div class="wvg-tools" id="Info">
<span id="changelog_container">
<!-- Silly stuff gets put here on JS execution -->
</span>
<div id="info_footer">
<span class="toolsep"></span>
<span> This tool was designed by Frey @ ATSMUSH. It is based on MapView for ATS with data used from the Navcomp MUSHClient plugin with permission. </span>
<span><a href="https://goo.gl/7uDYCW">Issue Tracker</a> <i class="fa fa-ellipsis-h" aria-hidden="true"></i> <a href="https://github.com/roblevesque/webglmapview">Project Page</a></span>
</div>
</div>
</div>
<div class="reset-container"><span class="reset-button"> Reset </span></div>
</div>
<div id="client">
<div id="client-bar">
<span class="client-bar-control-container handle">
<a href="#" id="client-bar-control"><i id="client-ico-up" class="fa fa-chevron-up" aria-hidden="true"></i><i id="client-ico-down" class="fa fa-chevron-down hidden" aria-hidden="true"></i><b id="client-tab-desc">Client</b></a>
</span>
</div>
<div id="client-term-container" class="hidden vertical-resize">
<div id="client-term-resize" class="handle ui-resizable-handle ui-resizable-n" >
<i class="fa fa-angle-double-up" aria-hidden="true"></i>
</div>
<form id="client-term" onsubmit="return false;">
<div id="client-term-output" class="ansi-37 ansi-40"></div>
<div id="client-term-prompt" class="ansi-37 ansi-40"></div>
<textarea id="client-term-entry" autocomplete="off" autofocus></textarea>
<button id="client-login">(Re)Connect</button>
</form>
</div>
</div>
<script src="js/wsclient.js"></script>
<script src="js/local.js"></script>
</body>
</html>

65
index.html Normal file
View File

@ -0,0 +1,65 @@
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="chrome=1">
<title>Webglmapview by roblevesque</title>
<link rel="stylesheet" href="stylesheets/styles.css">
<link rel="stylesheet" href="stylesheets/github-light.css">
<meta name="viewport" content="width=device-width">
<!--[if lt IE 9]>
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-80748037-1', 'auto');
ga('send', 'pageview');
</script>
</head>
<body>
<div class="wrapper">
<header>
<h1>Webglmapview</h1>
<p>A webGL MapVew alternative for ATSTrekMUSH (A Star Trek themed, text based game)</p>
<p class="view"><a href="https://github.com/roblevesque/webglmapview">View the Project on GitHub <small>roblevesque/webglmapview</small></a></p>
<ul>
<li><a href="https://github.com/roblevesque/webglmapview/zipball/master">Download <strong>ZIP File</strong></a></li>
<li><a href="https://github.com/roblevesque/webglmapview/tarball/master">Download <strong>TAR Ball</strong></a></li>
<li><a href="https://github.com/roblevesque/webglmapview">View On <strong>GitHub</strong></a></li>
</ul>
</header>
<section>
<h1>
<a id="mapview-webgl" class="anchor" href="#mapview-webgl" aria-hidden="true"><span aria-hidden="true" class="octicon octicon-link"></span></a>Mapview WebGL</h1>
<h2>
<a id="introduction" class="anchor" href="#introduction" aria-hidden="true"><span aria-hidden="true" class="octicon octicon-link"></span></a>Introduction</h2>
<p>This is an attempt to throw together a webGL version of the Mapview program (located <a href="http://atsnavmap.startreklover.com/">here</a>) so that folks that have a Mac or other Non-Windows machine can still have a map of the game. </p>
<p>This is project is by no means official or complete. It is simply ment as a POC at this point. If there is enough interest in this game-side I may continue to develop it to be a fairly complete alternative to the MapView software. </p>
<p>You can access what is currently done by going <a href="https://roblevesque.github.io/webglmapview/mapview/webviewgl.htm">here</a></p>
<h2>
<a id="contributing--comments" class="anchor" href="#contributing--comments" aria-hidden="true"><span aria-hidden="true" class="octicon octicon-link"></span></a>Contributing &amp; Comments</h2>
<p>Feel free. I am not a JS developer by any stretch (no really, just look at the code. Frightning) so any desire to contribute or any desire to blast me and call me an idiot for doing X, Y or Z, go for it. I'm only trying to learn. </p>
</section>
<footer>
<p>This project is maintained by <a href="https://github.com/roblevesque">roblevesque</a></p>
<p><small>Hosted on GitHub Pages &mdash; Theme by <a href="https://github.com/orderedlist">orderedlist</a></small></p>
</footer>
</div>
<script src="javascripts/scale.fix.js"></script>
</body>
</html>

17
javascripts/scale.fix.js Normal file
View File

@ -0,0 +1,17 @@
var metas = document.getElementsByTagName('meta');
var i;
if (navigator.userAgent.match(/iPhone/i)) {
for (i=0; i<metas.length; i++) {
if (metas[i].name == "viewport") {
metas[i].content = "width=device-width, minimum-scale=1.0, maximum-scale=1.0";
}
}
document.addEventListener("gesturestart", gestureStart, false);
}
function gestureStart() {
for (i=0; i<metas.length; i++) {
if (metas[i].name == "viewport") {
metas[i].content = "width=device-width, minimum-scale=0.25, maximum-scale=1.6";
}
}
}

View File

@ -1,66 +0,0 @@
/**
* @author alteredq / http://alteredqualia.com/
* @author mr.doob / http://mrdoob.com/
*/
var Detector = {
canvas: !! window.CanvasRenderingContext2D,
webgl: ( function () { try { var canvas = document.createElement( 'canvas' ); return !! ( window.WebGLRenderingContext && ( canvas.getContext( 'webgl' ) || canvas.getContext( 'experimental-webgl' ) ) ); } catch ( e ) { return false; } } )(),
workers: !! window.Worker,
fileapi: window.File && window.FileReader && window.FileList && window.Blob,
getWebGLErrorMessage: function () {
var element = document.createElement( 'div' );
element.id = 'webgl-error-message';
element.style.fontFamily = 'monospace';
element.style.fontSize = '13px';
element.style.fontWeight = 'normal';
element.style.textAlign = 'center';
element.style.background = '#fff';
element.style.color = '#000';
element.style.padding = '1.5em';
element.style.width = '400px';
element.style.margin = '5em auto 0';
if ( ! this.webgl ) {
element.innerHTML = window.WebGLRenderingContext ? [
'Your graphics card does not seem to support <a href="http://khronos.org/webgl/wiki/Getting_a_WebGL_Implementation" style="color:#000">WebGL</a>.<br />',
'Find out how to get it <a href="http://get.webgl.org/" style="color:#000">here</a>.'
].join( '\n' ) : [
'Your browser does not seem to support <a href="http://khronos.org/webgl/wiki/Getting_a_WebGL_Implementation" style="color:#000">WebGL</a>.<br/>',
'Find out how to get it <a href="http://get.webgl.org/" style="color:#000">here</a>.'
].join( '\n' );
}
return element;
},
addGetWebGLMessage: function ( parameters ) {
var parent, id, element;
parameters = parameters || {};
parent = parameters.parent !== undefined ? parameters.parent : document.body;
id = parameters.id !== undefined ? parameters.id : 'oldie';
element = Detector.getWebGLErrorMessage();
element.id = id;
parent.appendChild( element );
}
};
// browserify support
if ( typeof module === 'object' ) {
module.exports = Detector;
}

View File

@ -1,257 +0,0 @@
var lastInputBox;
$.widget("ui.resizable", $.ui.resizable, {
resizeBy: function(newSize) {
this._mouseStart($.Event("mousedown", { pageX: 0, pageY: 0 }));
this.axis = 'se';
var end = $.Event("mouseup", {
pageX: newSize.width,
pageY: newSize.height
});
this._mouseDrag(end);
this._mouseStop(end);
}
});
$(document).ready(function() {
// Controls menu hide/show
$('#hotdog').click(function(){
$('#controls').toggleClass("active");
});
// Reset view
$('.reset-container').click(function(){ reset_view();});
$('#submitfindbyname').click(function() {
var selected = $('#findbyselect option:selected').text();
var object = findObjectInfo(selected);
zoomfocus(selected);
// Populate information area about target
console.log(object)
var objdata = "<b>Name: </b>" + object.name + "<br />";
objdata += "<br /><b>Location (Galactic Ref.)</b><br /><b>X</b>: " + object.x + "<br/><b>Y</b>: " + object.y + "<br /><b>Z</b>: " + object.z;
objdata += "<br /><br /><b>Classification</b><br />" + object.type;
objdata += "<br /><br /><b>Owning Faction</b><br />" + object.parent.name;
$('#findbydata').html(objdata)
});
$('#route_output').change(function() {
var stop=$('#route_output :selected').parent().attr('label');
zoomfocus(stop);
});
$('#swapab').click(function() {
var swap=$('#pointa').val();
$("#pointa").val($("#pointb").val());
$("#pointb").val(swap);
});
$('#calctnd').click(function() {
removeEntity('arrow');
lastInputBox = null;
$('#route_output').html("No route calculated");
var speed = {'speed': $('#speed').val(), 'unit':$('#speedunit option:selected').val() };
populateRoutePlan( $('#pointa option:selected').text() , $('#pointb option:selected').text(),speed );
});
$('#cbs').click(function() {populateFBSelect(); });
$('#cbp').click(function() {populateFBSelect(); });
$("#pointa").focus(function() {
lastInputBox = "pointa";
// console.log('Updating last touched box to : ' + lastInputBox)
});
$("#pointb").focus(function() {
lastInputBox = "pointb";
// console.log('Updating last touched box to : ' + lastInputBox)
});
String.prototype.capitalize = function(lower) {
return (lower ? this.toLowerCase() : this).replace(/(?:^|\s)\S/g, function(a) { return a.toUpperCase(); });
};
$('.rpcoord').blur(function() {
if(!$(this).val()) { $(this).val( $(this).attr("id") ) }
});
$('.rpcoord').focus(function() {
if($(this).val() == $(this).attr("id")) { $(this).val("") }
});
$('#calcpredict').click(function() {
$('#intel_predicted').html("");
var predicted = predictDestination(new THREE.Vector3(Number($('#x').val()),Number($('#y').val()),Number($('#z').val())),new THREE.Vector2(Number($('#azmuth').val()),Number($('#inclination').val())),$('#intel_frame option:selected').val());
$('#intel_predicted').html(predicted);
});
$('#client-bar-control').click(function() {
$('#client-term-container').toggleClass("hidden");
$('#client-ico-down').toggleClass("hidden");
$('#client-ico-up').toggleClass("hidden");
});
$('#client-login').click(function() { reconnect();})
$(".vertical-resize").resizable({
handles: {
'n': '.handle'
},
alsoResize: "#client-term-output",
minWidth: "100%",
maxWidth: "100%",
maxHeight: ($(window).height() * 0.95),
stop: function(event, ui) {
$(this).css("width", '');
$('#client-term-output').css("width",'');
}
});
$(".client-term-container").resize(function() { width = $(this).width(); $("#client").css({'width' : '100%'}); $("#client-term-output").css({'margin-right' : '0px !important', 'padding-right' : '0 !important'}) })
$.ajax({
url: 'CHANGELOG.md',
type: 'get',
async: 'true',
success: function(text) {
var converter = new showdown.Converter(),
html = converter.makeHtml(text);
$("#changelog_container").html(html);
}
});
$(window).resize(function() {
$('.vertical-resize').resizable( "option", "maxHeight", ($('.vertical-resize').parent().parent().height() * 0.95) );
if($('.vertical-resize').height() > ($('.vertical-resize').parent().parent().height() * 0.95) ) {
$('.vertical-resize').resizable("resizeBy", {height: '95%', width:'100%'});
}
});
// Websocket client startup
startup();
});
function populateUserFields() {
// Populate findby box
populateFBSelect();
// Populate pointa and pointb dropdowns
var types = ['planets','stations'];
option = "";
for (var type in types){
var keys = Object.keys(listobjects(types[type]));
var captype = types[type];
captype = captype.capitalize()
option += '<optgroup label="'+ captype + '">';
keys.sort().forEach(function(element, index, array){
option += '<option value="'+ escapeHTML(element) + '">' + escapeHTML(element) + '</option>';
});
option += '</optgroup>';
}
$('#pointa').html(option);
$('#pointb').html(option);
// Populate list of borders for intel frame selection
option = $('#intel_frame').html();
var borderlist = listobjects("borders");
for (var border in borderlist) {
if(borderlist[border].radius > 10) {
option += '<option value="'+ escapeHTML(border) + '">' + escapeHTML(border) + '</option>';
}
}
$('#intel_frame').html(option);
}
function populateFBSelect() {
//Populate find by select dropdown
var types = [];
var checkboxes = document.getElementsByName("objtype");
for (var type in checkboxes) {
if(checkboxes[type].checked) {
types[type] = checkboxes[type].value;
}
}
var option = '';
for (var type in types) {
var captype = types[type];
captype = captype.capitalize()
option += '<optgroup label="'+ captype + '">';
var keys = Object.keys(listobjects(types[type]));
keys.sort().forEach(function(element, index, array){
option += '<option value="'+ escapeHTML(element) + '">' + escapeHTML(element) + '</option>';
});
option += '</optgroup>';
}
$('#findbyselect').html(option);
}
function openTab(evt,tabName) {
var i, x, tablinks;
x = document.getElementsByClassName("wvg-tools");
for (i = 0; i < x.length; i++) {
x[i].style.display = "none";
}
tablinks = document.getElementsByClassName("wvg-tablink");
for (i = 0; i < x.length; i++) {
tablinks[i].className = tablinks[i].className.replace(" wvg-tab-active", "");
}
document.getElementById(tabName).style.display = "block";
evt.currentTarget.className += " wvg-tab-active";
}
function escapeHTML(text) {
var chr = { '"': '"', '&': '&', '<': '[', '>': ']' };
function abc(a)
{
return chr[a];
}
return text.replace(/[\"&<>]/g, abc);
}
function timeformat(secs) {
var s = new Decimal(secs);
var hours = new Decimal(secs / 3600);
var h = hours.floor(); //Get whole hours
s = s - (h * 3600);
var m = new Decimal(s / 60); //Get remaining minutes
m = m.floor();
s = s - (m * 60 );
s = Math.round(s,0)
// console.log("Hours :"+ h);
// console.log("Minutes :"+ m);
// console.log("Seconds :"+ s);
// console.log("Input :"+ secs);
return h+":"+(m < 10 ? '0'+m : m)+":"+(s < 10 ? '0'+s : s); //zero padding on minutes and seconds
}
function populateRoutePlan(pointa,pointb,speed) {
if ( pointa != pointb ) {
// Populate legacy (trip total) fields with route info
$('#cal_start').html( pointa );
$('#cal_end').html( pointb );
$('#cal_speed').html( speed.speed + " " + speed.unit );
var route = calcBestRoute(pointa,pointb);
var dist = route.distance;
var eta = calcETA(speed,dist);
$('#cal_eta').html( timeformat(eta) );
$('#cal_dist').html( dist.toFixed(2) + " PC");
// Populate the route plan select area
lastWaypoint = {'name': pointa, gate:false};
var routeplan;
route.stops.forEach(function(waypoint,index,self) {
routeplan += '<optgroup label="' + waypoint.name + '">';
if(typeof self[index+1] != 'undefined' ) {
if(waypoint.gate && self[index+1].gate) {routeplan += '<option>^---- Gate From</option>'; }
}
if(waypoint.gate && lastWaypoint.gate) {routeplan += '<option>^---- Gate Exit</option>'; }
if(!waypoint.gate || (!lastWaypoint.gate && waypoint.gate)) {
routeplan += '<option>Distance:' + waypoint.distance.toFixed(2) + '</option>'
routeplan += '<option>ETA: ' + timeformat(calcETA(speed,waypoint.distance)) + '</option>';
drawline(grabPositionByName(lastWaypoint.name.split('@')[lastWaypoint.name.split('@').length-1] ),grabPositionByName(waypoint.name.split('@')[waypoint.name.split('@').length-1] ));
}
lastWaypoint = waypoint;
});
$('#route_output').html(routeplan);
//drawline(grabPositionByName($('#pointa option:selected').text()),grabPositionByName($('#pointb option:selected').text()));
}
}

File diff suppressed because it is too large Load Diff

View File

@ -1,458 +0,0 @@
{
"ATS_Navcomp_DB": {
"version": 2.11,
"gates": [
{ "name":"Sherman's Planet / USB Galadriel"},
{ "name":"Dark Phoenix City / USB Milliways"},
{ "name":"New Risa / USB Lothlorien"},
{ "name":"Lily Yo II / USB Celestine Gate"},
{ "name":"Kildare V / Kildare IX / Kildare XI / USB Stormwatch"}
],
"wormholes": [
{"name": "Magna Roma <-> Usho Prime", "enda": {"location": "Magna Roma", "displayname": "Transwarp Gate MR-01", "oppsiteexit": "Transwarp Exit U-02" }, "endb": {"location": "Usho Prime", "displayname": "Transwarp Gate U-02", "oppsiteexit": "Transwarp Exit M-01"}},
{"name": "Bajor <-> Idran X", "enda": {"location": "Bajor/Jeraddo", "displayname": "Wormhole BQ Entrance", "oppsiteexit": "Wormhole GQ Exit" }, "endb": {"location": "Idran X", "displayname": "Wormhole GQ Entrance", "oppsiteexit": "Wormhole BQ Exit"}}
],
"empires": [
{
"name": "Cardassian",
"desc":"Describe the empire here",
"color": "#CC9933",
"borders":[
{ "name":"Cardassian", "x": -9337.944000, "y": 310.000000, "z": 20.000000, "radius":100 },
{ "name":"CU-Iure", "x": -9149.300000, "y": 346.133000, "z": -18.218000, "radius":5 },
{ "name":"CU-Kakra", "x": -9303.800000, "y": 327.400000, "z": 119.100000, "radius":5 }
],
"planets":[
{ "name":"Cardassia Prime / Cardassia IV", "x": -9292.700000, "y": 278.900000, "z": 23.200000, "cochranes":971, "market":1 },
{ "name":"Celtris III", "x": -9321.600000, "y": 363.800000, "z": 30.300000, "cochranes":1092, "market":2 },
{ "name":"Elosian City", "x": -9324.413300, "y": 226.485000, "z": -29.919000, "cochranes":1080, "market":2 },
{ "name":"Iure Prime", "x": -9149.300000, "y": 346.133000, "z": -18.218000, "cochranes":1352, "market":2 },
{ "name":"Kakrafoon", "x": -9303.800000, "y": 327.400000, "z": 119.100000, "cochranes":984, "market":2 },
{ "name":"Kora II", "x": -9415.200000, "y": 336.800000, "z": 2.200000, "cochranes":1546, "market":2 },
{ "name":"Omekla III", "x": -9332.823000, "y": 322.081000, "z": 47.755000, "cochranes":1177, "market":2 },
{ "name":"Orias III", "x": -9374.800000, "y": 280.800000, "z": 3.100000, "cochranes":1298, "market":2 },
{ "name":"Prim II", "x": -9374.544000, "y": 391.000000, "z": 25.200000, "cochranes":1298, "market":0 },
{ "name":"Siltalk", "x": -9244.244000, "y": 329.900000, "z": 4.800000, "cochranes":1291, "market":2 },
{ "name":"Tohvun", "x": -9329.900000, "y": 378.000000, "z": 30.000000, "cochranes":1169, "market":2 },
{ "name":"Velos VII", "x": -9331.300000, "y": 279.900000, "z": 55.000000, "cochranes":1150, "market":2 },
{ "name":"Volan", "x": -9340.700000, "y": 366.200000, "z": 10.100000, "cochranes":1271, "market":2 }
],
"stations":[
{ "name":"Alar Ser", "x": -9333.000000, "y": 322.000000, "z": 48.000000, "cochranes":1298, "market":-1 },
{ "name":"Demaz Ser", "x": -9258.000000, "y": 261.000000, "z": 1.000000, "cochranes":1298, "market":-1 },
{ "name":"Dolak Nor", "x": 6237.000000, "y": 6271.000000, "z": -17.000000, "cochranes":1298, "market":-1 },
{ "name":"Empok Nor", "x": -9415.000000, "y": 337.000000, "z": 2.000000, "cochranes":1298, "market":-1 },
{ "name":"Keitan Nor", "x": -9375.000000, "y": 391.000000, "z": 25.000000, "cochranes":1298, "market":-1 },
{ "name":"Litvok Ser", "x": -9375.000000, "y": 281.000000, "z": 3.000000, "cochranes":1298, "market":-1 },
{ "name":"Makbar Ser", "x": -9304.000000, "y": 327.000000, "z": 119.000000, "cochranes":1298, "market":-1 },
{ "name":"Rusot Facility", "x": -9322.000000, "y": 364.000000, "z": 30.000000, "cochranes":1298, "market":-1 },
{ "name":"Tehrak Nor", "x": -9149.000000, "y": 346.000000, "z": -18.000000, "cochranes":1298, "market":-1 },
{ "name":"Temar Nor", "x": -9244.000000, "y": 330.000000, "z": 5.000000, "cochranes":1298, "market":-1 },
{ "name":"Toran Ser", "x": -9341.000000, "y": 366.000000, "z": 10.000000, "cochranes":1298, "market":-1 },
{ "name":"Varohdan Nor", "x": -9292.744000, "y": 278.900000, "z": 23.200000, "cochranes":1298, "market":-1 },
{ "name":"Wraikor Ser", "x": -9330.000000, "y": 378.000000, "z": 30.000000, "cochranes":1298, "market":-1 },
{ "name":"Xran Ser", "x": -9331.000000, "y": 280.000000, "z": 55.000000, "cochranes":1298, "market":-1 },
{ "name":"Zorin Nor", "x": 7396.117000, "y": -5624.900000, "z": 78.700000, "cochranes":979, "market":-1 }
]},
{
"name": "Federation",
"desc":"Founded in 2161 on Earth, the United Federation of planets spans thousands of\nlightyears and 150+ member planets.\nTraditionally lead by a President, the Federation has been without one since\n SD 86621.568754 (2409) when President Armitage was assassinated.\n\nSince then, it has been loosely run by the ellusive Daystrom Institute (rumor)",
"government":"Federation", "leader":"Unknown (assassinated?)",
"homeworld":"Earth", "hwx":9174.044174, "hwy": 61.800000, "hwz": 0.000000,
"color": "#0000FF",
"borders":[
{ "name":"Federation", "x": -9197.944000, "y": 0.000000, "z": 0.000000, "radius":240 },
{ "name":"Talos Exclusion Zone", "x": -9317.344174, "y": -43.700000, "z": -24.000000, "radius":10 }
],
"planets":[
{ "name":"Alpha Centauri", "x": -9173.253664, "y": 62.558679, "z": -1.032124, "cochranes":1509, "market":2 },
{ "name":"Andor", "x": -9172.144174, "y": 60.100000, "z": -2.400000, "cochranes":1501, "market":2 },
{ "name":"Antos IV", "x": -9179.844174, "y": -20.400000, "z": -6.100000, "cochranes":1298, "market":2 },
{ "name":"Argelius II", "x": -9352.644174, "y": -59.200000, "z": -121.200000, "cochranes":1321, "market":2 },
{ "name":"Betazed", "x": -9386.244174, "y": -93.300000, "z": -88.100000, "cochranes":1588, "market":2 },
{ "name":"Bynaus", "x": -9318.244174, "y": 98.900000, "z": 146.300000, "cochranes":1024, "market":2 },
{ "name":"Cait <Ferasa>", "x": -9156.044174, "y": -228.300000, "z": -12.600000, "cochranes":1381, "market":-1 },
{ "name":"Daran V", "x": -9325.499174, "y": -139.232000, "z": -19.774000, "cochranes":1075, "market":2 },
{ "name":"Darius III", "x": -9179.444174, "y": 200.000000, "z": -22.100000, "cochranes":1563, "market":2 },
{ "name":"Delta <Seyalia>", "x": -9010.644174, "y": 89.900000, "z": -17.300000, "cochranes":1596, "market":2 },
{ "name":"Draken IV", "x": -9133.537416, "y": -117.755082, "z": 32.526741, "cochranes":1139, "market":2 },
{ "name":"Earth <Terra>/Luna Terra", "x": -9174.044174, "y": 61.800000, "z": 0.000000, "cochranes":1515, "market":0 },
{ "name":"Eeiauo", "x": -9159.944174, "y": -126.000000, "z": 96.000000, "cochranes":1400, "market":2 },
{ "name":"Ekos", "x": -9125.144174, "y": -29.100000, "z": -68.700000, "cochranes":1065, "market":-1 },
{ "name":"Eminiar VII", "x": -9234.944174, "y": 222.300000, "z": 25.100000, "cochranes":1415, "market":2 },
{ "name":"Freehaven", "x": -9337.244174, "y": 207.000000, "z": -36.800000, "cochranes":1298, "market":-1 },
{ "name":"Lissajous IV", "x": 6254.176800, "y": 6234.263658, "z": 26.301745, "cochranes":1298, "market":-1 },
{ "name":"Magna Roma", "x": -9330.044174, "y": -101.100000, "z": -56.700000, "cochranes":1107, "market":2 },
{ "name":"Mars", "x": -9174.044166, "y": 61.799995, "z": 0.000001, "cochranes":1515, "market":-1 },
{ "name":"Melkot II", "x": -9274.862114, "y": -145.996700, "z": -12.771700, "cochranes":1298, "market":2 },
{ "name":"New Fabrina/Yonada", "x": -9249.044174, "y": -93.600000, "z": -91.400000, "cochranes":1297, "market":2 },
{ "name":"Organia", "x": -9310.544174, "y": 186.300000, "z": -12.100000, "cochranes":993, "market":2 },
{ "name":"Sivao", "x": -9097.226132, "y": -0.102246, "z": 146.784743, "cochranes":970, "market":2 },
{ "name":"Talos IV", "x": -9317.344174, "y": -43.700000, "z": -24.000000, "cochranes":1298, "market":-1 },
{ "name":"Taurus II", "x": -9264.444174, "y": 47.400000, "z": 8.100000, "cochranes":1149, "market":2 },
{ "name":"Tellar", "x": -9172.944174, "y": 60.100000, "z": 2.600000, "cochranes":1507, "market":2 },
{ "name":"Trill", "x": -9247.944174, "y": 75.000000, "z": 66.000000, "cochranes":1310, "market":2 },
{ "name":"Vulcan", "x": -9178.444174, "y": 60.000000, "z": -0.600000, "cochranes":1545, "market":2 }
],
"stations":[
{ "name":"Deep Space Nine <DS9>", "x": -9325.944000, "y": 221.700000, "z": -45.100000, "cochranes":1091, "market":-1 },
{ "name":"Epsilon 202", "x": -9179.000000, "y": -20.000000, "z": -6.000000, "cochranes":1298, "market":-1 },
{ "name":"Epsilon 209", "x": -9097.226000, "y": -0.102000, "z": 146.785000, "cochranes":1298, "market":-1 },
{ "name":"Epsilon 212", "x": -9156.044000, "y": -228.300000, "z": -12.600000, "cochranes":1298, "market":-1 },
{ "name":"Epsilon 216", "x": -9159.944000, "y": -126.000000, "z": 96.000000, "cochranes":1298, "market":-1 },
{ "name":"Epsilon 217", "x": -9125.144300, "y": -29.100000, "z": -68.700000, "cochranes":1298, "market":-1 },
{ "name":"Epsilon 301", "x": -9352.644174, "y": -59.200000, "z": -121.200000, "cochranes":1298, "market":-1 },
{ "name":"Epsilon 303", "x": -9249.044000, "y": -93.600000, "z": -91.400000, "cochranes":1298, "market":-1 },
{ "name":"Epsilon 308", "x": -9274.862300, "y": -145.997000, "z": -12.772000, "cochranes":1298, "market":-1 },
{ "name":"Epsilon 402", "x": -9234.944000, "y": 222.300000, "z": 25.100000, "cochranes":1298, "market":-1 },
{ "name":"Epsilon 413", "x": -9264.444000, "y": 47.400000, "z": 8.100000, "cochranes":1298, "market":-1 },
{ "name":"Epsilon 416", "x": -9318.244300, "y": 98.900000, "z": 146.300000, "cochranes":1298, "market":-1 },
{ "name":"Epsilon 618", "x": -9128.197000, "y": 184.604000, "z": -108.63000, "cochranes":1103.287, "market":-1 },
{ "name":"Epsilon 647", "x": -9394.946300, "y": 31.231000, "z": -122.427000, "cochranes":1298, "market":-1 },
{ "name":"Para Bellum", "x": -9330.518000, "y": 48.300000, "z": 12.124000, "cochranes":1108, "market":2 },
{ "name":"Starbase 001 <Spacedock>", "x": -9174.044174, "y": 61.800000, "z": 0.000000, "cochranes":1515, "market":-1 },
{ "name":"Starbase 002 <Andromeda>", "x": -9247.944300, "y": 75.000000, "z": 66.000000, "cochranes":1298, "market":-1 },
{ "name":"Starbase 257 <Alamo>", "x": -9010.644300, "y": 89.900000, "z": -17.300000, "cochranes":1298, "market":-1 },
{ "name":"Starbase 35 <Telstar>", "x": -9330.044000, "y": -101.100000, "z": -56.700000, "cochranes":1107, "market":-1 },
{ "name":"Starbase 73 <Camelot>", "x": -9310.544000, "y": 186.300000, "z": -12.100000, "cochranes":1298, "market":-1 },
{ "name":"Station 218 <Eurus>", "x": -9133.537000, "y": -117.755000, "z": 32.527000, "cochranes":1298, "market":-1 },
{ "name":"Station 309 <Notus>", "x": -9325.499000, "y": -139.232000, "z": -19.774000, "cochranes":1298, "market":-1 },
{ "name":"USB Triton Station", "x": -9179.444300, "y": 200.000000, "z": -22.100000, "cochranes":1298, "market":-1 },
{ "name":"USB Eisenhower Outpost", "x": -9401.147000, "y": 18.932000, "z": -107.859000, "cochranes":1298, "market":-1 },
{ "name":"USB Gallipoli Outpost", "x": -9337.244174, "y": 207.000000, "z": -36.800000, "cochranes":1298, "market":-1 },
{ "name":"USB Invictus Outpost", "x": -9197.944300, "y": 0.000000, "z": 0.000000, "cochranes":1298, "market":-1 },
{ "name":"USB Kembri Outpost", "x": -9290.482000, "y": -129.997000, "z": -46.686000, "cochranes":1298, "market":-1 },
{ "name":"USB Leonidas Outpost", "x": -9386.244300, "y": -93.300000, "z": -88.100000, "cochranes":1298, "market":-1 },
{ "name":"USB Ankara Station", "x": 7446.049000, "y": -5376.000000, "z": 131.501000, "cochranes":1575, "market":-1 },
{ "name":"USB Safe Haven", "x": 7252.341000, "y": -5637.792000, "z": 55.796000, "cochranes":1584, "market":-1 }
]},
{
"name": "Bajoran",
"desc":"Describe the empire here",
"color": "#ffaaaa",
"borders":[
{ "name":"Bajoran", "x": -9325.944000, "y": 221.700000, "z": -45.100000, "radius":5 }
],
"planets":[
{ "name":"Bajor/Jeraddo", "x": -9325.944078, "y": 221.700000, "z": -45.100001, "cochranes":1091, "market":2 }
],
"stations":[
{ "name":"Kainon Station", "x": 6316.800000, "y": 6324.700000, "z": 10.500000, "cochranes":1298, "market":-1 }
]},
{
"name": "Breen",
"desc":"Describe the empire here",
"color": "#00AAAA",
"borders":[
{ "name":"Breen", "x": -9359.000000, "y": 213.000000, "z": -30.000000, "radius":5 }
],
"planets":[
{ "name":"Breen", "x": -9376.050179, "y": 203.150816, "z": -46.281517, "cochranes":1298, "market":-1 },
{ "name":"Dozaria", "x": -9359.000000, "y": 213.000000, "z": -30.000000, "cochranes":1298, "market":-1 },
{ "name":"Portos V", "x": -9268.874000, "y": 231.877000, "z": 42.479000, "cochranes":1298, "market":-1 }
]},
{
"name": "Klingon",
"desc":"Founded in the 9th century by QeylIS (Kahless) the Unforgettable the Empire\nspans several thousand light years around it's homeworld of Qo'noS. In ancient\ntimes the Empire was ran as a dictatorship by the Emperor, however, in this age\nit is governed by the High Council and the Qang (Chancellor). The role of\nEmperor is retained as more of a religious figurehead, rather than\ndirect government control.\n\nThe Empire employs advancedphase-disruptor technology and cloaking devices in\nevery ship of the Imperial Navy, giving them an edge in any combat situation.\n",
"government":"Feudal Monarchy",
"leader":"Q'var Qang",
"homeworld":"Qo'noS", "hwx": -9519.444174, "hwy": 48.600000, "hwz": -87.900000,
"color": "#FF0000",
"borders":[
{ "name":"Klingon", "x": -9577.944000, "y": 120.000000, "z": -90.000000, "radius":160 },
{ "name":"KE-Beeble", "x": -9528.850000, "y": -113.663000, "z": -89.859000, "radius":10 },
{ "name":"KE-Narendra", "x": -9634.940000, "y": -114.000000, "z": -170.000000, "radius":10 },
{ "name":"KE-QIT", "x": -9439.940000, "y": -42.000000, "z": -28.000000, "radius":10 },
{ "name":"KE-Hunt", "x": -9424.783000, "y": 123.700000, "z": 34.706000, "radius":10 }
],
"planets":[
{ "name":"Beeblebrox", "x": -9528.850000, "y": -113.663000, "z": -89.859000, "cochranes":1098, "market":2 },
{ "name":"Beta Lankal", "x": -9536.344174, "y": 248.800000, "z": -96.400000, "cochranes":1188, "market":2 },
{ "name":"Beta Thoridar", "x": -9684.844174, "y": 118.100000, "z": -140.100000, "cochranes":1002, "market":2 },
{ "name":"Boreth", "x": -9588.044174, "y": 130.900000, "z": -100.500000, "cochranes":1596, "market":2 },
{ "name":"Gamma Eridon", "x": -9597.940000, "y": -25.000000, "z": -58.000000, "cochranes":1615, "market":2 },
{ "name":"Hunter's Refuge", "x": -9424.783000, "y": 123.700000, "z": 34.706000, "cochranes":1298, "market":2 },
{ "name":"Narendra III", "x": -9634.940000, "y": -114.000000, "z": -170.000000, "cochranes":1433, "market":2 },
{ "name":"QI'tomer", "x": -9439.940000, "y": -42.000000, "z": -28.000000, "cochranes":1392, "market":-1 },
{ "name":"Qo'noS/No'Mat", "x": -9519.444174, "y": 48.600000, "z": -87.900000, "cochranes":1028, "market":2 },
{ "name":"Rura Penthe", "x": -9444.844174, "y": 60.000000, "z": -66.400000, "cochranes":1342, "market":0 },
{ "name":"Zansellquasure", "x": -9478.009867, "y": 311.638052, "z": -56.560950, "cochranes":1013, "market":2 }
],
"stations":[
{ "name":"IKB wuQmoHwI'", "x": -9528.850000, "y": -113.663000, "z": -89.859000, "cochranes": 1098 },
{ "name":"IKA noch vagh", "x": -9536.344174, "y": 248.800000, "z": -96.400000, "cochranes": 1188 },
{ "name":"IKA noch loS", "x": -9684.844174, "y": 118.100000, "z": -140.100000, "cochranes": 1002 },
{ "name":"IKB qul cha'", "x": -9588.044174, "y": 130.900000, "z": -100.500000, "cochranes": 1596 },
{ "name":"IKA leSSov", "x": -9597.940000, "y": -25.000000, "z": -58.000000, "cochranes": 1615 },
{ "name":"IKB pegh waw'", "x": -9634.940000, "y": -114.000000, "z": -170.000000, "cochranes": 1433 },
{ "name":"IKB 'oy'qem", "x": -9439.940000, "y": -42.000000, "z": -28.000000, "cochranes": 1392 },
{ "name":"IKB juHwaw'", "x": -9519.444174, "y": 48.600000, "z": -87.900000, "cochranes": 1028 },
{ "name":"IKB Qulpo'", "x": -9444.844174, "y": 60.000000, "z": -66.400000, "cochranes": 1342 },
{ "name":"IKB yoH hubwI'", "x": -9478.009867, "y": 311.638052, "z": -56.560950, "cochranes": 1013 },
{ "name":"IKB Hegh nach", "x": 7369.536000, "y": -5276.597000, "z": -49.229000, "cochranes": 1156 }
]},
{
"name": "Romulan",
"desc":"Describe the empire here",
"color": "#00ff00",
"borders":[
{ "name":"Romulan", "x": -9477.000000, "y": -230.000000, "z": 10.000000, "radius":120 }
],
"planets":[
{ "name":"Addams IX", "x": -9484.058519, "y": 367.519852, "z": -105.792164, "cochranes":1298, "market":-1 },
{ "name":"Jeglae XI", "x": 7234.131000, "y": -5189.726000, "z": -55.079000, "cochranes":1298, "market":-1 },
{ "name":"Levaeri Asteroids", "x": -9565.944174, "y": -302.200000, "z": 13.200000, "cochranes":1298, "market":-1 },
{ "name":"Marion III", "x": -9484.317611, "y": 368.050979, "z": -105.070637, "cochranes":1298, "market":-1 },
{ "name":"Nelvana III", "x": -9391.244174, "y": -148.700000, "z": 16.000000, "cochranes":1298, "market":-1 },
{ "name":"Nogark", "x": -9383.380000, "y": -160.704000, "z": 33.659000, "cochranes":1298, "market":-1 },
{ "name":"Rhei'llhne", "x": -9444.944174, "y": -184.000000, "z": 68.000000, "cochranes":1298, "market":-1 },
{ "name":"Santraginus V", "x": -9507.774194, "y": 345.217185, "z": -125.827115, "cochranes":1298, "market":-1 },
{ "name":"Thieurrull", "x": -9433.944174, "y": -246.000000, "z": -26.000000, "cochranes":1298, "market":-1 },
{ "name":"ch'Havran", "x": -9384.244174, "y": -158.800000, "z": -1.800000, "cochranes":1298, "market":-1 },
{ "name":"ch'Nahir", "x": -9507.044174, "y": -128.000000, "z": -19.100000, "cochranes":1298, "market":-1 },
{ "name":"Mol'Rihan <New Romulus>", "x": -9429.742, "y": -147.389, "z": -8.21, "cochranes":1475.271911805, "market":-1 },
{ "name":"ch'Rihan", "x": -9384.244174, "y": -158.800000, "z": -1.800000, "cochranes":1298, "market":-1 }
],
"stations":[
{ "name":"RIS Sienovan B", "x": -9581.352300, "y": -314.942000, "z": 13.693000, "cochranes":1298, "market":-1 },
{ "name":"RSB Deleth", "x": -9383, "y": -161, "z": 34, "cochranes": 1298, "market":-1 },
{ "name":"RSB Ralaaram", "x": -9445, "y": -184, "z": 68, "cochranes": 1298, "market":-1 },
{ "name":"RSB Uerrho'lhiet", "x": -9434, "y": -246, "z": -26, "cochranes": 1298, "market":-1 },
{ "name":"RSB Ael'Theirr", "x": -9430, "y": -147, "z": -8, "cochranes": 1298, "market":-1 },
{ "name":"RSB Cas'idine", "x": -9507, "y": -128, "z": -19, "cochranes": 1298, "market":-1 },
{ "name":"RSB Avrrhinul", "x": -9497, "y": -150, "z": -10, "cochranes": 1298, "market":-1 },
{ "name":"GSO Flagrante Bello", "x": 7312.568, "y": -5203.543, "z": 11.594, "cochranes": 1521.202, "market":-1 }
]},
{
"name": "GFA",
"desc":"The Galactic Ferengi Alliance is a sparse cluster of planets, centered around Ferenganor, which is colonized by the Ferengi and governed by the Ferengi Commerce Authority (or FCA). As an intensely capitalist society, the alliance is inclusive of most races which are capable of turning a profit. ",
"color": "#FFFF00",
"borders":[
{ "name":"GFA", "x": -8977.944000, "y": 260.000000, "z":-50.000000, "radius":100 }
],
"planets":[
{ "name":"Arcybite", "x": -8982.565430, "y": 240.626306, "z":-26.940100, "cochranes":1584, "market":2 },
{ "name":"Artificier II", "x": 6287.573000, "y": 6249.993000,"z": 9.727000, "cochranes":1298, "market":-1 },
{ "name":"Chemarra", "x": -8905.663399, "y": 266.258273, "z":-17.130635, "cochranes":1298, "market":0 },
{ "name":"Fenalgar", "x": -8995.604111, "y": 302.521799, "z":-60.548258, "cochranes":1615, "market":2 },
{ "name":"Ferenganor", "x": -8969.545098, "y": 292.579839, "z":-43.900428, "cochranes":1516, "market":2 },
{ "name":"Golgafrincham XI", "x": -9075.838671, "y":-395.931128, "z": -1.302726, "cochranes":1007, "market":2 },
{ "name":"Latinum Galleria", "x": -8980.714000, "y": 258.600000,"z": 55.588000, "cochranes":1578, "market":2 },
{ "name":"Llystad", "x": -9038.221744, "y": 285.872559, "z":-47.785562, "cochranes":1365, "market":2 },
{ "name":"Nausicaa", "x": -9022.786865, "y": 205.064703, "z":-20.937833, "cochranes":1520, "market":2 },
{ "name":"Quinn's Moon", "x": -9023.031716, "y": 205.064976,"z": -20.849225, "cochranes":1298, "market":-1 },
{ "name":"Tolagor", "x": -8953.947696, "y": 276.884008, "z":-95.171788, "cochranes":1375, "market":2 },
{ "name":"Zekit", "x": -9048.346357, "y": 223.158750, "z":-52.169469, "cochranes":1281, "market":2 }
],
"stations":[
{ "name":"JFS Facility", "x": -9165.336000, "y": 258.472000,"z": 4.896000, "cochranes":1298, "market":-1 },
{ "name":"FSB Skymart III", "x": 7233.902000, "y":-5371.594000, "z": -3.391000, "cochranes":1298, "market":-1 },
{ "name":"FSB Black Scholes", "x": -8905.663399, "y":266.258273, "z": -17.130635, "cochranes":1298, "market":-1 },
{ "name":"FSB Paladium", "x": -9038.221744, "y": 285.872559,"z": -47.785562, "cochranes":1365, "market":-1 },
{ "name":"FSB Kriton", "x": -9022.786865, "y": 205.064703, "z":-20.937833, "cochranes":1520, "market":-1 },
{ "name":"FSB Brz'aak", "x": -8995.604111, "y": 302.521799,"z": -60.548258, "cochranes":1615, "market":-1 },
{ "name":"FSA fthg", "x": -8953.947696, "y": 276.884008, "z":-95.171788, "cochranes":1375, "market":-1 },
{ "name":"FSB Ferengal", "x": -8969.545098, "y": 292.579839,"z": -43.900428, "cochranes":1516, "market":-1 },
{ "name":"FSB Honest Broker", "x": -9048.346357, "y":223.158750, "z": -52.169469, "cochranes":1281, "market":-1 }
]},
{
"name": "Orion",
"desc":"Describe the empire here",
"color": "#00FFFF",
"borders":[
{ "name":"Orion", "x": -9407.844174, "y": 7.700001, "z": -135.999923, "radius":5 }
],
"planets":[
{ "name":"Aphrodite VIII", "x": 6191.658552, "y": 6227.973513, "z": 23.944103, "cochranes":1298, "market":1 },
{ "name":"Gamora III", "x": -9410.744174, "y": 1.400000, "z": -139.000000, "cochranes":1298, "market":1 },
{ "name":"Rigel VIII/XII", "x": -9407.844174, "y": 7.700001, "z": -135.999923, "cochranes":1298, "market":1 },
{ "name":"Viltvodle VI", "x": -9514.000498, "y": -167.995678, "z": -93.458616, "cochranes":1298, "market":1 }
]},
{
"name": "Dominion",
"desc":"Describe the empire here",
"color": "#A9FFEE",
"borders":[
{ "name":"Dominion", "x": 0.000000, "y": 0.000000, "z": 0.000000, "radius":100 }
],
"planets":[
{ "name":"Callinon VII", "x": 6458.800000, "y": 6286.200000, "z": -32.400000, "cochranes":1298, "market":1 },
{ "name":"Ceranon", "x": 6554.000000, "y": 6568.900000, "z": -42.700000, "cochranes":1298, "market":1 },
{ "name":"D'ko Fafnir", "x": 6578.100000, "y": 6459.800000, "z": -19.500000, "cochranes":1298, "market":1 },
{ "name":"Domini V", "x": 6707.800000, "y": 6438.100000, "z": 28.600000, "cochranes":970, "market":1 },
{ "name":"Hardol", "x": 6597.400000, "y": 6389.800000, "z": 6.100000, "cochranes":1298, "market":1 },
{ "name":"Idran X", "x": 6316.800000, "y": 6324.700000, "z": 10.500000, "cochranes":1298, "market":-1 },
{ "name":"Internment Camp 371", "x": 6367.272000, "y": 6372.995000, "z": 7.607000, "cochranes":1298, "market":-1 },
{ "name":"Kaos", "x": 6330.000000, "y": 6337.100000, "z": 15.600000, "cochranes":1298, "market":-1 },
{ "name":"Kareel Prime", "x": 6694.500000, "y": 6519.400000, "z": 73.600000, "cochranes":1298, "market":1 },
{ "name":"Karemma", "x": 6330.200000, "y": 6336.900000, "z": 15.300000, "cochranes":1298, "market":1 },
{ "name":"Kryseis", "x": 6643.900000, "y": 6642.400000, "z": 17.200000, "cochranes":1298, "market":1 },
{ "name":"Omaria", "x": 6500.000000, "y": 6500.000000, "z": 0.000000, "cochranes":1298, "market":-1 },
{ "name":"Sumn'Kapta", "x": 6506.100000, "y": 6670.700000, "z": 20.200000, "cochranes":1298, "market":1 },
{ "name":"Vegan", "x": 6384.300000, "y": 6439.800000, "z": 101.700000, "cochranes":1298, "market":1 },
{ "name":"Veronica Prime", "x": 6304.524556, "y": 6288.311594, "z": -26.045920, "cochranes":1298, "market":1 }
]},
{
"name": "Unity",
"desc":"Describe the empire here",
"color": "#FFA9EE",
"borders":[
{ "name":"Unity", "x": 0.000000, "y": 0.000000, "z": 0.000000, "radius":100 }
],
"planets":[
{ "name":"Angela V", "x": 6125.350290, "y": 6126.116216, "z": -40.743949, "cochranes":1298, "market":-1 },
{ "name":"Deneb III", "x": -9055.244174, "y": -143.400000, "z": 382.500000, "cochranes":577, "market":2 },
{ "name":"Donatu V", "x": -9404.544174, "y": 154.100000, "z": -141.000000, "cochranes":1610, "market":2 },
{ "name":"Kelso II", "x": 6129.214991, "y": 6127.104155, "z": -26.014402, "cochranes":1298, "market":-1 },
{ "name":"Kelvira IX", "x": -9159.000000, "y": 254.000000, "z": -4.000000, "cochranes":1416, "market":2 },
{ "name":"Kildare V / Kildare IX / Kildare XI / USB Stormwatch", "x": 16800.000000, "y": -7100.000000, "z": 5500.000000, "cochranes":1, "market":2 },
{ "name":"Krios", "x": -9423.944174, "y": 76.000000, "z": 90.000000, "cochranes":1526, "market":2 },
{ "name":"Lily Yo II / USB Celestine Gate", "x": 7345.880000, "y": -5452.994000, "z": 45.441000, "cochranes":1278, "market":2 },
{ "name":"New Auria", "x": -9401.344174, "y": -290.400000, "z": 227.000000, "cochranes":1610, "market":2 },
{ "name":"New Risa / USB Lothlorien", "x": -9327.944000, "y": 49.000000, "z": 17.500000, "cochranes":1087, "market":2 },
{ "name":"Nimbus III", "x": -9492.744174, "y": -49.000000, "z": -35.600000, "cochranes":977, "market":2 },
{ "name":"Old Risa/USB Khazad-Dum", "x": -9289.544174, "y": -86.700000, "z": -215.900000, "cochranes":985, "market":2 },
{ "name":"Sherman's Planet / USB Galadriel", "x": -9422.644174, "y": 214.500000, "z": -100.700000, "cochranes":1520, "market":2 }
],
"stations":[
{ "name":"Dark Phoenix City / USB Milliways", "x": -8977.944000, "y": 260.000000, "z": 60.000000, "cochranes":1563, "market":2 }
]},
{
"name": "Tholian",
"desc":"Describe the empire here",
"color": "#FEA901",
"borders":[
{ "name":"Tholian", "x": -9107.944000, "y": -290.000000, "z": -10.000000, "radius":50 }
],
"planets":[
{ "name":"Celestia/Luna Celestia", "x": -9127.844174, "y": -307.200000, "z": 0.900000, "cochranes":1298, "market":-1 },
{ "name":"Crystal Moon", "x": -9107.944174, "y": -290.000000, "z": -10.000000, "cochranes":1298, "market":-1 },
{ "name":"Etheria", "x": -9104.944174, "y": -294.000000, "z": -32.000000, "cochranes":1298, "market":-1 },
{ "name":"Tholia", "x": -9108.940000, "y": -285.000000, "z": 29.000000, "cochranes":1298, "market":-1 }
]},
{
"name": "Qvarne",
"desc":"Describe the empire here",
"color": "#990103",
"borders":[
{ "name":"Qvarne", "x": -9109.941000, "y": 228.477000, "z": -135.785000, "radius":10 }
],
"planets":[
{ "name":"Flamarion II", "x": -9543.340008, "y": -108.565436, "z": -37.688798, "cochranes":1231, "market":2 },
{ "name":"Munspelheim", "x": -9483.597022, "y": -74.090490, "z": -37.498596, "cochranes":1010, "market":2 },
{ "name":"Pryan/Luna Kaigun", "x": -9522.645877, "y": -73.543452, "z": -34.701889, "cochranes":1049, "market":2 },
{ "name":"Qvarne IV", "x": -9109.941898, "y": 228.477574, "z": -135.785688, "cochranes":1298, "market":-1 },
{ "name":"Traal", "x": -9543.352014, "y": -39.594749, "z": -37.539687, "cochranes":1226, "market":2 }
],
"stations":[
{ "name":"Atlas Ultrayards", "x": -9109.942000, "y": 228.478000, "z": -135.786000, "cochranes":995, "market":2 },
{ "name":"New Neresia", "x": 7422.000000, "y": -5502.000000, "z": 114.000000, "cochranes":1298, "market":-1 }
]},
{
"name": "Gorn",
"desc":"Describe the empire here",
"color": "#FF02FF",
"borders":[
{ "name":"Gorn", "x": -9267.944000, "y": -330.000000, "z": 80.000000, "radius":80 }
],
"planets":[
{ "name":"Arkleseizure", "x": -9312.877310, "y": -247.150914, "z": 47.981427, "cochranes":1298, "market":-1 },
{ "name":"Cestus III", "x": -9188.553000, "y": -344.200000, "z": 119.601000, "cochranes":1298, "market":-1 },
{ "name":"Ghdarin II", "x": -9310.236000, "y": -270.000000, "z": 109.310000, "cochranes":1298, "market":-1 },
{ "name":"Ghehak VI", "x": -9206.632000, "y": -283.700000, "z": 60.456000, "cochranes":1298, "market":-1 },
{ "name":"Gornar V", "x": -9272.366000, "y": -332.200000, "z": 81.114000, "cochranes":1298, "market":-1 },
{ "name":"Gymine Prime", "x": -9284.976000, "y": -395.400000, "z": 37.375000, "cochranes":1298, "market":-1 },
{ "name":"Troldar II", "x": -9267.729000, "y": -389.400000, "z": 69.348000, "cochranes":1298, "market":-1 }
],
"stations":[
{ "name":"GSO Oblo Kale", "x": 7020.577000, "y": -5606.577000, "z": 94.444000, "cochranes":1578, "market":-1 }
]},
{
"name": "Independent",
"desc":"Describe the empire here",
"color": "#B3B3B3",
"borders":[
{ "name":"Independent", "x": 0.000000, "y": 0.000000, "z": 0.000000, "radius":100 }
],
"planets":[
{ "name":"Aglaboogh VII", "x": -8982.306174, "y": -464.566000, "z": 5.397000, "cochranes":1298, "market":-1 },
{ "name":"Aozaproag Prime", "x": -8876.486174, "y": -222.494000, "z": 16.017000, "cochranes":1298, "market":-1 },
{ "name":"Arcadia Prime", "x": 7747.785000, "y": -6371.844000, "z": 128.383000, "cochranes":1298, "market":-1 },
{ "name":"Astoa III", "x": 7618.377000, "y": -5318.577000, "z": 47.795000, "cochranes":1298, "market":-1 },
{ "name":"Aufria II", "x": 7055.077000, "y": -5126.073000, "z": 83.423000, "cochranes":1298, "market":-1 },
{ "name":"Auquac IV", "x": 6992.746000, "y": -5275.089000, "z": 95.556000, "cochranes":1298, "market":-1 },
{ "name":"Avarice Prime", "x": 6274.119000, "y": 6221.450000, "z": 9.793000, "cochranes":1298, "market":2 },
{ "name":"Bavo II", "x": -8990.196174, "y": -306.017000, "z": 48.773000, "cochranes":1298, "market":-1 },
{ "name":"Chiune V", "x": 7252.341000, "y": -5637.792000, "z": 55.796000, "cochranes":1584, "market":2 },
{ "name":"Cisp X", "x": 7471.562000, "y": -5170.704000, "z": -33.250000, "cochranes":1298, "market":-1 },
{ "name":"Clispau IX", "x": 7396.117000, "y": -5624.900000, "z": 78.700000, "cochranes":979, "market":2 },
{ "name":"Cloobith II", "x": -9062.607174, "y": -207.870000, "z": 96.331000, "cochranes":1298, "market":-1 },
{ "name":"D-572", "x": -9261.447000, "y": 248.430000, "z": 16.421000, "cochranes":1298, "market":-1 },
{ "name":"Easle IX", "x": -8906.822174, "y": -380.967000, "z": 27.467000, "cochranes":1298, "market":-1 },
{ "name":"Egnach IV", "x": -9082.456174, "y": 408.671000, "z": 20.222000, "cochranes":1298, "market":-1 },
{ "name":"Eheutra Prime", "x": -9652.350174, "y": -199.355000, "z": -37.731000, "cochranes":1298, "market":-1 },
{ "name":"Eita VI", "x": 7648.931000, "y": -5189.132000, "z": 116.485000, "cochranes":1298, "market":-1 },
{ "name":"Evensong Nation", "x": -8805.000000, "y": -400.000000, "z": -0.000000, "cochranes":1298, "market":-1 },
{ "name":"Flaubea X", "x": -9624.352174, "y": 265.740000, "z": 51.859000, "cochranes":1298, "market":-1 },
{ "name":"Floach II", "x": -9690.480174, "y": 258.945000, "z": -18.427000, "cochranes":1298, "market":-1 },
{ "name":"Fraspait Prime", "x": -9295.454174, "y": 468.735000, "z": 82.720000, "cochranes":1298, "market":-1 },
{ "name":"Fuezia III", "x": 7351.123000, "y": -5853.708000, "z": 78.529000, "cochranes":1298, "market":-1 },
{ "name":"Ghosco V", "x": -8754.312174, "y": 249.667000, "z": -91.045000, "cochranes":1298, "market":-1 },
{ "name":"Gloguipoo II", "x": -8904.784174, "y": 426.400000, "z": 77.432000, "cochranes":1298, "market":-1 },
{ "name":"Goedot V", "x": 6988.361000, "y": -4610.728000, "z": -8.522000, "cochranes":1298, "market":-1 },
{ "name":"Grime IV", "x": 7784.585000, "y": -5399.124000, "z": 210.168000, "cochranes":1298, "market":-1 },
{ "name":"Grutitrust IX", "x": -8722.025174, "y": -77.022000, "z": -19.349000, "cochranes":1298, "market":-1 },
{ "name":"Hopruu II", "x": -8628.000000, "y": -22.000000, "z": 10.000000, "cochranes":1298, "market":-1 },
{ "name":"Iokono IV", "x": 7128.521000, "y": -5727.190000, "z": 96.049000, "cochranes":1298, "market":-1 },
{ "name":"Iuka IV", "x": -8703.226174, "y": -310.962000, "z": -90.058000, "cochranes":1298, "market":-1 },
{ "name":"Jesp IV", "x": -9280.787174, "y": -484.123000, "z": 16.589000, "cochranes":1298, "market":-1 },
{ "name":"Kloggen XI", "x": 7331.246000, "y": -5592.223000, "z": -34.348000, "cochranes":1298, "market":-1 },
{ "name":"Krussel IX", "x": -9474.700000, "y": -33.400000, "z": 66.300000, "cochranes":1298, "market":1 },
{ "name":"Latinum Planet", "x": -9221.219174, "y": 47.222000, "z": -328.813000, "cochranes":1298, "market":-1 },
{ "name":"Lizrae XII", "x": 7317.001000, "y": -5865.982000, "z": -33.662000, "cochranes":1298, "market":-1 },
{ "name":"Maust III", "x": 7312.568000, "y": -5203.543000, "z": 11.594000, "cochranes":1521, "market":2 },
{ "name":"Meufie V", "x": -9461.384174, "y": 424.385000, "z": 28.043000, "cochranes":1298, "market":-1 },
{ "name":"Meufie V", "x": -9461.384000, "y": 424.385000, "z": 28.043000, "cochranes":1298, "market":-1 },
{ "name":"Mitundri Prime", "x": -8991.803000, "y": 45.101000, "z": -124.125000, "cochranes":1298, "market":-1 },
{ "name":"New Hallee", "x": -9473.974000, "y": -35.679000, "z": -133.042000, "cochranes":1298, "market":-1 },
{ "name":"Odach VI", "x": -9298.308174, "y": -345.039000, "z": -44.753000, "cochranes":1298, "market":-1 },
{ "name":"Oglaroon", "x": -8944.871608, "y": 67.810590, "z": -46.850639, "cochranes":1298, "market":-1 },
{ "name":"Ohespae VII", "x": 7368.627000, "y": -5391.671000, "z": 140.684000, "cochranes":1107, "market":2 },
{ "name":"Ouble III", "x": -9687.353174, "y": -1.643000, "z": 67.658000, "cochranes":1298, "market":-1 },
{ "name":"Pluine IX", "x": 7740.842000, "y": -5857.020000, "z": 10.752000, "cochranes":1298, "market":-1 },
{ "name":"Preria IV", "x": -8771.570174, "y": -233.347000, "z": 41.478000, "cochranes":1298, "market":-1 },
{ "name":"Prodaze IX", "x": 7020.577000, "y": -5606.577000, "z": 94.444000, "cochranes":1578, "market":2 },
{ "name":"Pruxav VII <Acheron>", "x": 7323.553000, "y": -4998.710000, "z": 111.047000, "cochranes":1298, "market":-1 },
{ "name":"Quegger X", "x": -9383.537174, "y": -453.175000, "z": -98.263000, "cochranes":1298, "market":-1 },
{ "name":"Quordlepleen II", "x": -8833.725186, "y": -217.429483, "z": 167.952190, "cochranes":1298, "market":-1 },
{ "name":"Salvo IX", "x": 6236.913370, "y": 6271.402476, "z": -17.030470, "cochranes":1298, "market":2 },
{ "name":"Sniet VI", "x": 7145.044000, "y": -5644.616000, "z": -36.663000, "cochranes":1298, "market":-1 },
{ "name":"Snozi III", "x": -8812.276174, "y": 256.804000, "z": 22.529000, "cochranes":1298, "market":-1 },
{ "name":"Spitzrath II", "x": -8701.338174, "y": -468.751000, "z": 84.215000, "cochranes":1298, "market":-1 },
{ "name":"Spoja V", "x": -8789.293000, "y": -433.819000, "z": 10.498000, "cochranes":1298, "market":-1 },
{ "name":"Spoja V", "x": -8789.293174, "y": -433.819000, "z": 10.498000, "cochranes":1298, "market":-1 },
{ "name":"Stobi III", "x": -8875.129174, "y": -49.772000, "z": 42.840000, "cochranes":1298, "market":-1 },
{ "name":"This Planet", "x": -8875.129000, "y": -49.772000, "z": 42.840000, "cochranes":1298, "market":-1 },
{ "name":"Tuosho Prime", "x": 7601.996000, "y": -5197.729000, "z": -22.884000, "cochranes":1298, "market":-1 },
{ "name":"Urss", "x": -9663.822000, "y": 434.853000, "z": 86.496000, "cochranes":1298, "market":-1 },
{ "name":"Usho Prime", "x": 7446.049000, "y": -5376.000000, "z": 131.501000, "cochranes":1575, "market":2 },
{ "name":"Usubau VII", "x": -9000.986174, "y": 449.987000, "z": -51.791000, "cochranes":1298, "market":-1 },
{ "name":"Whousnod III", "x": -9499.273174, "y": -457.956000, "z": -9.871000, "cochranes":1298, "market":-1 },
{ "name":"Wosnav Prime", "x": 7551.731000, "y": -5267.641000, "z": -94.157000, "cochranes":1298, "market":-1 },
{ "name":"Wroja III", "x": 7233.902000, "y": -5371.594000, "z": -3.391000, "cochranes":1298, "market":2 },
{ "name":"Xob VIII", "x": -8802.619174, "y": 130.684000, "z": 44.825000, "cochranes":1298, "market":-1 },
{ "name":"Xofu VII", "x": -8729.240174, "y": 70.156000, "z": 4.162000, "cochranes":1298, "market":-1 },
{ "name":"Yodixxo II", "x": 7265.834000, "y": -5388.170000, "z": -96.473000, "cochranes":1298, "market":-1 },
{ "name":"Yoolu VI", "x": 7683.403000, "y": -5113.280000, "z": 47.527000, "cochranes":1298, "market":-1 },
{ "name":"Yozerob VI", "x": 7111.099000, "y": -5348.459000, "z": -84.371000, "cochranes":1298, "market":-1 },
{ "name":"Zarniwoop IV", "x": -8809.782656, "y": -61.478745, "z": -74.808896, "cochranes":1298, "market":-1 },
{ "name":"Zausta VI", "x": 7369.536000, "y": -5276.597000, "z": -49.229000, "cochranes":1156, "market":2 },
{ "name":"Zhara II", "x": 7739.851000, "y": -5604.221000, "z": -124.050000, "cochranes":1298, "market":-1 }
],
"stations":[
{ "name":"HirogenBase", "x": 7300.000000, "y": -5400.000000, "z": 100.300000, "cochranes":1298, "market":-1 },
{ "name":"Quaard 821 <Borg Planet>", "x": -9599.900000, "y": -400.100000, "z": 0.100000, "cochranes":1298, "market":-1 }
]}]}}

3
js/decimal.min.js vendored

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

View File

@ -1,562 +0,0 @@
// A Simple WSClient for PennMUSH
// -grapenut
var defaultHost = "ats.trekmush.org";
var defaultPort = '1701';
// pre-define the connection object, later it will be set to
// conn = WSClient.open('ws://host:port/wsclient')
var conn = null;
// user information
var login = document.getElementById('client-login');
var username = document.getElementById('username');
var password = document.getElementById('password');
// terminal is the container for output, cmdprompt, quicklinks and the entry box.
var terminal = document.getElementById('client-term');
// the main terminal output window
var output = WSClient.output(document.getElementById('client-term-output'));
// update the command prompt without modifying the main output
var cmdprompt = WSClient.output(document.getElementById('client-term-prompt'));
// clickable command links that do some common tasks (who, look, @mail, etc)
var quicklinks = document.getElementById('quicklinks');
// the user input box
var entry = WSClient.input(document.getElementById('client-term-entry'));
// settings popup and the different configuration options
/*var settingsContainer = document.getElementById('settings-container');
var settingsForm = document.getElementById('settings');
var fontSelect = document.getElementById('fontSelect');
var fontSize = document.getElementById('fontSize');
var fontBold = document.getElementById('fontBold');
var forceSSL = document.getElementById('forceSSL');
var keepAliveTime = document.getElementById('keepAliveTime');
var keepAliveLabel = document.getElementById('keepAliveLabel');
*/
// info window (show the credits)
//var infoContainer = document.getElementById('info-container');
/***********************************************/
/** Body **/
// called by body.onLoad
function startup() {
// load browser cookie and parse settings
//settings.load();
// set the initial screen dimensions (use for multi-window output)
// terminal.style.left = settings.SCREEN_LEFT + 'em';
// terminal.style.right = settings.SCREEN_RIGHT + 'em';
// terminal.style.top = settings.SCREEN_TOP + 'em';
// terminal.style.bottom = settings.SCREEN_BOT + 'em';
// set some obvious ChangeMe values if there are none saved
// if (username.value === '') {
// username.value = 'Username';
// }
/*
if (password.value === '') {
password.value = 'Password';
}
// autoconnect, if desired
settings.autoConnect.val && reconnect();
*/
// start the keepalive loop
keepalive();
// set focus on the input box
//refocus();
};
// called by body.onUnload
function shutdown() {
// if we have an active connection,
// send a QUIT command and exit gracefully
if (conn && conn.socket.readyState === 1) {
conn.sendText('QUIT');
setTimeout(conn.close, 1000);
}
conn = null;
};
/***********************************************/
/** Callbacks **/
// the user pressed enter
entry.onEnter = function(cmd) {
// detect whether we have an overlay showing and close it
/* if (settingsContainer.style.visibility === 'visible') {
settings.save();
} else if (infoContainer.style.visibility === 'visible') {
infoContainer.style.visibility = 'hidden';
} else { */
// no overlay, submit user input
if (conn && conn.socket.readyState === 1) {
// send current user input to the MUSH
conn.sendText(cmd);
// and echo to the terminal
settings.localEcho.val && msg(cmd);
} else {
// auto-reconnect if the connection was lost
settings.autoReConnect.val && reconnect();
}
//}
};
// the user pressed escape
/* entry.onEscape = function() {
toggle_overlays();
}; */
/* settingsForm.onsubmit = function () {
settings.save();
entry.focus();
return false;
}; */
/*
settingsForm.onkeydown = function(e) {
var code = (e.keyCode ? e.keyCode : e.which);
if (code == 27) {
// escape pressed, toggle form input and delete command elements
toggle_overlay();
}
};
*/
// automatically update port +/- 1 when forceSSL is changed
// 4201 -> 4202 with ssl
// this maybe is a bit awkward, but I didn't come up with a better idea
/*forceSSL.onchange = function() {
if (forceSSL.checked) {
serverPort.value = parseInt(serverPort.value) + 1;
} else {
serverPort.value = parseInt(serverPort.value) - 1;
}
};
*/
/*
// close the info window on any key press
infoContainer.onkeydown = function(e) {
var code = (e.keyCode ? e.keyCode : e.which);
toggle_overlay();
};
*/
/***********************************************/
/** Focus **/
// put focus back on the user input box
// unless it's in another input box (e.g. username/password/settings)
function refocus() {
if (((window.getSelection == "undefined") ||
(window.getSelection() == "")) &&
((document.getSelection == "undefined") ||
(document.getSelection() == "")) &&
!((document.activeElement.tagName === "INPUT") &&
(document.activeElement.type.search(/image/gi) === -1)))
{
entry.focus();
}
};
// move the input cursor to the end of the input elements current text
function move_cursor_to_end(el) {
if (typeof el.selectionStart == "number") {
el.selectionStart = el.selectionEnd = el.value.length;
} else if (typeof el.createTextRange != "undefined") {
el.focus();
var range = el.createTextRange();
range.collapse(false);
range.select();
}
};
/*
// close anything that may be showing or bring up the settings
function toggle_overlay() {
if (settingsContainer.style.visibility === 'visible') {
settings.show();
settings.reconfigure();
} else if (infoContainer.style.visibility === 'visible') {
infoContainer.style.visibility = 'hidden';
} else {
// no overlay, bring up settings
settings.show();
}
entry.focus();
};
*/
/***********************************************/
/** Terminal **/
// send a log message to the terminal output
function msg(data) {
output.appendMessage('logMessage', data);
};
function xch_cmd(command) {
output.onCommand(command);
};
// execute pueblo command
// a '??' token in command will be replaced with user input
output.onCommand = function (command) {
var cmd = WSClient.parseCommand(command);
// send the parsed command to the MUSH
conn && conn.sendText(cmd);
settings.localEcho.val && msg(cmd);
};
// clear the child elements from any element (like the output window)
function clearscreen () {
output.clear();
cmdprompt.clear();
entry.clear();
};
// keepalive function continually calls itself and sends the IDLE command
function keepalive () {
conn && settings.keepAlive.val && conn.sendText("IDLE");
setTimeout(keepalive, settings.keepAliveTime.val*1000.0);
};
// connect or reconnect to the MUSH
function reconnect() {
// we can't do websockets, redirect to 505
if (!window.WebSocket){
window.location.replace("/505.htm");
}
entry.focus();
// clean up the old connection gracefully
if (conn) {
var old = conn;
old.sendText('QUIT');
setTimeout(function () { old.close(); }, 1000);
conn = null;
}
msg('%% Reconnecting to server...\r\n');
// detect whether to use SSL or not
var proto = ((window.location.protocol == "https:") || settings.forceSSL.val) ? 'wss://' : 'ws://';
//var proto = 'ws://';
// open a new connection to ws://host:port/wsclient
conn = WSClient.connect(proto + settings.serverAddress.val + ":" + settings.serverPort.val + '/wsclient');
// auto-login if username and password are not the default values
conn.onOpen = function (text) {
msg("%% Connected.");
// if (username.value.toUpperCase() !== "USERNAME" && username.value !== "") {
// setTimeout(function () {
// conn.sendText('connect "' + username.value + '" ' + password.value);
// }, 4000);
//}
};
// send a log message if there is a connection error
conn.onError = function (evt) {
msg("%% Connection error!");
console.log('error', evt);
};
// send a log message when connection closed
conn.onClose = function (evt) {
msg("%% Connection closed.");
console.log('close', evt);
};
// handle incoming plain text
// this will parse ansi color codes, but won't render untrusted HTML
conn.onText = function (text) {
var reg = /^FugueEdit > /;
// detect if we are capturing a FugueEdit string
if (text.search(reg) !== -1) {
// replace the user input with text, sans the FugueEdit bit
entry.value = text.replace(reg, "");
} else {
// append text to the output window
output.appendText(text);
}
};
// handle incoming JSON object
conn.onObject = function (obj) {
// just send a log message
// could use this for lots of neat stuff
// maps, huds, combat logs in a separate window
console.log('object', obj);
};
// handle incoming HTML from the MUSH
// it's already been encoded and trusted by the MUSH
conn.onHTML = function (fragment) {
// just append it to the terminal output
output.appendHTML(fragment);
};
// handle incoming pueblo tags
// currently implements xch_cmd and xch_hint
conn.onPueblo = function (tag, attrs) {
// just append it to the terminal output
output.appendPueblo(tag, attrs);
};
// handle incoming command prompt
conn.onPrompt = function (text) {
// replace anything in cmdprompt with text
// cmdprompt is an emulated terminal, so use appendText() to get ansi parsed
cmdprompt.root.innerHTML = '';
cmdprompt.appendText(text + '\r\n');
};
};
/***********************************************/
/** Settings **/
var SettingsClass = (function (window, document, undefined) {
this.localEcho = {val: true};
this.autoConnect = {val: true};
this.autoReConnect = {val: true};
this.numInputLines = {val: 3};
this.serverAddress = {val: defaultHost};
this.serverPort = {val: defaultPort};
this.forceSSL = {val: false};
this.keepAlive = {val: true};
this.keepAliveTime = {val: 600};
this.fontSelect = {val: "Courier New"};
this.fontSize = {val: 10};
this.fontBold = {val: false};
this.SCREEN_TOP = 3;
this.SCREEN_BOT = 3;
this.SCREEN_LEFT = 3;
this.SCREEN_RIGHT = 3;
this.doc = document;
// settingsContainer.style.visibility = 'hidden';
/////////////////////////////////////
this.updateFonts = function() {
document.body.style.fontFamily = fontSelect.value + ", 'Courier New', monospace";
document.body.style.fontSize = fontSize.value + 'pt';
document.body.style.fontWeight = (fontBold.checked ? "bold" : "normal");;
keepAliveLabel.innerHTML='KeepAlive('+keepAliveTime.value+'s)';
};
/* this.show = function () {
if (settingsContainer.style.visibility === 'visible') {
// settingsContainer.style.visibility = 'hidden';
// this.reconfigure();
} else {
// restore form values from actual settings
var opts = document.getElementsByClassName('option');
for (var i=0; i < opts.length; i++)
{
var opt = this[opts[i].id];
if (opt) {
if (opts[i].type.toUpperCase() === 'CHECKBOX') {
opts[i].checked = opt.val;
} else {
opts[i].value = opt.val;
}
}
}
settingsContainer.style.visibility = 'visible';
}
};
*/
this.cookie = function (c_name) {
var c_value = this.doc.cookie;
var c_start = c_value.indexOf(" " + c_name + "=");
if (c_start == -1)
{
c_start = c_value.indexOf(c_name + "=");
}
if (c_start == -1) {
c_value = null;
} else {
c_start = c_value.indexOf("=", c_start) + 1;
var c_end = c_value.indexOf(";", c_start);
if (c_end == -1) {
c_end = c_value.length;
}
c_value = unescape(c_value.substring(c_start,c_end));
}
return c_value;
};
/*
// Load values from cookies, or save the cookie on first visitl
this.load = function () {
var opts = document.getElementsByClassName('option');
var exdate=new Date();
exdate.setDate(exdate.getDate() + 365*10);
for (var i = 0; i < opts.length; i++)
{
var opt = this[opts[i].id];
if (opt) {
if (opts[i].type.toUpperCase() === 'CHECKBOX') {
var val = this.cookie(opts[i].id);
if (val && val != 'undefined') {
opt.val = (val.toUpperCase() === 'TRUE');
} else {
this.doc.cookie = opts[i].id + "=" + opt.val
}
opts[i].checked = opt.val;
} else {
var val = this.cookie(opts[i].id);
if (val && val != 'undefined') {
opt.val = val;
} else {
this.doc.cookie = opts[i].id + "=" + opt.val
}
opts[i].value = opt.val;
}
}
}
// this.reconfigure();
};
*/
// Save form values to settings values, and settings values to cookies
this.save = function () {
var opts = document.getElementsByClassName('option');
var exdate=new Date();
exdate.setDate(exdate.getDate() + 365*10);
for (var i = 0; i < opts.length; i++)
{
var opt = this[opts[i].id];
// copy form values to settings values
if (opt) {
if (opts[i].type.toUpperCase() === 'CHECKBOX') {
if (opts[i].checked !== opt.val) {
opt.val = opts[i].checked;
}
} else {
if (opts[i].value !== opt.val) {
opt.val = opts[i].value;
}
}
// save settings value to cookie
this.doc.cookie=opts[i].id + "=" + opt.val + "; expires="+exdate.toUTCString();
}
}
// this.reconfigure();
// toggle visibility
// settingsContainer.style.visibility = 'hidden';
};
// Resize or otherwise modify the output window to reflect the new settings
/* this.reconfigure = function() {
document.body.style.fontFamily = this.fontSelect.val + ", 'Courier New', monospace";
document.body.style.fontSize = this.fontSize.val + 'pt';
document.body.style.fontWeight = (this.fontBold.val ? "bold" : "normal");;
output.root.style.bottom = 4.0+parseInt(this.numInputLines.val) + 'em';
quicklinks.style.bottom = 2.0+parseInt(this.numInputLines.val) + 'em';
cmdprompt.root.style.bottom = 1.0+parseInt(this.numInputLines.val) + 'em';
entry.root.style.height = parseInt(this.numInputLines.val) + 'em';
keepAliveLabel.innerHTML='KeepAlive('+keepAliveTime.value+'s)';
};
*/
});
var settings = new SettingsClass(window,document,undefined);

View File

@ -1,483 +0,0 @@
if ( ! Detector.webgl ) Detector.addGetWebGLMessage();
var camera, controls, scene, renderer;
var clock = new THREE.Clock();
var raycaster = new THREE.Raycaster();
var mouse = new THREE.Vector2(), INTERSECTED;
var WIDTH = window.innerWidth , HEIGHT = window.innerHeight
window.onload = function() {
loadData(function() {
init();
animate();
populateUserFields();
});
}
function loadData(_callback) {
// Load Data (hopefully) before the rest of the place loads.
var xmlhttp = new XMLHttpRequest();
var url = "js/atsdata.json";
xmlhttp.onreadystatechange = function() {
if (xmlhttp.readyState == 4 && xmlhttp.status == 200) {
jsonEmpire = JSON.parse(xmlhttp.responseText)['ATS_Navcomp_DB']['empires'];
jsonGate = JSON.parse(xmlhttp.responseText)['ATS_Navcomp_DB']['gates'];
jsonWormhole = JSON.parse(xmlhttp.responseText)['ATS_Navcomp_DB']['wormholes'];
_callback();
}
};
xmlhttp.open("GET", url, true);
xmlhttp.send();
}
function reset_view() {
camera.position.set(-9300,50,550);
controls.target.x = scene.getObjectByName("Federation").position.x;
controls.target.y = scene.getObjectByName("Federation").position.y;
controls.target.z = scene.getObjectByName("Federation").position.z;
camera.updateProjectionMatrix();
render();
}
function init() {
scene = new THREE.Scene();
renderer = new THREE.WebGLRenderer();
renderer.setSize( window.innerWidth, window.innerHeight );
document.body.appendChild( renderer.domElement );
container = document.createElement( 'div' );
document.body.appendChild( container );
camera = new THREE.PerspectiveCamera(50, window.innerWidth / window.innerHeight, 1, 1e7);
controls = new THREE.OrbitControls( camera, renderer.domElement );
controls.enableDamping = true;
controls.dampingFactor = 0.25;
controls.enableZoom = true;
controls.addEventListener( 'change', render );
document.addEventListener( 'mousedown', onCanvasClick, false );
var Text2D = THREE_Text.Text2D;
var SpriteText2D = THREE_Text.SpriteText2D;
var textAlign = THREE_Text.textAlign
var b_geometry, b_material, b_mesh, p_geometry, p_material, p_mesh, s_geometry, s_material, s_mesh, l_text;
for (var key in jsonEmpire) {
area=jsonEmpire[key];
for (var key2 in area['borders']) {
var border = area['borders'][key2];
b_geometry = new THREE.SphereGeometry( border.radius, 10, 10 );
b_material = new THREE.MeshBasicMaterial( { color: area.color, wireframe: true} );
b_mesh = new THREE.Mesh( b_geometry, b_material );b_mesh
b_mesh.position.x = border.x;
b_mesh.position.y = border.y;
b_mesh.position.z = border.z;
b_mesh.name = escapeHTML(border.name);
scene.add( b_mesh );
if (border.radius > 10) {
l_text = new Text2D(border.name, { align: textAlign.center, font: '25px Arial', fillStyle: '#777' , antialias: false });
l_text.material.alphaTest = 0.5;
l_text.position.set(border.x,border.y,border.z);
l_text.scale.set(0.75,0.75,0.75);
l_text.name = border.name + "_label";
scene.add(l_text);
}
}
// Planet Generation
for (var key in area["planets"]) {
var planet = area.planets[key];
p_geometry= new THREE.SphereGeometry( 1, 10, 10 );
p_material = new THREE.MeshBasicMaterial( { color: area.color, wireframe: false} );
p_mesh = new THREE.Mesh( p_geometry, p_material );
p_mesh.position.x=planet.x;
p_mesh.position.y=planet.y;
p_mesh.position.z=planet.z;
p_mesh.name = escapeHTML(planet.name);
scene.add( p_mesh );
l_text = new Text2D(escapeHTML(planet.name), { align: textAlign.right, font: '12px Arial', fillStyle: '#FFF' , antialias: false });
l_text.material.alphaTest = 0.0;
l_text.position.set(planet.x,planet.y,planet.z);
l_text.scale.set(0.25,0.25,0.25);
l_text.name = escapeHTML(planet.name + "_label");
scene.add(l_text);
}
// Base Generation
for (var key in area["stations"]) {
var base = area.stations[key];
s_geometry = new THREE.CylinderGeometry( 0.2, 0.6*3, 0.5*3, 4 );
s_geometry.computeBoundingSphere();
s_material = new THREE.MeshBasicMaterial( { color: area.color, wireframe: false} );
s_mesh = new THREE.Mesh( s_geometry, s_material );
s_mesh.position.x=base.x;
s_mesh.position.y=base.y;
s_mesh.position.z=base.z;
s_mesh.name = escapeHTML(base.name);
scene.add( s_mesh );
l_text = new Text2D(escapeHTML(base.name), { align: textAlign.left, font: '12px Arial', fillStyle: '#ABABAB' , antialias: false });
l_text.material.alphaTest = 0.0;
l_text.position.set(base.x,base.y+3,base.z);
l_text.scale.set(0.20,0.20,0.20);
l_text.name = escapeHTML(base.name + "_label");
scene.add(l_text);
}
}
// Set view and camera to point to initial location
reset_view();
}
window.onresize = function() {
camera.aspect = window.innerWidth / window.innerHeight;
camera.updateProjectionMatrix();
renderer.setSize( window.innerWidth, window.innerHeight );
render();
}
function onCanvasClick( event ) {
//event.preventDefault();
mouse.x = ( event.clientX / window.innerWidth ) * 2 - 1;
mouse.y = - ( event.clientY / window.innerHeight ) * 2 + 1;
raycaster.setFromCamera( mouse, camera );
var intersects = raycaster.intersectObjects( scene.children );
if ( intersects.length > 0 ) {
if ( INTERSECTED != intersects[ 0 ].object ) {
INTERSECTED = intersects[ 0 ].object;
// console.log( INTERSECTED.name );
if (lastInputBox) {
document.getElementById(lastInputBox).value = INTERSECTED.name;
}
}
} else {
INTERSECTED = null;
}
}
function animate() {
var delta = clock.getDelta();
requestAnimationFrame( animate );
scene.updateMatrixWorld()
controls.update(delta);
render();
}
function render () {
//requestAnimationFrame( render );
var objectlist = Object.keys(listobjects("stations"));
objectlist.forEach (function(station) { var obj = scene.getObjectByName(escapeHTML(station + "_label")); obj.lookAt(camera.position) }) ;
objectlist = Object.keys(listobjects("planets"));
objectlist.forEach (function(planet) { var obj = scene.getObjectByName(escapeHTML(planet + "_label")); obj.lookAt(camera.position) }) ;
objectlist = Object.keys(listobjects("borders"));
objectlist.forEach (function(border) { var obj = scene.getObjectByName(border + "_label"); if (obj != undefined) { obj.lookAt(camera.position)} }) ;
renderer.render( scene, camera );
}
function listobjects(type) {
var objects = {};
for (var key in jsonEmpire) {
area=jsonEmpire[key];
for (var key2 in area[type]) {
object = area[type][key2];
objectname = object.name;
objects[object.name] = object;
}
}
return objects;
}
function zoomfocus(name) {
var zoomto = grabPositionByName(name.split('@')[name.split('@').length-1]);
if (zoomto != null) {
controls.target.x = zoomto.x;
controls.target.y = zoomto.y;
controls.target.z = zoomto.z;
var focus = new THREE.Vector3( zoomto.x, zoomto.y, zoomto.z );
var vantage = new THREE.Vector3( 5, 60 , 150 );
focus.add(vantage);
camera.position.set(focus.x,focus.y,focus.z);
camera.updateProjectionMatrix();
render();
}
}
function drawline(origin,dest) {
var direction = dest.clone().sub(origin);
var length = origin.distanceTo(dest);
var arrowHelper = new THREE.ArrowHelper(direction.normalize(),origin,length,0xffffff,10,5);
arrowHelper.name = "arrow";
arrowHelper.cone.material.transparent = true;
arrowHelper.cone.material.opacity = 0.25;
arrowHelper.line.material.linewidth = 2;
scene.add( arrowHelper );
animate();
}
function removeEntity(object) {
var selectedObject;
while ( selectedObject = scene.getObjectByName(object) ) {
scene.remove( selectedObject );
}
animate();
}
// Calculates SU/s with given warp factor
function calcSUpS(warpfactor) {
// 14.0*29.979246*1298.737508 = 257494817.55 SU/s
// Velocity = WF^3.333333*lightspeed*cochranes
// 3087467836.3256578445 = 1 Parsec
var cochranes = 1298.737508; // Average cochranes
var lightspeed = 29.979246; // Lightspeed constant
var exponent = 3.333333;
var sus = Math.pow(warpfactor,exponent) * lightspeed * cochranes ;
return sus;
}
function su2pc ( su ) {
return su / 3087467836.3256578445;
}
// Calculates ETA for given distance and velocity.
// Velocity should be supplied as an array of speed and unit
function calcETA(velocity,distance) {
var speed = velocity.speed;
var unit = velocity.unit;
var seconds;
switch (unit) {
case 'SU/s':
seconds = new Decimal( distance / su2pc(speed) );
break;
case 'PC/s':
seconds = new Decimal( distance / speed );
break;
case 'WF':
seconds = distance / su2pc(calcSUpS(speed));
break;
default:
throw "Invalid unit of speed."
}
return seconds;
}
// Calculate the distance between two named points ( Stations or Bases )
function calcDist(pointa, pointb) {
var obj_A = scene.getObjectByName(pointa);
var obj_B = scene.getObjectByName(pointb);
var distance = obj_A.position.distanceTo(obj_B.position);
return distance;
}
function grabPositionByName(name) { return scene.getObjectByName(name.split('@')[name.split('@').length-1]).position; }
function calcEndpointByHeading(heading,startvec = new THREE.Vector3(0,0,0)) {
// heading.x = azimuth
// heading.y = inclination
// heading.z = radius (distance)
var calcvec = new THREE.Vector3();
calcvec.x = Math.cos(heading.x / 180 * Math.PI ) * Math.cos(heading.y / 180 * Math.PI ) * heading.z;
calcvec.x = Number(calcvec.x.toFixed(6));
if (Math.sign(calcvec.x) == -1 && calcvec.x == 0) { calcvec.x=0; } // A dirty hack to fix negative zero situations.
calcvec.y = Math.sin(heading.x / 180 * Math.PI ) * Math.cos(heading.y / 180 * Math.PI ) * heading.z;
calcvec.y = Number(calcvec.y.toFixed(6));
if (Math.sign(calcvec.y) == -1 && calcvec.y == 0) { calcvec.y=0; } // A dirty hack to fix negative zero situations.
calcvec.z = Math.sin(heading.y / 180 * Math.PI) * heading.z;
calcvec.z = Number(calcvec.z.toFixed(6));
if (Math.sign(calcvec.z) == -1 && calcvec.z == 0) { calcvec.z=0; } // A dirty hack to fix negative zero situations.
var finalvec = new THREE.Vector3();
calcvec.add(startvec);
return calcvec;
}
function calcBestRoute(pointa,pointb) {
var route = [{}];
delete route['0']; // WTF? We shouldn't need to do this. I hate JS....
// Calculate direct route.
route['Direct'] = { 'stops': [{'name':pointb, 'gate': false, 'distance':calcDist(pointa,pointb)}], 'distance': calcDist(pointa, pointb)};
// Thats it! Direct is easy stuff
// Find route via stargate.
var distance_a = {};
var distance_b = {};
var viawormhole = {};
var distance_wb = {};
var near_a,near_b;
// Find gate closest to point a
jsonGate.forEach(function(name) { distance_a[name.name] = calcDist(pointa,name.name);});
var dist_a_sorted = Object.keys(distance_a).sort(function(a,b) {return distance_a[a]-distance_a[b]});
var near_a = dist_a_sorted[0];
// Find gate closest to point b
jsonGate.forEach(function(name) { distance_b[name.name] = calcDist(pointb,name.name) ;});
var dist_b_sorted = Object.keys(distance_b).sort(function(a,b) {return distance_b[a]-distance_b[b]});
var near_b = dist_b_sorted[0];
// Dump out right now if it's the same fucking gate.
if( near_a != near_b) {
// Assemble the gate travel plan. With our powers unite, we are shitty code!
gate_distance = distance_a[near_a] + distance_b[near_b];
route['Gate'] = {'stops': [{'name':near_a, 'gate':true, 'distance': calcDist(pointa,near_a)} ,{'name': near_b, 'gate': true, 'distance':0},{'name': pointb, 'gate':false, 'distance':calcDist(near_b,pointb)}], 'distance':gate_distance}
} // End gate work...
// Calculate wormhole route
// Qon does this by quadrant. Frey does this by brute force. The following may be really scary.
jsonWormhole.forEach(function(wh) { distance_wb[wh.enda.location] = calcDist(pointb,wh.enda.location); distance_wb[wh.endb.location] = calcDist(pointb,wh.endb.location); });
var dist_wb_sorted = Object.keys(distance_wb).sort(function(a,b) {return distance_wb[a]-distance_wb[b]});
var near_wb;
jsonWormhole.forEach(function(wh) {if(wh.enda.location == dist_wb_sorted[0]) { near_wb = wh.enda; } else if (wh.endb.location == dist_wb_sorted[0] ) {near_wb = wh.endb; } })
//var near_wb = dist_wb_sorted[0];
jsonWormhole.forEach(function(wh) {if(wh.enda.location == near_wb.location || wh.endb.location == near_wb.location) { viawormhole = wh } });
var via_wh_dista ={}
via_wh_dista["enda"] = calcDist(pointa,viawormhole.enda.location);
via_wh_dista["endb"] = calcDist(pointa,viawormhole.endb.location);
var via_wh_dista_sorted = Object.keys(via_wh_dista).sort(function(a,b) {return via_wh_dista[a]-via_wh_dista[b]});
var near_wa = viawormhole[via_wh_dista_sorted[0]];
// Build Wormhole route.
if(near_wa.location != near_wb.location ) {
var temproute_a = calcBestRoute(pointa,near_wa.location);
temproute_a['stops'][temproute_a['stops'].length-1]['gate'] = true;
temproute_a['stops'][temproute_a['stops'].length-1]['name'] = near_wa.displayname + "@" + near_wa.location;
temproute_a['stops'][temproute_a['stops'].length] = {'name': near_wa.oppsiteexit + "@" + near_wb.location, 'gate': true};
var temproute_b = calcBestRoute(near_wb.location,pointb);
var stops=temproute_a['stops'];
for (var obj in temproute_b['stops']) { stops[stops.length] = temproute_b['stops'][obj]}
stops.forEach(function(s, idx, array) {if(s.gate !=true && array[idx-1].gate !=true) { stops[idx].distance = calcDist(s.location,array[idx-1].location); }
else if(idx == 0) {stops[idx].distance = calcDist(pointa,s.name.split('@')[s.name.split('@').length-1] ); } else if(s.gate == true && array[idx-1].gate == true) {stops[idx].distance = 0;}
else if(stops[idx-1].name.split('@')[stops[idx-1].name.split('@').length-1] == s.name.split('@')[s.name.split('@').length-1]) {stops[idx].distance=0;}
else { stops[idx].distance = calcDist(stops[idx-1].name.split('@')[stops[idx-1].name.split('@').length-1],s.name.split('@')[s.name.split('@').length-1]); }});
var wh_dist = 0;
stops.forEach(function(s) { wh_dist += s.distance; });
route['Wormhole'] = {'stops': stops, 'distance':wh_dist}
}
// Sort all routes by distance traveled. Index of zero should be the fastest, in theory any way
var route_keys_sorted = Object.keys(route).sort(function(a,b) {return route[a].distance-route[b].distance});
return route[route_keys_sorted[0]];
}
function predictDestination(loc,heading,frame) {
removeEntity('arrow');
if(frame != "Galactic") {
var objFrame = grabPositionByName(frame);
} else {
var objFrame = new THREE.Vector3(0,0,0);
}
var adjLoc = loc.clone();
adjLoc = adjLoc.add(objFrame);
var headingvec = new THREE.Vector3(heading.x, heading.y, 300);
var farpoint = calcEndpointByHeading(headingvec,adjLoc);
drawline(adjLoc,farpoint);
var directionvector = farpoint.sub(adjLoc);
var ray = new THREE.Raycaster(adjLoc, directionvector.clone().normalize());
ray.precision = 100;
scene.updateMatrixWorld();
var intersects = ray.intersectObjects(scene.children,false);
var correctedintersections=[];
if (intersects[0]) {
intersects.forEach(function(obj) {
if (obj.object.geometry.boundingSphere.radius != 'undefined' && obj.object.geometry.boundingSphere.radius < 4 ) {
correctedintersections.push(obj.object.name);
}
});
return correctedintersections[0];
}
return "Unable to predict"
}
function boundingSphereGrab(name){
return scene.getObjectByName(name)
}
function findObjectInfo(name) {
var object = {};
var types = ["stations","planets","borders"];
types.forEach(function(type) {
for (var key in jsonEmpire) {
area=jsonEmpire[key];
for (var key2 in area[type]) {
if(escapeHTML(area[type][key2].name) == name) {
object = area[type][key2];
object.parent = jsonEmpire[key];
switch(type) {
case 'planets':
object.type = "Planet";
break;
case 'borders':
object.type = "Territory";
break;
case 'stations':
object.type = "Starbase/Base/Station";
break;
default:
object.type = "Currently Unknown"
}
}
}
}});
return object;
}

View File

@ -1,9 +0,0 @@
{
"red":"#f00",
"green":"#0f0",
"blue":"#00f",
"cyan":"#0ff",
"magenta":"#f0f",
"yellow":"#ff0",
"black":"#000"
}

View File

@ -1,383 +0,0 @@
(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.THREE_Text = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
'use strict';
var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })();
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
var fontHeightCache = {};
var CanvasText = (function () {
function CanvasText() {
_classCallCheck(this, CanvasText);
this.textWidth = null;
this.textHeight = null;
this.canvas = document.createElement('canvas');
this.ctx = this.canvas.getContext('2d');
}
_createClass(CanvasText, [{
key: 'drawText',
value: function drawText(text, ctxOptions) {
this.ctx.clearRect(0, 0, this.canvas.width, this.canvas.height);
this.ctx.font = ctxOptions.font;
this.textWidth = Math.ceil(this.ctx.measureText(text).width);
this.textHeight = getFontHeight(this.ctx.font);
this.canvas.width = THREE.Math.nextPowerOfTwo(this.textWidth);
this.canvas.height = THREE.Math.nextPowerOfTwo(this.textHeight);
this.ctx.font = ctxOptions.font;
this.ctx.fillStyle = ctxOptions.fillStyle;
this.ctx.textAlign = 'left';
this.ctx.textBaseline = 'top';
this.ctx.fillText(text, 0, 0);
return this.canvas;
}
}, {
key: 'width',
get: function get() {
return this.canvas.width;
}
}, {
key: 'height',
get: function get() {
return this.canvas.height;
}
}]);
return CanvasText;
})();
function getFontHeight(fontStyle) {
var result = fontHeightCache[fontStyle];
if (!result) {
var body = document.getElementsByTagName('body')[0];
var dummy = document.createElement('div');
var dummyText = document.createTextNode('MÉq');
dummy.appendChild(dummyText);
dummy.setAttribute('style', 'font:' + fontStyle + ';position:absolute;top:0;left:0');
body.appendChild(dummy);
result = dummy.offsetHeight;
fontHeightCache[fontStyle] = result;
body.removeChild(dummy);
}
return result;
}
module.exports = CanvasText;
},{}],2:[function(require,module,exports){
'use strict';
var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })();
function _typeof(obj) { return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
var textAlign = require('./textAlign'),
CanvasText = require('./CanvasText');
var SpriteText2D = (function (_THREE$Object3D) {
_inherits(SpriteText2D, _THREE$Object3D);
function SpriteText2D() {
var text = arguments.length <= 0 || arguments[0] === undefined ? '' : arguments[0];
var options = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1];
_classCallCheck(this, SpriteText2D);
var _this = _possibleConstructorReturn(this, Object.getPrototypeOf(SpriteText2D).call(this));
_this._font = options.font || '30px Arial';
_this._fillStyle = options.fillStyle || '#FFFFFF';
_this.canvas = new CanvasText();
_this.align = options.align || textAlign.center;
// this._textAlign = options.align || "center"
// this.anchor = Label.fontAlignAnchor[ this._textAlign ]
_this.antialias = _typeof(options.antialias === "undefined") ? true : options.antialias;
_this.text = text;
return _this;
}
_createClass(SpriteText2D, [{
key: 'updateText',
value: function updateText() {
this.canvas.drawText(this._text, {
font: this._font,
fillStyle: this._fillStyle
});
// cleanup previous texture
this.cleanUp();
this.texture = new THREE.Texture(this.canvas.canvas);
this.texture.needsUpdate = true;
this.applyAntiAlias();
if (!this.material) {
this.material = new THREE.SpriteMaterial({ map: this.texture });
} else {
this.material.map = this.texture;
}
if (!this.sprite) {
this.sprite = new THREE.Sprite(this.material);
this.geometry = this.sprite.geometry;
this.add(this.sprite);
}
this.sprite.scale.set(this.canvas.width, this.canvas.height, 1);
this.sprite.position.x = this.canvas.width / 2 - this.canvas.textWidth / 2 + this.canvas.textWidth / 2 * this.align.x;
this.sprite.position.y = -this.canvas.height / 2 + this.canvas.textHeight / 2 * this.align.y;
}
}, {
key: 'cleanUp',
value: function cleanUp() {
if (this.texture) {
this.texture.dispose();
}
}
}, {
key: 'applyAntiAlias',
value: function applyAntiAlias() {
if (this.antialias === false) {
this.texture.magFilter = THREE.NearestFilter;
this.texture.minFilter = THREE.LinearMipMapLinearFilter;
}
}
}, {
key: 'width',
get: function get() {
return this.canvas.textWidth;
}
}, {
key: 'height',
get: function get() {
return this.canvas.textHeight;
}
}, {
key: 'text',
get: function get() {
return this._text;
},
set: function set(value) {
if (this._text !== value) {
this._text = value;
this.updateText();
}
}
}, {
key: 'font',
get: function get() {
return this._font;
},
set: function set(value) {
if (this._font !== value) {
this._font = value;
this.updateText();
}
}
}, {
key: 'fillStyle',
get: function get() {
return this._fillStyle;
},
set: function set(value) {
if (this._fillStyle !== value) {
this._fillStyle = value;
this.updateText();
}
}
}]);
return SpriteText2D;
})(THREE.Object3D);
module.exports = SpriteText2D;
},{"./CanvasText":1,"./textAlign":5}],3:[function(require,module,exports){
'use strict';
var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })();
function _typeof(obj) { return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
var textAlign = require('./textAlign'),
CanvasText = require('./CanvasText');
var Text2D = (function (_THREE$Object3D) {
_inherits(Text2D, _THREE$Object3D);
function Text2D() {
var text = arguments.length <= 0 || arguments[0] === undefined ? '' : arguments[0];
var options = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1];
_classCallCheck(this, Text2D);
var _this = _possibleConstructorReturn(this, Object.getPrototypeOf(Text2D).call(this));
_this._font = options.font || '30px Arial';
_this._fillStyle = options.fillStyle || '#FFFFFF';
_this.canvas = new CanvasText();
_this.align = options.align || textAlign.center;
_this.side = options.side || THREE.DoubleSide;
// this._textAlign = options.align || "center"
// this.anchor = Label.fontAlignAnchor[ this._textAlign ]
_this.antialias = _typeof(options.antialias === "undefined") ? true : options.antialias;
_this.text = text;
return _this;
}
_createClass(Text2D, [{
key: 'updateText',
value: function updateText() {
this.cleanUp(); // cleanup previous texture
this.canvas.drawText(this._text, {
font: this._font,
fillStyle: this._fillStyle
});
this.texture = new THREE.Texture(this.canvas.canvas);
this.texture.needsUpdate = true;
this.applyAntiAlias();
if (!this.material) {
this.material = new THREE.MeshBasicMaterial({ map: this.texture, side: this.side });
this.material.transparent = true;
} else {
this.material.map = this.texture;
}
if (!this.mesh) {
this.mesh = new THREE.Mesh(new THREE.PlaneGeometry(this.canvas.width, this.canvas.height), this.material);
this.geometry = this.mesh.geometry;
this.add(this.mesh);
}
this.mesh.position.x = this.canvas.width / 2 - this.canvas.textWidth / 2 + this.canvas.textWidth / 2 * this.align.x;
this.mesh.position.y = -this.canvas.height / 2 + this.canvas.textHeight / 2 * this.align.y;
// manually update geometry vertices
this.geometry.vertices[0].x = this.geometry.vertices[2].x = -this.canvas.width / 2;
this.geometry.vertices[1].x = this.geometry.vertices[3].x = this.canvas.width / 2;
this.geometry.vertices[0].y = this.geometry.vertices[1].y = this.canvas.height / 2;
this.geometry.vertices[2].y = this.geometry.vertices[3].y = -this.canvas.height / 2;
this.geometry.verticesNeedUpdate = true;
}
}, {
key: 'cleanUp',
value: function cleanUp() {
if (this.texture) {
this.texture.dispose();
}
}
}, {
key: 'applyAntiAlias',
value: function applyAntiAlias() {
if (this.antialias === false) {
this.texture.magFilter = THREE.NearestFilter;
this.texture.minFilter = THREE.LinearMipMapLinearFilter;
}
}
}, {
key: 'width',
get: function get() {
return this.canvas.textWidth;
}
}, {
key: 'height',
get: function get() {
return this.canvas.textHeight;
}
}, {
key: 'text',
get: function get() {
return this._text;
},
set: function set(value) {
if (this._text !== value) {
this._text = value;
this.updateText();
}
}
}, {
key: 'font',
get: function get() {
return this._font;
},
set: function set(value) {
if (this._font !== value) {
this._font = value;
this.updateText();
}
}
}, {
key: 'fillStyle',
get: function get() {
return this._fillStyle;
},
set: function set(value) {
if (this._fillStyle !== value) {
this._fillStyle = value;
this.updateText();
}
}
}]);
return Text2D;
})(THREE.Object3D);
module.exports = Text2D;
},{"./CanvasText":1,"./textAlign":5}],4:[function(require,module,exports){
'use strict';
module.exports.SpriteText2D = require('./SpriteText2D');
module.exports.Text2D = require('./Text2D');
module.exports.textAlign = require('./textAlign');
},{"./SpriteText2D":2,"./Text2D":3,"./textAlign":5}],5:[function(require,module,exports){
"use strict";
module.exports = {
center: new THREE.Vector2(0, 0),
left: new THREE.Vector2(1, 0),
topLeft: new THREE.Vector2(1, -1),
topRight: new THREE.Vector2(-1, -1),
right: new THREE.Vector2(-1, 0),
bottomLeft: new THREE.Vector2(1, 1),
bottomRight: new THREE.Vector2(-1, 1)
};
},{}]},{},[4])(4)
});

41871
js/three.js

File diff suppressed because one or more lines are too long

View File

@ -1,985 +0,0 @@
//////////////////////////////////////////////////////////////////
// WebSockClient for PennMUSH
// There is no license. Just make a neato game with it.
//////////////////////////////////////////////////////////////////
var WSClient = (function (window, document, undefined) {
//////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////
// MU* protocol carried over the WebSocket API.
function Connection(url) {
var that = this;
this.url = url;
this.socket = null;
this.isOpen = false;
Connection.reconnect(that);
}
Connection.CHANNEL_TEXT = 't';
Connection.CHANNEL_JSON = 'j';
Connection.CHANNEL_HTML = 'h';
Connection.CHANNEL_PUEBLO = 'p';
Connection.CHANNEL_PROMPT = '>';
Connection.reconnect = function (that) {
that.reconnect();
};
Connection.onopen = function (that, evt) {
that.isOpen = true;
that.onOpen && that.onOpen(evt);
};
Connection.onerror = function (that, evt) {
that.onError && that.onError(evt);
};
Connection.onclose = function (that, evt) {
that.onClose && that.onClose(evt);
};
Connection.onmessage = function (that, evt) {
that.onMessage && that.onMessage(evt.data[0], evt.data.substring(1));
};
Connection.prototype.reconnect = function () {
var that = this;
// quit the old connection, if we have one
if (this.socket) {
var old = this.socket;
this.sendText('QUIT');
setTimeout(old.close, 1000);
}
this.socket = new window.WebSocket(this.url);
this.isOpen = false;
this.socket.onopen = function (evt) {
Connection.onopen(that, evt);
};
this.socket.onerror = function (evt) {
Connection.onerror(that, evt);
};
this.socket.onclose = function (evt) {
Connection.onclose(that, evt);
};
this.socket.onmessage = function (evt) {
Connection.onmessage(that, evt);
};
};
Connection.prototype.isConnected = function() {
return (this.socket && this.isOpen && (this.socket.readyState === 1));
};
Connection.prototype.close = function () {
this.socket && this.socket.close();
};
Connection.prototype.sendText = function (data) {
this.isConnected() && this.socket.send(Connection.CHANNEL_TEXT + data + '\r\n');
};
Connection.prototype.sendObject = function (data) {
this.isConnected() && this.socket.send(Connection.CHANNEL_JSON + window.JSON.stringify(data));
};
Connection.prototype.onOpen = null;
Connection.prototype.onError = null;
Connection.prototype.onClose = null;
Connection.prototype.onMessage = function (channel, data) {
switch (channel) {
case Connection.CHANNEL_TEXT:
this.onText && this.onText(data);
break;
case Connection.CHANNEL_JSON:
this.onObject && this.onObject(window.JSON.parse(data));
break;
case Connection.CHANNEL_HTML:
if (this.onHTML) {
var div = document.createElement('div');
div.innerHTML = data;
var fragment = document.createDocumentFragment();
for (var child = div.firstChild; child; child = child.nextSibling) {
fragment.appendChild(child);
}
this.onHTML(fragment);
}
break;
case Connection.CHANNEL_PUEBLO:
if (this.onPueblo) {
var tag, attrs;
var idx = data.indexOf(' ');
if (idx !== -1) {
tag = data.substring(0, idx);
attrs = data.substring(idx + 1);
} else {
tag = data;
attrs = '';
}
this.onPueblo(tag.toUpperCase(), attrs);
}
break;
case Connection.CHANNEL_PROMPT:
this.onPrompt && this.onPrompt(data);
break;
default:
window.console && window.console.log('unhandled message', channel, data);
return false;
}
return true;
};
Connection.prototype.onText = null;
Connection.prototype.onObject = null;
Connection.prototype.onHTML = null;
Connection.prototype.onPueblo = null;
Connection.prototype.onPrompt = null;
//////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////
// MU* terminal emulator.
function Terminal(root) {
this.root = root;
this.clear();
}
Terminal.PARSE_PLAIN = 0;
Terminal.PARSE_CR = 1;
Terminal.PARSE_ESC1 = 2;
Terminal.PARSE_ESC2 = 3;
Terminal.ANSI_NORMAL = 0;
Terminal.ANSI_BRIGHT = 1;
Terminal.ANSI_UNDERLINE = 4;
Terminal.ANSI_BLINK = 5;
Terminal.ANSI_INVERSE = 7;
Terminal.ANSI_XTERM_FG = 38;
Terminal.ANSI_XTERM_BG = 48;
Terminal.DEFAULT_FG = 37;
Terminal.DEFAULT_BG = 30;
Terminal.UNCLOSED_TAGS = ['area', 'base', 'br', 'col', 'command', 'embed', 'hr', 'img',
'input', 'keygen', 'link', 'menuitem', 'meta', 'param', 'source', 'track', 'wbr'];
/////////////////////////////////////////////////////
// ansi parsing routines
Terminal.encodeState = function (state) {
if (!state) {
return '';
}
var classes = [];
if (state[Terminal.ANSI_INVERSE]) {
var value = state.fg;
state.fg = state.bg;
state.bg = value;
value = state.fg256;
state.fg256 = state.bg256;
state.bg256 = value;
}
var fg = state.fg;
var bg = state.bg;
if (state[Terminal.ANSI_UNDERLINE]) {
classes[classes.length] = 'ansi-' + Terminal.ANSI_UNDERLINE;
}
// make sure to avoid conflict with XTERM256 color's usage of blink (code 5)
if (state.fg256) {
classes[classes.length] = 'ansi-38-5-' + state.fg;
} else {
if (state[Terminal.ANSI_BRIGHT]) {
if (state[Terminal.ANSI_INVERSE]) {
if (fg !== Terminal.DEFAULT_FG) {
classes[classes.length] = 'ansi-' + fg;
}
} else {
classes[classes.length] = 'ansi-1-' + fg;
}
} else if (fg !== Terminal.DEFAULT_FG) {
classes[classes.length] = 'ansi-' + fg;
}
}
if (state.bg256) {
classes[classes.length] = 'ansi-48-5-' + state.bg;
} else {
if (state[Terminal.ANSI_BRIGHT]) {
if (state[Terminal.ANSI_INVERSE]) {
classes[classes.length] = 'ansi-1-' + (bg + 10);
} else {
if (bg !== Terminal.DEFAULT_BG) {
classes[classes.length] = 'ansi-' + (bg + 10);
}
}
} else if (bg !== Terminal.DEFAULT_BG) {
classes[classes.length] = 'ansi-' + (bg + 10);
}
}
if (state[Terminal.ANSI_BLINK] && !(state.fg256 || state.bg256)) {
classes[classes.length] = 'ansi-' + Terminal.ANSI_BLINK;
}
return classes.join(' ');
};
Terminal.prototype.getANSI = function () {
if (!this.ansiState) {
this.ansiState = {
fg: Terminal.DEFAULT_FG,
bg: Terminal.DEFAULT_BG,
fg256: false,
bg256: false
};
}
return this.ansiState;
};
Terminal.prototype.applyANSI = function (ansi) {
switch (ansi.charCodeAt(ansi.length - 1)) {
case 109: // m (SGR)
var codes = ansi.substring(0, ansi.length - 1).split(';');
var value, state;
for (var ii = 0; (value = codes[ii]) !== undefined; ++ii) {
if (value.length === 0) {
// Empty is treated as the equivalent of 0.
value = Terminal.ANSI_NORMAL;
} else {
value = parseInt(value);
}
state = this.getANSI();
// check for xterm256 fg/bg first, fallback to standard codes otherwise
if (state[Terminal.ANSI_XTERM_FG] && state[Terminal.ANSI_BLINK]) {
if (value >= 0 && value <= 255) {
state.fg = value;
state.fg256 = true;
state[Terminal.ANSI_XTERM_FG] = false;
state[Terminal.ANSI_BLINK] = false;
} else {
// invalid xterm256, let's reset the ansi state due to bad codes
this.ansiState = null;
}
} else if (state[Terminal.ANSI_XTERM_BG] && state[Terminal.ANSI_BLINK]) {
if (value >= 0 && value <= 255) {
state.bg = value;
state.bg256 = true;
state[Terminal.ANSI_XTERM_BG] = false;
state[Terminal.ANSI_BLINK] = false;
} else {
// invalid xterm256, let's reset the ansi state due to bad codes
this.ansiState = null;
}
} else {
// detect regular ansi codes
switch (value) {
case Terminal.ANSI_NORMAL: // reset
this.ansiState = null;
break;
case Terminal.ANSI_BRIGHT:
case Terminal.ANSI_UNDERLINE:
case Terminal.ANSI_BLINK:
case Terminal.ANSI_INVERSE:
case Terminal.ANSI_XTERM_FG:
case Terminal.ANSI_XTERM_BG:
state[value] = true;
break;
default:
if (30 <= value && value <= 37) {
state.fg = value;
} else if (40 <= value && value <= 47) {
state.bg = value - 10;
}
break;
}
}
this.ansiDirty = true;
}
break;
}
};
Terminal.prototype.write = function (value, start, end) {
if (start === end) {
return;
}
if (this.ansiDirty) {
var next = Terminal.encodeState(this.ansiState);
if (this.ansiClass !== next) {
this.ansiClass = next;
this.span = null;
}
this.ansiDirty = false;
}
if (this.ansiClass && !this.span) {
this.span = document.createElement('span');
this.span.className = this.ansiClass;
this.stack[this.stack.length - 1].appendChild(this.span);
}
var text = document.createTextNode(value.substring(start, end));
this.lineBuf[this.lineBuf.length] = text;
this.appendHTML(text);
};
Terminal.prototype.endLine = function () {
var that = this;
this.onLine && this.onLine(that, this.lineBuf);
this.write('\n', 0, 1);
this.lineBuf.length = 0;
};
Terminal.prototype.abortParse = function (value, start, end) {
switch (this.state) {
case Terminal.PARSE_PLAIN:
this.write(value, start, end);
break;
case Terminal.PARSE_ESC1:
this.write('\u001B', 0, 1);
break;
case Terminal.PARSE_ESC2:
this.write('\u001B[', 0, 2);
this.write(this.parseBuf, 0, this.parseBuf.length);
this.parseBuf = '';
break;
}
};
/////////////////////////////////////////////////////
// message appending routines
// appends a text string to the terminal, parsing ansi escape codes into html/css
Terminal.prototype.appendText = function (data) {
var start = 0;
// Scan for sequence start characters.
// TODO: Could scan with RegExp; not convinced sufficiently simpler/faster.
for (var ii = 0, ilen = data.length; ii < ilen; ++ii) {
var ch = data.charCodeAt(ii);
// Resynchronize at special characters.
switch (ch) {
case 10: // newline
if (this.state !== Terminal.PARSE_CR) {
this.abortParse(data, start, ii);
this.endLine();
}
start = ii + 1;
this.state = Terminal.PARSE_PLAIN;
continue;
case 13: // carriage return
this.abortParse(data, start, ii);
this.endLine();
start = ii + 1;
this.state = Terminal.PARSE_CR;
continue;
case 27: // escape
this.abortParse(data, start, ii);
start = ii + 1;
this.state = Terminal.PARSE_ESC1;
continue;
}
// Parse other characters.
switch (this.state) {
case Terminal.PARSE_CR:
this.state = Terminal.PARSE_PLAIN;
break;
case Terminal.PARSE_ESC1:
if (ch === 91) {
// Start of escape sequence (\e[).
start = ii + 1;
this.state = Terminal.PARSE_ESC2;
} else {
// Not an escape sequence.
this.abortParse(data, start, ii);
start = ii;
this.state = Terminal.PARSE_PLAIN;
}
break;
case Terminal.PARSE_ESC2:
if (64 <= ch && ch <= 126) {
// End of escape sequence.
this.parseBuf += data.substring(start, (start = ii + 1));
this.applyANSI(this.parseBuf);
this.parseBuf = '';
this.state = Terminal.PARSE_PLAIN;
}
break;
}
}
// Handle tail.
switch (this.state) {
case Terminal.PARSE_PLAIN:
this.write(data, start, data.length);
break;
case Terminal.PARSE_ESC2:
this.parseBuf += data.substring(start);
break;
}
};
// append an HTML fragment to the terminal
Terminal.prototype.appendHTML = function (fragment) {
(this.span || this.stack[this.stack.length - 1]).appendChild(fragment);
// TODO: May want to animate this, to make it less abrupt.
this.root.scrollTop = this.root.scrollHeight;
};
// append a log message to the terminal
Terminal.prototype.appendMessage = function (classid, message) {
var div = document.createElement('div');
div.className = classid;
// create a text node to safely append the string without rendering code
var text = document.createTextNode(message);
div.appendChild(text);
this.appendHTML(div);
};
// push a new html element onto the stack
Terminal.prototype.pushElement = function (element) {
this.span = null;
this.stack[this.stack.length - 1].appendChild(element);
this.stack[this.stack.length] = element;
};
// remove 1 level from the stack, check consistency
Terminal.prototype.popElement = function () {
this.span = null;
if (this.stack.length > 1) {
--this.stack.length;
} else {
window.console && window.console.warn('element stack underflow');
}
};
// append a pueblo tag to the terminal stack (or pop if an end tag)
Terminal.prototype.appendPueblo = function (tag, attrs) {
var html = '<' + tag + (attrs ? ' ' : '') + attrs + '>';
var start;
if (tag[0] !== '/') {
start = true;
} else {
start = false;
tag = tag.substring(1);
}
var selfClosing = false;
if ((tag.substring(-1) === '/') || (attrs.substring(-1) === '/')) {
selfClosing = true;
}
if (Terminal.UNCLOSED_TAGS.indexOf(tag.toLowerCase()) > -1) {
selfClosing = true;
}
if ((tag === 'XCH_PAGE') ||
((tag === 'IMG') && (attrs.search(/xch_graph=(("[^"]*")|('[^']*')|([^\s]*))/i) !== -1))) {
//console.log("unhandled pueblo", html);
return;
}
// we have a starting <tag> (not </tag>)
if (start) {
var div = document.createElement('div');
html = html.replace(
/xch_graph=(("[^"]*")|('[^']*')|([^\s]*))/i,
''
);
html = html.replace(
/xch_mode=(("[^"]*")|('[^']*')|([^\s]*))/i,
''
);
html = html.replace(
/xch_hint="([^"]*)"/i,
'title="$1"'
);
div.innerHTML = html.replace(
/xch_cmd="([^"]*)"/i,
"onClick='this.onCommand(&quot;$1&quot;)'"
);
div.firstChild.onCommand = this.onCommand;
div.setAttribute('target', '_blank');
// add this tag to the stack to keep track of nested elements
this.pushElement(div.firstChild);
// automatically pop the tag if it is self closing
if (selfClosing) {
this.popElement();
}
} else {
// we have an ending </tag> so remove the closed tag from the stack
// don't bother for self closing tags with an explicit end tag, we already popped them
if (!selfClosing) {
this.popElement();
}
}
};
Terminal.prototype.clear = function() {
this.root.innerHTML = '';
this.stack = [this.root];
this.state = Terminal.PARSE_PLAIN;
this.line = null;
this.lineBuf = [];
this.span = null;
this.parseBuf = '';
this.ansiClass = '';
this.ansiState = null;
this.ansiDirty = false;
};
// setup the pueblo xch_cmd callback
Terminal.prototype.onCommand = null;
//////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////
// User input handler (command history, callback events)
function UserInput(root) {
var that = this;
this.root = root;
this.history = [];
this.ncommand = 0;
this.save_current = '';
this.current = -1;
this.root.onkeydown = function(evt) {
UserInput.onkeydown(that, evt);
};
this.root.onkeyup = function(evt) {
UserInput.onkeyup(that, evt);
};
}
// passthrough to the local onKeyDown callback
UserInput.onkeydown = function(that, evt) {
that.onKeyDown && that.onKeyDown(evt);
};
// passthrough to the local onKeyUp callback
UserInput.onkeyup = function(that, evt) {
that.onKeyUp && that.onKeyUp(evt);
};
// set the default onKeyDown handler
UserInput.prototype.onKeyDown = function(e) {
PressKey(this, e);
};
// set the default onKeyUp handler
UserInput.prototype.onKeyUp = function(e) {
ReleaseKey(this, e);
};
UserInput.prototype.onEnter = null;
UserInput.prototype.onEscape = null;
// push a command onto the history list and clear the input box
UserInput.prototype.saveCommand = function() {
if (this.root.value !== '') {
this.history[this.ncommand] = this.root.value;
this.ncommand++;
this.save_current = '';
this.current = -1;
this.root.value = '';
}
};
// cycle the history backward
UserInput.prototype.cycleBackward = function() {
// save the current entry in case we come back
if (this.current < 0) {
this.save_current = this.root.value;
}
// cycle command history backward
if (this.current < this.ncommand - 1) {
this.current++;
this.root.value = this.history[this.ncommand - this.current - 1];
}
};
// cycle the history forward
UserInput.prototype.cycleForward = function () {
// cycle command history forward
if (this.current > 0) {
this.current--;
this.root.value = this.history[this.ncommand - this.current - 1];
} else if (this.current === 0) {
// recall the current entry if they had typed something already
this.current = -1;
this.root.value = this.save_current;
}
};
// move the input cursor to the end of the input elements current text
UserInput.prototype.moveCursor = function() {
if (typeof this.root.selectionStart === "number") {
this.root.selectionStart = this.root.selectionEnd = this.root.value.length;
} else if (typeof this.root.createTextRange !== "undefined") {
this.focus();
var range = this.root.createTextRange();
range.collapse(false);
range.select();
}
};
// clear the current input text
UserInput.prototype.clear = function() {
this.root.value = '';
};
// get the current text in the input box
UserInput.prototype.value = function() {
return this.root.value;
};
// refocus the input box
UserInput.prototype.focus = function() {
this.root.focus();
};
// user-defined keys for command history
UserInput.prototype.keyCycleForward = null;
UserInput.prototype.keyCycleBackward = null;
UserInput.isKeyCycleForward = function(that, key) {
if (that && that.keyCycleForward) {
return that.keyCycleForward(key);
} else {
// default key is ctrl+n
return (key.code === 78 && key.ctrl);
}
};
UserInput.isKeyCycleBackward = function (that, key) {
if (that && that.keyCycleBackward) {
return that.keyCycleBackward(key);
} else {
// default key is ctrl+p
return (key.code === 80 && key.ctrl);
}
};
//////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////
// some string helper functions for replacing links and user input tokens
// Example onLine() handler that linkifies URLs in text.
function LinkHandler(that, lineBuf) {
// Merge text so we can scan it.
if (!lineBuf.length) {
return;
}
var line = '';
for (var ii = 0, ilen = lineBuf.length; ii < ilen; ++ii) {
line += lineBuf[ii].nodeValue;
}
// Scan the merged text for links.
var links = LinkHandler.scan(line);
if (!links.length) {
return;
}
// Find the start and end text nodes.
var nodeIdx = 0, nodeStart = 0, nodeEnd = lineBuf[0].nodeValue.length;
for (var ii = 0, ilen = links.length; ii < ilen; ++ii) {
var info = links[ii], startOff, startNode, endOff, endNode;
while (nodeEnd <= info.start) {
nodeStart = nodeEnd;
nodeEnd += lineBuf[++nodeIdx].nodeValue.length;
}
startOff = info.start - nodeStart;
startNode = lineBuf[nodeIdx];
while (nodeEnd < info.end) {
nodeStart = nodeEnd;
nodeEnd += lineBuf[++nodeIdx].nodeValue.length;
}
endOff = info.end - nodeStart;
endNode = lineBuf[nodeIdx];
// Wrap the link text.
// TODO: In this version, we won't try to cross text nodes.
// TODO: Discard any text nodes that are already part of links?
if (startNode !== endNode) {
window.console && window.console.warn('link', info);
continue;
}
lineBuf[nodeIdx] = endNode.splitText(endOff);
nodeStart += endOff;
var middleNode = startNode.splitText(startOff);
var anchor = document.createElement('a');
middleNode.parentNode.replaceChild(anchor, middleNode);
anchor.target = '_blank';
if (info.url === '' && info.xch_cmd !== '') {
anchor.setAttribute('onClick', 'this.onCommand("'+info.xch_cmd+'");');
anchor.onCommand = that.onCommand;
} else {
anchor.href = info.url;
}
anchor.appendChild(middleNode);
}
}
// Link scanner function.
// TODO: Customizers may want to replace this, since regular expressions
// ultimately limit how clever our heuristics can be.
LinkHandler.scan = function (line) {
var links = [], result;
LinkHandler.regex.lastIndex = 0;
while ((result = LinkHandler.regex.exec(line))) {
var info = {};
info.start = result.index + result[1].length;
info.xch_cmd = '';
if (result[2]) {
result = result[2];
info.url = result;
} else if (result[3]) {
result = result[3];
info.url = 'mailto:' + result;
} else if (result[4]) {
result = result[4];
info.url = '';
info.xch_cmd = 'help ' + result;
info.className = "ansi-1-37";
}
info.end = info.start + result.length;
links[links.length] = info;
}
return links;
};
// LinkHandler regex:
//
// 1. Links must be preceded by a non-alphanumeric delimiter.
// 2. Links are matched greedily.
// 3. URLs must start with a supported scheme.
// 4. E-mail addresses are also linkified.
// 5. Twitter users and hash tags are also linkified.
//
// TODO: This can be improved (but also customized). One enhancement might be
// to support internationalized syntax.
LinkHandler.regex = /(^|[^a-zA-Z0-9]+)(?:((?:http|https):\/\/[-a-zA-Z0-9_.~:\/?#[\]@!$&'()*+,;=%]+)|([-.+a-zA-Z0-9_]+@[-a-zA-Z0-9]+(?:\.[-a-zA-Z0-9]+)+)|(@[a-zA-Z]\w*))/g;
// set the default line handler for the terminal to use the LinkHandler
Terminal.prototype.onLine = LinkHandler;
// detect if more user input is required for a pueblo command
function ReplaceToken(command) {
var cmd = command;
var regex = /\?\?/;
// check for the search token '??'
if (cmd.search(regex) !== -1) {
var val = prompt(command);
if (val === null) {
// user cancelled the prompt, don't send any command
cmd = '';
} else {
// replace the ?? token with the prompt value
cmd = cmd.replace(regex, val);
}
}
return cmd;
};
//////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////
// default handler for key press events
function PressKey(that, e) {
var key = { code: (e.keyCode ? e.keyCode : e.which),
ctrl: e.ctrlKey,
shift: e.shiftKey,
alt: e.altKey };
var prevent = true;
if (UserInput.isKeyCycleBackward(that, key)) {
// cycle history backward
that.cycleBackward();
} else if (UserInput.isKeyCycleForward(that, key)) {
// cycle history forward
that.cycleForward();
} else if (key.code === 13) {
// enter key
// save the command string and clear the input box
var cmd = that.root.value;
that.saveCommand();
// pass through to the local callback for sending data
that.onEnter && that.onEnter(cmd);
} else if (key.code === 27) {
// pass through to the local callback for the escape key
that.onEscape && that.onEscape();
} else {
// didn't capture anything, pass it through
prevent = false;
}
if (prevent) {
e.preventDefault();
}
// make sure input retains focus
that.focus();
};
// default handler for key release events
function ReleaseKey(that, e) {
var key = { code: (e.keyCode ? e.keyCode : e.which),
ctrl: e.ctrlKey,
shift: e.shiftKey,
alt: e.altKey };
if (UserInput.isKeyCycleBackward(that, key) ||
UserInput.isKeyCycleForward(that, key)) {
// move the cursor to end of the input text after a history change
that.moveCursor();
}
};
//////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////
// Module exports.
var exports = {};
// open a websocket connection to url
exports.connect = function (url) {
return new Connection(url);
};
// create a terminal emulator that appends output to root
exports.output = function (root) {
return new Terminal(root);
};
// create an input handler that saves and recalls command history
exports.input = function (root) {
return new UserInput(root);
};
// default key event callback handlers
exports.pressKey = PressKey;
exports.releaseKey = ReleaseKey;
// helper for replacing ?? in string with user input
exports.parseCommand = ReplaceToken;
// export the LinkHandler just in case it's useful elsewhere
exports.parseLinks = LinkHandler;
return exports;
})(window, document);

12
mapview/webviewgl.htm Normal file
View File

@ -0,0 +1,12 @@
<!doctype html>
<html>
<head>
<meta http-equiv="refresh" content="0; url=http://zen.trekmush.org/ats/webglmapview/index.htm" />
</head>
<body>
It moved to: <a href="http://zen.trekmush.org/ats/webglmapview/index.htm">here</a>
</body>
</html>

6
params.json Normal file
View File

@ -0,0 +1,6 @@
{
"name": "Webglmapview",
"tagline": "A webGL MapVew alternative for ATSTrekMUSH (A Star Trek themed, text based game)",
"body": "# Mapview WebGL\r\n\r\n## Introduction\r\nThis is an attempt to throw together a webGL version of the Mapview program (located [here](http://atsnavmap.startreklover.com/)) so that folks that have a Mac or other Non-Windows machine can still have a map of the game. \r\n\r\nThis is project is by no means official or complete. It is simply ment as a POC at this point. If there is enough interest in this game-side I may continue to develop it to be a fairly complete alternative to the MapView software. \r\n\r\n\r\n\r\n## Contributing & Comments\r\n\r\nFeel free. I am not a JS developer by any stretch (no really, just look at the code. Frightning) so any desire to contribute or any desire to blast me and call me an idiot for doing X, Y or Z, go for it. I'm only trying to learn. \r\n\r\n\r\n",
"note": "Don't delete this file! It's used internally to help with page regeneration."
}

View File

@ -1,567 +0,0 @@
/******************************************/
/** ANSI Colors **/
/* underlined text */
.ansi-4 { text-decoration: underline; }
/* blinking text */
.ansi-5 {
-webkit-animation: blink .75s linear infinite;
-moz-animation: blink .75s linear infinite;
-ms-animation: blink .75s linear infinite;
-o-animation: blink .75s linear infinite;
animation: blink .75s linear infinite;
}
/* standard 16 foreground colors */
.ansi-30 { color: black; }
.ansi-1-30 { color: gray; }
.ansi-31 { color: maroon; }
.ansi-1-31 { color: red; }
.ansi-32 { color: green; }
.ansi-1-32 { color: lime; }
.ansi-33 { color: olive; }
.ansi-1-33 { color: yellow; }
.ansi-34 { color: navy; }
.ansi-1-34 { color: blue; }
.ansi-35 { color: purple; }
.ansi-1-35 { color: fuchsia; }
.ansi-36 { color: teal; }
.ansi-1-36 { color: aqua; }
.ansi-37 { color: silver; }
.ansi-1-37 { color: white; }
/* standard 16 background colors */
.ansi-40 { background-color: black; }
.ansi-1-40 { background-color: gray; }
.ansi-41 { background-color: maroon; }
.ansi-1-41 { background-color: red; }
.ansi-42 { background-color: green; }
.ansi-1-42 { background-color: lime; }
.ansi-43 { background-color: olive; }
.ansi-1-43 { background-color: yellow; }
.ansi-44 { background-color: navy; }
.ansi-1-44 { background-color: blue; }
.ansi-45 { background-color: purple; }
.ansi-1-45 { background-color: fuchsia; }
.ansi-46 { background-color: teal; }
.ansi-1-46 { background-color: aqua; }
.ansi-47 { background-color: silver; }
.ansi-1-47 { background-color: white; }
/* xterm256 foreground colors */
.ansi-38-5-0 { color: #000000; }
.ansi-38-5-1 { color: #800000; }
.ansi-38-5-2 { color: #008000; }
.ansi-38-5-3 { color: #808000; }
.ansi-38-5-4 { color: #000080; }
.ansi-38-5-5 { color: #800080; }
.ansi-38-5-6 { color: #008080; }
.ansi-38-5-7 { color: #c0c0c0; }
.ansi-38-5-8 { color: #808080; }
.ansi-38-5-9 { color: #ff0000; }
.ansi-38-5-10 { color: #00ff00; }
.ansi-38-5-11 { color: #ffff00; }
.ansi-38-5-12 { color: #0000ff; }
.ansi-38-5-13 { color: #ff00ff; }
.ansi-38-5-14 { color: #00ffff; }
.ansi-38-5-15 { color: #ffffff; }
.ansi-38-5-16 { color: #000000; }
.ansi-38-5-17 { color: #00005f; }
.ansi-38-5-18 { color: #000087; }
.ansi-38-5-19 { color: #0000af; }
.ansi-38-5-20 { color: #0000d7; }
.ansi-38-5-21 { color: #0000ff; }
.ansi-38-5-22 { color: #005f00; }
.ansi-38-5-23 { color: #005f5f; }
.ansi-38-5-24 { color: #005f87; }
.ansi-38-5-25 { color: #005faf; }
.ansi-38-5-26 { color: #005fd7; }
.ansi-38-5-27 { color: #005fff; }
.ansi-38-5-28 { color: #008700; }
.ansi-38-5-29 { color: #00875f; }
.ansi-38-5-30 { color: #008787; }
.ansi-38-5-31 { color: #0087af; }
.ansi-38-5-32 { color: #0087d7; }
.ansi-38-5-33 { color: #0087ff; }
.ansi-38-5-34 { color: #00af00; }
.ansi-38-5-35 { color: #00af5f; }
.ansi-38-5-36 { color: #00af87; }
.ansi-38-5-37 { color: #00afaf; }
.ansi-38-5-38 { color: #00afd7; }
.ansi-38-5-39 { color: #00afff; }
.ansi-38-5-40 { color: #00d700; }
.ansi-38-5-41 { color: #00d75f; }
.ansi-38-5-42 { color: #00d787; }
.ansi-38-5-43 { color: #00d7af; }
.ansi-38-5-44 { color: #00d7d7; }
.ansi-38-5-45 { color: #00d7ff; }
.ansi-38-5-46 { color: #00ff00; }
.ansi-38-5-47 { color: #00ff5f; }
.ansi-38-5-48 { color: #00ff87; }
.ansi-38-5-49 { color: #00ffaf; }
.ansi-38-5-50 { color: #00ffd7; }
.ansi-38-5-51 { color: #00ffff; }
.ansi-38-5-52 { color: #5f0000; }
.ansi-38-5-53 { color: #5f005f; }
.ansi-38-5-54 { color: #5f0087; }
.ansi-38-5-55 { color: #5f00af; }
.ansi-38-5-56 { color: #5f00d7; }
.ansi-38-5-57 { color: #5f00ff; }
.ansi-38-5-58 { color: #5f5f00; }
.ansi-38-5-59 { color: #5f5f5f; }
.ansi-38-5-60 { color: #5f5f87; }
.ansi-38-5-61 { color: #5f5faf; }
.ansi-38-5-62 { color: #5f5fd7; }
.ansi-38-5-63 { color: #5f5fff; }
.ansi-38-5-64 { color: #5f8700; }
.ansi-38-5-65 { color: #5f875f; }
.ansi-38-5-66 { color: #5f8787; }
.ansi-38-5-67 { color: #5f87af; }
.ansi-38-5-68 { color: #5f87d7; }
.ansi-38-5-69 { color: #5f87ff; }
.ansi-38-5-70 { color: #5faf00; }
.ansi-38-5-71 { color: #5faf5f; }
.ansi-38-5-72 { color: #5faf87; }
.ansi-38-5-73 { color: #5fafaf; }
.ansi-38-5-74 { color: #5fafd7; }
.ansi-38-5-75 { color: #5fafff; }
.ansi-38-5-76 { color: #5fd700; }
.ansi-38-5-77 { color: #5fd75f; }
.ansi-38-5-78 { color: #5fd787; }
.ansi-38-5-79 { color: #5fd7af; }
.ansi-38-5-80 { color: #5fd7d7; }
.ansi-38-5-81 { color: #5fd7ff; }
.ansi-38-5-82 { color: #5fff00; }
.ansi-38-5-83 { color: #5fff5f; }
.ansi-38-5-84 { color: #5fff87; }
.ansi-38-5-85 { color: #5fffaf; }
.ansi-38-5-86 { color: #5fffd7; }
.ansi-38-5-87 { color: #5fffff; }
.ansi-38-5-88 { color: #870000; }
.ansi-38-5-89 { color: #87005f; }
.ansi-38-5-90 { color: #870087; }
.ansi-38-5-91 { color: #8700af; }
.ansi-38-5-92 { color: #8700d7; }
.ansi-38-5-93 { color: #8700ff; }
.ansi-38-5-94 { color: #875f00; }
.ansi-38-5-95 { color: #875f5f; }
.ansi-38-5-96 { color: #875f87; }
.ansi-38-5-97 { color: #875faf; }
.ansi-38-5-98 { color: #875fd7; }
.ansi-38-5-99 { color: #875fff; }
.ansi-38-5-100 { color: #878700; }
.ansi-38-5-101 { color: #87875f; }
.ansi-38-5-102 { color: #878787; }
.ansi-38-5-103 { color: #8787af; }
.ansi-38-5-104 { color: #8787d7; }
.ansi-38-5-105 { color: #8787ff; }
.ansi-38-5-106 { color: #87af00; }
.ansi-38-5-107 { color: #87af5f; }
.ansi-38-5-108 { color: #87af87; }
.ansi-38-5-109 { color: #87afaf; }
.ansi-38-5-110 { color: #87afd7; }
.ansi-38-5-111 { color: #87afff; }
.ansi-38-5-112 { color: #87d700; }
.ansi-38-5-113 { color: #87d75f; }
.ansi-38-5-114 { color: #87d787; }
.ansi-38-5-115 { color: #87d7af; }
.ansi-38-5-116 { color: #87d7d7; }
.ansi-38-5-117 { color: #87d7ff; }
.ansi-38-5-118 { color: #87ff00; }
.ansi-38-5-119 { color: #87ff5f; }
.ansi-38-5-120 { color: #87ff87; }
.ansi-38-5-121 { color: #87ffaf; }
.ansi-38-5-122 { color: #87ffd7; }
.ansi-38-5-123 { color: #87ffff; }
.ansi-38-5-124 { color: #af0000; }
.ansi-38-5-125 { color: #af005f; }
.ansi-38-5-126 { color: #af0087; }
.ansi-38-5-127 { color: #af00af; }
.ansi-38-5-128 { color: #af00d7; }
.ansi-38-5-129 { color: #af00ff; }
.ansi-38-5-130 { color: #af5f00; }
.ansi-38-5-131 { color: #af5f5f; }
.ansi-38-5-132 { color: #af5f87; }
.ansi-38-5-133 { color: #af5faf; }
.ansi-38-5-134 { color: #af5fd7; }
.ansi-38-5-135 { color: #af5fff; }
.ansi-38-5-136 { color: #af8700; }
.ansi-38-5-137 { color: #af875f; }
.ansi-38-5-138 { color: #af8787; }
.ansi-38-5-139 { color: #af87af; }
.ansi-38-5-140 { color: #af87d7; }
.ansi-38-5-141 { color: #af87ff; }
.ansi-38-5-142 { color: #afaf00; }
.ansi-38-5-143 { color: #afaf5f; }
.ansi-38-5-144 { color: #afaf87; }
.ansi-38-5-145 { color: #afafaf; }
.ansi-38-5-146 { color: #afafd7; }
.ansi-38-5-147 { color: #afafff; }
.ansi-38-5-148 { color: #afd700; }
.ansi-38-5-149 { color: #afd75f; }
.ansi-38-5-150 { color: #afd787; }
.ansi-38-5-151 { color: #afd7af; }
.ansi-38-5-152 { color: #afd7d7; }
.ansi-38-5-153 { color: #afd7ff; }
.ansi-38-5-154 { color: #afff00; }
.ansi-38-5-155 { color: #afff5f; }
.ansi-38-5-156 { color: #afff87; }
.ansi-38-5-157 { color: #afffaf; }
.ansi-38-5-158 { color: #afffd7; }
.ansi-38-5-159 { color: #afffff; }
.ansi-38-5-160 { color: #d70000; }
.ansi-38-5-161 { color: #d7005f; }
.ansi-38-5-162 { color: #d70087; }
.ansi-38-5-163 { color: #d700af; }
.ansi-38-5-164 { color: #d700d7; }
.ansi-38-5-165 { color: #d700ff; }
.ansi-38-5-166 { color: #d75f00; }
.ansi-38-5-167 { color: #d75f5f; }
.ansi-38-5-168 { color: #d75f87; }
.ansi-38-5-169 { color: #d75faf; }
.ansi-38-5-170 { color: #d75fd7; }
.ansi-38-5-171 { color: #d75fff; }
.ansi-38-5-172 { color: #d78700; }
.ansi-38-5-173 { color: #d7875f; }
.ansi-38-5-174 { color: #d78787; }
.ansi-38-5-175 { color: #d787af; }
.ansi-38-5-176 { color: #d787d7; }
.ansi-38-5-177 { color: #d787ff; }
.ansi-38-5-178 { color: #d7af00; }
.ansi-38-5-179 { color: #d7af5f; }
.ansi-38-5-180 { color: #d7af87; }
.ansi-38-5-181 { color: #d7afaf; }
.ansi-38-5-182 { color: #d7afd7; }
.ansi-38-5-183 { color: #d7afff; }
.ansi-38-5-184 { color: #d7d700; }
.ansi-38-5-185 { color: #d7d75f; }
.ansi-38-5-186 { color: #d7d787; }
.ansi-38-5-187 { color: #d7d7af; }
.ansi-38-5-188 { color: #d7d7d7; }
.ansi-38-5-189 { color: #d7d7ff; }
.ansi-38-5-190 { color: #d7ff00; }
.ansi-38-5-191 { color: #d7ff5f; }
.ansi-38-5-192 { color: #d7ff87; }
.ansi-38-5-193 { color: #d7ffaf; }
.ansi-38-5-194 { color: #d7ffd7; }
.ansi-38-5-195 { color: #d7ffff; }
.ansi-38-5-196 { color: #ff0000; }
.ansi-38-5-197 { color: #ff005f; }
.ansi-38-5-198 { color: #ff0087; }
.ansi-38-5-199 { color: #ff00af; }
.ansi-38-5-200 { color: #ff00d7; }
.ansi-38-5-201 { color: #ff00ff; }
.ansi-38-5-202 { color: #ff5f00; }
.ansi-38-5-203 { color: #ff5f5f; }
.ansi-38-5-204 { color: #ff5f87; }
.ansi-38-5-205 { color: #ff5faf; }
.ansi-38-5-206 { color: #ff5fd7; }
.ansi-38-5-207 { color: #ff5fff; }
.ansi-38-5-208 { color: #ff8700; }
.ansi-38-5-209 { color: #ff875f; }
.ansi-38-5-210 { color: #ff8787; }
.ansi-38-5-211 { color: #ff87af; }
.ansi-38-5-212 { color: #ff87d7; }
.ansi-38-5-213 { color: #ff87ff; }
.ansi-38-5-214 { color: #ffaf00; }
.ansi-38-5-215 { color: #ffaf5f; }
.ansi-38-5-216 { color: #ffaf87; }
.ansi-38-5-217 { color: #ffafaf; }
.ansi-38-5-218 { color: #ffafd7; }
.ansi-38-5-219 { color: #ffafff; }
.ansi-38-5-220 { color: #ffd700; }
.ansi-38-5-221 { color: #ffd75f; }
.ansi-38-5-222 { color: #ffd787; }
.ansi-38-5-223 { color: #ffd7af; }
.ansi-38-5-224 { color: #ffd7d7; }
.ansi-38-5-225 { color: #ffd7ff; }
.ansi-38-5-226 { color: #ffff00; }
.ansi-38-5-227 { color: #ffff5f; }
.ansi-38-5-228 { color: #ffff87; }
.ansi-38-5-229 { color: #ffffaf; }
.ansi-38-5-230 { color: #ffffd7; }
.ansi-38-5-231 { color: #ffffff; }
.ansi-38-5-232 { color: #080808; }
.ansi-38-5-233 { color: #121212; }
.ansi-38-5-234 { color: #1c1c1c; }
.ansi-38-5-235 { color: #262626; }
.ansi-38-5-236 { color: #303030; }
.ansi-38-5-237 { color: #3a3a3a; }
.ansi-38-5-238 { color: #444444; }
.ansi-38-5-239 { color: #4e4e4e; }
.ansi-38-5-240 { color: #585858; }
.ansi-38-5-241 { color: #626262; }
.ansi-38-5-242 { color: #6c6c6c; }
.ansi-38-5-243 { color: #767676; }
.ansi-38-5-244 { color: #808080; }
.ansi-38-5-245 { color: #8a8a8a; }
.ansi-38-5-246 { color: #949494; }
.ansi-38-5-247 { color: #9e9e9e; }
.ansi-38-5-248 { color: #a8a8a8; }
.ansi-38-5-249 { color: #b2b2b2; }
.ansi-38-5-250 { color: #bcbcbc; }
.ansi-38-5-251 { color: #c6c6c6; }
.ansi-38-5-252 { color: #d0d0d0; }
.ansi-38-5-253 { color: #dadada; }
.ansi-38-5-254 { color: #e4e4e4; }
.ansi-38-5-255 { color: #eeeeee; }
/* xterm256 background colors */
.ansi-48-5-0 { background-color: #000000; }
.ansi-48-5-1 { background-color: #800000; }
.ansi-48-5-2 { background-color: #008000; }
.ansi-48-5-3 { background-color: #808000; }
.ansi-48-5-4 { background-color: #000080; }
.ansi-48-5-5 { background-color: #800080; }
.ansi-48-5-6 { background-color: #008080; }
.ansi-48-5-7 { background-color: #c0c0c0; }
.ansi-48-5-8 { background-color: #808080; }
.ansi-48-5-9 { background-color: #ff0000; }
.ansi-48-5-10 { background-color: #00ff00; }
.ansi-48-5-11 { background-color: #ffff00; }
.ansi-48-5-12 { background-color: #0000ff; }
.ansi-48-5-13 { background-color: #ff00ff; }
.ansi-48-5-14 { background-color: #00ffff; }
.ansi-48-5-15 { background-color: #ffffff; }
.ansi-48-5-16 { background-color: #000000; }
.ansi-48-5-17 { background-color: #00005f; }
.ansi-48-5-18 { background-color: #000087; }
.ansi-48-5-19 { background-color: #0000af; }
.ansi-48-5-20 { background-color: #0000d7; }
.ansi-48-5-21 { background-color: #0000ff; }
.ansi-48-5-22 { background-color: #005f00; }
.ansi-48-5-23 { background-color: #005f5f; }
.ansi-48-5-24 { background-color: #005f87; }
.ansi-48-5-25 { background-color: #005faf; }
.ansi-48-5-26 { background-color: #005fd7; }
.ansi-48-5-27 { background-color: #005fff; }
.ansi-48-5-28 { background-color: #008700; }
.ansi-48-5-29 { background-color: #00875f; }
.ansi-48-5-30 { background-color: #008787; }
.ansi-48-5-31 { background-color: #0087af; }
.ansi-48-5-32 { background-color: #0087d7; }
.ansi-48-5-33 { background-color: #0087ff; }
.ansi-48-5-34 { background-color: #00af00; }
.ansi-48-5-35 { background-color: #00af5f; }
.ansi-48-5-36 { background-color: #00af87; }
.ansi-48-5-37 { background-color: #00afaf; }
.ansi-48-5-38 { background-color: #00afd7; }
.ansi-48-5-39 { background-color: #00afff; }
.ansi-48-5-40 { background-color: #00d700; }
.ansi-48-5-41 { background-color: #00d75f; }
.ansi-48-5-42 { background-color: #00d787; }
.ansi-48-5-43 { background-color: #00d7af; }
.ansi-48-5-44 { background-color: #00d7d7; }
.ansi-48-5-45 { background-color: #00d7ff; }
.ansi-48-5-46 { background-color: #00ff00; }
.ansi-48-5-47 { background-color: #00ff5f; }
.ansi-48-5-48 { background-color: #00ff87; }
.ansi-48-5-49 { background-color: #00ffaf; }
.ansi-48-5-50 { background-color: #00ffd7; }
.ansi-48-5-51 { background-color: #00ffff; }
.ansi-48-5-52 { background-color: #5f0000; }
.ansi-48-5-53 { background-color: #5f005f; }
.ansi-48-5-54 { background-color: #5f0087; }
.ansi-48-5-55 { background-color: #5f00af; }
.ansi-48-5-56 { background-color: #5f00d7; }
.ansi-48-5-57 { background-color: #5f00ff; }
.ansi-48-5-58 { background-color: #5f5f00; }
.ansi-48-5-59 { background-color: #5f5f5f; }
.ansi-48-5-60 { background-color: #5f5f87; }
.ansi-48-5-61 { background-color: #5f5faf; }
.ansi-48-5-62 { background-color: #5f5fd7; }
.ansi-48-5-63 { background-color: #5f5fff; }
.ansi-48-5-64 { background-color: #5f8700; }
.ansi-48-5-65 { background-color: #5f875f; }
.ansi-48-5-66 { background-color: #5f8787; }
.ansi-48-5-67 { background-color: #5f87af; }
.ansi-48-5-68 { background-color: #5f87d7; }
.ansi-48-5-69 { background-color: #5f87ff; }
.ansi-48-5-70 { background-color: #5faf00; }
.ansi-48-5-71 { background-color: #5faf5f; }
.ansi-48-5-72 { background-color: #5faf87; }
.ansi-48-5-73 { background-color: #5fafaf; }
.ansi-48-5-74 { background-color: #5fafd7; }
.ansi-48-5-75 { background-color: #5fafff; }
.ansi-48-5-76 { background-color: #5fd700; }
.ansi-48-5-77 { background-color: #5fd75f; }
.ansi-48-5-78 { background-color: #5fd787; }
.ansi-48-5-79 { background-color: #5fd7af; }
.ansi-48-5-80 { background-color: #5fd7d7; }
.ansi-48-5-81 { background-color: #5fd7ff; }
.ansi-48-5-82 { background-color: #5fff00; }
.ansi-48-5-83 { background-color: #5fff5f; }
.ansi-48-5-84 { background-color: #5fff87; }
.ansi-48-5-85 { background-color: #5fffaf; }
.ansi-48-5-86 { background-color: #5fffd7; }
.ansi-48-5-87 { background-color: #5fffff; }
.ansi-48-5-88 { background-color: #870000; }
.ansi-48-5-89 { background-color: #87005f; }
.ansi-48-5-90 { background-color: #870087; }
.ansi-48-5-91 { background-color: #8700af; }
.ansi-48-5-92 { background-color: #8700d7; }
.ansi-48-5-93 { background-color: #8700ff; }
.ansi-48-5-94 { background-color: #875f00; }
.ansi-48-5-95 { background-color: #875f5f; }
.ansi-48-5-96 { background-color: #875f87; }
.ansi-48-5-97 { background-color: #875faf; }
.ansi-48-5-98 { background-color: #875fd7; }
.ansi-48-5-99 { background-color: #875fff; }
.ansi-48-5-100 { background-color: #878700; }
.ansi-48-5-101 { background-color: #87875f; }
.ansi-48-5-102 { background-color: #878787; }
.ansi-48-5-103 { background-color: #8787af; }
.ansi-48-5-104 { background-color: #8787d7; }
.ansi-48-5-105 { background-color: #8787ff; }
.ansi-48-5-106 { background-color: #87af00; }
.ansi-48-5-107 { background-color: #87af5f; }
.ansi-48-5-108 { background-color: #87af87; }
.ansi-48-5-109 { background-color: #87afaf; }
.ansi-48-5-110 { background-color: #87afd7; }
.ansi-48-5-111 { background-color: #87afff; }
.ansi-48-5-112 { background-color: #87d700; }
.ansi-48-5-113 { background-color: #87d75f; }
.ansi-48-5-114 { background-color: #87d787; }
.ansi-48-5-115 { background-color: #87d7af; }
.ansi-48-5-116 { background-color: #87d7d7; }
.ansi-48-5-117 { background-color: #87d7ff; }
.ansi-48-5-118 { background-color: #87ff00; }
.ansi-48-5-119 { background-color: #87ff5f; }
.ansi-48-5-120 { background-color: #87ff87; }
.ansi-48-5-121 { background-color: #87ffaf; }
.ansi-48-5-122 { background-color: #87ffd7; }
.ansi-48-5-123 { background-color: #87ffff; }
.ansi-48-5-124 { background-color: #af0000; }
.ansi-48-5-125 { background-color: #af005f; }
.ansi-48-5-126 { background-color: #af0087; }
.ansi-48-5-127 { background-color: #af00af; }
.ansi-48-5-128 { background-color: #af00d7; }
.ansi-48-5-129 { background-color: #af00ff; }
.ansi-48-5-130 { background-color: #af5f00; }
.ansi-48-5-131 { background-color: #af5f5f; }
.ansi-48-5-132 { background-color: #af5f87; }
.ansi-48-5-133 { background-color: #af5faf; }
.ansi-48-5-134 { background-color: #af5fd7; }
.ansi-48-5-135 { background-color: #af5fff; }
.ansi-48-5-136 { background-color: #af8700; }
.ansi-48-5-137 { background-color: #af875f; }
.ansi-48-5-138 { background-color: #af8787; }
.ansi-48-5-139 { background-color: #af87af; }
.ansi-48-5-140 { background-color: #af87d7; }
.ansi-48-5-141 { background-color: #af87ff; }
.ansi-48-5-142 { background-color: #afaf00; }
.ansi-48-5-143 { background-color: #afaf5f; }
.ansi-48-5-144 { background-color: #afaf87; }
.ansi-48-5-145 { background-color: #afafaf; }
.ansi-48-5-146 { background-color: #afafd7; }
.ansi-48-5-147 { background-color: #afafff; }
.ansi-48-5-148 { background-color: #afd700; }
.ansi-48-5-149 { background-color: #afd75f; }
.ansi-48-5-150 { background-color: #afd787; }
.ansi-48-5-151 { background-color: #afd7af; }
.ansi-48-5-152 { background-color: #afd7d7; }
.ansi-48-5-153 { background-color: #afd7ff; }
.ansi-48-5-154 { background-color: #afff00; }
.ansi-48-5-155 { background-color: #afff5f; }
.ansi-48-5-156 { background-color: #afff87; }
.ansi-48-5-157 { background-color: #afffaf; }
.ansi-48-5-158 { background-color: #afffd7; }
.ansi-48-5-159 { background-color: #afffff; }
.ansi-48-5-160 { background-color: #d70000; }
.ansi-48-5-161 { background-color: #d7005f; }
.ansi-48-5-162 { background-color: #d70087; }
.ansi-48-5-163 { background-color: #d700af; }
.ansi-48-5-164 { background-color: #d700d7; }
.ansi-48-5-165 { background-color: #d700ff; }
.ansi-48-5-166 { background-color: #d75f00; }
.ansi-48-5-167 { background-color: #d75f5f; }
.ansi-48-5-168 { background-color: #d75f87; }
.ansi-48-5-169 { background-color: #d75faf; }
.ansi-48-5-170 { background-color: #d75fd7; }
.ansi-48-5-171 { background-color: #d75fff; }
.ansi-48-5-172 { background-color: #d78700; }
.ansi-48-5-173 { background-color: #d7875f; }
.ansi-48-5-174 { background-color: #d78787; }
.ansi-48-5-175 { background-color: #d787af; }
.ansi-48-5-176 { background-color: #d787d7; }
.ansi-48-5-177 { background-color: #d787ff; }
.ansi-48-5-178 { background-color: #d7af00; }
.ansi-48-5-179 { background-color: #d7af5f; }
.ansi-48-5-180 { background-color: #d7af87; }
.ansi-48-5-181 { background-color: #d7afaf; }
.ansi-48-5-182 { background-color: #d7afd7; }
.ansi-48-5-183 { background-color: #d7afff; }
.ansi-48-5-184 { background-color: #d7d700; }
.ansi-48-5-185 { background-color: #d7d75f; }
.ansi-48-5-186 { background-color: #d7d787; }
.ansi-48-5-187 { background-color: #d7d7af; }
.ansi-48-5-188 { background-color: #d7d7d7; }
.ansi-48-5-189 { background-color: #d7d7ff; }
.ansi-48-5-190 { background-color: #d7ff00; }
.ansi-48-5-191 { background-color: #d7ff5f; }
.ansi-48-5-192 { background-color: #d7ff87; }
.ansi-48-5-193 { background-color: #d7ffaf; }
.ansi-48-5-194 { background-color: #d7ffd7; }
.ansi-48-5-195 { background-color: #d7ffff; }
.ansi-48-5-196 { background-color: #ff0000; }
.ansi-48-5-197 { background-color: #ff005f; }
.ansi-48-5-198 { background-color: #ff0087; }
.ansi-48-5-199 { background-color: #ff00af; }
.ansi-48-5-200 { background-color: #ff00d7; }
.ansi-48-5-201 { background-color: #ff00ff; }
.ansi-48-5-202 { background-color: #ff5f00; }
.ansi-48-5-203 { background-color: #ff5f5f; }
.ansi-48-5-204 { background-color: #ff5f87; }
.ansi-48-5-205 { background-color: #ff5faf; }
.ansi-48-5-206 { background-color: #ff5fd7; }
.ansi-48-5-207 { background-color: #ff5fff; }
.ansi-48-5-208 { background-color: #ff8700; }
.ansi-48-5-209 { background-color: #ff875f; }
.ansi-48-5-210 { background-color: #ff8787; }
.ansi-48-5-211 { background-color: #ff87af; }
.ansi-48-5-212 { background-color: #ff87d7; }
.ansi-48-5-213 { background-color: #ff87ff; }
.ansi-48-5-214 { background-color: #ffaf00; }
.ansi-48-5-215 { background-color: #ffaf5f; }
.ansi-48-5-216 { background-color: #ffaf87; }
.ansi-48-5-217 { background-color: #ffafaf; }
.ansi-48-5-218 { background-color: #ffafd7; }
.ansi-48-5-219 { background-color: #ffafff; }
.ansi-48-5-220 { background-color: #ffd700; }
.ansi-48-5-221 { background-color: #ffd75f; }
.ansi-48-5-222 { background-color: #ffd787; }
.ansi-48-5-223 { background-color: #ffd7af; }
.ansi-48-5-224 { background-color: #ffd7d7; }
.ansi-48-5-225 { background-color: #ffd7ff; }
.ansi-48-5-226 { background-color: #ffff00; }
.ansi-48-5-227 { background-color: #ffff5f; }
.ansi-48-5-228 { background-color: #ffff87; }
.ansi-48-5-229 { background-color: #ffffaf; }
.ansi-48-5-230 { background-color: #ffffd7; }
.ansi-48-5-231 { background-color: #ffffff; }
.ansi-48-5-232 { background-color: #080808; }
.ansi-48-5-233 { background-color: #121212; }
.ansi-48-5-234 { background-color: #1c1c1c; }
.ansi-48-5-235 { background-color: #262626; }
.ansi-48-5-236 { background-color: #303030; }
.ansi-48-5-237 { background-color: #3a3a3a; }
.ansi-48-5-248 { background-color: #444444; }
.ansi-48-5-239 { background-color: #4e4e4e; }
.ansi-48-5-240 { background-color: #585858; }
.ansi-48-5-241 { background-color: #626262; }
.ansi-48-5-242 { background-color: #6c6c6c; }
.ansi-48-5-243 { background-color: #767676; }
.ansi-48-5-244 { background-color: #808080; }
.ansi-48-5-245 { background-color: #8a8a8a; }
.ansi-48-5-246 { background-color: #949494; }
.ansi-48-5-247 { background-color: #9e9e9e; }
.ansi-48-5-248 { background-color: #a8a8a8; }
.ansi-48-5-249 { background-color: #b2b2b2; }
.ansi-48-5-250 { background-color: #bcbcbc; }
.ansi-48-5-251 { background-color: #c6c6c6; }
.ansi-48-5-252 { background-color: #d0d0d0; }
.ansi-48-5-253 { background-color: #dadada; }
.ansi-48-5-254 { background-color: #e4e4e4; }
.ansi-48-5-255 { background-color: #eeeeee; }

View File

@ -1,181 +0,0 @@
body { margin: 0; overflow:hidden;}
a { color: #3641a0;}
a:visited { color: #87899b; }
a:hover { color: #0019ff;}
canvas { width: 75%; height: 100% ;}
.reset-button {margin: 0; padding: 0; padding: 0.25em 0.25em; color: #AAA; font-size: 1.0em;}
.menu-button { position: fixed; right: 0.1vw; top: 0; z-index: 5; color:white; background-color:#003133; padding: 0px; font-weight: bold; font-size:2.5vh; }
.reset-container { margin: 0; margin-top: -4.5vh; padding-top:5vh; padding: 1vh; font-weight: bold; text-align: center; font-family: 'Open Sans', sans-serif; color:#67989A; background-color: maroon; width: 100%; height: 1.75em; float:bottom; }
.wvg-controls { position: fixed;
right: 15%;
height: 100%;
width: 20%;
margin: 0;
display: none;
-webkit-transition-duration: 0.5s;
-moz-transition-duration: 0.5s;
-o-transition-duration: 0.5s;
transition-duration: 0.5s;
}
.wvg-controls.active { right: 0; }
.wvg-navbar { height: 2.0em; width: 100%; list-style-type: none; overflow: hidden; padding: 0; margin: 0; border: 0; background-color:#003133 }
.wvg-navbar li { width:auto; height: 100%; float: left; padding-top: 0.25vh; padding-bottom: 0.25vh; padding-left: 0.5vw; padding-right: 0.5vw; margin: 0; border: 0; text-decoration: none;}
.wvg-tablink { height: 100%; border: 0; margin: 0; padding: 0; font-weight: bold; text-align: center; font-family: 'Raleway', sans-serif; color:#67989A; font-size: 1.0em; }
.wvg-tab-active { background-color: #0D4A4D; color: #003133; }
.wvg-tools { width: 100%; height: 98%; background: #333; display: none; color: #AAA; padding-top: 2vh; padding-left:0.1vw; padding-right: 0.25vw;}
.wvg-tools select, .wvg-tools input {
width: 12vw;
padding: 5px;
font-size: 16px;
line-height: 1;
border: 1px solid #67878A;
border-radius: 0;
height: auto;
-webkit-appearance: none;
background: url('../assets/select-arrow.png') no-repeat right center #333;
color: #67989A;
margin: 0 auto;
}
.wvg-tools input { background: #333; width: 11.4vw; }
.wvg-tools span { text-align:center; color: #FFF; font-family: 'Raleway', sans-serif; display: block; font-size: 1.0em; }
.wvg-tools span label { font-weight: bold;}
.wvg-first { display: block; }
#wrapper { height: inherit; width: 100%; }
.active { display: block; }
input[type=radio], input[type=checkbox] {
display:none;
}
input[type=checkbox] + label:before {
content: "";
display: inline-block;
width: 15px;
height: 15px;
vertical-align:middle;
margin-right: 8px;
background-color: #aaa;
box-shadow: inset 0px 2px 2px rgba(0, 0, 0, .3);
border-radius: 4px;
}
input[type=radio]:checked + label:before {
content: "\2022"; /* Bullet */
color:white;
background-color: #666;
font-size:1.8em;
text-align:center;
line-height:14px;
text-shadow:0px 0px 3px #eee;
}
input[type=checkbox]:checked + label:before {
content:"\2714"; /* Tick */
color:white;
background-color: #666;
text-align:center;
line-height:15px;
text-shadow:0px 0px 3px #eee;
}
.btn {
background: #67989A;
-webkit-border-radius: 0;
-moz-border-radius: 0;
border-radius: 0px;
font-family: 'Raleway', sans-serif;
color: #003133;
font-size: 14px;
font-weight: bolder;
width: 75%;
height: 4vh;
padding: 3px;
margin-top:1vh;
border: solid #67878A 1px;
text-decoration: none;
}
.btn:hover {
background: #0D4A4D;
text-decoration: none;
}
.tool-header { font-weight: bold; padding-top: 0.75em; display: block; }
#route_output {margin: 0 auto; font-size: 1.25vh; height: 30%; padding-top: 1vh; width: 100%; overflow: auto;}
.toolsep { margin: 0 auto; padding:0; padding-top: 1vh; padding-bottom: 2.5vh; border-bottom: 1px #AAA solid; height: 1vh; display: block; width: 64%;}
.calc_data { padding-top: 2.5vh; font-size: 1.5vh; font-family: 'Open Sans', sans-serif;}
#client {
position: fixed;
bottom: 0px;
width: 80%;
margin:0;
}
#client-bar {
width:100%;
margin: 0;
}
#client-bar-control {
margin: 0;
}
.client-bar-control-container:hover, .client-bar-control-container:hover a:hover {
color: black;
background-color: lightgrey;
}
.client-bar-control-container {
width: 5vw;
text-align: center;
background-color: black;
border-top: 1px solid darkgrey;
border-left: 1px solid darkgrey;
border-right: 1px solid darkgrey;
margin-bottom: 0;
border-radius: 5px 5px 0 0;
display: block;
padding: 0;
text-decoration: none;
}
.client-bar-control-container a:link, .client-bar-control-container a:visited { color: white; text-decoration: none }
#client-tab-desc{ padding-left: 0.5vw;}
#client-term-container {
height: 40%;
width: 100%;
background-color: black;
}
#client-term-output {
width: 100%;
height: 30vh;
background-color: #111;
border-bottom: 1px solid #444;
overflow-y: auto;
overflow-x: hidden;
white-space: pre-wrap;
word-wrap: break-word;
margin: 0;
border: 0;
font-family: monospace;
}
#client-term-prompt {
width: 100%;
height: 1em;
overflow: hidden;
white-space: pre-wrap;
text-align: left;
background-color: #111
}
#client-term-button { position: fixed; bottom: 1vh; }
#client { display: block; }
.hidden { display: none; }
#client-term-entry { width: 100%; height: 5vh; border: 0; border-top: 1px solid white; border-bottom: 1px solid white; background-color: #222; margin: 0; padding:0; resize: none; color: silver; vertical-align: middle;}
#client-term-resize {color: lightgrey; text-align: center; width: 100%; background-color: #333; }
#client-term-resize i { margin: 0 auto; width: 2vw;}
#changelog_container h1 { text-align: center; font-size: 1.0em; }
#changelog_container { height: 80%; text-align: left; font-size: 0.75em; padding-right: 0.3vw; overflow: hidden;}
#changelog_container::parent {text-align: left;}
#info_footer {padding-bottom:0.9vh; font-size: 0.60em; position: fixed; bottom: 5vh;}
@media only screen and (max-width: 1290px) { #client-tab-desc { display: none; } }
@media only screen and (max-width: 900px) { .wvg-navbar { height: 6vh; font-size: 1.25em;} .wvg-controls { width: 65%;} .wvg-navbar li { padding-left: 1vw; padding-right: 2vw; padding-top: 2.0vh;} .wvg-tools span, .select-route-map {width: 95%;}
.menu-button { font-weight: bold; font-size:1.5em; padding-top: 0.5vh; } #client-tab-desc { display: none; } #client { display: none; }}
@media only screen and (max-width: 500px) { .wvg-controls { width: 100%;} .wvg-tablink { font-size: 0.75em; padding:0; padding-left: 2vw; padding-right: 2vw; } }
@media only screen and (max-height: 575px) { .reset-container { height: 4em;} .wvg-controls { overflow-y: auto; margin-bottom: -5vh;} .wvg-tools {font-size: 0.75em;} }

View File

@ -0,0 +1,124 @@
/*
The MIT License (MIT)
Copyright (c) 2016 GitHub, Inc.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
*/
.pl-c /* comment */ {
color: #969896;
}
.pl-c1 /* constant, variable.other.constant, support, meta.property-name, support.constant, support.variable, meta.module-reference, markup.raw, meta.diff.header */,
.pl-s .pl-v /* string variable */ {
color: #0086b3;
}
.pl-e /* entity */,
.pl-en /* entity.name */ {
color: #795da3;
}
.pl-smi /* variable.parameter.function, storage.modifier.package, storage.modifier.import, storage.type.java, variable.other */,
.pl-s .pl-s1 /* string source */ {
color: #333;
}
.pl-ent /* entity.name.tag */ {
color: #63a35c;
}
.pl-k /* keyword, storage, storage.type */ {
color: #a71d5d;
}
.pl-s /* string */,
.pl-pds /* punctuation.definition.string, string.regexp.character-class */,
.pl-s .pl-pse .pl-s1 /* string punctuation.section.embedded source */,
.pl-sr /* string.regexp */,
.pl-sr .pl-cce /* string.regexp constant.character.escape */,
.pl-sr .pl-sre /* string.regexp source.ruby.embedded */,
.pl-sr .pl-sra /* string.regexp string.regexp.arbitrary-repitition */ {
color: #183691;
}
.pl-v /* variable */ {
color: #ed6a43;
}
.pl-id /* invalid.deprecated */ {
color: #b52a1d;
}
.pl-ii /* invalid.illegal */ {
color: #f8f8f8;
background-color: #b52a1d;
}
.pl-sr .pl-cce /* string.regexp constant.character.escape */ {
font-weight: bold;
color: #63a35c;
}
.pl-ml /* markup.list */ {
color: #693a17;
}
.pl-mh /* markup.heading */,
.pl-mh .pl-en /* markup.heading entity.name */,
.pl-ms /* meta.separator */ {
font-weight: bold;
color: #1d3e81;
}
.pl-mq /* markup.quote */ {
color: #008080;
}
.pl-mi /* markup.italic */ {
font-style: italic;
color: #333;
}
.pl-mb /* markup.bold */ {
font-weight: bold;
color: #333;
}
.pl-md /* markup.deleted, meta.diff.header.from-file */ {
color: #bd2c00;
background-color: #ffecec;
}
.pl-mi1 /* markup.inserted, meta.diff.header.to-file */ {
color: #55a532;
background-color: #eaffea;
}
.pl-mdr /* meta.diff.range */ {
font-weight: bold;
color: #795da3;
}
.pl-mo /* meta.output */ {
color: #1d3e81;
}

324
stylesheets/styles.css Normal file
View File

@ -0,0 +1,324 @@
@font-face {
font-family: 'Noto Sans';
font-weight: 400;
font-style: normal;
src: url('../fonts/Noto-Sans-regular/Noto-Sans-regular.eot');
src: url('../fonts/Noto-Sans-regular/Noto-Sans-regular.eot?#iefix') format('embedded-opentype'),
local('Noto Sans'),
local('Noto-Sans-regular'),
url('../fonts/Noto-Sans-regular/Noto-Sans-regular.woff2') format('woff2'),
url('../fonts/Noto-Sans-regular/Noto-Sans-regular.woff') format('woff'),
url('../fonts/Noto-Sans-regular/Noto-Sans-regular.ttf') format('truetype'),
url('../fonts/Noto-Sans-regular/Noto-Sans-regular.svg#NotoSans') format('svg');
}
@font-face {
font-family: 'Noto Sans';
font-weight: 700;
font-style: normal;
src: url('../fonts/Noto-Sans-700/Noto-Sans-700.eot');
src: url('../fonts/Noto-Sans-700/Noto-Sans-700.eot?#iefix') format('embedded-opentype'),
local('Noto Sans Bold'),
local('Noto-Sans-700'),
url('../fonts/Noto-Sans-700/Noto-Sans-700.woff2') format('woff2'),
url('../fonts/Noto-Sans-700/Noto-Sans-700.woff') format('woff'),
url('../fonts/Noto-Sans-700/Noto-Sans-700.ttf') format('truetype'),
url('../fonts/Noto-Sans-700/Noto-Sans-700.svg#NotoSans') format('svg');
}
@font-face {
font-family: 'Noto Sans';
font-weight: 400;
font-style: italic;
src: url('../fonts/Noto-Sans-italic/Noto-Sans-italic.eot');
src: url('../fonts/Noto-Sans-italic/Noto-Sans-italic.eot?#iefix') format('embedded-opentype'),
local('Noto Sans Italic'),
local('Noto-Sans-italic'),
url('../fonts/Noto-Sans-italic/Noto-Sans-italic.woff2') format('woff2'),
url('../fonts/Noto-Sans-italic/Noto-Sans-italic.woff') format('woff'),
url('../fonts/Noto-Sans-italic/Noto-Sans-italic.ttf') format('truetype'),
url('../fonts/Noto-Sans-italic/Noto-Sans-italic.svg#NotoSans') format('svg');
}
@font-face {
font-family: 'Noto Sans';
font-weight: 700;
font-style: italic;
src: url('../fonts/Noto-Sans-700italic/Noto-Sans-700italic.eot');
src: url('../fonts/Noto-Sans-700italic/Noto-Sans-700italic.eot?#iefix') format('embedded-opentype'),
local('Noto Sans Bold Italic'),
local('Noto-Sans-700italic'),
url('../fonts/Noto-Sans-700italic/Noto-Sans-700italic.woff2') format('woff2'),
url('../fonts/Noto-Sans-700italic/Noto-Sans-700italic.woff') format('woff'),
url('../fonts/Noto-Sans-700italic/Noto-Sans-700italic.ttf') format('truetype'),
url('../fonts/Noto-Sans-700italic/Noto-Sans-700italic.svg#NotoSans') format('svg');
}
body {
background-color: #fff;
padding:50px;
font: 14px/1.5 "Noto Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
color:#727272;
font-weight:400;
}
h1, h2, h3, h4, h5, h6 {
color:#222;
margin:0 0 20px;
}
p, ul, ol, table, pre, dl {
margin:0 0 20px;
}
h1, h2, h3 {
line-height:1.1;
}
h1 {
font-size:28px;
}
h2 {
color:#393939;
}
h3, h4, h5, h6 {
color:#494949;
}
a {
color:#39c;
text-decoration:none;
}
a:hover {
color:#069;
}
a small {
font-size:11px;
color:#777;
margin-top:-0.3em;
display:block;
}
a:hover small {
color:#777;
}
.wrapper {
width:860px;
margin:0 auto;
}
blockquote {
border-left:1px solid #e5e5e5;
margin:0;
padding:0 0 0 20px;
font-style:italic;
}
code, pre {
font-family:Monaco, Bitstream Vera Sans Mono, Lucida Console, Terminal, Consolas, Liberation Mono, DejaVu Sans Mono, Courier New, monospace;
color:#333;
font-size:12px;
}
pre {
padding:8px 15px;
background: #f8f8f8;
border-radius:5px;
border:1px solid #e5e5e5;
overflow-x: auto;
}
table {
width:100%;
border-collapse:collapse;
}
th, td {
text-align:left;
padding:5px 10px;
border-bottom:1px solid #e5e5e5;
}
dt {
color:#444;
font-weight:700;
}
th {
color:#444;
}
img {
max-width:100%;
}
header {
width:270px;
float:left;
position:fixed;
-webkit-font-smoothing:subpixel-antialiased;
}
header ul {
list-style:none;
height:40px;
padding:0;
background: #f4f4f4;
border-radius:5px;
border:1px solid #e0e0e0;
width:270px;
}
header li {
width:89px;
float:left;
border-right:1px solid #e0e0e0;
height:40px;
}
header li:first-child a {
border-radius:5px 0 0 5px;
}
header li:last-child a {
border-radius:0 5px 5px 0;
}
header ul a {
line-height:1;
font-size:11px;
color:#999;
display:block;
text-align:center;
padding-top:6px;
height:34px;
}
header ul a:hover {
color:#999;
}
header ul a:active {
background-color:#f0f0f0;
}
strong {
color:#222;
font-weight:700;
}
header ul li + li + li {
border-right:none;
width:89px;
}
header ul a strong {
font-size:14px;
display:block;
color:#222;
}
section {
width:500px;
float:right;
padding-bottom:50px;
}
small {
font-size:11px;
}
hr {
border:0;
background:#e5e5e5;
height:1px;
margin:0 0 20px;
}
footer {
width:270px;
float:left;
position:fixed;
bottom:50px;
-webkit-font-smoothing:subpixel-antialiased;
}
@media print, screen and (max-width: 960px) {
div.wrapper {
width:auto;
margin:0;
}
header, section, footer {
float:none;
position:static;
width:auto;
}
header {
padding-right:320px;
}
section {
border:1px solid #e5e5e5;
border-width:1px 0;
padding:20px 0;
margin:0 0 20px;
}
header a small {
display:inline;
}
header ul {
position:absolute;
right:50px;
top:52px;
}
}
@media print, screen and (max-width: 720px) {
body {
word-wrap:break-word;
}
header {
padding:0;
}
header ul, header p.view {
position:static;
}
pre, code {
word-wrap:normal;
}
}
@media print, screen and (max-width: 480px) {
body {
padding:15px;
}
header ul {
width:99%;
}
header li, header ul li + li + li {
width:33%;
}
}
@media print {
body {
padding:0.4in;
font-size:12pt;
color:#444;
}
}

View File

@ -1,6 +0,0 @@
<!doctype html>
<html>
<head>
<meta http-equiv="refresh" content="0; url=./" />
</head>
</html>