From 3f920f41f3477aea4f2da05884c62e2b8ada0ca6 Mon Sep 17 00:00:00 2001 From: Gerald Choqueux Date: Wed, 14 Sep 2016 11:50:10 +0200 Subject: [PATCH] Change Three v79 to v80 the Three library now uses ES6 Modules --- package.json | 2 +- .../Commander/Providers/BuildingBox_Provider.js | 2 +- src/Core/Commander/Providers/GpxUtils.js | 2 +- src/Core/Commander/Providers/ItownsLine.js | 2 +- src/Core/Commander/Providers/ItownsPoint.js | 2 +- src/Core/Commander/Providers/KML_Provider.js | 2 +- .../Commander/Providers/PanoramicProvider.js | 2 +- src/Core/Commander/Providers/WMS_Provider.js | 2 +- src/Core/Commander/Providers/WMTS_Provider.js | 2 +- src/Core/Geographic/Projection.js | 2 +- src/Core/Math/Ellipsoid.js | 2 +- src/Core/Math/Sphere.js | 2 +- src/Core/defaultValue.js | 4 ++-- src/Globe/Atmosphere.js | 2 +- src/Globe/BuilderEllipsoidTile.js | 2 +- src/Globe/Clouds.js | 2 +- src/Globe/Globe.js | 2 +- src/Globe/SkyShader.js | 2 +- src/Globe/Star.js | 2 +- src/Globe/TileGeometry.js | 2 +- src/Globe/TileMesh.js | 2 +- src/MobileMapping/GeometryProj.js | 2 +- src/MobileMapping/MobileMappingLayer.js | 2 +- src/MobileMapping/Ori.js | 2 +- src/MobileMapping/Sensor.js | 2 +- src/Renderer/BasicMaterial.js | 2 +- src/Renderer/Camera.js | 2 +- src/Renderer/ItownsLineMaterial.js | 2 +- src/Renderer/ItownsPointMaterial.js | 2 +- src/Renderer/LayeredMaterial.js | 2 +- src/Renderer/MatteIdsMaterial.js | 2 +- src/Renderer/NodeMesh.js | 2 +- src/Renderer/ProjectiveTexturingMaterial.js | 2 +- src/Renderer/ThreeExtented/GlobeControls.js | 16 ++++++++-------- src/Renderer/ThreeExtented/KMZLoader.js | 2 +- src/Renderer/ThreeExtented/OBB.js | 2 +- src/Renderer/ThreeExtented/OBBHelper.js | 2 +- src/Renderer/ThreeExtented/SphereHelper.js | 2 +- src/Renderer/ThreeExtented/StarGeometry.js | 2 +- src/Renderer/ThreeExtented/threeExt.js | 2 +- src/Renderer/c3DEngine.js | 2 +- src/Scene/BoundingBox.js | 2 +- src/Scene/BrowseTree.js | 2 +- src/Scene/Layer.js | 2 +- src/Scene/NodeProcess.js | 2 +- src/Scene/Quadtree.js | 2 -- 46 files changed, 53 insertions(+), 55 deletions(-) diff --git a/package.json b/package.json index 68c5e21164..4a3141d1b3 100644 --- a/package.json +++ b/package.json @@ -28,7 +28,7 @@ "paralleljs": "^0.2.1", "simd": "^2.0.0", "string_format": "^0.0.6", - "three": "^0.79.0", + "three": "^0.80.0", "whatwg-fetch": "^1.0.0", "custom-event": "^1.0.0" }, diff --git a/src/Core/Commander/Providers/BuildingBox_Provider.js b/src/Core/Commander/Providers/BuildingBox_Provider.js index 84f02e4942..6f62fcf902 100644 --- a/src/Core/Commander/Providers/BuildingBox_Provider.js +++ b/src/Core/Commander/Providers/BuildingBox_Provider.js @@ -16,7 +16,7 @@ // TODO , will use WFS_Provider import Provider from 'Core/Commander/Providers/Provider'; import WFS_Provider from 'Core/Commander/Providers/WFS_Provider'; -import THREE from 'THREE'; +import * as THREE from 'THREE'; import Ellipsoid from 'Core/Math/Ellipsoid'; import GeoCoordinate,{UNIT} from 'Core/Geographic/GeoCoordinate'; import CVML from 'Core/Math/CVML'; diff --git a/src/Core/Commander/Providers/GpxUtils.js b/src/Core/Commander/Providers/GpxUtils.js index 2767734f9f..fda6ee1467 100644 --- a/src/Core/Commander/Providers/GpxUtils.js +++ b/src/Core/Commander/Providers/GpxUtils.js @@ -4,7 +4,7 @@ * Description: Parse Gpx file to get [lat, lon, alt] */ -import THREE from 'THREE'; +import * as THREE from 'THREE'; import IoDriverXML from 'Core/Commander/Providers/IoDriverXML'; import GeoCoordinate,{UNIT} from 'Core/Geographic/GeoCoordinate'; import ItownsLine from 'Core/Commander/Providers/ItownsLine'; diff --git a/src/Core/Commander/Providers/ItownsLine.js b/src/Core/Commander/Providers/ItownsLine.js index 0d6706a80e..7eb02c67c3 100644 --- a/src/Core/Commander/Providers/ItownsLine.js +++ b/src/Core/Commander/Providers/ItownsLine.js @@ -1,4 +1,4 @@ -import THREE from 'THREE'; +import * as THREE from 'THREE'; import ItownsLineMaterial from 'Renderer/ItownsLineMaterial'; var ItownsLine = function(options){ diff --git a/src/Core/Commander/Providers/ItownsPoint.js b/src/Core/Commander/Providers/ItownsPoint.js index 0aaef9b118..23b492d59f 100644 --- a/src/Core/Commander/Providers/ItownsPoint.js +++ b/src/Core/Commander/Providers/ItownsPoint.js @@ -1,4 +1,4 @@ -import THREE from 'THREE'; +import * as THREE from 'THREE'; import ItownsPointMaterial from 'Renderer/ItownsPointMaterial'; diff --git a/src/Core/Commander/Providers/KML_Provider.js b/src/Core/Commander/Providers/KML_Provider.js index d6d7744b97..ad53cb66a5 100644 --- a/src/Core/Commander/Providers/KML_Provider.js +++ b/src/Core/Commander/Providers/KML_Provider.js @@ -7,7 +7,7 @@ import Provider from 'Core/Commander/Providers/Provider'; import IoDriverXML from 'Core/Commander/Providers/IoDriverXML'; -import THREE from 'THREE'; +import * as THREE from 'THREE'; import KMZLoader from 'Renderer/ThreeExtented/KMZLoader'; import BasicMaterial from 'Renderer/BasicMaterial'; diff --git a/src/Core/Commander/Providers/PanoramicProvider.js b/src/Core/Commander/Providers/PanoramicProvider.js index 82cb31a3f4..1573209098 100644 --- a/src/Core/Commander/Providers/PanoramicProvider.js +++ b/src/Core/Commander/Providers/PanoramicProvider.js @@ -9,7 +9,7 @@ /* global Promise*/ -import THREE from 'three'; +import * as THREE from 'THREE'; import Provider from 'Core/Commander/Providers/Provider'; import BuildingBox_Provider from 'Core/Commander/Providers/BuildingBox_Provider'; import ProjectiveTexturingMaterial from 'Renderer/ProjectiveTexturingMaterial'; diff --git a/src/Core/Commander/Providers/WMS_Provider.js b/src/Core/Commander/Providers/WMS_Provider.js index e2ea69e2cb..5d40d9946a 100644 --- a/src/Core/Commander/Providers/WMS_Provider.js +++ b/src/Core/Commander/Providers/WMS_Provider.js @@ -10,7 +10,7 @@ import IoDriver_XBIL from 'Core/Commander/Providers/IoDriver_XBIL'; import IoDriver_Image from 'Core/Commander/Providers/IoDriver_Image'; import IoDriverXML from 'Core/Commander/Providers/IoDriverXML'; import defaultValue from 'Core/defaultValue'; -import THREE from 'THREE'; +import * as THREE from 'THREE'; import Projection from 'Core/Geographic/Projection'; import CacheRessource from 'Core/Commander/Providers/CacheRessource'; import mE from 'Core/Math/MathExtented'; diff --git a/src/Core/Commander/Providers/WMTS_Provider.js b/src/Core/Commander/Providers/WMTS_Provider.js index d8a23b72db..a7d2613ea5 100644 --- a/src/Core/Commander/Providers/WMTS_Provider.js +++ b/src/Core/Commander/Providers/WMTS_Provider.js @@ -11,7 +11,7 @@ import CoordWMTS from 'Core/Geographic/CoordWMTS'; import IoDriver_XBIL from 'Core/Commander/Providers/IoDriver_XBIL'; import IoDriver_Image from 'Core/Commander/Providers/IoDriver_Image'; import IoDriverXML from 'Core/Commander/Providers/IoDriverXML'; -import THREE from 'THREE'; +import * as THREE from 'THREE'; import CacheRessource from 'Core/Commander/Providers/CacheRessource'; function WMTS_Provider(options) { diff --git a/src/Core/Geographic/Projection.js b/src/Core/Geographic/Projection.js index 55d499c88d..32c156ca45 100644 --- a/src/Core/Geographic/Projection.js +++ b/src/Core/Geographic/Projection.js @@ -7,7 +7,7 @@ import CoordWMTS from 'Core/Geographic/CoordWMTS'; import MathExt from 'Core/Math/MathExtented'; import GeoCoordinate from 'Core/Geographic/GeoCoordinate'; -import THREE from 'THREE'; +import * as THREE from 'THREE'; function Projection() { diff --git a/src/Core/Math/Ellipsoid.js b/src/Core/Math/Ellipsoid.js index 015def9724..30f11b3d24 100644 --- a/src/Core/Math/Ellipsoid.js +++ b/src/Core/Math/Ellipsoid.js @@ -6,7 +6,7 @@ -import THREE from 'THREE'; +import * as THREE from 'THREE'; function Ellipsoid(size) { //Constructor diff --git a/src/Core/Math/Sphere.js b/src/Core/Math/Sphere.js index 1c99f88c6f..c1e64cea0d 100644 --- a/src/Core/Math/Sphere.js +++ b/src/Core/Math/Sphere.js @@ -1,4 +1,4 @@ -import THREE from 'THREE'; +import * as THREE from 'THREE'; function Sphere(center,radius) { diff --git a/src/Core/defaultValue.js b/src/Core/defaultValue.js index 036de1f773..42b737d7d5 100644 --- a/src/Core/defaultValue.js +++ b/src/Core/defaultValue.js @@ -5,12 +5,12 @@ */ -import THREE from 'THREE'; +import {Vector3} from 'THREE'; var defaultValue = function(value, def) { return value === undefined ? def : value; }; -defaultValue.lightingPos = new THREE.Vector3(1, 0, 0); +defaultValue.lightingPos = new Vector3(1, 0, 0); export default defaultValue; diff --git a/src/Globe/Atmosphere.js b/src/Globe/Atmosphere.js index d5ea82ec80..c3180c47d8 100644 --- a/src/Globe/Atmosphere.js +++ b/src/Globe/Atmosphere.js @@ -6,7 +6,7 @@ import NodeMesh from 'Renderer/NodeMesh'; -import THREE from 'THREE'; +import * as THREE from 'THREE'; import defaultValue from 'Core/defaultValue'; import Sky from 'Globe/SkyShader'; import skyFS from 'Renderer/Shader/skyFS.glsl'; diff --git a/src/Globe/BuilderEllipsoidTile.js b/src/Globe/BuilderEllipsoidTile.js index ca450de9f3..e3748027ae 100644 --- a/src/Globe/BuilderEllipsoidTile.js +++ b/src/Globe/BuilderEllipsoidTile.js @@ -1,5 +1,5 @@ import GeoCoordinate from 'Core/Geographic/GeoCoordinate'; -import THREE from 'THREE'; +import * as THREE from 'THREE'; import OBB from 'Renderer/ThreeExtented/OBB'; function BuilderEllipsoidTile(model, projector) { diff --git a/src/Globe/Clouds.js b/src/Globe/Clouds.js index 2ff5775b1b..d956978141 100644 --- a/src/Globe/Clouds.js +++ b/src/Globe/Clouds.js @@ -6,7 +6,7 @@ import NodeMesh from 'Renderer/NodeMesh'; -import THREE from 'THREE'; +import * as THREE from 'THREE'; import defaultValue from 'Core/defaultValue'; import WMS_Provider from 'Core/Commander/Providers/WMS_Provider'; import CloudsFS from 'Renderer/Shader/CloudsFS.glsl'; diff --git a/src/Globe/Globe.js b/src/Globe/Globe.js index 778d94818f..29c8839074 100644 --- a/src/Globe/Globe.js +++ b/src/Globe/Globe.js @@ -15,7 +15,7 @@ import Capabilities from 'Core/System/Capabilities'; import GeoCoordinate,{UNIT} from 'Core/Geographic/GeoCoordinate'; import BasicMaterial from 'Renderer/BasicMaterial'; import LayersConfiguration from 'Scene/LayersConfiguration'; -import THREE from 'THREE'; +import * as THREE from 'THREE'; /* eslint-disable */ diff --git a/src/Globe/SkyShader.js b/src/Globe/SkyShader.js index 8807f022a4..f64e4a8600 100644 --- a/src/Globe/SkyShader.js +++ b/src/Globe/SkyShader.js @@ -14,7 +14,7 @@ * Three.js integration by zz85 http://twitter.com/blurspline */ -import THREE from 'three'; +import * as THREE from 'THREE'; var skyShader = { diff --git a/src/Globe/Star.js b/src/Globe/Star.js index fb53da931c..8e1a7cd702 100644 --- a/src/Globe/Star.js +++ b/src/Globe/Star.js @@ -7,7 +7,7 @@ import NodeMesh from 'Renderer/NodeMesh'; import StarGeometry from 'StarGeometry'; -import THREE from 'three'; +import * as THREE from 'THREE'; diff --git a/src/Globe/TileGeometry.js b/src/Globe/TileGeometry.js index c454cc17c4..a127970b56 100644 --- a/src/Globe/TileGeometry.js +++ b/src/Globe/TileGeometry.js @@ -6,7 +6,7 @@ * Description: Tuile géométrique. Buffer des vertex et des faces */ /* global Float32Array*/ -import THREE from 'THREE'; +import * as THREE from 'THREE'; import defaultValue from 'Core/defaultValue'; import JavaTools from 'Core/System/JavaTools'; import CacheRessource from 'Core/Commander/Providers/CacheRessource'; diff --git a/src/Globe/TileMesh.js b/src/Globe/TileMesh.js index 675654eb2d..4001984c3b 100644 --- a/src/Globe/TileMesh.js +++ b/src/Globe/TileMesh.js @@ -21,7 +21,7 @@ import NodeMesh from 'Renderer/NodeMesh'; import TileGeometry from 'Globe/TileGeometry'; import BoundingBox from 'Scene/BoundingBox'; import defaultValue from 'Core/defaultValue'; -import THREE from 'THREE'; +import * as THREE from 'THREE'; import OBBHelper from 'OBBHelper'; import SphereHelper from 'SphereHelper'; import LayeredMaterial from 'Renderer/LayeredMaterial'; diff --git a/src/MobileMapping/GeometryProj.js b/src/MobileMapping/GeometryProj.js index 9b642b7b2e..661788776d 100644 --- a/src/MobileMapping/GeometryProj.js +++ b/src/MobileMapping/GeometryProj.js @@ -4,7 +4,7 @@ */ -import THREE from 'THREE'; +import * as THREE from 'THREE'; function GeometryProj() { //Constructor diff --git a/src/MobileMapping/MobileMappingLayer.js b/src/MobileMapping/MobileMappingLayer.js index 41deac86be..0314b4b720 100644 --- a/src/MobileMapping/MobileMappingLayer.js +++ b/src/MobileMapping/MobileMappingLayer.js @@ -5,7 +5,7 @@ */ import Layer from 'Scene/Layer'; -import THREE from 'THREE'; +import * as THREE from 'THREE'; import gfxEngine from 'Renderer/c3DEngine'; import Projection from 'Core/Geographic/Projection'; import PanoramicProvider from 'Core/Commander/Providers/PanoramicProvider'; diff --git a/src/MobileMapping/Ori.js b/src/MobileMapping/Ori.js index 10e911cf62..124c619c08 100644 --- a/src/MobileMapping/Ori.js +++ b/src/MobileMapping/Ori.js @@ -6,7 +6,7 @@ * @Depends Sensor.js */ -import THREE from 'three'; +import * as THREE from 'THREE'; import Sensor from 'MobileMapping/Sensor'; var Ori = { diff --git a/src/MobileMapping/Sensor.js b/src/MobileMapping/Sensor.js index 234dae0f1c..598ad2881b 100644 --- a/src/MobileMapping/Sensor.js +++ b/src/MobileMapping/Sensor.js @@ -4,7 +4,7 @@ */ -import THREE from 'three'; +import * as THREE from 'THREE'; var Sensor = function(infos) { diff --git a/src/Renderer/BasicMaterial.js b/src/Renderer/BasicMaterial.js index 75f9c642c0..3b95ac779b 100644 --- a/src/Renderer/BasicMaterial.js +++ b/src/Renderer/BasicMaterial.js @@ -5,7 +5,7 @@ */ -import THREE from 'THREE'; +import * as THREE from 'THREE'; import defaultValue from 'Core/defaultValue'; import c3DEngine from 'Renderer/c3DEngine'; import SimpleVS from 'Renderer/Shader/SimpleVS.glsl'; diff --git a/src/Renderer/Camera.js b/src/Renderer/Camera.js index 60470fa1de..810f1c79da 100644 --- a/src/Renderer/Camera.js +++ b/src/Renderer/Camera.js @@ -7,7 +7,7 @@ /* global Float64Array*/ import Node from 'Scene/Node'; -import THREE from 'THREE'; +import * as THREE from 'THREE'; function Camera(width, height, debug) { //Constructor diff --git a/src/Renderer/ItownsLineMaterial.js b/src/Renderer/ItownsLineMaterial.js index c1ca1978fe..dde3ff8c30 100644 --- a/src/Renderer/ItownsLineMaterial.js +++ b/src/Renderer/ItownsLineMaterial.js @@ -4,7 +4,7 @@ * and open the template in the editor. */ -import THREE from 'THREE'; +import * as THREE from 'THREE'; import BasicMaterial from 'Renderer/BasicMaterial'; import LineVS from 'Renderer/Shader/LineVS.glsl'; import LineFS from 'Renderer/Shader/LineFS.glsl'; diff --git a/src/Renderer/ItownsPointMaterial.js b/src/Renderer/ItownsPointMaterial.js index 9e20be5f15..781ea90a99 100644 --- a/src/Renderer/ItownsPointMaterial.js +++ b/src/Renderer/ItownsPointMaterial.js @@ -1,4 +1,4 @@ -import THREE from 'THREE'; +import * as THREE from 'THREE'; import BasicMaterial from 'Renderer/BasicMaterial'; import PointVS from 'Renderer/Shader/PointVS.glsl'; import PointFS from 'Renderer/Shader/PointFS.glsl'; diff --git a/src/Renderer/LayeredMaterial.js b/src/Renderer/LayeredMaterial.js index a3a78de0a8..c4f666fa24 100644 --- a/src/Renderer/LayeredMaterial.js +++ b/src/Renderer/LayeredMaterial.js @@ -5,7 +5,7 @@ */ -import THREE from 'THREE'; +import * as THREE from 'THREE'; import BasicMaterial from 'Renderer/BasicMaterial'; import gfxEngine from 'Renderer/c3DEngine'; import JavaTools from 'Core/System/JavaTools'; diff --git a/src/Renderer/MatteIdsMaterial.js b/src/Renderer/MatteIdsMaterial.js index 7625a1c18f..87b46cf946 100644 --- a/src/Renderer/MatteIdsMaterial.js +++ b/src/Renderer/MatteIdsMaterial.js @@ -5,7 +5,7 @@ */ -import THREE from 'THREE'; +import * as THREE from 'THREE'; import BasicMaterial from 'Renderer/BasicMaterial'; import MatteIdsFS from 'Renderer/Shader/MatteIdsFS.glsl'; import GlobeDepthVS from 'Renderer/Shader/GlobeDepthVS.glsl'; diff --git a/src/Renderer/NodeMesh.js b/src/Renderer/NodeMesh.js index ffda3f253b..20c6db6a00 100644 --- a/src/Renderer/NodeMesh.js +++ b/src/Renderer/NodeMesh.js @@ -7,7 +7,7 @@ import Node from 'Scene/Node'; -import THREE from 'THREE'; +import * as THREE from 'THREE'; var NodeMesh = function() { diff --git a/src/Renderer/ProjectiveTexturingMaterial.js b/src/Renderer/ProjectiveTexturingMaterial.js index db1cd7b5b7..776eb2cd28 100644 --- a/src/Renderer/ProjectiveTexturingMaterial.js +++ b/src/Renderer/ProjectiveTexturingMaterial.js @@ -7,7 +7,7 @@ */ import graphicEngine from 'Renderer/c3DEngine'; -import THREE from 'three'; +import * as THREE from 'THREE'; import Ori from 'MobileMapping/Ori'; import Shader from 'MobileMapping/Shader'; import url from 'url'; diff --git a/src/Renderer/ThreeExtented/GlobeControls.js b/src/Renderer/ThreeExtented/GlobeControls.js index e88cb5a625..6647559294 100644 --- a/src/Renderer/ThreeExtented/GlobeControls.js +++ b/src/Renderer/ThreeExtented/GlobeControls.js @@ -6,9 +6,7 @@ // Zoom - middle mouse, or mousewheel / touch: two finger spread or squish // Pan - right mouse, or arrow keys / touch: three finter swipe -/* global document,window*/ - -import THREE from 'three'; +import * as THREE from 'THREE'; import Sphere from 'Core/Math/Sphere'; import CustomEvent from 'custom-event'; @@ -177,10 +175,11 @@ var snapShotCamera; ///////////////////////// +/* globals document,window */ + function GlobeControls(camera, domElement, engine) { var scene = engine.scene; - this.camera = camera; snapShotCamera = new SnapCamera(camera); @@ -230,8 +229,9 @@ function GlobeControls(camera, domElement, engine) { if(enableTargetHelper) - + { this.pickingHelper = new THREE.AxisHelper( 500000 ); + } // Mouse buttons this.mouseButtons = { @@ -449,8 +449,9 @@ function GlobeControls(camera, domElement, engine) { var bbox = scene.getMap().getTile(coord).bbox; var delta = coord.altitude() - (bbox.top() + radiusCollision); - if(delta<0) + if (delta < 0) { position.setLength(position.length()-delta); + } } return position; @@ -1147,8 +1148,7 @@ function GlobeControls(camera, domElement, engine) { engine.scene3D.add(globeTarget); - if(enableTargetHelper) - { + if(enableTargetHelper) { globeTarget.add( new THREE.AxisHelper( 500000 )); engine.scene3D.add(this.pickingHelper); } diff --git a/src/Renderer/ThreeExtented/KMZLoader.js b/src/Renderer/ThreeExtented/KMZLoader.js index 2cf8c8a524..52c596e416 100644 --- a/src/Renderer/ThreeExtented/KMZLoader.js +++ b/src/Renderer/ThreeExtented/KMZLoader.js @@ -4,7 +4,7 @@ //var JSZip = require("C:/Users/vcoindet/Documents/NetBeansProjects/itownsV1/src/Renderer/ThreeExtented/jszip.min"); import JSZip from 'Renderer/ThreeExtented/jszip.min'; -import THREE from 'THREE'; +import * as THREE from 'THREE'; import IoDriverXML from 'Core/Commander/Providers/IoDriverXML'; import GeoCoordinate,{UNIT} from 'Core/Geographic/GeoCoordinate'; diff --git a/src/Renderer/ThreeExtented/OBB.js b/src/Renderer/ThreeExtented/OBB.js index 9f3048ee96..137c59da4b 100644 --- a/src/Renderer/ThreeExtented/OBB.js +++ b/src/Renderer/ThreeExtented/OBB.js @@ -5,7 +5,7 @@ */ -import THREE from 'three'; +import * as THREE from 'THREE'; function OBB(min, max, lookAt, translate) { THREE.Object3D.call(this); diff --git a/src/Renderer/ThreeExtented/OBBHelper.js b/src/Renderer/ThreeExtented/OBBHelper.js index 29d98a91f4..4967a71484 100644 --- a/src/Renderer/ThreeExtented/OBBHelper.js +++ b/src/Renderer/ThreeExtented/OBBHelper.js @@ -5,7 +5,7 @@ */ /* global Uint16Array Float32Array*/ -import THREE from 'three'; +import * as THREE from 'THREE'; // TODO regler le probleme glsl import fontJS from './fonts/optimer_regular.glsl'; diff --git a/src/Renderer/ThreeExtented/SphereHelper.js b/src/Renderer/ThreeExtented/SphereHelper.js index dc02cfbc50..7229ab44c5 100644 --- a/src/Renderer/ThreeExtented/SphereHelper.js +++ b/src/Renderer/ThreeExtented/SphereHelper.js @@ -5,7 +5,7 @@ */ -import THREE from 'three'; +import * as THREE from 'THREE'; function SphereHelper(radius) { THREE.Mesh.call(this); diff --git a/src/Renderer/ThreeExtented/StarGeometry.js b/src/Renderer/ThreeExtented/StarGeometry.js index 9dda83da76..f796e40c8a 100644 --- a/src/Renderer/ThreeExtented/StarGeometry.js +++ b/src/Renderer/ThreeExtented/StarGeometry.js @@ -5,7 +5,7 @@ */ -import THREE from 'three'; +import * as THREE from 'THREE'; function StarGeometry() { THREE.Geometry.call(this); diff --git a/src/Renderer/ThreeExtented/threeExt.js b/src/Renderer/ThreeExtented/threeExt.js index 511260305d..7651822a5e 100644 --- a/src/Renderer/ThreeExtented/threeExt.js +++ b/src/Renderer/ThreeExtented/threeExt.js @@ -3,7 +3,7 @@ * */ -import THREE from 'three'; +import * as THREE from 'THREE'; // mbredif: extend THREE.Matrix3 prototype to with some THREE.Matrix4 functionalities diff --git a/src/Renderer/c3DEngine.js b/src/Renderer/c3DEngine.js index 2db8f4e3db..cb26eecbff 100644 --- a/src/Renderer/c3DEngine.js +++ b/src/Renderer/c3DEngine.js @@ -6,7 +6,7 @@ /* global Uint8Array Float64Array*/ -import THREE from 'THREE'; +import * as THREE from 'THREE'; import GlobeControls from 'GlobeControls'; import Camera from 'Renderer/Camera'; import Atmosphere from 'Globe/Atmosphere'; diff --git a/src/Scene/BoundingBox.js b/src/Scene/BoundingBox.js index 7b4417d4bf..de337c9730 100644 --- a/src/Scene/BoundingBox.js +++ b/src/Scene/BoundingBox.js @@ -7,7 +7,7 @@ import defaultValue from 'Core/defaultValue'; import mE from 'Core/Math/MathExtented'; import Point2D from 'Core/Math/Point2D'; -import THREE from 'THREE'; +import * as THREE from 'THREE'; import GeoCoordinate from 'Core/Geographic/GeoCoordinate'; /** diff --git a/src/Scene/BrowseTree.js b/src/Scene/BrowseTree.js index 706c6093dc..3ad91d186b 100644 --- a/src/Scene/BrowseTree.js +++ b/src/Scene/BrowseTree.js @@ -4,7 +4,7 @@ * Description: BrowseTree parcourt un arbre de Node. Lors du parcours un ou plusieur NodeProcess peut etre appliqué sur certains Node. */ -import THREE from 'THREE'; +import * as THREE from 'THREE'; function BrowseTree(engine) { //Constructor diff --git a/src/Scene/Layer.js b/src/Scene/Layer.js index cc266fbdbb..52abe6a4e0 100644 --- a/src/Scene/Layer.js +++ b/src/Scene/Layer.js @@ -13,7 +13,7 @@ * @param {type} NodeMesh * @returns {Layer_L15.Layer} */ -import THREE from 'THREE'; +import * as THREE from 'THREE'; import Node from 'Scene/Node'; import Projection from 'Core/Geographic/Projection'; import NodeMesh from 'Renderer/NodeMesh'; diff --git a/src/Scene/NodeProcess.js b/src/Scene/NodeProcess.js index 617c4ba498..03e52378c8 100644 --- a/src/Scene/NodeProcess.js +++ b/src/Scene/NodeProcess.js @@ -6,7 +6,7 @@ import BoundingBox from 'Scene/BoundingBox'; import MathExt from 'Core/Math/MathExtented'; -import THREE from 'THREE'; +import * as THREE from 'THREE'; import defaultValue from 'Core/defaultValue'; import Projection from 'Core/Geographic/Projection'; import RendererConstant from 'Renderer/RendererConstant'; diff --git a/src/Scene/Quadtree.js b/src/Scene/Quadtree.js index df6a1de809..a33cbadc5b 100644 --- a/src/Scene/Quadtree.js +++ b/src/Scene/Quadtree.js @@ -15,7 +15,6 @@ import InterfaceCommander from 'Core/Commander/InterfaceCommander'; import Quad from 'Core/Geographic/Quad'; import NodeMesh from 'Renderer/NodeMesh'; - function commandQueuePriorityFunction(cmd) { var node = cmd.requester; @@ -62,7 +61,6 @@ function Quadtree(type, schemeTile, link) { this.add(rootNode); } - Quadtree.prototype = Object.create(Layer.prototype); Quadtree.prototype.constructor = Quadtree;