Attention ! Gitlab fournissant maintenant nativement des certificats Let’s Encrypt aux domaines personnalisés des Gitlab Pages, nous avons coupé notre service qui le faisait automatiquement pour vous.

Il est impératif, pour que votre domaine personnalisé continue à avoir un certificat Let’s Encrypt à jour, d’activer la fonctionnalité native dans les paramètres de votre projet. Cette activation remplacera votre certificat actuel par un nouveau certificat Let’s Encrypt géré par Gitlab.

Voir les détails sur https://docs.framasoft.org/fr/gitlab/gitlab-pages-le.html

Commit eecf59e4 authored by Clément Igonet's avatar Clément Igonet

Open Earth View as a library project.

parent b436eb4e
{
"presets": ["es2015"],
"plugins": ["babel-plugin-add-module-exports"]
}
\ No newline at end of file
{
"ecmaFeatures": {
"globalReturn": true,
"jsx": true,
"modules": true
},
"env": {
"browser": true,
"es6": true,
"node": true
},
"globals": {
"document": false,
"escape": false,
"navigator": false,
"unescape": false,
"window": false,
"describe": true,
"before": true,
"it": true,
"expect": true,
"sinon": true
},
"parser": "babel-eslint",
"plugins": [
],
"rules": {
"block-scoped-var": 2,
"brace-style": [2, "1tbs", { "allowSingleLine": true }],
"camelcase": [2, { "properties": "always" }],
"comma-dangle": [2, "never"],
"comma-spacing": [2, { "before": false, "after": true }],
"comma-style": [2, "last"],
"complexity": 0,
"consistent-return": 2,
"consistent-this": 0,
"curly": [2, "multi-line"],
"default-case": 0,
"dot-location": [2, "property"],
"dot-notation": 0,
"eol-last": 2,
"eqeqeq": [2, "allow-null"],
"func-names": 0,
"func-style": 0,
"generator-star-spacing": [2, "both"],
"guard-for-in": 0,
"handle-callback-err": [2, "^(err|error|anySpecificError)$" ],
# "indent": [2, 2, { "SwitchCase": 1 }],
"key-spacing": [2, { "beforeColon": false, "afterColon": true }],
"linebreak-style": 0,
"max-depth": 0,
# "max-len": [2, 120, 4],
"max-nested-callbacks": 0,
"max-params": 0,
"max-statements": 0,
"new-cap": [2, { "newIsCap": true, "capIsNew": false }],
# "newline-after-var": [2, "always"],
"new-parens": 2,
"no-alert": 0,
"no-array-constructor": 2,
"no-bitwise": 0,
"no-caller": 2,
"no-catch-shadow": 0,
"no-cond-assign": 2,
"no-console": 0,
"no-constant-condition": 0,
"no-continue": 0,
"no-control-regex": 2,
"no-debugger": 2,
"no-delete-var": 2,
"no-div-regex": 0,
"no-dupe-args": 2,
"no-dupe-keys": 2,
"no-duplicate-case": 2,
"no-else-return": 2,
"no-empty": 0,
"no-empty-character-class": 2,
"no-empty-label": 2,
"no-eq-null": 0,
"no-eval": 2,
"no-ex-assign": 2,
"no-extend-native": 2,
"no-extra-bind": 2,
"no-extra-boolean-cast": 2,
"no-extra-parens": 0,
"no-extra-semi": 0,
"no-extra-strict": 0,
"no-fallthrough": 2,
"no-floating-decimal": 2,
"no-func-assign": 2,
"no-implied-eval": 2,
"no-inline-comments": 0,
"no-inner-declarations": [2, "functions"],
"no-invalid-regexp": 2,
"no-irregular-whitespace": 2,
"no-iterator": 2,
"no-label-var": 2,
"no-labels": 2,
"no-lone-blocks": 0,
"no-lonely-if": 0,
"no-loop-func": 0,
"no-mixed-requires": 0,
"no-mixed-spaces-and-tabs": [2, false],
"no-multi-spaces": 2,
"no-multi-str": 2,
"no-multiple-empty-lines": [2, { "max": 1 }],
"no-native-reassign": 2,
"no-negated-in-lhs": 2,
"no-nested-ternary": 0,
"no-new": 2,
"no-new-func": 2,
"no-new-object": 2,
"no-new-require": 2,
"no-new-wrappers": 2,
"no-obj-calls": 2,
"no-octal": 2,
"no-octal-escape": 2,
"no-path-concat": 0,
"no-plusplus": 0,
"no-process-env": 0,
"no-process-exit": 0,
"no-proto": 2,
"no-redeclare": 2,
"no-regex-spaces": 2,
"no-reserved-keys": 0,
"no-restricted-modules": 0,
"no-return-assign": 2,
"no-script-url": 0,
"no-self-compare": 2,
"no-sequences": 2,
"no-shadow": 0,
"no-shadow-restricted-names": 2,
"no-spaced-func": 2,
"no-sparse-arrays": 2,
"no-sync": 0,
"no-ternary": 0,
"no-throw-literal": 2,
"no-trailing-spaces": 2,
"no-undef": 2,
"no-undef-init": 2,
"no-undefined": 0,
"no-underscore-dangle": 0,
"no-unneeded-ternary": 2,
"no-unreachable": 2,
"no-unused-expressions": 0,
"no-unused-vars": [2, { "vars": "all", "args": "none" }],
"no-use-before-define": 2,
"no-var": 0,
"no-void": 0,
"no-warning-comments": 0,
"no-with": 2,
"one-var": 0,
"operator-assignment": 0,
"operator-linebreak": [2, "after"],
"padded-blocks": 0,
"quote-props": 0,
"quotes": [2, "single", "avoid-escape"],
"radix": 2,
"semi": [2, "always"],
"semi-spacing": 0,
"sort-vars": 0,
"space-after-keywords": [2, "always"],
"space-before-blocks": [2, "always"],
# "space-before-function-paren": [2, {"anonymous": "always", "named": "never"}],
"space-in-brackets": 0,
"space-in-parens": [2, "never"],
"space-infix-ops": 2,
"space-return-throw-case": 2,
"space-unary-ops": [2, { "words": true, "nonwords": false }],
# "spaced-comment": [2, "always"],
"strict": 0,
"use-isnan": 2,
"valid-jsdoc": 0,
"valid-typeof": 2,
"vars-on-top": 2,
"wrap-iife": [2, "any"],
"wrap-regex": 0,
"yoda": [2, "never"]
}
}
# Logs
logs
*.log
# Runtime data
pids
*.pid
*.seed
# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov
# Coverage directory used by tools like istanbul
coverage
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
.grunt
# node-waf configuration
.lock-wscript
# Compiled binary addons (http://nodejs.org/api/addons.html)
build/Release
# Dependency directory
# https://www.npmjs.org/doc/misc/npm-faq.html#should-i-check-my-node_modules-folder-into-git
node_modules
The MIT License (MIT)
Copyright (c) 2017 Clement Igonet
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.
# Open Earth View Library
Webpack based boilerplate for producing Open Earth View libraries (Input: ES6, Output: library)
## Features
* Webpack based.
* ES6 as a source.
* ES6 test setup with [Mocha](http://mochajs.org/) and [Chai](http://chaijs.com/).
* Linting with [ESLint](http://eslint.org/).
## Process
```
ES6 source files
|
|
webpack
|
+--- babel, eslint
|
ready to use
library
```
## Getting started
1. Build your library
* Run `npm install` to get the project's dependencies
* Run `npm run build` to produce minified version of your library.
2. Development mode
* Having all the dependencies installed run `npm run dev`. This command will generate an non-minified version of your library and will run a watcher so you get the compilation on file change.
3. Running the tests
* Run `npm run test`
## Scripts
* `npm run build` - produces production version of the library under the `lib` folder
* `npm run dev` - produces development version of the library and runs a watcher
* `npm run test` - well ... it runs the tests :)
* `npm run test:watch` - same as above but in a watch mode
#openearthviewcanvas {
width: 100%;
height: 100%
}
<html>
<head>
<meta charset=utf-8>
<title>Open Earth View - viewer-earth</title>
<link rel="stylesheet" href="css/openearthview.css" type="text/css">
<style>
body {
margin: 0;
}
#osmworld {
height: 90%;
margin-left: 5%;
margin-right: 5%;
}
</style>
<script src="node_modules/three/build/three.js"></script>
<script src="./lib/OpenEarthView.js" type="text/javascript"></script>
<script src="./js/layers/OverpassBuildingLayer.js" type="text/javascript"></script>
</head>
<body>
<div id="osmworld"></div>
<script type="text/javascript">
var world = new OpenEarthView.World("osmworld");
// world.addLayer(
// new OpenEarthView.Layer.OSM(
// 'GoogleMap', [
// "http://mt0.google.com/vt/lyrs=y&x=${x}&y=${y}&z=${z}",
// "http://mt1.google.com/vt/lyrs=y&x=${x}&y=${y}&z=${z}",
// "http://mt2.google.com/vt/lyrs=y&x=${x}&y=${y}&z=${z}",
// "http://mt3.google.com/vt/lyrs=y&x=${x}&y=${y}&z=${z}"
// ], {
// mapTextureRequest: 10
// }));
// Set ground layer
world.addLayer(
new OpenEarthView.Layer.OSM(
"OpenStreetMap", [
"https://a.tile.openstreetmap.org/${z}/${x}/${y}.png",
"https://b.tile.openstreetmap.org/${z}/${x}/${y}.png",
"https://c.tile.openstreetmap.org/${z}/${x}/${y}.png"
]));
// Set 3D building layer
world.addLayer(
new OpenEarthView.Layer.OverpassBuilding(
'Overpass', [
'http://overpass-api.de/api/interpreter'
], {
minZoom: 18
}),
THREE.OverpassJsonLoader.getSingleton());
world.setPosition(-73.982704, 40.7489443, 0, 0);
</script>
</body>
</html>
This diff is collapsed.
{
"name": "webpack-library-starter",
"version": "0.2.1",
"description": "Produce universal library with webpack and es6",
"main": "lib/OpenEarthView.js",
"scripts": {
"build": "webpack --mode=build",
"dev": "webpack --progress --colors --watch --mode=dev",
"test": "mocha --compilers js:babel-core/register --colors ./test/*.spec.js",
"test:watch": "mocha --compilers js:babel-core/register --colors -w ./test/*.spec.js"
},
"dependencies": {
"three": ""
},
"devDependencies": {
"babel": "6.3.13",
"babel-core": "6.1.18",
"babel-eslint": "5.0.0",
"babel-loader": "6.1.0",
"babel-plugin-add-module-exports": "0.1.2",
"babel-preset-es2015": "6.3.13",
"chai": "3.4.1",
"eslint": "1.7.2",
"eslint-loader": "1.1.0",
"mocha": "2.3.4",
"webpack": "1.12.9",
"yargs": "3.32.0"
},
"repository": {
"type": "git",
"url": "https://github.com/krasimir/webpack-library-starter.git"
},
"keywords": [
"webpack",
"es6",
"starter",
"library",
"universal",
"umd",
"commonjs"
],
"author": "Krasimir Tsonev",
"license": "MIT",
"bugs": {
"url": "https://github.com/krasimir/webpack-library-starter/issues"
},
"homepage": "https://github.com/krasimir/webpack-library-starter"
}
This diff is collapsed.
// export default class OpenEarthView {
// constructor() {
// this._name = 'OpenEarthView';
// }
// get name() {
// return this._name;
// }
// }
var THREE = require('THREE');
THREE.EarthControls = require('./controls/EarthControls.js');
export default {
World: require('./world.js'),
toolbox: require('./toolbox.js'),
Layer: {
// OverpassBuilding: require('./layers/OverpassBuildingLayer.js'),
OSM: require('./layers/OsmLayer.js')
}
// EarthControls: require('./controls/EarthControls_function.js')
// EarthControls: require('./controls/EarthControls.js')
};
// OpenEarthView.TileLoader = require("./loaders/TileLoader.js");
// world.addLayer(new OpenEarthView.Layer.OSM(
// "OpenStreetMap", [
// "http://a.tile.openstreetmap.org/${z}/${x}/${y}.png",
// "http://b.tile.openstreetmap.org/${z}/${x}/${y}.png",
// "http://c.tile.openstreetmap.org/${z}/${x}/${y}.png"
// ]));
class OSM {
constructor(name, urls) {
this.name = (name !== undefined) ? name : 'OpenStreetMap';
// if (OpenEarthViewLayers.hasOwnProperty(name)) {
// console.err('Cannot register this already existing layer !');
// return;
// }
this.urls = (urls !== undefined) ? urls : [
'http://a.tile.openstreetmap.org/${z}/${x}/${y}.png',
'http://b.tile.openstreetmap.org/${z}/${x}/${y}.png',
'http://c.tile.openstreetmap.org/${z}/${x}/${y}.png'
];
this.type = OSM.type;
}
getName() {
return this.name;
}
getUrl(zoom, xtile, ytile) {
let urlRandom = this.urls[
Math.floor(Math.random() * this.urls.length)];
let url = urlRandom.replace('${z}', zoom);
url = url.replace('${x}', xtile);
return url.replace('${y}', ytile);
}
}
OSM.type = 'tile';
OSM.opacity = 1;
export default OSM;
/**
Open Earth View - viewer-threejs
The MIT License (MIT)
Copyright (c) 2016 Clément Igonet
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.
* @author Clement Igonet
*/
// OpenEarthView.TileLoader = function() {
// this.textureLoader = new THREE.TextureLoader();
// this.textureLoader.crossOrigin = '';
// // this.textureLoader
// };
var THREE = require('THREE');
class TileLoader {
constructor() {
this.textureLoader = new THREE.TextureLoader();
this.textureLoader.crossOrigin = '';
this.textures = {};
this.textureRequests = {};
this.textureRequestsCount = 0;
this.textureAliveRequests = {};
this.textureAliveRequestsCount = 0;
}
loadNextTile() {
// let scope = this;
// textureLoader.crossOrigin: '';
// console.log('textureAliveRequestsCount:', textureAliveRequestsCount, '/textureRequestsCount:', textureRequestsCount);
let textures = this.textures;
let textureRequests = this.textureRequests;
let textureAliveRequests = this.textureAliveRequests;
// console.log('scope.textureAliveRequestsCount: ', scope.textureAliveRequestsCount);
// console.log('scope.textureRequestsCount: ', scope.textureRequestsCount);
while (this.textureAliveRequestsCount < TileLoader.MAX_TEXTURE_REQUEST && this.textureRequestsCount > 0) {
let ids = Object.keys(textureRequests);
let id = ids[ids.length - 1];
this.textureAliveRequestsCount = this.textureAliveRequestsCount + (textureAliveRequests.hasOwnProperty(id) ? 0 : 1);
textureAliveRequests[id] = textureRequests[id];
let url = textureAliveRequests[id].url;
delete textureRequests[id];
this.textureRequestsCount--;
// console.log('(2) scope.textureAliveRequestsCount: ', scope.textureAliveRequestsCount);
// console.log('(2) scope.textureRequestsCount: ', scope.textureRequestsCount);
let scope = this;
(function(url, id) {
// console.log("Asking for loading: ", url);
// zoom =
textureAliveRequests[id].request = scope.textureLoader.load(url,
function(texture) {
textures[id] = texture;
if (textureAliveRequests.hasOwnProperty(id)) {
textureAliveRequests[id].onLoaded(texture);
delete textureAliveRequests[id];
scope.textureAliveRequestsCount--;
// console.log('(0) scope.textureAliveRequestsCount: ', scope.textureAliveRequestsCount);
// console.log('(0) scope.textureRequestsCount: ', scope.textureRequestsCount);
}
scope.loadNextTile();
},
function() {},
function() {
if (textureAliveRequests.hasOwnProperty(id)) {
// textureAliveRequests[id].onLoaded(texture);
delete textureAliveRequests[id];
scope.textureAliveRequestsCount--;
// console.log('scope.textureAliveRequestsCount: ', scope.textureAliveRequestsCount);
// console.log('scope.textureRequestsCount: ', scope.textureRequestsCount);
}
scope.loadNextTile();
}
);
})(url, id);
}
};
// var TILE_PROVIDER01 = '.tile.openstreetmap.org';
// var TILE_PROVIDER01_RANDOM = ['a', 'b', 'c'];
// var TILE_PROVIDER01_FILE_EXT = 'png';
tilePreload(zoom, xtile, ytile, onLoaded) {
let textures = this.textures;
// let textureRequests = this.textureRequests;
// let textureAliveRequests = this.textureAliveRequests;
// let id = zoom + '/' + xtile + '/' + ytile;
for (let diff = 0; diff < zoom; diff++) {
let power = Math.pow(2, diff);
let idZoomOther = (+zoom - diff) + '/' + Math.floor(xtile / power) + '/' + Math.floor(ytile / power);
// console.log('Looking for texture: ', idZoomOther);
if (textures.hasOwnProperty(idZoomOther)) {
// onLoaded(textures[idZoomOther]);
// origin : bottom left
let tex = textures[idZoomOther].clone();
tex.repeat.x = 1 / power;
tex.repeat.y = 1 / power;
let xOffset = xtile - Math.floor(xtile / power) * power;
// console.log('xOffset: ', xOffset);
let yOffset = (power - 1) - (ytile - Math.floor(ytile / power) * power);
// console.log('yOffset: ', yOffset);
tex.offset.x = xOffset * tex.repeat.x;
tex.offset.y = yOffset * tex.repeat.y;
tex.needsUpdate = true;
onLoaded(tex);
return;
}
}
// for (var diff = Math.min(zoom - 19, -8); diff < Math.min(zoom - 1, -1); diff++) {
// var power = Math.pow(2, diff);
// var idZoomOther = (+zoom - diff) + '/' + Math.floor(xtile / power) + '/' + Math.floor(ytile / power);
// // console.log('Looking for texture: ', idZoomOther);
// if (textures.hasOwnProperty(idZoomOther)) {
// // onLoaded(textures[idZoomOther]);
// // origin : bottom left
// var tex = textures[idZoomOther].clone();
// tex.repeat.x = 1 / power;
// tex.repeat.y = 1 / power;
// var xOffset = xtile - Math.floor(xtile / power) * power
// console.log('xOffset: ', xOffset);
// var yOffset = (power - 1) - (ytile - Math.floor(ytile / power) * power);
// console.log('yOffset: ', yOffset);
// tex.offset.x = xOffset * tex.repeat.x;
// tex.offset.y = yOffset * tex.repeat.y;
// tex.needsUpdate = true;
// onLoaded(tex);
// return;
// }
// }
}
tileFactory(url, zoom, xtile, ytile, onLoaded) {
// let scope = this;
let textures = this.textures;
let textureRequests = this.textureRequests;
// let textureAliveRequests = this.textureAliveRequests;
// var id = 'tile' + zoom + '_' + xtile + '_' + ytile + '_' + layerName;
// var myUrl = new URL(url);
let id = zoom + '/' + xtile + '/' + ytile;
if (textures.hasOwnProperty(id)) {
// onLoaded(textures[id]);
} else {
this.textureRequestsCount = this.textureRequestsCount + (textureRequests.hasOwnProperty(id) ? 0 : 1);
// console.log('scope.textureAliveRequestsCount: ', scope.textureAliveRequestsCount);
// console.log('scope.textureRequestsCount: ', scope.textureRequestsCount);
textureRequests[id] = {
zoom: zoom,
xtile: xtile,
ytile: ytile,
url: url,
onLoaded: onLoaded
};
this.loadNextTile();
}
}
cancelOtherRequests(currentIds) {
// let scope = this;
// let textures = this.textures;
let textureRequests = this.textureRequests;
let textureAliveRequests = this.textureAliveRequests;
// console.log('currentIds: ', JSON.stringify(currentIds));
for (let id in textureRequests) {
if (!currentIds.hasOwnProperty(id)) {
delete textureRequests[id];
this.textureRequestsCount--;
// console.log('id: ', id);
// console.log('(1) scope.textureAliveRequestsCount: ', scope.textureAliveRequestsCount);
// console.log('(1) scope.textureRequestsCount: ', scope.textureRequestsCount);
}
}
for (let id in textureAliveRequests) {
if (!currentIds.hasOwnProperty(id)) {
// if (textureAliveRequests[id].request.hasOwnProperty('abort')) {
// textureAliveRequests[id].request.abort();
// }
// delete textureAliveRequests[id];
// textureAliveRequestsCount--;
}
}
this.loadNextTile();
}
}
TileLoader.MAX_TEXTURE_REQUEST = 10;
export default new TileLoader();
// var OpenEarthView = require("../openearthview.js");
// OpenEarthView.Terrain = require("./Terrain.js");
// this.terrains["defaultTerrain"] = new OpenEarthView.Terrain.FlatTerrain("FlatTerrain");
// // this.addTerrain("defaultTerrain", new OpenEarthView.Terrain.FlatTerrain("FlatTerrain"));
// // world.addTerrain(new OpenEarthView.Terrain.FlatTerrain("FlatTerrain"));
export default class {
constructor(name, urls, options) {
this.type = 'terrain';
this.name = (name !== undefined) ? name : 'OpenEarthView';
// if (OpenEarthView.Terrains.hasOwnProperty(name)) {
// console.err('Cannot register this already existing layer !');
// return;
// }
// OpenEarthView.Terrains[name] = [];
}
getName() {
return this.name;
}
getUrl(zoom, xtile, ytile) {
return undefined;
}
}
// TOOLBOX //
/**
Open Earth View - viewer-threejs
The MIT License (MIT)
Copyright (c) 2016 Clément Igonet
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.
*/
// OpenEarthView.toolbox = function() {
// this.textureLoader = new THREE.TextureLoader();
// this.textureLoader.crossOrigin = '';
// };
// var OpenEarthView = require("./openearthview.js");
var THREE = require('THREE');
let instance = null;
//
// class Cache {
// constructor() {
// if (!instance) {
// instance = this;
// }
//
// // to test whether we have singleton or not
// this.time = new Date()
//
// return instance;
// }
// }
class Toolbox {
constructor() {
if (!instance) {
instance = this;