mirror of
https://github.com/Ekokumppanit/Bicyclesim.git
synced 2026-03-05 09:54:33 +00:00
Initial commit.
This commit is contained in:
35
client/lib/settings.js
Normal file
35
client/lib/settings.js
Normal file
@@ -0,0 +1,35 @@
|
||||
window.settings = {
|
||||
'default_latlng': [61.501043, 23.763035],
|
||||
'default_pov': {
|
||||
heading: 200,
|
||||
pitch: 0,
|
||||
zoom: 1
|
||||
},
|
||||
'debug': false,
|
||||
'maps_key': 'AIzaSyDtGhiAnSdg9TaGZC_daNcQe43BS8Ws7Iw',
|
||||
'staticmaps_key': 'AIzaSyDtGhiAnSdg9TaGZC_daNcQe43BS8Ws7Iw'
|
||||
};
|
||||
|
||||
window.c = function () {
|
||||
return Math.PI * localStorage.diameter * 2.54 / 100;
|
||||
};
|
||||
|
||||
if (_.has(localStorage, 'diameter') && !_.isNumber(localStorage.diameter)) {
|
||||
delete localStorage.diameter;
|
||||
}
|
||||
|
||||
|
||||
if (_.has(localStorage, 'multiplier') && !_.isNumber(localStorage.multiplier)) {
|
||||
delete localStorage.multiplier;
|
||||
}
|
||||
|
||||
_.defaults(localStorage, {
|
||||
diameter: 28,
|
||||
multiplier: 2.5
|
||||
});
|
||||
|
||||
window.debug = function () {
|
||||
if (this.console && settings.debug) {
|
||||
console.log(Array.prototype.slice.call(arguments));
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user