space_handling + varie

master
Tancre 5 years ago
parent f0be24cf6a
commit a0f22f897d

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 128 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 130 KiB

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

@ -1,486 +0,0 @@
function shuffled(list) {
var newlist = [];
for (var i = 0; i < list.length; i++) {
newlist.push(list[i]);
}
for (var i = list.length - 1; i > 0; i--) {
var tmp = newlist[i];
var j = randrange(i);
newlist[i] = newlist[j];
newlist[j] = tmp;
}
return newlist;
}
function choose(list, exponent) {
exponent = exponent || 1;
return list[Math.floor(Math.pow(Math.random(), exponent) * list.length)];
}
function randrange(lo, hi) {
if (hi == undefined) {
hi = lo;
lo = 0;
}
return Math.floor(Math.random() * (hi - lo)) + lo;
}
function join(list, sep) {
if (list.length == 0) return '';
sep = sep || '';
var s = list[0];
for (var i = 1; i < list.length; i++) {
s += sep;
s += list[i];
}
return s;
}
function capitalize(word) {
return word[0].toUpperCase() + word.slice(1);
}
function spell(lang, syll) {
if (lang.noortho) return syll;
var s = '';
for (var i = 0; i < syll.length; i++) {
var c = syll[i];
s += lang.cortho[c] || lang.vortho[c] || defaultOrtho[c] || c;
}
return s;
}
function makeSyllable(lang) {
while (true) {
var syll = "";
for (var i = 0; i < lang.structure.length; i++) {
var ptype = lang.structure[i];
if (lang.structure[i+1] == '?') {
i++;
if (Math.random() < 0.5) {
continue;
}
}
syll += choose(lang.phonemes[ptype], lang.exponent);
}
var bad = false;
for (var i = 0; i < lang.restricts.length; i++) {
if (lang.restricts[i].test(syll)) {
bad = true;
break;
}
}
if (bad) continue;
return spell(lang, syll);
}
}
function getMorpheme(lang, key) {
if (lang.nomorph) {
return makeSyllable(lang);
}
key = key || '';
var list = lang.morphemes[key] || [];
var extras = 10;
if (key) extras = 1;
while (true) {
var n = randrange(list.length + extras);
if (list[n]) return list[n];
var morph = makeSyllable(lang);
var bad = false;
for (var k in lang.morphemes) {
if (lang.morphemes[k].includes(morph)) {
bad = true;
break;
}
}
if (bad) continue;
list.push(morph);
lang.morphemes[key] = list;
return morph;
}
}
function makeWord(lang, key) {
var nsylls = randrange(lang.minsyll, lang.maxsyll + 1);
var w = '';
var keys = [];
keys[randrange(nsylls)] = key;
for (var i = 0; i < nsylls; i++) {
w += getMorpheme(lang, keys[i]);
}
return w;
}
function getWord(lang, key) {
key = key || '';
var ws = lang.words[key] || [];
var extras = 3;
if (key) extras = 2;
while (true) {
var n = randrange(ws.length + extras);
var w = ws[n];
if (w) {
return w;
}
w = makeWord(lang, key);
var bad = false;
for (var k in lang.words) {
if (lang.words[k].includes(w)) {
bad = true;
break;
}
}
if (bad) continue;
ws.push(w);
lang.words[key] = ws;
return w;
}
}
function makeName(lang, key) {
key = key || '';
lang.genitive = lang.genitive || getMorpheme(lang, 'of');
lang.definite = lang.definite || getMorpheme(lang, 'the');
while (true) {
var name = null;
if (Math.random() < 0.5) {
name = capitalize(getWord(lang, key));
} else {
var w1 = capitalize(getWord(lang, Math.random() < 0.6 ? key : ''));
var w2 = capitalize(getWord(lang, Math.random() < 0.6 ? key : ''));
if (w1 == w2) continue;
if (Math.random() > 0.5) {
name = join([w1, w2], lang.joiner);
} else {
name = join([w1, lang.genitive, w2], lang.joiner);
}
}
if (Math.random() < 0.1) {
name = join([lang.definite, name], lang.joiner);
}
if ((name.length < lang.minchar) || (name.length > lang.maxchar)) continue;
var used = false;
for (var i = 0; i < lang.names.length; i++) {
var name2 = lang.names[i];
if ((name.indexOf(name2) != -1) || (name2.indexOf(name) != -1)) {
used = true;
break;
}
}
if (used) continue;
lang.names.push(name);
return name;
}
}
function makeBasicLanguage() {
return {
phonemes: {
C: "ptkmnls",
V: "aeiou",
S: "s",
F: "mn",
L: "rl"
},
structure: "CVC",
exponent: 2,
restricts: [],
cortho: {},
vortho: {},
noortho: true,
nomorph: true,
nowordpool: true,
minsyll: 1,
maxsyll: 1,
morphemes: {},
words: {},
names: [],
joiner: ' ',
maxchar: 12,
minchar: 5
};
}
function makeOrthoLanguage() {
var lang = makeBasicLanguage();
lang.noortho = false;
return lang;
}
function makeRandomLanguage() {
var lang = makeBasicLanguage();
lang.noortho = false;
lang.nomorph = false;
lang.nowordpool = false;
lang.phonemes.C = shuffled(choose(consets, 2).C);
lang.phonemes.V = shuffled(choose(vowsets, 2).V);
lang.phonemes.L = shuffled(choose(lsets, 2).L);
lang.phonemes.S = shuffled(choose(ssets, 2).S);
lang.phonemes.F = shuffled(choose(fsets, 2).F);
lang.structure = choose(syllstructs);
lang.restricts = ressets[2].res;
lang.cortho = choose(corthsets, 2).orth;
lang.vortho = choose(vorthsets, 2).orth;
lang.minsyll = randrange(1, 3);
if (lang.structure.length < 3) lang.minsyll++;
lang.maxsyll = randrange(lang.minsyll + 1, 7);
lang.joiner = choose(' -');
return lang;
}
var defaultOrtho = {
'ʃ': 'sh',
'ʒ': 'zh',
'ʧ': 'ch',
'ʤ': 'j',
'ŋ': 'ng',
'j': 'y',
'x': 'kh',
'ɣ': 'gh',
'ʔ': '',
A: "á",
E: "é",
I: "í",
O: "ó",
U: "ú"
};
var corthsets = [
{
name: "Default",
orth: {}
},
{
name: "Slavic",
orth: {
'ʃ': 'š',
'ʒ': 'ž',
'ʧ': 'č',
'ʤ': 'ǧ',
'j': 'j'
}
},
{
name: "German",
orth: {
'ʃ': 'sch',
'ʒ': 'zh',
'ʧ': 'tsch',
'ʤ': 'dz',
'j': 'j',
'x': 'ch'
}
},
{
name: "French",
orth: {
'ʃ': 'ch',
'ʒ': 'j',
'ʧ': 'tch',
'ʤ': 'dj',
'x': 'kh'
}
},
{
name: "Chinese (pinyin)",
orth: {
'ʃ': 'x',
'ʧ': 'q',
'ʤ': 'j',
}
}
];
var vorthsets = [
{
name: "Ácutes",
orth: {}
},
{
name: "Ümlauts",
orth: {
A: "ä",
E: "ë",
I: "ï",
O: "ö",
U: "ü"
}
},
{
name: "Welsh",
orth: {
A: "â",
E: "ê",
I: "y",
O: "ô",
U: "w"
}
},
{
name: "Diphthongs",
orth: {
A: "au",
E: "ei",
I: "ie",
O: "ou",
U: "oo"
}
},
{
name: "Doubles",
orth: {
A: "aa",
E: "ee",
I: "ii",
O: "oo",
U: "uu"
}
}
];
var consets = [
{
name: "Minimal",
C: "ptkmnls"
},
{
name: "English-ish",
C: "ptkbdgmnlrsʃzʒʧ"
},
{
name: "Pirahã (very simple)",
C: "ptkmnh"
},
{
name: "Hawaiian-ish",
C: "hklmnpwʔ"
},
{
name: "Greenlandic-ish",
C: "ptkqvsgrmnŋlj"
},
{
name: "Arabic-ish",
C: "tksʃdbqɣxmnlrwj"
},
{
name: "Arabic-lite",
C: "tkdgmnsʃ"
},
{
name: "English-lite",
C: "ptkbdgmnszʒʧhjw"
}
];
var ssets = [
{
name: "Just s",
S: "s"
},
{
name: "s ʃ",
S: "sʃ"
},
{
name: "s ʃ f",
S: "sʃf"
}
];
var lsets = [
{
name: "r l",
L: "rl"
},
{
name: "Just r",
L: "r"
},
{
name: "Just l",
L: "l"
},
{
name: "w j",
L: "wj"
},
{
name: "r l w j",
L: "rlwj"
}
];
var fsets = [
{
name: "m n",
F: "mn"
},
{
name: "s k",
F: "sk"
},
{
name: "m n ŋ",
F: "mnŋ"
},
{
name: "s ʃ z ʒ",
F: "sʃzʒ"
}
];
var vowsets = [
{
name: "Standard 5-vowel",
V: "aeiou"
},
{
name: "3-vowel a i u",
V: "aiu"
},
{
name: "Extra A E I",
V: "aeiouAEI"
},
{
name: "Extra U",
V: "aeiouU"
},
{
name: "5-vowel a i u A I",
V: "aiuAI"
},
{
name: "3-vowel e o u",
V: "eou"
},
{
name: "Extra A O U",
V: "aeiouAOU"
}
];
var syllstructs = [
"CVC",
"CVV?C",
"CVVC?", "CVC?", "CV", "VC", "CVF", "C?VC", "CVF?",
"CL?VC", "CL?VF", "S?CVC", "S?CVF", "S?CVC?",
"C?VF", "C?VC?", "C?VF?", "C?L?VC", "VC",
"CVL?C?", "C?VL?C", "C?VLC?"];
var ressets = [
{
name: "None",
res: []
},
{
name: "Double sounds",
res: [/(.)\1/]
},
{
name: "Doubles and hard clusters",
res: [/[sʃf][sʃ]/, /(.)\1/, /[rl][rl]/]
}
];

@ -1,387 +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.PriorityQueue = 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(_dereq_,module,exports){
var AbstractPriorityQueue, ArrayStrategy, BHeapStrategy, BinaryHeapStrategy, PriorityQueue,
extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
hasProp = {}.hasOwnProperty;
AbstractPriorityQueue = _dereq_('./PriorityQueue/AbstractPriorityQueue');
ArrayStrategy = _dereq_('./PriorityQueue/ArrayStrategy');
BinaryHeapStrategy = _dereq_('./PriorityQueue/BinaryHeapStrategy');
BHeapStrategy = _dereq_('./PriorityQueue/BHeapStrategy');
PriorityQueue = (function(superClass) {
extend(PriorityQueue, superClass);
function PriorityQueue(options) {
options || (options = {});
options.strategy || (options.strategy = BinaryHeapStrategy);
options.comparator || (options.comparator = function(a, b) {
return (a || 0) - (b || 0);
});
PriorityQueue.__super__.constructor.call(this, options);
}
return PriorityQueue;
})(AbstractPriorityQueue);
PriorityQueue.ArrayStrategy = ArrayStrategy;
PriorityQueue.BinaryHeapStrategy = BinaryHeapStrategy;
PriorityQueue.BHeapStrategy = BHeapStrategy;
module.exports = PriorityQueue;
},{"./PriorityQueue/AbstractPriorityQueue":2,"./PriorityQueue/ArrayStrategy":3,"./PriorityQueue/BHeapStrategy":4,"./PriorityQueue/BinaryHeapStrategy":5}],2:[function(_dereq_,module,exports){
var AbstractPriorityQueue;
module.exports = AbstractPriorityQueue = (function() {
function AbstractPriorityQueue(options) {
var ref;
if ((options != null ? options.strategy : void 0) == null) {
throw 'Must pass options.strategy, a strategy';
}
if ((options != null ? options.comparator : void 0) == null) {
throw 'Must pass options.comparator, a comparator';
}
this.priv = new options.strategy(options);
this.length = (options != null ? (ref = options.initialValues) != null ? ref.length : void 0 : void 0) || 0;
}
AbstractPriorityQueue.prototype.queue = function(value) {
this.length++;
this.priv.queue(value);
return void 0;
};
AbstractPriorityQueue.prototype.dequeue = function(value) {
if (!this.length) {
throw 'Empty queue';
}
this.length--;
return this.priv.dequeue();
};
AbstractPriorityQueue.prototype.peek = function(value) {
if (!this.length) {
throw 'Empty queue';
}
return this.priv.peek();
};
AbstractPriorityQueue.prototype.clear = function() {
this.length = 0;
return this.priv.clear();
};
return AbstractPriorityQueue;
})();
},{}],3:[function(_dereq_,module,exports){
var ArrayStrategy, binarySearchForIndexReversed;
binarySearchForIndexReversed = function(array, value, comparator) {
var high, low, mid;
low = 0;
high = array.length;
while (low < high) {
mid = (low + high) >>> 1;
if (comparator(array[mid], value) >= 0) {
low = mid + 1;
} else {
high = mid;
}
}
return low;
};
module.exports = ArrayStrategy = (function() {
function ArrayStrategy(options) {
var ref;
this.options = options;
this.comparator = this.options.comparator;
this.data = ((ref = this.options.initialValues) != null ? ref.slice(0) : void 0) || [];
this.data.sort(this.comparator).reverse();
}
ArrayStrategy.prototype.queue = function(value) {
var pos;
pos = binarySearchForIndexReversed(this.data, value, this.comparator);
this.data.splice(pos, 0, value);
return void 0;
};
ArrayStrategy.prototype.dequeue = function() {
return this.data.pop();
};
ArrayStrategy.prototype.peek = function() {
return this.data[this.data.length - 1];
};
ArrayStrategy.prototype.clear = function() {
this.data.length = 0;
return void 0;
};
return ArrayStrategy;
})();
},{}],4:[function(_dereq_,module,exports){
var BHeapStrategy;
module.exports = BHeapStrategy = (function() {
function BHeapStrategy(options) {
var arr, i, j, k, len, ref, ref1, shift, value;
this.comparator = (options != null ? options.comparator : void 0) || function(a, b) {
return a - b;
};
this.pageSize = (options != null ? options.pageSize : void 0) || 512;
this.length = 0;
shift = 0;
while ((1 << shift) < this.pageSize) {
shift += 1;
}
if (1 << shift !== this.pageSize) {
throw 'pageSize must be a power of two';
}
this._shift = shift;
this._emptyMemoryPageTemplate = arr = [];
for (i = j = 0, ref = this.pageSize; 0 <= ref ? j < ref : j > ref; i = 0 <= ref ? ++j : --j) {
arr.push(null);
}
this._memory = [];
this._mask = this.pageSize - 1;
if (options.initialValues) {
ref1 = options.initialValues;
for (k = 0, len = ref1.length; k < len; k++) {
value = ref1[k];
this.queue(value);
}
}
}
BHeapStrategy.prototype.queue = function(value) {
this.length += 1;
this._write(this.length, value);
this._bubbleUp(this.length, value);
return void 0;
};
BHeapStrategy.prototype.dequeue = function() {
var ret, val;
ret = this._read(1);
val = this._read(this.length);
this.length -= 1;
if (this.length > 0) {
this._write(1, val);
this._bubbleDown(1, val);
}
return ret;
};
BHeapStrategy.prototype.peek = function() {
return this._read(1);
};
BHeapStrategy.prototype.clear = function() {
this.length = 0;
this._memory.length = 0;
return void 0;
};
BHeapStrategy.prototype._write = function(index, value) {
var page;
page = index >> this._shift;
while (page >= this._memory.length) {
this._memory.push(this._emptyMemoryPageTemplate.slice(0));
}
return this._memory[page][index & this._mask] = value;
};
BHeapStrategy.prototype._read = function(index) {
return this._memory[index >> this._shift][index & this._mask];
};
BHeapStrategy.prototype._bubbleUp = function(index, value) {
var compare, indexInPage, parentIndex, parentValue;
compare = this.comparator;
while (index > 1) {
indexInPage = index & this._mask;
if (index < this.pageSize || indexInPage > 3) {
parentIndex = (index & ~this._mask) | (indexInPage >> 1);
} else if (indexInPage < 2) {
parentIndex = (index - this.pageSize) >> this._shift;
parentIndex += parentIndex & ~(this._mask >> 1);
parentIndex |= this.pageSize >> 1;
} else {
parentIndex = index - 2;
}
parentValue = this._read(parentIndex);
if (compare(parentValue, value) < 0) {
break;
}
this._write(parentIndex, value);
this._write(index, parentValue);
index = parentIndex;
}
return void 0;
};
BHeapStrategy.prototype._bubbleDown = function(index, value) {
var childIndex1, childIndex2, childValue1, childValue2, compare;
compare = this.comparator;
while (index < this.length) {
if (index > this._mask && !(index & (this._mask - 1))) {
childIndex1 = childIndex2 = index + 2;
} else if (index & (this.pageSize >> 1)) {
childIndex1 = (index & ~this._mask) >> 1;
childIndex1 |= index & (this._mask >> 1);
childIndex1 = (childIndex1 + 1) << this._shift;
childIndex2 = childIndex1 + 1;
} else {
childIndex1 = index + (index & this._mask);
childIndex2 = childIndex1 + 1;
}
if (childIndex1 !== childIndex2 && childIndex2 <= this.length) {
childValue1 = this._read(childIndex1);
childValue2 = this._read(childIndex2);
if (compare(childValue1, value) < 0 && compare(childValue1, childValue2) <= 0) {
this._write(childIndex1, value);
this._write(index, childValue1);
index = childIndex1;
} else if (compare(childValue2, value) < 0) {
this._write(childIndex2, value);
this._write(index, childValue2);
index = childIndex2;
} else {
break;
}
} else if (childIndex1 <= this.length) {
childValue1 = this._read(childIndex1);
if (compare(childValue1, value) < 0) {
this._write(childIndex1, value);
this._write(index, childValue1);
index = childIndex1;
} else {
break;
}
} else {
break;
}
}
return void 0;
};
return BHeapStrategy;
})();
},{}],5:[function(_dereq_,module,exports){
var BinaryHeapStrategy;
module.exports = BinaryHeapStrategy = (function() {
function BinaryHeapStrategy(options) {
var ref;
this.comparator = (options != null ? options.comparator : void 0) || function(a, b) {
return a - b;
};
this.length = 0;
this.data = ((ref = options.initialValues) != null ? ref.slice(0) : void 0) || [];
this._heapify();
}
BinaryHeapStrategy.prototype._heapify = function() {
var i, j, ref;
if (this.data.length > 0) {
for (i = j = 1, ref = this.data.length; 1 <= ref ? j < ref : j > ref; i = 1 <= ref ? ++j : --j) {
this._bubbleUp(i);
}
}
return void 0;
};
BinaryHeapStrategy.prototype.queue = function(value) {
this.data.push(value);
this._bubbleUp(this.data.length - 1);
return void 0;
};
BinaryHeapStrategy.prototype.dequeue = function() {
var last, ret;
ret = this.data[0];
last = this.data.pop();
if (this.data.length > 0) {
this.data[0] = last;
this._bubbleDown(0);
}
return ret;
};
BinaryHeapStrategy.prototype.peek = function() {
return this.data[0];
};
BinaryHeapStrategy.prototype.clear = function() {
this.length = 0;
this.data.length = 0;
return void 0;
};
BinaryHeapStrategy.prototype._bubbleUp = function(pos) {
var parent, x;
while (pos > 0) {
parent = (pos - 1) >>> 1;
if (this.comparator(this.data[pos], this.data[parent]) < 0) {
x = this.data[parent];
this.data[parent] = this.data[pos];
this.data[pos] = x;
pos = parent;
} else {
break;
}
}
return void 0;
};
BinaryHeapStrategy.prototype._bubbleDown = function(pos) {
var last, left, minIndex, right, x;
last = this.data.length - 1;
while (true) {
left = (pos << 1) + 1;
right = left + 1;
minIndex = pos;
if (left <= last && this.comparator(this.data[left], this.data[minIndex]) < 0) {
minIndex = left;
}
if (right <= last && this.comparator(this.data[right], this.data[minIndex]) < 0) {
minIndex = right;
}
if (minIndex !== pos) {
x = this.data[minIndex];
this.data[minIndex] = this.data[pos];
this.data[pos] = x;
pos = minIndex;
} else {
break;
}
}
return void 0;
};
return BinaryHeapStrategy;
})();
},{}]},{},[1])(1)
});

@ -1,21 +0,0 @@
/* If you're feeling fancy you can add interactivity
to your site with Javascript */
// prints "hi" in the browser's dev tools console
console.log("hi");
var svg = d3.select("svg");
var params = {
extent: defaultExtent,
generator: generateCoast,
npts: 1684,
ncities: 15,
nterrs: 5,
fontsizes: {
region: 40,
city: 25,
town: 20
}
}
doMap(svg, defaultParams);

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

@ -1,486 +0,0 @@
function shuffled(list) {
var newlist = [];
for (var i = 0; i < list.length; i++) {
newlist.push(list[i]);
}
for (var i = list.length - 1; i > 0; i--) {
var tmp = newlist[i];
var j = randrange(i);
newlist[i] = newlist[j];
newlist[j] = tmp;
}
return newlist;
}
function choose(list, exponent) {
exponent = exponent || 1;
return list[Math.floor(Math.pow(Math.random(), exponent) * list.length)];
}
function randrange(lo, hi) {
if (hi == undefined) {
hi = lo;
lo = 0;
}
return Math.floor(Math.random() * (hi - lo)) + lo;
}
function join(list, sep) {
if (list.length == 0) return '';
sep = sep || '';
var s = list[0];
for (var i = 1; i < list.length; i++) {
s += sep;
s += list[i];
}
return s;
}
function capitalize(word) {
return word[0].toUpperCase() + word.slice(1);
}
function spell(lang, syll) {
if (lang.noortho) return syll;
var s = '';
for (var i = 0; i < syll.length; i++) {
var c = syll[i];
s += lang.cortho[c] || lang.vortho[c] || defaultOrtho[c] || c;
}
return s;
}
function makeSyllable(lang) {
while (true) {
var syll = "";
for (var i = 0; i < lang.structure.length; i++) {
var ptype = lang.structure[i];
if (lang.structure[i+1] == '?') {
i++;
if (Math.random() < 0.5) {
continue;
}
}
syll += choose(lang.phonemes[ptype], lang.exponent);
}
var bad = false;
for (var i = 0; i < lang.restricts.length; i++) {
if (lang.restricts[i].test(syll)) {
bad = true;
break;
}
}
if (bad) continue;
return spell(lang, syll);
}
}
function getMorpheme(lang, key) {
if (lang.nomorph) {
return makeSyllable(lang);
}
key = key || '';
var list = lang.morphemes[key] || [];
var extras = 10;
if (key) extras = 1;
while (true) {
var n = randrange(list.length + extras);
if (list[n]) return list[n];
var morph = makeSyllable(lang);
var bad = false;
for (var k in lang.morphemes) {
if (lang.morphemes[k].includes(morph)) {
bad = true;
break;
}
}
if (bad) continue;
list.push(morph);
lang.morphemes[key] = list;
return morph;
}
}
function makeWord(lang, key) {
var nsylls = randrange(lang.minsyll, lang.maxsyll + 1);
var w = '';
var keys = [];
keys[randrange(nsylls)] = key;
for (var i = 0; i < nsylls; i++) {
w += getMorpheme(lang, keys[i]);
}
return w;
}
function getWord(lang, key) {
key = key || '';
var ws = lang.words[key] || [];
var extras = 3;
if (key) extras = 2;
while (true) {
var n = randrange(ws.length + extras);
var w = ws[n];
if (w) {
return w;
}
w = makeWord(lang, key);
var bad = false;
for (var k in lang.words) {
if (lang.words[k].includes(w)) {
bad = true;
break;
}
}
if (bad) continue;
ws.push(w);
lang.words[key] = ws;
return w;
}
}
function makeName(lang, key) {
key = key || '';
lang.genitive = lang.genitive || getMorpheme(lang, 'of');
lang.definite = lang.definite || getMorpheme(lang, 'the');
while (true) {
var name = null;
if (Math.random() < 0.5) {
name = capitalize(getWord(lang, key));
} else {
var w1 = capitalize(getWord(lang, Math.random() < 0.6 ? key : ''));
var w2 = capitalize(getWord(lang, Math.random() < 0.6 ? key : ''));
if (w1 == w2) continue;
if (Math.random() > 0.5) {
name = join([w1, w2], lang.joiner);
} else {
name = join([w1, lang.genitive, w2], lang.joiner);
}
}
if (Math.random() < 0.1) {
name = join([lang.definite, name], lang.joiner);
}
if ((name.length < lang.minchar) || (name.length > lang.maxchar)) continue;
var used = false;
for (var i = 0; i < lang.names.length; i++) {
var name2 = lang.names[i];
if ((name.indexOf(name2) != -1) || (name2.indexOf(name) != -1)) {
used = true;
break;
}
}
if (used) continue;
lang.names.push(name);
return name;
}
}
function makeBasicLanguage() {
return {
phonemes: {
C: "ptkmnls",
V: "aeiou",
S: "s",
F: "mn",
L: "rl"
},
structure: "CVC",
exponent: 2,
restricts: [],
cortho: {},
vortho: {},
noortho: true,
nomorph: true,
nowordpool: true,
minsyll: 1,
maxsyll: 1,
morphemes: {},
words: {},
names: [],
joiner: ' ',
maxchar: 12,
minchar: 5
};
}
function makeOrthoLanguage() {
var lang = makeBasicLanguage();
lang.noortho = false;
return lang;
}
function makeRandomLanguage() {
var lang = makeBasicLanguage();
lang.noortho = false;
lang.nomorph = false;
lang.nowordpool = false;
lang.phonemes.C = shuffled(choose(consets, 2).C);
lang.phonemes.V = shuffled(choose(vowsets, 2).V);
lang.phonemes.L = shuffled(choose(lsets, 2).L);
lang.phonemes.S = shuffled(choose(ssets, 2).S);
lang.phonemes.F = shuffled(choose(fsets, 2).F);
lang.structure = choose(syllstructs);
lang.restricts = ressets[2].res;
lang.cortho = choose(corthsets, 2).orth;
lang.vortho = choose(vorthsets, 2).orth;
lang.minsyll = randrange(1, 3);
if (lang.structure.length < 3) lang.minsyll++;
lang.maxsyll = randrange(lang.minsyll + 1, 7);
lang.joiner = choose(' -');
return lang;
}
var defaultOrtho = {
'ʃ': 'sh',
'ʒ': 'zh',
'ʧ': 'ch',
'ʤ': 'j',
'ŋ': 'ng',
'j': 'y',
'x': 'kh',
'ɣ': 'gh',
'ʔ': '',
A: "á",
E: "é",
I: "í",
O: "ó",
U: "ú"
};
var corthsets = [
{
name: "Default",
orth: {}
},
{
name: "Slavic",
orth: {
'ʃ': 'š',
'ʒ': 'ž',
'ʧ': 'č',
'ʤ': 'ǧ',
'j': 'j'
}
},
{
name: "German",
orth: {
'ʃ': 'sch',
'ʒ': 'zh',
'ʧ': 'tsch',
'ʤ': 'dz',
'j': 'j',
'x': 'ch'
}
},
{
name: "French",
orth: {
'ʃ': 'ch',
'ʒ': 'j',
'ʧ': 'tch',
'ʤ': 'dj',
'x': 'kh'
}
},
{
name: "Chinese (pinyin)",
orth: {
'ʃ': 'x',
'ʧ': 'q',
'ʤ': 'j',
}
}
];
var vorthsets = [
{
name: "Ácutes",
orth: {}
},
{
name: "Ümlauts",
orth: {
A: "ä",
E: "ë",
I: "ï",
O: "ö",
U: "ü"
}
},
{
name: "Welsh",
orth: {
A: "â",
E: "ê",
I: "y",
O: "ô",
U: "w"
}
},
{
name: "Diphthongs",
orth: {
A: "au",
E: "ei",
I: "ie",
O: "ou",
U: "oo"
}
},
{
name: "Doubles",
orth: {
A: "aa",
E: "ee",
I: "ii",
O: "oo",
U: "uu"
}
}
];
var consets = [
{
name: "Minimal",
C: "ptkmnls"
},
{
name: "English-ish",
C: "ptkbdgmnlrsʃzʒʧ"
},
{
name: "Pirahã (very simple)",
C: "ptkmnh"
},
{
name: "Hawaiian-ish",
C: "hklmnpwʔ"
},
{
name: "Greenlandic-ish",
C: "ptkqvsgrmnŋlj"
},
{
name: "Arabic-ish",
C: "tksʃdbqɣxmnlrwj"
},
{
name: "Arabic-lite",
C: "tkdgmnsʃ"
},
{
name: "English-lite",
C: "ptkbdgmnszʒʧhjw"
}
];
var ssets = [
{
name: "Just s",
S: "s"
},
{
name: "s ʃ",
S: "sʃ"
},
{
name: "s ʃ f",
S: "sʃf"
}
];
var lsets = [
{
name: "r l",
L: "rl"
},
{
name: "Just r",
L: "r"
},
{
name: "Just l",
L: "l"
},
{
name: "w j",
L: "wj"
},
{
name: "r l w j",
L: "rlwj"
}
];
var fsets = [
{
name: "m n",
F: "mn"
},
{
name: "s k",
F: "sk"
},
{
name: "m n ŋ",
F: "mnŋ"
},
{
name: "s ʃ z ʒ",
F: "sʃzʒ"
}
];
var vowsets = [
{
name: "Standard 5-vowel",
V: "aeiou"
},
{
name: "3-vowel a i u",
V: "aiu"
},
{
name: "Extra A E I",
V: "aeiouAEI"
},
{
name: "Extra U",
V: "aeiouU"
},
{
name: "5-vowel a i u A I",
V: "aiuAI"
},
{
name: "3-vowel e o u",
V: "eou"
},
{
name: "Extra A O U",
V: "aeiouAOU"
}
];
var syllstructs = [
"CVC",
"CVV?C",
"CVVC?", "CVC?", "CV", "VC", "CVF", "C?VC", "CVF?",
"CL?VC", "CL?VF", "S?CVC", "S?CVF", "S?CVC?",
"C?VF", "C?VC?", "C?VF?", "C?L?VC", "VC",
"CVL?C?", "C?VL?C", "C?VLC?"];
var ressets = [
{
name: "None",
res: []
},
{
name: "Double sounds",
res: [/(.)\1/]
},
{
name: "Doubles and hard clusters",
res: [/[sʃf][sʃ]/, /(.)\1/, /[rl][rl]/]
}
];

@ -1,387 +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.PriorityQueue = 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(_dereq_,module,exports){
var AbstractPriorityQueue, ArrayStrategy, BHeapStrategy, BinaryHeapStrategy, PriorityQueue,
extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
hasProp = {}.hasOwnProperty;
AbstractPriorityQueue = _dereq_('./PriorityQueue/AbstractPriorityQueue');
ArrayStrategy = _dereq_('./PriorityQueue/ArrayStrategy');
BinaryHeapStrategy = _dereq_('./PriorityQueue/BinaryHeapStrategy');
BHeapStrategy = _dereq_('./PriorityQueue/BHeapStrategy');
PriorityQueue = (function(superClass) {
extend(PriorityQueue, superClass);
function PriorityQueue(options) {
options || (options = {});
options.strategy || (options.strategy = BinaryHeapStrategy);
options.comparator || (options.comparator = function(a, b) {
return (a || 0) - (b || 0);
});
PriorityQueue.__super__.constructor.call(this, options);
}
return PriorityQueue;
})(AbstractPriorityQueue);
PriorityQueue.ArrayStrategy = ArrayStrategy;
PriorityQueue.BinaryHeapStrategy = BinaryHeapStrategy;
PriorityQueue.BHeapStrategy = BHeapStrategy;
module.exports = PriorityQueue;
},{"./PriorityQueue/AbstractPriorityQueue":2,"./PriorityQueue/ArrayStrategy":3,"./PriorityQueue/BHeapStrategy":4,"./PriorityQueue/BinaryHeapStrategy":5}],2:[function(_dereq_,module,exports){
var AbstractPriorityQueue;
module.exports = AbstractPriorityQueue = (function() {
function AbstractPriorityQueue(options) {
var ref;
if ((options != null ? options.strategy : void 0) == null) {
throw 'Must pass options.strategy, a strategy';
}
if ((options != null ? options.comparator : void 0) == null) {
throw 'Must pass options.comparator, a comparator';
}
this.priv = new options.strategy(options);
this.length = (options != null ? (ref = options.initialValues) != null ? ref.length : void 0 : void 0) || 0;
}
AbstractPriorityQueue.prototype.queue = function(value) {
this.length++;
this.priv.queue(value);
return void 0;
};
AbstractPriorityQueue.prototype.dequeue = function(value) {
if (!this.length) {
throw 'Empty queue';
}
this.length--;
return this.priv.dequeue();
};
AbstractPriorityQueue.prototype.peek = function(value) {
if (!this.length) {
throw 'Empty queue';
}
return this.priv.peek();
};
AbstractPriorityQueue.prototype.clear = function() {
this.length = 0;
return this.priv.clear();
};
return AbstractPriorityQueue;
})();
},{}],3:[function(_dereq_,module,exports){
var ArrayStrategy, binarySearchForIndexReversed;
binarySearchForIndexReversed = function(array, value, comparator) {
var high, low, mid;
low = 0;
high = array.length;
while (low < high) {
mid = (low + high) >>> 1;
if (comparator(array[mid], value) >= 0) {
low = mid + 1;
} else {
high = mid;
}
}
return low;
};
module.exports = ArrayStrategy = (function() {
function ArrayStrategy(options) {
var ref;
this.options = options;
this.comparator = this.options.comparator;
this.data = ((ref = this.options.initialValues) != null ? ref.slice(0) : void 0) || [];
this.data.sort(this.comparator).reverse();
}
ArrayStrategy.prototype.queue = function(value) {
var pos;
pos = binarySearchForIndexReversed(this.data, value, this.comparator);
this.data.splice(pos, 0, value);
return void 0;
};
ArrayStrategy.prototype.dequeue = function() {
return this.data.pop();
};
ArrayStrategy.prototype.peek = function() {
return this.data[this.data.length - 1];
};
ArrayStrategy.prototype.clear = function() {
this.data.length = 0;
return void 0;
};
return ArrayStrategy;
})();
},{}],4:[function(_dereq_,module,exports){
var BHeapStrategy;
module.exports = BHeapStrategy = (function() {
function BHeapStrategy(options) {
var arr, i, j, k, len, ref, ref1, shift, value;
this.comparator = (options != null ? options.comparator : void 0) || function(a, b) {
return a - b;
};
this.pageSize = (options != null ? options.pageSize : void 0) || 512;
this.length = 0;
shift = 0;
while ((1 << shift) < this.pageSize) {
shift += 1;
}
if (1 << shift !== this.pageSize) {
throw 'pageSize must be a power of two';
}
this._shift = shift;
this._emptyMemoryPageTemplate = arr = [];
for (i = j = 0, ref = this.pageSize; 0 <= ref ? j < ref : j > ref; i = 0 <= ref ? ++j : --j) {
arr.push(null);
}
this._memory = [];
this._mask = this.pageSize - 1;
if (options.initialValues) {
ref1 = options.initialValues;
for (k = 0, len = ref1.length; k < len; k++) {
value = ref1[k];
this.queue(value);
}
}
}
BHeapStrategy.prototype.queue = function(value) {
this.length += 1;
this._write(this.length, value);
this._bubbleUp(this.length, value);
return void 0;
};
BHeapStrategy.prototype.dequeue = function() {
var ret, val;
ret = this._read(1);
val = this._read(this.length);
this.length -= 1;
if (this.length > 0) {
this._write(1, val);
this._bubbleDown(1, val);
}
return ret;
};
BHeapStrategy.prototype.peek = function() {
return this._read(1);
};
BHeapStrategy.prototype.clear = function() {
this.length = 0;
this._memory.length = 0;
return void 0;
};
BHeapStrategy.prototype._write = function(index, value) {
var page;
page = index >> this._shift;
while (page >= this._memory.length) {
this._memory.push(this._emptyMemoryPageTemplate.slice(0));
}
return this._memory[page][index & this._mask] = value;
};
BHeapStrategy.prototype._read = function(index) {
return this._memory[index >> this._shift][index & this._mask];
};
BHeapStrategy.prototype._bubbleUp = function(index, value) {
var compare, indexInPage, parentIndex, parentValue;
compare = this.comparator;
while (index > 1) {
indexInPage = index & this._mask;
if (index < this.pageSize || indexInPage > 3) {
parentIndex = (index & ~this._mask) | (indexInPage >> 1);
} else if (indexInPage < 2) {
parentIndex = (index - this.pageSize) >> this._shift;
parentIndex += parentIndex & ~(this._mask >> 1);
parentIndex |= this.pageSize >> 1;
} else {
parentIndex = index - 2;
}
parentValue = this._read(parentIndex);
if (compare(parentValue, value) < 0) {
break;
}
this._write(parentIndex, value);
this._write(index, parentValue);
index = parentIndex;
}
return void 0;
};
BHeapStrategy.prototype._bubbleDown = function(index, value) {
var childIndex1, childIndex2, childValue1, childValue2, compare;
compare = this.comparator;
while (index < this.length) {
if (index > this._mask && !(index & (this._mask - 1))) {
childIndex1 = childIndex2 = index + 2;
} else if (index & (this.pageSize >> 1)) {
childIndex1 = (index & ~this._mask) >> 1;
childIndex1 |= index & (this._mask >> 1);
childIndex1 = (childIndex1 + 1) << this._shift;
childIndex2 = childIndex1 + 1;
} else {
childIndex1 = index + (index & this._mask);
childIndex2 = childIndex1 + 1;
}
if (childIndex1 !== childIndex2 && childIndex2 <= this.length) {
childValue1 = this._read(childIndex1);
childValue2 = this._read(childIndex2);
if (compare(childValue1, value) < 0 && compare(childValue1, childValue2) <= 0) {
this._write(childIndex1, value);
this._write(index, childValue1);
index = childIndex1;
} else if (compare(childValue2, value) < 0) {
this._write(childIndex2, value);
this._write(index, childValue2);
index = childIndex2;
} else {
break;
}
} else if (childIndex1 <= this.length) {
childValue1 = this._read(childIndex1);
if (compare(childValue1, value) < 0) {
this._write(childIndex1, value);
this._write(index, childValue1);
index = childIndex1;
} else {
break;
}
} else {
break;
}
}
return void 0;
};
return BHeapStrategy;
})();
},{}],5:[function(_dereq_,module,exports){
var BinaryHeapStrategy;
module.exports = BinaryHeapStrategy = (function() {
function BinaryHeapStrategy(options) {
var ref;
this.comparator = (options != null ? options.comparator : void 0) || function(a, b) {
return a - b;
};
this.length = 0;
this.data = ((ref = options.initialValues) != null ? ref.slice(0) : void 0) || [];
this._heapify();
}
BinaryHeapStrategy.prototype._heapify = function() {
var i, j, ref;
if (this.data.length > 0) {
for (i = j = 1, ref = this.data.length; 1 <= ref ? j < ref : j > ref; i = 1 <= ref ? ++j : --j) {
this._bubbleUp(i);
}
}
return void 0;
};
BinaryHeapStrategy.prototype.queue = function(value) {
this.data.push(value);
this._bubbleUp(this.data.length - 1);
return void 0;
};
BinaryHeapStrategy.prototype.dequeue = function() {
var last, ret;
ret = this.data[0];
last = this.data.pop();
if (this.data.length > 0) {
this.data[0] = last;
this._bubbleDown(0);
}
return ret;
};
BinaryHeapStrategy.prototype.peek = function() {
return this.data[0];
};
BinaryHeapStrategy.prototype.clear = function() {
this.length = 0;
this.data.length = 0;
return void 0;
};
BinaryHeapStrategy.prototype._bubbleUp = function(pos) {
var parent, x;
while (pos > 0) {
parent = (pos - 1) >>> 1;
if (this.comparator(this.data[pos], this.data[parent]) < 0) {
x = this.data[parent];
this.data[parent] = this.data[pos];
this.data[pos] = x;
pos = parent;
} else {
break;
}
}
return void 0;
};
BinaryHeapStrategy.prototype._bubbleDown = function(pos) {
var last, left, minIndex, right, x;
last = this.data.length - 1;
while (true) {
left = (pos << 1) + 1;
right = left + 1;
minIndex = pos;
if (left <= last && this.comparator(this.data[left], this.data[minIndex]) < 0) {
minIndex = left;
}
if (right <= last && this.comparator(this.data[right], this.data[minIndex]) < 0) {
minIndex = right;
}
if (minIndex !== pos) {
x = this.data[minIndex];
this.data[minIndex] = this.data[pos];
this.data[pos] = x;
pos = minIndex;
} else {
break;
}
}
return void 0;
};
return BinaryHeapStrategy;
})();
},{}]},{},[1])(1)
});

@ -1,21 +0,0 @@
/* If you're feeling fancy you can add interactivity
to your site with Javascript */
// prints "hi" in the browser's dev tools console
console.log("hi");
var svg = d3.select("svg");
var params = {
extent: defaultExtent,
generator: generateCoast,
npts: 1684,
ncities: 15,
nterrs: 5,
fontsizes: {
region: 40,
city: 25,
town: 20
}
}
doMap(svg, defaultParams);

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

@ -1,486 +0,0 @@
function shuffled(list) {
var newlist = [];
for (var i = 0; i < list.length; i++) {
newlist.push(list[i]);
}
for (var i = list.length - 1; i > 0; i--) {
var tmp = newlist[i];
var j = randrange(i);
newlist[i] = newlist[j];
newlist[j] = tmp;
}
return newlist;
}
function choose(list, exponent) {
exponent = exponent || 1;
return list[Math.floor(Math.pow(Math.random(), exponent) * list.length)];
}
function randrange(lo, hi) {
if (hi == undefined) {
hi = lo;
lo = 0;
}
return Math.floor(Math.random() * (hi - lo)) + lo;
}
function join(list, sep) {
if (list.length == 0) return '';
sep = sep || '';
var s = list[0];
for (var i = 1; i < list.length; i++) {
s += sep;
s += list[i];
}
return s;
}
function capitalize(word) {
return word[0].toUpperCase() + word.slice(1);
}
function spell(lang, syll) {
if (lang.noortho) return syll;
var s = '';
for (var i = 0; i < syll.length; i++) {
var c = syll[i];
s += lang.cortho[c] || lang.vortho[c] || defaultOrtho[c] || c;
}
return s;
}
function makeSyllable(lang) {
while (true) {
var syll = "";
for (var i = 0; i < lang.structure.length; i++) {
var ptype = lang.structure[i];
if (lang.structure[i+1] == '?') {
i++;
if (Math.random() < 0.5) {
continue;
}
}
syll += choose(lang.phonemes[ptype], lang.exponent);
}
var bad = false;
for (var i = 0; i < lang.restricts.length; i++) {
if (lang.restricts[i].test(syll)) {
bad = true;
break;
}
}
if (bad) continue;
return spell(lang, syll);
}
}
function getMorpheme(lang, key) {
if (lang.nomorph) {
return makeSyllable(lang);
}
key = key || '';
var list = lang.morphemes[key] || [];
var extras = 10;
if (key) extras = 1;
while (true) {
var n = randrange(list.length + extras);
if (list[n]) return list[n];
var morph = makeSyllable(lang);
var bad = false;
for (var k in lang.morphemes) {
if (lang.morphemes[k].includes(morph)) {
bad = true;
break;
}
}
if (bad) continue;
list.push(morph);
lang.morphemes[key] = list;
return morph;
}
}
function makeWord(lang, key) {
var nsylls = randrange(lang.minsyll, lang.maxsyll + 1);
var w = '';
var keys = [];
keys[randrange(nsylls)] = key;
for (var i = 0; i < nsylls; i++) {
w += getMorpheme(lang, keys[i]);
}
return w;
}
function getWord(lang, key) {
key = key || '';
var ws = lang.words[key] || [];
var extras = 3;
if (key) extras = 2;
while (true) {
var n = randrange(ws.length + extras);
var w = ws[n];
if (w) {
return w;
}
w = makeWord(lang, key);
var bad = false;
for (var k in lang.words) {
if (lang.words[k].includes(w)) {
bad = true;
break;
}
}
if (bad) continue;
ws.push(w);
lang.words[key] = ws;
return w;
}
}
function makeName(lang, key) {
key = key || '';
lang.genitive = lang.genitive || getMorpheme(lang, 'of');
lang.definite = lang.definite || getMorpheme(lang, 'the');
while (true) {
var name = null;
if (Math.random() < 0.5) {
name = capitalize(getWord(lang, key));
} else {
var w1 = capitalize(getWord(lang, Math.random() < 0.6 ? key : ''));
var w2 = capitalize(getWord(lang, Math.random() < 0.6 ? key : ''));
if (w1 == w2) continue;
if (Math.random() > 0.5) {
name = join([w1, w2], lang.joiner);
} else {
name = join([w1, lang.genitive, w2], lang.joiner);
}
}
if (Math.random() < 0.1) {
name = join([lang.definite, name], lang.joiner);
}
if ((name.length < lang.minchar) || (name.length > lang.maxchar)) continue;
var used = false;
for (var i = 0; i < lang.names.length; i++) {
var name2 = lang.names[i];
if ((name.indexOf(name2) != -1) || (name2.indexOf(name) != -1)) {
used = true;
break;
}
}
if (used) continue;
lang.names.push(name);
return name;
}
}
function makeBasicLanguage() {
return {
phonemes: {
C: "ptkmnls",
V: "aeiou",
S: "s",
F: "mn",
L: "rl"
},
structure: "CVC",
exponent: 2,
restricts: [],
cortho: {},
vortho: {},
noortho: true,
nomorph: true,
nowordpool: true,
minsyll: 1,
maxsyll: 1,
morphemes: {},
words: {},
names: [],
joiner: ' ',
maxchar: 12,
minchar: 5
};
}
function makeOrthoLanguage() {
var lang = makeBasicLanguage();
lang.noortho = false;
return lang;
}
function makeRandomLanguage() {
var lang = makeBasicLanguage();
lang.noortho = false;
lang.nomorph = false;
lang.nowordpool = false;
lang.phonemes.C = shuffled(choose(consets, 2).C);
lang.phonemes.V = shuffled(choose(vowsets, 2).V);
lang.phonemes.L = shuffled(choose(lsets, 2).L);
lang.phonemes.S = shuffled(choose(ssets, 2).S);
lang.phonemes.F = shuffled(choose(fsets, 2).F);
lang.structure = choose(syllstructs);
lang.restricts = ressets[2].res;
lang.cortho = choose(corthsets, 2).orth;
lang.vortho = choose(vorthsets, 2).orth;
lang.minsyll = randrange(1, 3);
if (lang.structure.length < 3) lang.minsyll++;
lang.maxsyll = randrange(lang.minsyll + 1, 7);
lang.joiner = choose(' -');
return lang;
}
var defaultOrtho = {
'ʃ': 'sh',
'ʒ': 'zh',
'ʧ': 'ch',
'ʤ': 'j',
'ŋ': 'ng',
'j': 'y',
'x': 'kh',
'ɣ': 'gh',
'ʔ': '',
A: "á",
E: "é",
I: "í",
O: "ó",
U: "ú"
};
var corthsets = [
{
name: "Default",
orth: {}
},
{
name: "Slavic",
orth: {
'ʃ': 'š',
'ʒ': 'ž',
'ʧ': 'č',
'ʤ': 'ǧ',
'j': 'j'
}
},
{
name: "German",
orth: {
'ʃ': 'sch',
'ʒ': 'zh',
'ʧ': 'tsch',
'ʤ': 'dz',
'j': 'j',
'x': 'ch'
}
},
{
name: "French",
orth: {
'ʃ': 'ch',
'ʒ': 'j',
'ʧ': 'tch',
'ʤ': 'dj',
'x': 'kh'
}
},
{
name: "Chinese (pinyin)",
orth: {
'ʃ': 'x',
'ʧ': 'q',
'ʤ': 'j',
}
}
];
var vorthsets = [
{
name: "Ácutes",
orth: {}
},
{
name: "Ümlauts",
orth: {
A: "ä",
E: "ë",
I: "ï",
O: "ö",
U: "ü"
}
},
{
name: "Welsh",
orth: {
A: "â",
E: "ê",
I: "y",
O: "ô",
U: "w"
}
},
{
name: "Diphthongs",
orth: {
A: "au",
E: "ei",
I: "ie",
O: "ou",
U: "oo"
}
},
{
name: "Doubles",
orth: {
A: "aa",
E: "ee",
I: "ii",
O: "oo",
U: "uu"
}
}
];
var consets = [
{
name: "Minimal",
C: "ptkmnls"
},
{
name: "English-ish",
C: "ptkbdgmnlrsʃzʒʧ"
},
{
name: "Pirahã (very simple)",
C: "ptkmnh"
},
{
name: "Hawaiian-ish",
C: "hklmnpwʔ"
},
{
name: "Greenlandic-ish",
C: "ptkqvsgrmnŋlj"
},
{
name: "Arabic-ish",
C: "tksʃdbqɣxmnlrwj"
},
{
name: "Arabic-lite",
C: "tkdgmnsʃ"
},
{
name: "English-lite",
C: "ptkbdgmnszʒʧhjw"
}
];
var ssets = [
{
name: "Just s",
S: "s"
},
{
name: "s ʃ",
S: "sʃ"
},
{
name: "s ʃ f",
S: "sʃf"
}
];
var lsets = [
{
name: "r l",
L: "rl"
},
{
name: "Just r",
L: "r"
},
{
name: "Just l",
L: "l"
},
{
name: "w j",
L: "wj"
},
{
name: "r l w j",
L: "rlwj"
}
];
var fsets = [
{
name: "m n",
F: "mn"
},
{
name: "s k",
F: "sk"
},
{
name: "m n ŋ",
F: "mnŋ"
},
{
name: "s ʃ z ʒ",
F: "sʃzʒ"
}
];
var vowsets = [
{
name: "Standard 5-vowel",
V: "aeiou"
},
{
name: "3-vowel a i u",
V: "aiu"
},
{
name: "Extra A E I",
V: "aeiouAEI"
},
{
name: "Extra U",
V: "aeiouU"
},
{
name: "5-vowel a i u A I",
V: "aiuAI"
},
{
name: "3-vowel e o u",
V: "eou"
},
{
name: "Extra A O U",
V: "aeiouAOU"
}
];
var syllstructs = [
"CVC",
"CVV?C",
"CVVC?", "CVC?", "CV", "VC", "CVF", "C?VC", "CVF?",
"CL?VC", "CL?VF", "S?CVC", "S?CVF", "S?CVC?",
"C?VF", "C?VC?", "C?VF?", "C?L?VC", "VC",
"CVL?C?", "C?VL?C", "C?VLC?"];
var ressets = [
{
name: "None",
res: []
},
{
name: "Double sounds",
res: [/(.)\1/]
},
{
name: "Doubles and hard clusters",
res: [/[sʃf][sʃ]/, /(.)\1/, /[rl][rl]/]
}
];

@ -1,387 +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.PriorityQueue = 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(_dereq_,module,exports){
var AbstractPriorityQueue, ArrayStrategy, BHeapStrategy, BinaryHeapStrategy, PriorityQueue,
extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
hasProp = {}.hasOwnProperty;
AbstractPriorityQueue = _dereq_('./PriorityQueue/AbstractPriorityQueue');
ArrayStrategy = _dereq_('./PriorityQueue/ArrayStrategy');
BinaryHeapStrategy = _dereq_('./PriorityQueue/BinaryHeapStrategy');
BHeapStrategy = _dereq_('./PriorityQueue/BHeapStrategy');
PriorityQueue = (function(superClass) {
extend(PriorityQueue, superClass);
function PriorityQueue(options) {
options || (options = {});
options.strategy || (options.strategy = BinaryHeapStrategy);
options.comparator || (options.comparator = function(a, b) {
return (a || 0) - (b || 0);
});
PriorityQueue.__super__.constructor.call(this, options);
}
return PriorityQueue;
})(AbstractPriorityQueue);
PriorityQueue.ArrayStrategy = ArrayStrategy;
PriorityQueue.BinaryHeapStrategy = BinaryHeapStrategy;
PriorityQueue.BHeapStrategy = BHeapStrategy;
module.exports = PriorityQueue;
},{"./PriorityQueue/AbstractPriorityQueue":2,"./PriorityQueue/ArrayStrategy":3,"./PriorityQueue/BHeapStrategy":4,"./PriorityQueue/BinaryHeapStrategy":5}],2:[function(_dereq_,module,exports){
var AbstractPriorityQueue;
module.exports = AbstractPriorityQueue = (function() {
function AbstractPriorityQueue(options) {
var ref;
if ((options != null ? options.strategy : void 0) == null) {
throw 'Must pass options.strategy, a strategy';
}
if ((options != null ? options.comparator : void 0) == null) {
throw 'Must pass options.comparator, a comparator';
}
this.priv = new options.strategy(options);
this.length = (options != null ? (ref = options.initialValues) != null ? ref.length : void 0 : void 0) || 0;
}
AbstractPriorityQueue.prototype.queue = function(value) {
this.length++;
this.priv.queue(value);
return void 0;
};
AbstractPriorityQueue.prototype.dequeue = function(value) {
if (!this.length) {
throw 'Empty queue';
}
this.length--;
return this.priv.dequeue();
};
AbstractPriorityQueue.prototype.peek = function(value) {
if (!this.length) {
throw 'Empty queue';
}
return this.priv.peek();
};
AbstractPriorityQueue.prototype.clear = function() {
this.length = 0;
return this.priv.clear();
};
return AbstractPriorityQueue;
})();
},{}],3:[function(_dereq_,module,exports){
var ArrayStrategy, binarySearchForIndexReversed;
binarySearchForIndexReversed = function(array, value, comparator) {
var high, low, mid;
low = 0;
high = array.length;
while (low < high) {
mid = (low + high) >>> 1;
if (comparator(array[mid], value) >= 0) {
low = mid + 1;
} else {
high = mid;
}
}
return low;
};
module.exports = ArrayStrategy = (function() {
function ArrayStrategy(options) {
var ref;
this.options = options;
this.comparator = this.options.comparator;
this.data = ((ref = this.options.initialValues) != null ? ref.slice(0) : void 0) || [];
this.data.sort(this.comparator).reverse();
}
ArrayStrategy.prototype.queue = function(value) {
var pos;
pos = binarySearchForIndexReversed(this.data, value, this.comparator);
this.data.splice(pos, 0, value);
return void 0;
};
ArrayStrategy.prototype.dequeue = function() {
return this.data.pop();
};
ArrayStrategy.prototype.peek = function() {
return this.data[this.data.length - 1];
};
ArrayStrategy.prototype.clear = function() {
this.data.length = 0;
return void 0;
};
return ArrayStrategy;
})();
},{}],4:[function(_dereq_,module,exports){
var BHeapStrategy;
module.exports = BHeapStrategy = (function() {
function BHeapStrategy(options) {
var arr, i, j, k, len, ref, ref1, shift, value;
this.comparator = (options != null ? options.comparator : void 0) || function(a, b) {
return a - b;
};
this.pageSize = (options != null ? options.pageSize : void 0) || 512;
this.length = 0;
shift = 0;
while ((1 << shift) < this.pageSize) {
shift += 1;
}
if (1 << shift !== this.pageSize) {
throw 'pageSize must be a power of two';
}
this._shift = shift;
this._emptyMemoryPageTemplate = arr = [];
for (i = j = 0, ref = this.pageSize; 0 <= ref ? j < ref : j > ref; i = 0 <= ref ? ++j : --j) {
arr.push(null);
}
this._memory = [];
this._mask = this.pageSize - 1;
if (options.initialValues) {
ref1 = options.initialValues;
for (k = 0, len = ref1.length; k < len; k++) {
value = ref1[k];
this.queue(value);
}
}
}
BHeapStrategy.prototype.queue = function(value) {
this.length += 1;
this._write(this.length, value);
this._bubbleUp(this.length, value);
return void 0;
};
BHeapStrategy.prototype.dequeue = function() {
var ret, val;
ret = this._read(1);
val = this._read(this.length);
this.length -= 1;
if (this.length > 0) {
this._write(1, val);
this._bubbleDown(1, val);
}
return ret;
};
BHeapStrategy.prototype.peek = function() {
return this._read(1);
};
BHeapStrategy.prototype.clear = function() {
this.length = 0;
this._memory.length = 0;
return void 0;
};
BHeapStrategy.prototype._write = function(index, value) {
var page;
page = index >> this._shift;
while (page >= this._memory.length) {
this._memory.push(this._emptyMemoryPageTemplate.slice(0));
}
return this._memory[page][index & this._mask] = value;
};
BHeapStrategy.prototype._read = function(index) {
return this._memory[index >> this._shift][index & this._mask];
};
BHeapStrategy.prototype._bubbleUp = function(index, value) {
var compare, indexInPage, parentIndex, parentValue;
compare = this.comparator;
while (index > 1) {
indexInPage = index & this._mask;
if (index < this.pageSize || indexInPage > 3) {
parentIndex = (index & ~this._mask) | (indexInPage >> 1);
} else if (indexInPage < 2) {
parentIndex = (index - this.pageSize) >> this._shift;
parentIndex += parentIndex & ~(this._mask >> 1);
parentIndex |= this.pageSize >> 1;
} else {
parentIndex = index - 2;
}
parentValue = this._read(parentIndex);
if (compare(parentValue, value) < 0) {
break;
}
this._write(parentIndex, value);
this._write(index, parentValue);
index = parentIndex;
}
return void 0;
};
BHeapStrategy.prototype._bubbleDown = function(index, value) {
var childIndex1, childIndex2, childValue1, childValue2, compare;
compare = this.comparator;
while (index < this.length) {
if (index > this._mask && !(index & (this._mask - 1))) {
childIndex1 = childIndex2 = index + 2;
} else if (index & (this.pageSize >> 1)) {
childIndex1 = (index & ~this._mask) >> 1;
childIndex1 |= index & (this._mask >> 1);
childIndex1 = (childIndex1 + 1) << this._shift;
childIndex2 = childIndex1 + 1;
} else {
childIndex1 = index + (index & this._mask);
childIndex2 = childIndex1 + 1;
}
if (childIndex1 !== childIndex2 && childIndex2 <= this.length) {
childValue1 = this._read(childIndex1);
childValue2 = this._read(childIndex2);
if (compare(childValue1, value) < 0 && compare(childValue1, childValue2) <= 0) {
this._write(childIndex1, value);
this._write(index, childValue1);
index = childIndex1;
} else if (compare(childValue2, value) < 0) {
this._write(childIndex2, value);
this._write(index, childValue2);
index = childIndex2;
} else {
break;
}
} else if (childIndex1 <= this.length) {
childValue1 = this._read(childIndex1);
if (compare(childValue1, value) < 0) {
this._write(childIndex1, value);
this._write(index, childValue1);
index = childIndex1;
} else {
break;
}
} else {
break;
}
}
return void 0;
};
return BHeapStrategy;
})();
},{}],5:[function(_dereq_,module,exports){
var BinaryHeapStrategy;
module.exports = BinaryHeapStrategy = (function() {
function BinaryHeapStrategy(options) {
var ref;
this.comparator = (options != null ? options.comparator : void 0) || function(a, b) {
return a - b;
};
this.length = 0;
this.data = ((ref = options.initialValues) != null ? ref.slice(0) : void 0) || [];
this._heapify();
}
BinaryHeapStrategy.prototype._heapify = function() {
var i, j, ref;
if (this.data.length > 0) {
for (i = j = 1, ref = this.data.length; 1 <= ref ? j < ref : j > ref; i = 1 <= ref ? ++j : --j) {
this._bubbleUp(i);
}
}
return void 0;
};
BinaryHeapStrategy.prototype.queue = function(value) {
this.data.push(value);
this._bubbleUp(this.data.length - 1);
return void 0;
};
BinaryHeapStrategy.prototype.dequeue = function() {
var last, ret;
ret = this.data[0];
last = this.data.pop();
if (this.data.length > 0) {
this.data[0] = last;
this._bubbleDown(0);
}
return ret;
};
BinaryHeapStrategy.prototype.peek = function() {
return this.data[0];
};
BinaryHeapStrategy.prototype.clear = function() {
this.length = 0;
this.data.length = 0;
return void 0;
};
BinaryHeapStrategy.prototype._bubbleUp = function(pos) {
var parent, x;
while (pos > 0) {
parent = (pos - 1) >>> 1;
if (this.comparator(this.data[pos], this.data[parent]) < 0) {
x = this.data[parent];
this.data[parent] = this.data[pos];
this.data[pos] = x;
pos = parent;
} else {
break;
}
}
return void 0;
};
BinaryHeapStrategy.prototype._bubbleDown = function(pos) {
var last, left, minIndex, right, x;
last = this.data.length - 1;
while (true) {
left = (pos << 1) + 1;
right = left + 1;
minIndex = pos;
if (left <= last && this.comparator(this.data[left], this.data[minIndex]) < 0) {
minIndex = left;
}
if (right <= last && this.comparator(this.data[right], this.data[minIndex]) < 0) {
minIndex = right;
}
if (minIndex !== pos) {
x = this.data[minIndex];
this.data[minIndex] = this.data[pos];
this.data[pos] = x;
pos = minIndex;
} else {
break;
}
}
return void 0;
};
return BinaryHeapStrategy;
})();
},{}]},{},[1])(1)
});

@ -1,21 +0,0 @@
/* If you're feeling fancy you can add interactivity
to your site with Javascript */
// prints "hi" in the browser's dev tools console
console.log("hi");
var svg = d3.select("svg");
var params = {
extent: defaultExtent,
generator: generateCoast,
npts: 1684,
ncities: 15,
nterrs: 5,
fontsizes: {
region: 40,
city: 25,
town: 20
}
}
doMap(svg, defaultParams);

File diff suppressed because it is too large Load Diff

@ -1,7 +0,0 @@
$(document).ready(function(){
$( function() {
$( ".draggable" ).draggable();
});
});

@ -1,37 +0,0 @@
Welcome to Glitch
=================
Click `Show` in the header to see your app live. Updates to your code will instantly deploy and update live.
**Glitch** is the friendly community where you'll build the app of your dreams. Glitch lets you instantly create, remix, edit, and host an app, bot or site, and you can invite collaborators or helpers to simultaneously edit code with you.
Find out more [about Glitch](https://glitch.com/about).
Your Project
------------
### ← README.md
That's this file, where you can tell people what your cool website does and how you built it.
### ← index.html
Where you'll write the content of your website.
### ← style.css
CSS files add styling rules to your content.
### ← script.js
If you're feeling fancy you can add interactivity to your site with JavaScript.
### ← assets
Drag in `assets`, like images or music, to add them to your project
Made by [Glitch](https://glitch.com/)
-------------------
\ ゜o゜)

@ -1,71 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<title>Hello!</title>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- import the webpage's stylesheet -->
<link rel="stylesheet" href="/style.css">
<!-- import the webpage's javascript file -->
<script src="script.js" defer></script>
<script src="https://d3js.org/d3.v5.js"></script>
<script src="priority-queue.js"></script>
<script src="language.js"></script>
<script src="terrain.js"></script>
<style>
path, line {
fill: none;
stroke: black;
stroke-linecap: round;
}
.field {
stroke: none;
fill-opacity: 1.0;
}
.slope {
stroke-width: 1;
}
.river {
stroke-width: 2;
}
.coast {
stroke-width: 4;
}
.border {
stroke-width: 5;
stroke-dasharray: 4,4;
stroke-linecap: butt;
}
text {
font-family: "Palatino Linotype", "Book Antiqua", Palatino, serif;
color: black;
stroke: white;
stroke-width: 5;
stroke-linejoin: round;
paint-order: stroke;
}
text.region {
stroke-width:10;
font-variant: small-caps;
}
svg {
float: right;
background-color: white;
}
</style>
</head>
<body>
<svg width="1000" height="1000"></svg>
</body>
</html>

@ -1,486 +0,0 @@
function shuffled(list) {
var newlist = [];
for (var i = 0; i < list.length; i++) {
newlist.push(list[i]);
}
for (var i = list.length - 1; i > 0; i--) {
var tmp = newlist[i];
var j = randrange(i);
newlist[i] = newlist[j];
newlist[j] = tmp;
}
return newlist;
}
function choose(list, exponent) {
exponent = exponent || 1;
return list[Math.floor(Math.pow(Math.random(), exponent) * list.length)];
}
function randrange(lo, hi) {
if (hi == undefined) {
hi = lo;
lo = 0;
}
return Math.floor(Math.random() * (hi - lo)) + lo;
}
function join(list, sep) {
if (list.length == 0) return '';
sep = sep || '';
var s = list[0];
for (var i = 1; i < list.length; i++) {
s += sep;
s += list[i];
}
return s;
}
function capitalize(word) {
return word[0].toUpperCase() + word.slice(1);
}
function spell(lang, syll) {
if (lang.noortho) return syll;
var s = '';
for (var i = 0; i < syll.length; i++) {
var c = syll[i];
s += lang.cortho[c] || lang.vortho[c] || defaultOrtho[c] || c;
}
return s;
}
function makeSyllable(lang) {
while (true) {
var syll = "";
for (var i = 0; i < lang.structure.length; i++) {
var ptype = lang.structure[i];
if (lang.structure[i+1] == '?') {
i++;
if (Math.random() < 0.5) {
continue;
}
}
syll += choose(lang.phonemes[ptype], lang.exponent);
}
var bad = false;
for (var i = 0; i < lang.restricts.length; i++) {
if (lang.restricts[i].test(syll)) {
bad = true;
break;
}
}
if (bad) continue;
return spell(lang, syll);
}
}
function getMorpheme(lang, key) {
if (lang.nomorph) {
return makeSyllable(lang);
}
key = key || '';
var list = lang.morphemes[key] || [];
var extras = 10;
if (key) extras = 1;
while (true) {
var n = randrange(list.length + extras);
if (list[n]) return list[n];
var morph = makeSyllable(lang);
var bad = false;
for (var k in lang.morphemes) {
if (lang.morphemes[k].includes(morph)) {
bad = true;
break;
}
}
if (bad) continue;
list.push(morph);
lang.morphemes[key] = list;
return morph;
}
}
function makeWord(lang, key) {
var nsylls = randrange(lang.minsyll, lang.maxsyll + 1);
var w = '';
var keys = [];
keys[randrange(nsylls)] = key;
for (var i = 0; i < nsylls; i++) {
w += getMorpheme(lang, keys[i]);
}
return w;
}
function getWord(lang, key) {
key = key || '';
var ws = lang.words[key] || [];
var extras = 3;
if (key) extras = 2;
while (true) {
var n = randrange(ws.length + extras);
var w = ws[n];
if (w) {
return w;
}
w = makeWord(lang, key);
var bad = false;
for (var k in lang.words) {
if (lang.words[k].includes(w)) {
bad = true;
break;
}
}
if (bad) continue;
ws.push(w);
lang.words[key] = ws;
return w;
}
}
function makeName(lang, key) {
key = key || '';
lang.genitive = lang.genitive || getMorpheme(lang, 'of');
lang.definite = lang.definite || getMorpheme(lang, 'the');
while (true) {
var name = null;
if (Math.random() < 0.5) {
name = capitalize(getWord(lang, key));
} else {
var w1 = capitalize(getWord(lang, Math.random() < 0.6 ? key : ''));
var w2 = capitalize(getWord(lang, Math.random() < 0.6 ? key : ''));
if (w1 == w2) continue;
if (Math.random() > 0.5) {
name = join([w1, w2], lang.joiner);
} else {
name = join([w1, lang.genitive, w2], lang.joiner);
}
}
if (Math.random() < 0.1) {
name = join([lang.definite, name], lang.joiner);
}
if ((name.length < lang.minchar) || (name.length > lang.maxchar)) continue;
var used = false;
for (var i = 0; i < lang.names.length; i++) {
var name2 = lang.names[i];
if ((name.indexOf(name2) != -1) || (name2.indexOf(name) != -1)) {
used = true;
break;
}
}
if (used) continue;
lang.names.push(name);
return name;
}
}
function makeBasicLanguage() {
return {
phonemes: {
C: "ptkmnls",
V: "aeiou",
S: "s",
F: "mn",
L: "rl"
},
structure: "CVC",
exponent: 2,
restricts: [],
cortho: {},
vortho: {},
noortho: true,
nomorph: true,
nowordpool: true,
minsyll: 1,
maxsyll: 1,
morphemes: {},
words: {},
names: [],
joiner: ' ',
maxchar: 12,
minchar: 5
};
}
function makeOrthoLanguage() {
var lang = makeBasicLanguage();
lang.noortho = false;
return lang;
}
function makeRandomLanguage() {
var lang = makeBasicLanguage();
lang.noortho = false;
lang.nomorph = false;
lang.nowordpool = false;
lang.phonemes.C = shuffled(choose(consets, 2).C);
lang.phonemes.V = shuffled(choose(vowsets, 2).V);
lang.phonemes.L = shuffled(choose(lsets, 2).L);
lang.phonemes.S = shuffled(choose(ssets, 2).S);
lang.phonemes.F = shuffled(choose(fsets, 2).F);
lang.structure = choose(syllstructs);
lang.restricts = ressets[2].res;
lang.cortho = choose(corthsets, 2).orth;
lang.vortho = choose(vorthsets, 2).orth;
lang.minsyll = randrange(1, 3);
if (lang.structure.length < 3) lang.minsyll++;
lang.maxsyll = randrange(lang.minsyll + 1, 7);
lang.joiner = choose(' -');
return lang;
}
var defaultOrtho = {
'ʃ': 'sh',
'ʒ': 'zh',
'ʧ': 'ch',
'ʤ': 'j',
'ŋ': 'ng',
'j': 'y',
'x': 'kh',
'ɣ': 'gh',
'ʔ': '',
A: "á",
E: "é",
I: "í",
O: "ó",
U: "ú"
};
var corthsets = [
{
name: "Default",
orth: {}
},
{
name: "Slavic",
orth: {
'ʃ': 'š',
'ʒ': 'ž',
'ʧ': 'č',
'ʤ': 'ǧ',
'j': 'j'
}
},
{
name: "German",
orth: {
'ʃ': 'sch',
'ʒ': 'zh',
'ʧ': 'tsch',
'ʤ': 'dz',
'j': 'j',
'x': 'ch'
}
},
{
name: "French",
orth: {
'ʃ': 'ch',
'ʒ': 'j',
'ʧ': 'tch',
'ʤ': 'dj',
'x': 'kh'
}
},
{
name: "Chinese (pinyin)",
orth: {
'ʃ': 'x',
'ʧ': 'q',
'ʤ': 'j',
}
}
];
var vorthsets = [
{
name: "Ácutes",
orth: {}
},
{
name: "Ümlauts",
orth: {
A: "ä",
E: "ë",
I: "ï",
O: "ö",
U: "ü"
}
},
{
name: "Welsh",
orth: {
A: "â",
E: "ê",
I: "y",
O: "ô",
U: "w"
}
},
{
name: "Diphthongs",
orth: {
A: "au",
E: "ei",
I: "ie",
O: "ou",
U: "oo"
}
},
{
name: "Doubles",
orth: {
A: "aa",
E: "ee",
I: "ii",
O: "oo",
U: "uu"
}
}
];
var consets = [
{
name: "Minimal",
C: "ptkmnls"
},
{
name: "English-ish",
C: "ptkbdgmnlrsʃzʒʧ"
},
{
name: "Pirahã (very simple)",
C: "ptkmnh"
},
{
name: "Hawaiian-ish",
C: "hklmnpwʔ"
},
{
name: "Greenlandic-ish",
C: "ptkqvsgrmnŋlj"
},
{
name: "Arabic-ish",
C: "tksʃdbqɣxmnlrwj"
},
{
name: "Arabic-lite",
C: "tkdgmnsʃ"
},
{
name: "English-lite",
C: "ptkbdgmnszʒʧhjw"
}
];
var ssets = [
{
name: "Just s",
S: "s"
},
{
name: "s ʃ",
S: "sʃ"
},
{
name: "s ʃ f",
S: "sʃf"
}
];
var lsets = [
{
name: "r l",
L: "rl"
},
{
name: "Just r",
L: "r"
},
{
name: "Just l",
L: "l"
},
{
name: "w j",
L: "wj"
},
{
name: "r l w j",
L: "rlwj"
}
];
var fsets = [
{
name: "m n",
F: "mn"
},
{
name: "s k",
F: "sk"
},
{
name: "m n ŋ",
F: "mnŋ"
},
{
name: "s ʃ z ʒ",
F: "sʃzʒ"
}
];
var vowsets = [
{
name: "Standard 5-vowel",
V: "aeiou"
},
{
name: "3-vowel a i u",
V: "aiu"
},
{
name: "Extra A E I",
V: "aeiouAEI"
},
{
name: "Extra U",
V: "aeiouU"
},
{
name: "5-vowel a i u A I",
V: "aiuAI"
},
{
name: "3-vowel e o u",
V: "eou"
},
{
name: "Extra A O U",
V: "aeiouAOU"
}
];
var syllstructs = [
"CVC",
"CVV?C",
"CVVC?", "CVC?", "CV", "VC", "CVF", "C?VC", "CVF?",
"CL?VC", "CL?VF", "S?CVC", "S?CVF", "S?CVC?",
"C?VF", "C?VC?", "C?VF?", "C?L?VC", "VC",
"CVL?C?", "C?VL?C", "C?VLC?"];
var ressets = [
{
name: "None",
res: []
},
{
name: "Double sounds",
res: [/(.)\1/]
},
{
name: "Doubles and hard clusters",
res: [/[sʃf][sʃ]/, /(.)\1/, /[rl][rl]/]
}
];

@ -1,387 +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.PriorityQueue = 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(_dereq_,module,exports){
var AbstractPriorityQueue, ArrayStrategy, BHeapStrategy, BinaryHeapStrategy, PriorityQueue,
extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
hasProp = {}.hasOwnProperty;
AbstractPriorityQueue = _dereq_('./PriorityQueue/AbstractPriorityQueue');
ArrayStrategy = _dereq_('./PriorityQueue/ArrayStrategy');
BinaryHeapStrategy = _dereq_('./PriorityQueue/BinaryHeapStrategy');
BHeapStrategy = _dereq_('./PriorityQueue/BHeapStrategy');
PriorityQueue = (function(superClass) {
extend(PriorityQueue, superClass);
function PriorityQueue(options) {
options || (options = {});
options.strategy || (options.strategy = BinaryHeapStrategy);
options.comparator || (options.comparator = function(a, b) {
return (a || 0) - (b || 0);
});
PriorityQueue.__super__.constructor.call(this, options);
}
return PriorityQueue;
})(AbstractPriorityQueue);
PriorityQueue.ArrayStrategy = ArrayStrategy;
PriorityQueue.BinaryHeapStrategy = BinaryHeapStrategy;
PriorityQueue.BHeapStrategy = BHeapStrategy;
module.exports = PriorityQueue;
},{"./PriorityQueue/AbstractPriorityQueue":2,"./PriorityQueue/ArrayStrategy":3,"./PriorityQueue/BHeapStrategy":4,"./PriorityQueue/BinaryHeapStrategy":5}],2:[function(_dereq_,module,exports){
var AbstractPriorityQueue;
module.exports = AbstractPriorityQueue = (function() {
function AbstractPriorityQueue(options) {
var ref;
if ((options != null ? options.strategy : void 0) == null) {
throw 'Must pass options.strategy, a strategy';
}
if ((options != null ? options.comparator : void 0) == null) {
throw 'Must pass options.comparator, a comparator';
}
this.priv = new options.strategy(options);
this.length = (options != null ? (ref = options.initialValues) != null ? ref.length : void 0 : void 0) || 0;
}
AbstractPriorityQueue.prototype.queue = function(value) {
this.length++;
this.priv.queue(value);
return void 0;
};
AbstractPriorityQueue.prototype.dequeue = function(value) {
if (!this.length) {
throw 'Empty queue';
}
this.length--;
return this.priv.dequeue();
};
AbstractPriorityQueue.prototype.peek = function(value) {
if (!this.length) {
throw 'Empty queue';
}
return this.priv.peek();
};
AbstractPriorityQueue.prototype.clear = function() {
this.length = 0;
return this.priv.clear();
};
return AbstractPriorityQueue;
})();
},{}],3:[function(_dereq_,module,exports){
var ArrayStrategy, binarySearchForIndexReversed;
binarySearchForIndexReversed = function(array, value, comparator) {
var high, low, mid;
low = 0;
high = array.length;
while (low < high) {
mid = (low + high) >>> 1;
if (comparator(array[mid], value) >= 0) {
low = mid + 1;
} else {
high = mid;
}
}
return low;
};
module.exports = ArrayStrategy = (function() {
function ArrayStrategy(options) {
var ref;
this.options = options;
this.comparator = this.options.comparator;
this.data = ((ref = this.options.initialValues) != null ? ref.slice(0) : void 0) || [];
this.data.sort(this.comparator).reverse();
}
ArrayStrategy.prototype.queue = function(value) {
var pos;
pos = binarySearchForIndexReversed(this.data, value, this.comparator);
this.data.splice(pos, 0, value);
return void 0;
};
ArrayStrategy.prototype.dequeue = function() {
return this.data.pop();
};
ArrayStrategy.prototype.peek = function() {
return this.data[this.data.length - 1];
};
ArrayStrategy.prototype.clear = function() {
this.data.length = 0;
return void 0;
};
return ArrayStrategy;
})();
},{}],4:[function(_dereq_,module,exports){
var BHeapStrategy;
module.exports = BHeapStrategy = (function() {
function BHeapStrategy(options) {
var arr, i, j, k, len, ref, ref1, shift, value;
this.comparator = (options != null ? options.comparator : void 0) || function(a, b) {
return a - b;
};
this.pageSize = (options != null ? options.pageSize : void 0) || 512;
this.length = 0;
shift = 0;
while ((1 << shift) < this.pageSize) {
shift += 1;
}
if (1 << shift !== this.pageSize) {
throw 'pageSize must be a power of two';
}
this._shift = shift;
this._emptyMemoryPageTemplate = arr = [];
for (i = j = 0, ref = this.pageSize; 0 <= ref ? j < ref : j > ref; i = 0 <= ref ? ++j : --j) {
arr.push(null);
}
this._memory = [];
this._mask = this.pageSize - 1;
if (options.initialValues) {
ref1 = options.initialValues;
for (k = 0, len = ref1.length; k < len; k++) {
value = ref1[k];
this.queue(value);
}
}
}
BHeapStrategy.prototype.queue = function(value) {
this.length += 1;
this._write(this.length, value);
this._bubbleUp(this.length, value);
return void 0;
};
BHeapStrategy.prototype.dequeue = function() {
var ret, val;
ret = this._read(1);
val = this._read(this.length);
this.length -= 1;
if (this.length > 0) {
this._write(1, val);
this._bubbleDown(1, val);
}
return ret;
};
BHeapStrategy.prototype.peek = function() {
return this._read(1);
};
BHeapStrategy.prototype.clear = function() {
this.length = 0;
this._memory.length = 0;
return void 0;
};
BHeapStrategy.prototype._write = function(index, value) {
var page;
page = index >> this._shift;
while (page >= this._memory.length) {
this._memory.push(this._emptyMemoryPageTemplate.slice(0));
}
return this._memory[page][index & this._mask] = value;
};
BHeapStrategy.prototype._read = function(index) {
return this._memory[index >> this._shift][index & this._mask];
};
BHeapStrategy.prototype._bubbleUp = function(index, value) {
var compare, indexInPage, parentIndex, parentValue;
compare = this.comparator;
while (index > 1) {
indexInPage = index & this._mask;
if (index < this.pageSize || indexInPage > 3) {
parentIndex = (index & ~this._mask) | (indexInPage >> 1);
} else if (indexInPage < 2) {
parentIndex = (index - this.pageSize) >> this._shift;
parentIndex += parentIndex & ~(this._mask >> 1);
parentIndex |= this.pageSize >> 1;
} else {
parentIndex = index - 2;
}
parentValue = this._read(parentIndex);
if (compare(parentValue, value) < 0) {
break;
}
this._write(parentIndex, value);
this._write(index, parentValue);
index = parentIndex;
}
return void 0;
};
BHeapStrategy.prototype._bubbleDown = function(index, value) {
var childIndex1, childIndex2, childValue1, childValue2, compare;
compare = this.comparator;
while (index < this.length) {
if (index > this._mask && !(index & (this._mask - 1))) {
childIndex1 = childIndex2 = index + 2;
} else if (index & (this.pageSize >> 1)) {
childIndex1 = (index & ~this._mask) >> 1;
childIndex1 |= index & (this._mask >> 1);
childIndex1 = (childIndex1 + 1) << this._shift;
childIndex2 = childIndex1 + 1;
} else {
childIndex1 = index + (index & this._mask);
childIndex2 = childIndex1 + 1;
}
if (childIndex1 !== childIndex2 && childIndex2 <= this.length) {
childValue1 = this._read(childIndex1);
childValue2 = this._read(childIndex2);
if (compare(childValue1, value) < 0 && compare(childValue1, childValue2) <= 0) {
this._write(childIndex1, value);
this._write(index, childValue1);
index = childIndex1;
} else if (compare(childValue2, value) < 0) {
this._write(childIndex2, value);
this._write(index, childValue2);
index = childIndex2;
} else {
break;
}
} else if (childIndex1 <= this.length) {
childValue1 = this._read(childIndex1);
if (compare(childValue1, value) < 0) {
this._write(childIndex1, value);
this._write(index, childValue1);
index = childIndex1;
} else {
break;
}
} else {
break;
}
}
return void 0;
};
return BHeapStrategy;
})();
},{}],5:[function(_dereq_,module,exports){
var BinaryHeapStrategy;
module.exports = BinaryHeapStrategy = (function() {
function BinaryHeapStrategy(options) {
var ref;
this.comparator = (options != null ? options.comparator : void 0) || function(a, b) {
return a - b;
};
this.length = 0;
this.data = ((ref = options.initialValues) != null ? ref.slice(0) : void 0) || [];
this._heapify();
}
BinaryHeapStrategy.prototype._heapify = function() {
var i, j, ref;
if (this.data.length > 0) {
for (i = j = 1, ref = this.data.length; 1 <= ref ? j < ref : j > ref; i = 1 <= ref ? ++j : --j) {
this._bubbleUp(i);
}
}
return void 0;
};
BinaryHeapStrategy.prototype.queue = function(value) {
this.data.push(value);
this._bubbleUp(this.data.length - 1);
return void 0;
};
BinaryHeapStrategy.prototype.dequeue = function() {
var last, ret;
ret = this.data[0];
last = this.data.pop();
if (this.data.length > 0) {
this.data[0] = last;
this._bubbleDown(0);
}
return ret;
};
BinaryHeapStrategy.prototype.peek = function() {
return this.data[0];
};
BinaryHeapStrategy.prototype.clear = function() {
this.length = 0;
this.data.length = 0;
return void 0;
};
BinaryHeapStrategy.prototype._bubbleUp = function(pos) {
var parent, x;
while (pos > 0) {
parent = (pos - 1) >>> 1;
if (this.comparator(this.data[pos], this.data[parent]) < 0) {
x = this.data[parent];
this.data[parent] = this.data[pos];
this.data[pos] = x;
pos = parent;
} else {
break;
}
}
return void 0;
};
BinaryHeapStrategy.prototype._bubbleDown = function(pos) {
var last, left, minIndex, right, x;
last = this.data.length - 1;
while (true) {
left = (pos << 1) + 1;
right = left + 1;
minIndex = pos;
if (left <= last && this.comparator(this.data[left], this.data[minIndex]) < 0) {
minIndex = left;
}
if (right <= last && this.comparator(this.data[right], this.data[minIndex]) < 0) {
minIndex = right;
}
if (minIndex !== pos) {
x = this.data[minIndex];
this.data[minIndex] = this.data[pos];
this.data[pos] = x;
pos = minIndex;
} else {
break;
}
}
return void 0;
};
return BinaryHeapStrategy;
})();
},{}]},{},[1])(1)
});

@ -1,21 +0,0 @@
/* If you're feeling fancy you can add interactivity
to your site with Javascript */
// prints "hi" in the browser's dev tools console
console.log("hi");
var svg = d3.select("svg");
var params = {
extent: defaultExtent,
generator: generateCoast,
npts: 1684,
ncities: 15,
nterrs: 5,
fontsizes: {
region: 40,
city: 25,
town: 20
}
}
doMap(svg, defaultParams);

@ -1,11 +0,0 @@
/* CSS files add styling rules to your content */
body {
font-family: helvetica, arial, sans-serif;
margin: 2em;
}
h1 {
font-style: italic;
color: #373fff;
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

@ -1,70 +0,0 @@
function setupTypewriter(t) {
var HTML = t.innerHTML;
t.innerHTML = "";
var cursorPosition = 0,
tag = "",
writingTag = false,
tagOpen = false,
typeSpeed = 100,
tempTypeSpeed = 0;
var type = function() {
if (writingTag === true) {
tag += HTML[cursorPosition];
}
if (HTML[cursorPosition] === "<") {
tempTypeSpeed = 0;
if (tagOpen) {
tagOpen = false;
writingTag = true;
} else {
tag = "";
tagOpen = true;
writingTag = true;
tag += HTML[cursorPosition];
}
}
if (!writingTag && tagOpen) {
tag.innerHTML += HTML[cursorPosition];
}
if (!writingTag && !tagOpen) {
if (HTML[cursorPosition] === " ") {
tempTypeSpeed = 0;
}
else {
tempTypeSpeed = (Math.random() * typeSpeed) + 50;
}
t.innerHTML += HTML[cursorPosition];
}
if (writingTag === true && HTML[cursorPosition] === ">") {
tempTypeSpeed = (Math.random() * typeSpeed) + 50;
writingTag = false;
if (tagOpen) {
var newSpan = document.createElement("span");
t.appendChild(newSpan);
newSpan.innerHTML = tag;
tag = newSpan.firstChild;
}
}
cursorPosition += 1;
if (cursorPosition < HTML.length - 1) {
setTimeout(type, tempTypeSpeed);
}
};
return {
type: type
};
}
var typer = document.getElementById('typewriter');
typewriter = setupTypewriter(typewriter);
typewriter.type();

@ -1,226 +0,0 @@
body{ font-family: "Lucida Console", Monaco, monospace;
overflow: hidden;}
p { font-size: 20px; }
a{ text-decoration: none; }
#space-time{
z-index: 101;
position: relative;
width: 600px;
height: 500px;
top: 1158px;
left: 853px;
}
#ilinx{
position: absolute;
width: 106px;
left: 250px;
top: 420px;
}
.ilinx {
font-size: 35px;
margin-top: -2px;
float:left;
cursor: grab;
}
#spiral {
width: 300px;
position: absolute;
margin-top: -150px;
margin-left: -150px;
top: 250px;
left: 300px;
}
.rotating {
-webkit-animation: rotating 3s linear infinite;
-moz-animation: rotating 3s linear infinite;
-ms-animation: rotating 3s linear infinite;
-o-animation: rotating 3s linear infinite;
animation: rotating 3s linear infinite;
}
#islands{
}
a.island:link{color:blue;}
a.island:hover{color: red;
-webkit-animation: breathe 3s linear infinite;
-moz-animation: breathe 3s linear infinite;
-ms-animation: breathe 3s linear infinite;
-o-animation: breathe 3s linear infinite;
animation: breathe 3s linear infinite;
}
a.island:visited{color: black;}
#lemuria {
position: absolute;
left: 68px;
top:269px;
}
#mu {
position: absolute;
left: 189px;
top:76px;
}
#hyperborea {
position: absolute;
left: 444px;
top: 151px;
}
#thule{
position: absolute;
left: 421px;
top:322px;
}
#sea {
position: relative;
width: 2500px;
height: 2500px;
/* border-style: dotted;
border-width: 2px;*/
top: -990px;
left: -145px;
/* background-image: url('./img/grid3.png');
background-repeat: repeat;*/
}
#iper{
position: relative;
left: -27px;
top: -47px;
}
#m {
position: relative;
left: -632px;
top: -48px;
}
#thl{
position: relative;
left: -30px;
top: -38px;
}
#lmr{
position: relative;
left: -532px;
top: -28px;
}
/* SVG */
text {
font-family: "Lucida Console", Monaco, monospace;
color: black;
stroke: white;
stroke-width: 6;
stroke-linejoin: round;
paint-order: stroke;
}
text.region {
stroke-width:6;
font-variant: small-caps;
}
svg {
float: right;
}
path, line {
fill: none;
stroke: black;
stroke-linecap: round;
}
.field {
stroke: none;
fill-opacity: 1.0;
}
.slope {
stroke-width: 1;
}
.river {
stroke-width: 2;
}
.coast {
stroke-width: 4;
}
.border {
stroke-width: 5;
stroke-dasharray: 4,4;
stroke-linecap: butt;
}
/* Rotate loop */
@-webkit-keyframes rotating /* Safari and Chrome */ {
from {
-webkit-transform: rotate(0deg);
-o-transform: rotate(0deg);
transform: rotate(0deg);
}
to {
-webkit-transform: rotate(360deg);
-o-transform: rotate(360deg);
transform: rotate(360deg);
}
}
@keyframes rotating {
from {
-ms-transform: rotate(0deg);
-moz-transform: rotate(0deg);
-webkit-transform: rotate(0deg);
-o-transform: rotate(0deg);
transform: rotate(0deg);
}
to {
-ms-transform: rotate(360deg);
-moz-transform: rotate(360deg);
-webkit-transform: rotate(360deg);
-o-transform: rotate(360deg);
transform: rotate(360deg);
}
}
/* Breathing text */
@-webkit-keyframes breathe /* Safari and Chrome */ {
0% {font-size:20px; color: white; letter-spacing: 0px; margin-left: 0px;}
50% {font-size:21px; color: red; letter-spacing: 1px; margin-left: -6px;}
100% {font-size:20px; color: white; letter-spacing: 0px; margin-left: 0px;}
}
@keyframes breathe {
0% {font-size:20px; color: white; letter-spacing: 0px; margin-left: 0px;}
50% {font-size:21px; color: red; letter-spacing: 1px; margin-left: -6px;}
100% {font-size:20px; color: white; letter-spacing: 0px; margin-left: 0px;}
}

File diff suppressed because one or more lines are too long

@ -1,228 +0,0 @@
body{ font-family: "Lucida Console", Monaco, monospace;
overflow: hidden;
background-color: black;
color: white;}
p { font-size: 20px; }
a{ text-decoration: none; }
#space-time{
z-index: 101;
position: relative;
width: 600px;
height: 500px;
top: 1158px;
left: 853px;
}
#ilinx{
position: absolute;
width: 106px;
left: 250px;
top: 420px;
}
.ilinx {
font-size: 35px;
margin-top: -2px;
float:left;
cursor: grab;
}
#spiral {
width: 300px;
position: absolute;
margin-top: -150px;
margin-left: -150px;
top: 250px;
left: 300px;
}
.rotating {
-webkit-animation: rotating 3s linear infinite;
-moz-animation: rotating 3s linear infinite;
-ms-animation: rotating 3s linear infinite;
-o-animation: rotating 3s linear infinite;
animation: rotating 3s linear infinite;
}
#islands{
}
a.island:link{color:white;}
a.island:hover{color: red;
-webkit-animation: breathe 3s linear infinite;
-moz-animation: breathe 3s linear infinite;
-ms-animation: breathe 3s linear infinite;
-o-animation: breathe 3s linear infinite;
animation: breathe 3s linear infinite;
}
a.island:visited{color: white;}
#lemuria {
position: absolute;
left: 68px;
top:269px;
}
#mu {
position: absolute;
left: 189px;
top:76px;
}
#hyperborea {
position: absolute;
left: 444px;
top: 151px;
}
#thule{
position: absolute;
left: 421px;
top:322px;
}
#sea {
position: relative;
width: 2500px;
height: 2500px;
/* border-style: dotted;
border-width: 2px;*/
top: -990px;
left: -145px;
/* background-image: url('./img/grid3.png');
background-repeat: repeat;*/
}
#iper{
position: relative;
left: -27px;
top: -47px;
}
#m {
position: relative;
left: -632px;
top: -48px;
}
#thl{
position: relative;
left: -30px;
top: -38px;
}
#lmr{
position: relative;
left: -532px;
top: -28px;
}
/* SVG */
text {
font-family: "Lucida Console", Monaco, monospace;
color: black;
stroke: white;
stroke-width: 6;
stroke-linejoin: round;
paint-order: stroke;
}
text.region {
stroke-width:6;
font-variant: small-caps;
}
svg {
float: right;
}
path, line {
fill: none;
stroke: white;
stroke-linecap: round;
}
.field {
stroke: none;
fill-opacity: 1.0;
}
.slope {
stroke-width: 1;
}
.river {
stroke-width: 2;
}
.coast {
stroke-width: 4;
}
.border {
stroke-width: 5;
stroke-dasharray: 4,4;
stroke-linecap: butt;
}
/* Rotate loop */
@-webkit-keyframes rotating /* Safari and Chrome */ {
from {
-webkit-transform: rotate(0deg);
-o-transform: rotate(0deg);
transform: rotate(0deg);
}
to {
-webkit-transform: rotate(360deg);
-o-transform: rotate(360deg);
transform: rotate(360deg);
}
}
@keyframes rotating {
from {
-ms-transform: rotate(0deg);
-moz-transform: rotate(0deg);
-webkit-transform: rotate(0deg);
-o-transform: rotate(0deg);
transform: rotate(0deg);
}
to {
-ms-transform: rotate(360deg);
-moz-transform: rotate(360deg);
-webkit-transform: rotate(360deg);
-o-transform: rotate(360deg);
transform: rotate(360deg);
}
}
/* Breathing text */
@-webkit-keyframes breathe /* Safari and Chrome */ {
0% {font-size:20px; color: white; letter-spacing: 0px; margin-left: 0px;}
50% {font-size:21px; color: red; letter-spacing: 1px; margin-left: -6px;}
100% {font-size:20px; color: white; letter-spacing: 0px; margin-left: 0px;}
}
@keyframes breathe {
0% {font-size:20px; color: white; letter-spacing: 0px; margin-left: 0px;}
50% {font-size:21px; color: red; letter-spacing: 1px; margin-left: -6px;}
100% {font-size:20px; color: white; letter-spacing: 0px; margin-left: 0px;}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 814 B

@ -1,7 +1,7 @@
$(document).ready(function(){ $(document).ready(function(){
$( function() { $( function() {
$( ".draggable" ).draggable(); $( ".draggable" ).draggable({ containment: [-1300,-750,1800,1250] });
}); });
}); });

File diff suppressed because one or more lines are too long

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 949 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

@ -11,15 +11,24 @@ a{ text-decoration: none; }
/* ----------------------------- SPACE ----------------------------- */ /* ----------------------------- SPACE ----------------------------- */
#space { #chaos {
position: relative; position: relative;
width: 2500px; width: 2500px;
height: 2500px; height: 2000px;
}
#space {
position: absolute;
width: 2500px;
height: 2000px;
transform:translate(-12%,-28%);
top: 0px;
left: 0px;
/* border-style: dotted; /* border-style: dotted;
border-width: 2px;*/ border-width: 2px;*/
top: -990px;
left: -145px; /* background-image: url('../img/grid3.png');
/* background-image: url('./img/grid3.png');
background-repeat: repeat;*/ background-repeat: repeat;*/
} }
@ -27,18 +36,19 @@ a{ text-decoration: none; }
#time{ #time{
z-index: 101; position: absolute;
position: relative;
width: 600px; width: 600px;
height: 500px; height: 500px;
top: 1158px; z-index: 101;
left: 853px; transform:translate(-50%,-50%);
top: 50%;
left: 50%;
} }
#ilinx{ #ilinx{
position: absolute; position: absolute;
width: 106px; width: 220px;
left: 250px; left: 190px;
top: 420px; top: 420px;
} }
@ -46,9 +56,19 @@ a{ text-decoration: none; }
font-size: 35px; font-size: 35px;
margin-top: -2px; margin-top: -2px;
float:left; float:left;
cursor: grab; text-align: right;
width: 40px;
/*cursor: grab;*/
} }
#i {cursor: url('./lemur2.png'), auto;}
#l {cursor: url('./lemur.png'), auto;}
#ii {cursor: url('./laby.png'), auto;}
#n {cursor: url('./mu.png'), auto;}
#x {cursor: url('./lemur.png'), auto;}
#spiral { #spiral {
width: 300px; width: 300px;
position: absolute; position: absolute;
@ -80,14 +100,12 @@ a{ text-decoration: none; }
position: absolute; position: absolute;
left: 68px; left: 68px;
top:269px; top:269px;
} }
#mu { #mu {
position: absolute; position: absolute;
left: 189px; left: 189px;
top:76px; top:76px;
} }
#hyperborea { #hyperborea {
@ -104,30 +122,38 @@ a{ text-decoration: none; }
} }
/* ----------------------------- ISLANDS ----------------------------- */ /* ----------------------------- FORM ----------------------------- */
#form{
position: absolute;
top: 0px;
left: 0px;
width: 100%;
height: 100%;
}
#iper{ #iper{
position: absolute; position: absolute;
left: 1340px; right: 0px;
top: 493px; top: 0px;
} }
#m { #m {
position: absolute; position: absolute;
left: 0px; left: 0px;
top: 542px; top: 0px;
} }
#thl{ #thl{
position: absolute; position: absolute;
left: 1280px; right: 0px;
top: 1500px; bottom: 0px;
} }
#lmr{ #lmr{
position: absolute; position: absolute;
left: 0px; left: 0px;
top: 1454px; bottom: 0px;
} }
/* --------------------- PLACES ------------------------ */ /* --------------------- PLACES ------------------------ */
@ -168,6 +194,59 @@ color: green;
animation: breathe 1s linear infinite;} animation: breathe 1s linear infinite;}
#black_hole{ left: 275.5px;
top: 559.5px; transform: scale(1.5,1.5)}
.black_hole {
border-color: #00fc33 !important;
background-color: black;
}
#bh1{animation-delay: 0.33s;}
#bh2{animation-delay: 0.66s;}
.pulse{ width: 30px;
height: 30px;
position: absolute;
left: 678px;
top: 717px;}
.pulsate {
position: absolute;
animation: pulsate 2s ease-out;
animation-iteration-count: infinite;
opacity: 0.0;
/* you dont need the stuff below, but its what I used to create the loading circle */
border: 3px solid red;
border-radius: 30px;
height: 18px;
width: 18px;
display: inline-block;
margin-top: 20px;
text-align: center;
}
#pulse1{animation-delay: 0.0s;}
#pulse2{animation-delay: 0.66s;}
#pulse3{animation-delay: 1.33s;}
/* Make the element pulse (grow large and small slowly) */
/* Usage
.myElement {
animation: pulsate 1s ease-out;
animation-iteration-count: infinite;
opacity: 1;
}
*/
@-webkit-keyframes pulsate {
0% {-webkit-transform: scale(0.1, 0.1); opacity: 0.0;}
50% {opacity: 1.0;}
100% {-webkit-transform: scale(3, 3); opacity: 0.0;}
}
/* ----------------------------- SVG ----------------------------- */ /* ----------------------------- SVG ----------------------------- */
@ -195,6 +274,10 @@ path, line {
stroke-linecap: round; stroke-linecap: round;
} }
circle{
stroke: blue !important;
}
.field { .field {
stroke: none; stroke: none;
fill-opacity: 1.0; fill-opacity: 1.0;
@ -265,3 +348,36 @@ path, line {
50% {font-size:21px; color: red; letter-spacing: 1px; margin-left: -6px;} 50% {font-size:21px; color: red; letter-spacing: 1px; margin-left: -6px;}
100% {font-size:20px; color: white; letter-spacing: 0px; margin-left: 0px;} 100% {font-size:20px; color: white; letter-spacing: 0px; margin-left: 0px;}
} }
.lds-hourglass {
display: inline-block;
position: absolute;
width: 80px;
height: 80px;
}
.lds-hourglass:after {
content: " ";
display: block;
border-radius: 50%;
width: 0;
height: 0;
margin: 8px;
box-sizing: border-box;
border: 32px solid #fff;
border-color: #fff transparent #fff transparent;
animation: lds-hourglass 1.2s infinite;
}
@keyframes lds-hourglass {
0% {
transform: rotate(0);
animation-timing-function: cubic-bezier(0.55, 0.055, 0.675, 0.19);
}
50% {
transform: rotate(900deg);
animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1);
}
100% {
transform: rotate(1800deg);
}
}

Loading…
Cancel
Save