Skip to content

Commit

Permalink
chore: update packages.
Browse files Browse the repository at this point in the history
  • Loading branch information
gchoqueux committed Oct 4, 2019
1 parent 5b9d94c commit 22e2a66
Show file tree
Hide file tree
Showing 12 changed files with 575 additions and 542 deletions.
1,017 changes: 542 additions & 475 deletions package-lock.json

Large diffs are not rendered by default.

40 changes: 20 additions & 20 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,28 +40,28 @@
},
"homepage": "https://itowns.github.io/",
"dependencies": {
"@babel/polyfill": "^7.4.4",
"@babel/runtime": "^7.5.5",
"@mapbox/mapbox-gl-style-spec": "^13.8.0",
"@babel/polyfill": "^7.6.0",
"@babel/runtime": "^7.6.2",
"@mapbox/mapbox-gl-style-spec": "^13.9.0",
"@mapbox/togeojson": "^0.16.0",
"@mapbox/vector-tile": "^1.3.1",
"@tweenjs/tween.js": "^18.1.2",
"earcut": "^2.1.5",
"@tweenjs/tween.js": "^18.3.1",
"earcut": "^2.2.1",
"js-priority-queue": "^0.1.5",
"pbf": "^3.2.0",
"shpjs": "^3.4.3",
"text-encoding-utf-8": "^1.0.2"
},
"peerDependencies": {
"proj4": "^2.5.0",
"three": "^0.108.0"
"three": "^0.109.0"
},
"devDependencies": {
"@babel/cli": "^7.5.5",
"@babel/core": "^7.5.5",
"@babel/plugin-transform-runtime": "^7.5.5",
"@babel/preset-env": "^7.5.5",
"@babel/register": "^7.5.5",
"@babel/cli": "^7.6.2",
"@babel/core": "^7.6.2",
"@babel/plugin-transform-runtime": "^7.6.2",
"@babel/preset-env": "^7.6.2",
"@babel/register": "^7.6.2",
"babel-inline-import-loader": "^0.1.0",
"babel-loader": "^8.0.6",
"babel-plugin-inline-import": "^3.0.0",
Expand All @@ -71,26 +71,26 @@
"chalk": "^2.4.2",
"chart.js": "^2.8.0",
"copyfiles": "^2.1.1",
"cross-env": "^5.2.1",
"eslint": "^6.3.0",
"cross-env": "^6.0.2",
"eslint": "^6.5.1",
"eslint-config-airbnb-base": "^14.0.0",
"eslint-import-resolver-webpack": "^0.11.1",
"eslint-loader": "^3.0.0",
"eslint-loader": "^3.0.2",
"eslint-plugin-import": "^2.18.2",
"https-proxy-agent": "^2.2.2",
"jsdoc": "^3.6.3",
"marked": "^0.7.0",
"mocha": "^6.2.0",
"mocha": "^6.2.1",
"node-fetch": "^2.6.0",
"nyc": "^14.1.1",
"proj4": "^2.5.0",
"puppeteer": "^1.19.0",
"puppeteer": "^1.20.0",
"replace-in-file": "^4.1.3",
"three": "^0.108.0",
"three": "^0.109.0",
"url-polyfill": "^1.1.7",
"webpack": "^4.39.3",
"webpack-cli": "^3.3.7",
"webpack-dev-server": "^3.8.0",
"webpack": "^4.41.0",
"webpack-cli": "^3.3.9",
"webpack-dev-server": "^3.8.1",
"whatwg-fetch": "^3.0.0"
}
}
1 change: 0 additions & 1 deletion src/Converter/Feature2Texture.js
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,6 @@ export default {
data[1] = backgroundColor.g * 255;
data[2] = backgroundColor.b * 255;
texture = new THREE.DataTexture(data, 1, 1, THREE.RGBFormat);
texture.needsUpdate = true;
} else {
texture = new THREE.Texture();
}
Expand Down
39 changes: 4 additions & 35 deletions src/Core/Prefab/Globe/Shaders/CloudsVS.glsl
Original file line number Diff line number Diff line change
@@ -1,17 +1,5 @@

#ifdef USE_LOGDEPTHBUF

#ifdef USE_LOGDEPTHBUF_EXT

varying float vFragDepth;

#endif

uniform float logDepthBufFC;

#endif

#define EPSILON 1e-6
#include <common>
#include <logdepthbuf_pars_vertex>

uniform vec3 lightPosition;
varying vec2 vUv;
Expand All @@ -20,32 +8,13 @@ varying vec3 pos;
vec3 normalES;
vec3 normalCAMES;


void main()
{
void main() {

vUv = uv;
vNormal = normal;
pos = position;
gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );


#ifdef USE_LOGDEPTHBUF

gl_Position.z = log2(max( EPSILON, gl_Position.w + 1.0 )) * logDepthBufFC;

#ifdef USE_LOGDEPTHBUF_EXT

vFragDepth = 1.0 + gl_Position.w;

#else

gl_Position.z = (gl_Position.z - 1.0) * gl_Position.w;

#endif

#endif

#include <logdepthbuf_vertex>
}


3 changes: 1 addition & 2 deletions src/Core/Prefab/Globe/Shaders/GlowFS.glsl
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@ varying float intensity;

vec4 glowColor = vec4(0.45, 0.74, 1. ,1.0);

void main()
{
void main() {
#include <logdepthbuf_fragment>
gl_FragColor = glowColor * intensity;
}
Expand Down
2 changes: 1 addition & 1 deletion src/Core/Prefab/Globe/Shaders/GlowVS.glsl
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#include <common>
#include <logdepthbuf_pars_vertex>
#define EPSILON 1e-6

uniform int atmoIN;
varying float intensity;
Expand Down
3 changes: 3 additions & 0 deletions src/Core/View.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ import { getMaxColorSamplerUnitsCount } from 'Renderer/LayeredMaterial';
import Scheduler from 'Core/Scheduler/Scheduler';
import Picking from 'Core/Picking';

// TEMPORY fix, on waiting THREE v110.
THREE.ShaderChunk.logdepthbuf_fragment = THREE.ShaderChunk.logdepthbuf_fragment.replace('== 1.0', '> 0.5');

export const VIEW_EVENTS = {
/**
* Fires when all the layers of the view are considered initialized.
Expand Down
4 changes: 1 addition & 3 deletions src/Provider/Fetcher.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,7 @@ const arrayBuffer = (url, options = {}) => fetch(url, options).then((response) =
});

const getTextureFloat = function getTextureFloat(buffer) {
const texture = new DataTexture(buffer, SIZE_TEXTURE_TILE, SIZE_TEXTURE_TILE, AlphaFormat, FloatType);
texture.needsUpdate = true;
return texture;
return new DataTexture(buffer, SIZE_TEXTURE_TILE, SIZE_TEXTURE_TILE, AlphaFormat, FloatType);
};

/**
Expand Down
1 change: 0 additions & 1 deletion src/Renderer/LayeredMaterial.js
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,6 @@ class LayeredMaterial extends THREE.RawShaderMaterial {
this.defines.NUM_VS_TEXTURES = nbSamplers[0];
this.defines.NUM_FS_TEXTURES = nbSamplers[1];
this.defines.USE_FOG = 1;
this.defines.EPSILON = 1e-6;
this.defines.NUM_CRS = crsCount;

setDefineMapping(this, 'ELEVATION', ELEVATION_MODES);
Expand Down
1 change: 0 additions & 1 deletion src/Renderer/OrientedImageMaterial.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ const ndcToTextureMatrix = new THREE.Matrix4().set(

const noMask = new THREE.DataTexture(new Uint8Array([255, 255, 255]), 1, 1, THREE.RGBFormat, THREE.UnsignedByteType);
const noTexture = new THREE.Texture();
noMask.needsUpdate = true;

const rawShaderMaterial = new THREE.RawShaderMaterial();
/**
Expand Down
1 change: 0 additions & 1 deletion src/Renderer/Shader/TileFS.glsl
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ void main() {
uvs[1] = vec3(vUv.x, fract(vUv.z), floor(vUv.z));
#endif


vec4 color;
#pragma unroll_loop
for ( int i = 0; i < NUM_FS_TEXTURES; i ++ ) {
Expand Down
5 changes: 3 additions & 2 deletions src/Renderer/Shader/TileVS.glsl
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#include <itowns/precision_qualifier>
#include <common>
#include <itowns/project_pars_vertex>
#include <itowns/elevation_pars_vertex>
#include <logdepthbuf_pars_vertex>
Expand All @@ -13,7 +14,7 @@ uniform bool lightingEnabled;

#if MODE == MODE_FINAL
#include <fog_pars_vertex>
varying vec3 vUv;
varying vec3 vUv;
varying vec3 vNormal;
#endif
void main() {
Expand All @@ -28,7 +29,7 @@ void main() {
#if NUM_CRS > 1
vUv = vec3(uv_0, (uv_1 > 0.) ? uv_1 : uv_0.y); // set uv_1 = uv_0 if uv_1 is undefined
#else
vUv = vec3(uv_0, 0.0);
vUv = vec3(uv_0, 0.0);
#endif
vNormal = normalize ( mat3( modelMatrix[0].xyz, modelMatrix[1].xyz, modelMatrix[2].xyz ) * normal );
#endif
Expand Down

0 comments on commit 22e2a66

Please sign in to comment.