Skip to content

Commit

Permalink
chore: update packages.
Browse files Browse the repository at this point in the history
  • Loading branch information
gchoqueux committed Nov 27, 2019
1 parent 6df3c3c commit 2955aaf
Show file tree
Hide file tree
Showing 10 changed files with 1,786 additions and 735 deletions.
2,424 changes: 1,739 additions & 685 deletions package-lock.json

Large diffs are not rendered by default.

46 changes: 23 additions & 23 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,57 +40,57 @@
},
"homepage": "https://itowns.github.io/",
"dependencies": {
"@babel/polyfill": "^7.6.0",
"@babel/runtime": "^7.6.2",
"@mapbox/mapbox-gl-style-spec": "^13.9.0",
"@babel/polyfill": "^7.7.0",
"@babel/runtime": "^7.7.4",
"@mapbox/mapbox-gl-style-spec": "^13.9.1",
"@mapbox/togeojson": "^0.16.0",
"@mapbox/vector-tile": "^1.3.1",
"@tweenjs/tween.js": "^18.3.1",
"@tweenjs/tween.js": "^18.4.2",
"earcut": "^2.2.1",
"js-priority-queue": "^0.1.5",
"pbf": "^3.2.0",
"pbf": "^3.2.1",
"shpjs": "^3.4.3",
"text-encoding-utf-8": "^1.0.2"
},
"peerDependencies": {
"proj4": "^2.5.0",
"three": "^0.109.0"
"three": "^0.110.0"
},
"devDependencies": {
"@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/cli": "^7.7.4",
"@babel/core": "^7.7.4",
"@babel/plugin-transform-runtime": "^7.7.4",
"@babel/preset-env": "^7.7.4",
"@babel/register": "^7.7.4",
"babel-inline-import-loader": "^0.1.0",
"babel-loader": "^8.0.6",
"babel-plugin-inline-import": "^3.0.0",
"babel-plugin-minify-dead-code-elimination": "^0.5.1",
"babel-plugin-minify-replace": "^0.5.0",
"babel-plugin-module-resolver": "^3.2.0",
"chalk": "^2.4.2",
"chart.js": "^2.8.0",
"chalk": "^3.0.0",
"chart.js": "^2.9.3",
"copyfiles": "^2.1.1",
"cross-env": "^6.0.2",
"eslint": "^6.5.1",
"cross-env": "^6.0.3",
"eslint": "^6.7.1",
"eslint-config-airbnb-base": "^14.0.0",
"eslint-import-resolver-webpack": "^0.11.1",
"eslint-loader": "^3.0.2",
"eslint-plugin-import": "^2.18.2",
"https-proxy-agent": "^2.2.2",
"https-proxy-agent": "^3.0.1",
"jsdoc": "^3.6.3",
"marked": "^0.7.0",
"mocha": "^6.2.1",
"mocha": "^6.2.2",
"node-fetch": "^2.6.0",
"nyc": "^14.1.1",
"proj4": "^2.5.0",
"puppeteer": "^1.20.0",
"replace-in-file": "^4.1.3",
"three": "^0.109.0",
"puppeteer": "^2.0.0",
"replace-in-file": "^4.2.0",
"three": "^0.110.0",
"url-polyfill": "^1.1.7",
"webpack": "^4.41.0",
"webpack-cli": "^3.3.9",
"webpack-dev-server": "^3.8.1",
"webpack": "^4.41.2",
"webpack-cli": "^3.3.10",
"webpack-dev-server": "^3.9.0",
"whatwg-fetch": "^3.0.0"
}
}
28 changes: 14 additions & 14 deletions src/Converter/Feature2Mesh.js
Original file line number Diff line number Diff line change
Expand Up @@ -157,9 +157,9 @@ function featureToPoint(feature, options) {
}

const geom = new THREE.BufferGeometry();
geom.addAttribute('position', new THREE.BufferAttribute(vertices, 3));
geom.addAttribute('color', new THREE.BufferAttribute(colors, 3, true));
if (batchIds) { geom.addAttribute('batchId', new THREE.BufferAttribute(batchIds, 1)); }
geom.setAttribute('position', new THREE.BufferAttribute(vertices, 3));
geom.setAttribute('color', new THREE.BufferAttribute(colors, 3, true));
if (batchIds) { geom.setAttribute('batchId', new THREE.BufferAttribute(batchIds, 1)); }

return new THREE.Points(geom, pointMaterial);
}
Expand All @@ -182,7 +182,7 @@ function featureToLine(feature, options) {
vertices = new Float32Array(ptsIn);
}
const geom = new THREE.BufferGeometry();
geom.addAttribute('position', new THREE.BufferAttribute(vertices, 3));
geom.setAttribute('position', new THREE.BufferAttribute(vertices, 3));

if (feature.geometry.length > 1) {
const countIndices = (count - feature.geometry.length) * 2;
Expand Down Expand Up @@ -214,18 +214,18 @@ function featureToLine(feature, options) {
featureId++;
}
}
geom.addAttribute('color', new THREE.BufferAttribute(colors, 3, true));
if (batchIds) { geom.addAttribute('batchId', new THREE.BufferAttribute(batchIds, 1)); }
geom.setAttribute('color', new THREE.BufferAttribute(colors, 3, true));
if (batchIds) { geom.setAttribute('batchId', new THREE.BufferAttribute(batchIds, 1)); }
geom.setIndex(new THREE.BufferAttribute(indices, 1));
return new THREE.LineSegments(geom, lineMaterial);
} else {
const color = getProperty('color', options, randomColor, feature.geometry[0].properties);
fillColorArray(colors, count, color);
geom.addAttribute('color', new THREE.BufferAttribute(colors, 3, true));
geom.setAttribute('color', new THREE.BufferAttribute(colors, 3, true));
if (batchIds) {
const id = options.batchId(feature.geometry.properties, featureId);
fillBatchIdArray(id, batchIds, 0, count);
geom.addAttribute('batchId', new THREE.BufferAttribute(batchIds, 1));
geom.setAttribute('batchId', new THREE.BufferAttribute(batchIds, 1));
}
return new THREE.Line(geom, lineMaterial);
}
Expand Down Expand Up @@ -280,9 +280,9 @@ function featureToPolygon(feature, options) {
}

const geom = new THREE.BufferGeometry();
geom.addAttribute('position', new THREE.BufferAttribute(vertices, 3));
geom.addAttribute('color', new THREE.BufferAttribute(colors, 3, true));
if (batchIds) { geom.addAttribute('batchId', new THREE.BufferAttribute(batchIds, 1)); }
geom.setAttribute('position', new THREE.BufferAttribute(vertices, 3));
geom.setAttribute('color', new THREE.BufferAttribute(colors, 3, true));
if (batchIds) { geom.setAttribute('batchId', new THREE.BufferAttribute(batchIds, 1)); }

geom.setIndex(new THREE.BufferAttribute(new Uint16Array(indices), 1));

Expand Down Expand Up @@ -370,9 +370,9 @@ function featureToExtrudedPolygon(feature, options) {
}

const geom = new THREE.BufferGeometry();
geom.addAttribute('position', new THREE.BufferAttribute(vertices, 3));
geom.addAttribute('color', new THREE.BufferAttribute(colors, 3, true));
if (batchIds) { geom.addAttribute('batchId', new THREE.BufferAttribute(batchIds, 1)); }
geom.setAttribute('position', new THREE.BufferAttribute(vertices, 3));
geom.setAttribute('color', new THREE.BufferAttribute(colors, 3, true));
if (batchIds) { geom.setAttribute('batchId', new THREE.BufferAttribute(batchIds, 1)); }

geom.setIndex(new THREE.BufferAttribute(new Uint16Array(indices), 1));

Expand Down
6 changes: 3 additions & 3 deletions src/Core/TileGeometry.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@ class TileGeometry extends THREE.BufferGeometry {
this.extent = params.extent;

this.setIndex(buffers.index);
this.addAttribute('position', buffers.position);
this.addAttribute('normal', buffers.normal);
this.setAttribute('position', buffers.position);
this.setAttribute('normal', buffers.normal);

for (let i = 0; i < buffers.uvs.length; i++) {
this.addAttribute(`uv_${i}`, buffers.uvs[i]);
this.setAttribute(`uv_${i}`, buffers.uvs[i]);
}

this.computeBoundingBox();
Expand Down
3 changes: 0 additions & 3 deletions src/Core/View.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,6 @@ 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: 2 additions & 2 deletions src/Parser/PntsParser.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,12 +80,12 @@ function parseFeatureBinary(array, byteOffset, FTJSONLength) {
if (parseJSON.POSITION) {
const byteOffsetPos = (parseJSON.POSITION.byteOffset + subArrayJson.length + byteOffset);
const positionArray = new Float32Array(array, byteOffsetPos, lengthFeature * 3);
geometry.addAttribute('position', new THREE.BufferAttribute(positionArray, 3));
geometry.setAttribute('position', new THREE.BufferAttribute(positionArray, 3));
}
if (parseJSON.RGB) {
const byteOffsetCol = parseJSON.RGB.byteOffset + subArrayJson.length + byteOffset;
const colorArray = new Uint8Array(array, byteOffsetCol, lengthFeature * 3);
geometry.addAttribute('color', new THREE.BufferAttribute(colorArray, 3, true));
geometry.setAttribute('color', new THREE.BufferAttribute(colorArray, 3, true));
}
if (parseJSON.POSITION_QUANTIZED) {
throw new Error('For pnts loader, POSITION_QUANTIZED: not yet managed');
Expand Down
2 changes: 1 addition & 1 deletion src/Parser/PotreeBinParser.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ export default {
}
elemOffset += attr.byteSize;
attrOffset = elemOffset;
geometry.addAttribute(attr.attributeName, new THREE.BufferAttribute(array, attr.numElements, attr.normalized));
geometry.setAttribute(attr.attributeName, new THREE.BufferAttribute(array, attr.numElements, attr.normalized));
}

geometry.computeBoundingBox();
Expand Down
4 changes: 2 additions & 2 deletions src/Parser/PotreeCinParser.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ export default {
const colors = new Uint8Array(buffer, 24 + 3 * 4 * numPoints, 4 * numPoints);

const geometry = new THREE.BufferGeometry();
geometry.addAttribute('position', new THREE.BufferAttribute(positions, 3));
geometry.addAttribute('color', new THREE.BufferAttribute(colors, 4, true));
geometry.setAttribute('position', new THREE.BufferAttribute(positions, 3));
geometry.setAttribute('color', new THREE.BufferAttribute(colors, 4, true));
geometry.boundingBox = box;

return Promise.resolve(geometry);
Expand Down
2 changes: 1 addition & 1 deletion src/Provider/PointCloudProvider.js
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ function addPickingAttribute(points) {
}

points.baseId = baseId;
points.geometry.addAttribute('unique_id', new THREE.BufferAttribute(ids, 4, true));
points.geometry.setAttribute('unique_id', new THREE.BufferAttribute(ids, 4, true));
return points;
}

Expand Down
2 changes: 1 addition & 1 deletion utils/debug/OBBHelper.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class OBBHelper extends THREE.LineSegments {

const geometry = new THREE.BufferGeometry();
geometry.setIndex(new THREE.BufferAttribute(indices, 1));
geometry.addAttribute('position', new THREE.BufferAttribute(positions, 3));
geometry.setAttribute('position', new THREE.BufferAttribute(positions, 3));

const color = new THREE.Color(Math.random(), Math.random(), Math.random());

Expand Down

0 comments on commit 2955aaf

Please sign in to comment.