Skip to content
This repository was archived by the owner on Mar 8, 2023. It is now read-only.

Commit

Permalink
Merge branch 'master' into release
Browse files Browse the repository at this point in the history
Signed-off-by: Jonathan Stichbury <2533428+nzjony@users.noreply.github.com>
  • Loading branch information
nzjony committed Aug 2, 2021
2 parents 51adfc4 + 53a43a6 commit b1e7f22
Show file tree
Hide file tree
Showing 86 changed files with 3,342 additions and 1,901 deletions.
5 changes: 3 additions & 2 deletions @here/generator-harp.gl/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,14 @@
],
"dependencies": {
"mkdirp": "^1.0.4",
"yeoman-generator": "^4.10.1"
"yeoman-generator": "^5.2.0"
},
"devDependencies": {
"chai": "^4.2.0",
"fs.extra": "^1.3.2",
"mocha": "^8.2.1",
"yeoman-test": "^2.6.0"
"yeoman-environment": "^3.4.1",
"yeoman-test": "^6.1.0"
},
"publishConfig": {
"access": "public"
Expand Down
27 changes: 12 additions & 15 deletions @here/generator-harp.gl/test/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,8 @@ const fs = require("fs");
const fsExtra = require("fs.extra");
const path = require("path");
const yeomanTestHelpers = require("yeoman-test");
const {
assert
} = require("chai");
const {
spawnSync
} = require('child_process');
const { assert } = require("chai");
const { spawnSync } = require("child_process");

/*
Expand All @@ -17,43 +13,44 @@ const {
*/
describe("harp.gl:app", function () {

this.timeout(300000);

let helperDirectory;
let runContext;

before(async function () {
helperDirectory = await yeomanTestHelpers.run(path.join(__dirname, '../generators/app'))
runContext = await yeomanTestHelpers
.run(path.join(__dirname, "../generators/app"))
.inTmpDir(function (dir) {
if (process.env.USE_NPMRC) {
const targetPath = path.join(dir, ".npmrc");
fs.copyFileSync(process.env.USE_NPMRC, targetPath);
}
})
.withPrompts({
'access_token': 'test_token'
language: "typescript",
apikey: "test_token"
});

assert.isString(helperDirectory);
assert.isNotNull(runContext);
});

it("webpack", async function () {
const installStatus = spawnSync("npm", ["install"], {
cwd: helperDirectory
cwd: runContext.cwd
});
assert.strictEqual(installStatus.status, 0, installStatus.output);

const buildStatus = spawnSync("npm", ["run", "build"], {
cwd: helperDirectory
cwd: runContext.cwd
});
assert.strictEqual(buildStatus.status, 0, buildStatus.output);
});

after(function () {
if (process.env.KEEP_TEMP_DIR) {
console.log("Keeping", helperDirectory);
console.log("Keeping", runContext.cwd);
} else {
fsExtra.rmrfSync(helperDirectory);
fsExtra.rmrfSync(runContext.cwd);
}
});
});
2 changes: 1 addition & 1 deletion @here/harp-datasource-protocol/lib/TechniqueParams.ts
Original file line number Diff line number Diff line change
Expand Up @@ -480,7 +480,7 @@ export interface PointTechniqueParams extends BaseTechniqueParams {
/**
* Size of point in pixels.
*/
size?: number;
size?: DynamicProperty<number>;
/**
* Whether to enable picking on these points.
*/
Expand Down
6 changes: 3 additions & 3 deletions @here/harp-datasource-protocol/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,17 +33,17 @@
"@here/harp-test-utils": "^0.25.0",
"@types/chai": "^4.2.14",
"@types/mocha": "^8.2.0",
"@types/three": "^0.127.0",
"@types/three": "^0.129.0",
"chai": "^4.0.2",
"cross-env": "^7.0.2",
"mocha": "^8.2.1",
"source-map-support": "^0.5.19",
"three": "^0.127.0",
"three": "^0.129.0",
"ts-json-schema-generator": "^0.68.1",
"typescript": "^4.1.2"
},
"peerDependencies": {
"three": "^0.127.0"
"three": "^0.129.0"
},
"publishConfig": {
"access": "public"
Expand Down
4 changes: 2 additions & 2 deletions @here/harp-debug-datasource/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,15 @@
"@types/chai": "^4.2.14",
"@types/mocha": "^8.2.0",
"@types/node": "^14.0.5",
"@types/three": "^0.127.0",
"@types/three": "^0.129.0",
"chai": "^4.0.2",
"cross-env": "^7.0.2",
"mocha": "^8.2.1",
"source-map-support": "^0.5.19",
"typescript": "^4.1.2"
},
"peerDependencies": {
"three": "^0.127.0"
"three": "^0.129.0"
},
"publishConfig": {
"access": "public"
Expand Down
2 changes: 1 addition & 1 deletion @here/harp-examples/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<meta charset="utf-8" />
<meta name="viewport"
content="width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0" />
<link href="https://fonts.googleapis.com/css?family=Fira+Sans:400,500,600&amp;display=swap"
<link href="https://fonts.googleapis.com/css?family=Fira+Sans:normal,bold&amp;display=swap"
rel="stylesheet">
<style>
:root {
Expand Down
4 changes: 2 additions & 2 deletions @here/harp-examples/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
"@here/harp-webtile-datasource": "^0.25.0",
"@types/dat.gui": "^0.7.1",
"@types/long": "^4.0.1",
"@types/three": "^0.127.0",
"@types/three": "^0.129.0",
"copy-webpack-plugin": "^7.0.0",
"cross-env": "^7.0.2",
"css-loader": "^5.0.1",
Expand All @@ -54,7 +54,7 @@
"stats.js": "^0.17.0",
"style-loader": "^2.0.0",
"suncalc": "^1.8.0",
"three": "^0.127.0",
"three": "^0.129.0",
"ts-loader": "^8.0.7",
"typescript": "^4.1.2",
"webpack": "^5.12.3",
Expand Down
3 changes: 2 additions & 1 deletion @here/harp-examples/src/datasource_geojson_choropleth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,8 @@ export namespace GeoJsonHeatmapExample {
);
const geoJsonDataSource = new VectorTileDataSource({
dataProvider: geoJsonDataProvider,
styleSetName: "geojson"
styleSetName: "geojson",
addGroundPlane: false
});
baseMap.addDataSource(geoJsonDataSource);

Expand Down
3 changes: 2 additions & 1 deletion @here/harp-examples/src/datasource_geojson_custom-shader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,8 @@ export namespace GeoJsonCustomShaderExample {
private addEvRange() {
const datasource = new VectorTileDataSource({
dataProvider: new GeoJsonDataProvider("geojson", geojson as any),
styleSetName: "geojson"
styleSetName: "geojson",
addGroundPlane: false
});
this.mapView.addDataSource(datasource);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,8 @@ export namespace ElevatedGeoJsonMarkersExample {
new VectorTileDataSource({
dataProvider: new CustomGeoJsonDataProvider(),
name: "geojson",
styleSetName: "geojson"
styleSetName: "geojson",
addGroundPlane: false
})
);

Expand Down
3 changes: 2 additions & 1 deletion @here/harp-examples/src/datasource_geojson_points.ts
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,8 @@ export namespace TiledGeoJsonPointExample {
const geoJsonDataSource = new VectorTileDataSource({
dataProvider: geoJsonDataProvider,
name: "geojson",
styleSetName: "geojson"
styleSetName: "geojson",
addGroundPlane: false
});
map.addDataSource(geoJsonDataSource);

Expand Down
3 changes: 2 additions & 1 deletion @here/harp-examples/src/datasource_geojson_styling_game.ts
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,8 @@ export namespace GeoJsonStylingGame {
dataProvider: geoJsonDataProvider,
name: "geojson",
styleSetName: "geojson",
gatherFeatureAttributes: true
gatherFeatureAttributes: true,
addGroundPlane: false
});

await mapView.addDataSource(geoJsonDataSource);
Expand Down
2 changes: 1 addition & 1 deletion @here/harp-examples/src/geojson-viewer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ export namespace GeoJsonExample {

function getExampleHTML(): string {
return `
<link href="https://fonts.googleapis.com/css?family=Fira+Sans:400,500,600&amp;display=swap" rel="stylesheet">
<link href="https://fonts.googleapis.com/css?family=Fira+Sans&amp;display=swap" rel="stylesheet">
<style>
:root{
--editor-width:${editorWidth};
Expand Down
10 changes: 9 additions & 1 deletion @here/harp-examples/src/real-time-shadows.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@ const guiOptions = {
time: date.getHours() + date.getMinutes() / 60,
timeIndicator: `${date.getHours()}:${date.getMinutes()}`,
debugCamera: false,
enableRasterTiles: false
enableRasterTiles: false,
textureSquareSize: 1024
};
// Reference solar noon time is used to calculate time offsets at specific coordinates.
const refSolarNoon = SunCalc.getTimes(date, 0, 0).solarNoon;
Expand Down Expand Up @@ -297,6 +298,13 @@ function addGuiElements() {
map.addDataSource(hereWebTileDataSource);
}
});
gui.add(guiOptions, "textureSquareSize", 256, 4096, 32).onChange(size => {
(sun.shadow.map as any).dispose();
(sun.shadow as any).map = null;
sun.shadow.mapSize.width = size;
sun.shadow.mapSize.height = size;
map.update();
});
}

export namespace RealTimeShadows {
Expand Down
2 changes: 1 addition & 1 deletion @here/harp-examples/template/example.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<meta http-equiv="X-UA-Compatible" content="ie=edge" />
<title><%= htmlWebpackPlugin.options.title %></title>
<link
href="https://fonts.googleapis.com/css?family=Fira+Sans:400,500,600&amp;display=swap"
href="https://fonts.googleapis.com/css?family=Fira+Sans:normal,bold&amp;display=swap"
rel="stylesheet"
/>
<style>
Expand Down
3 changes: 2 additions & 1 deletion @here/harp-features-datasource/lib/FeaturesDataSource.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,8 @@ export class FeaturesDataSource extends VectorTileDataSource {
constructor(options?: FeatureDataSourceOptions) {
super({
...options,
dataProvider: new GeoJsonDataProvider(NAME, DEFAULT_GEOJSON, options)
dataProvider: new GeoJsonDataProvider(NAME, DEFAULT_GEOJSON, options),
addGroundPlane: false
});
if (options !== undefined) {
if (options.features !== undefined) {
Expand Down
4 changes: 2 additions & 2 deletions @here/harp-features-datasource/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"@types/chai": "^4.2.14",
"@types/mocha": "^8.2.0",
"@types/node": "^14.0.5",
"@types/three": "^0.127.0",
"@types/three": "^0.129.0",
"chai": "^4.0.2",
"cross-env": "^7.0.2",
"mocha": "^8.2.1",
Expand All @@ -38,7 +38,7 @@
"typescript": "^4.1.2"
},
"peerDependencies": {
"three": "^0.127.0"
"three": "^0.129.0"
},
"publishConfig": {
"access": "public"
Expand Down
4 changes: 2 additions & 2 deletions @here/harp-geojson-datasource/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,13 @@
"@types/chai": "^4.2.14",
"@types/mocha": "^8.2.0",
"@types/node": "^14.0.5",
"@types/three": "^0.127.0",
"@types/three": "^0.129.0",
"chai": "^4.0.2",
"cross-env": "^7.0.2",
"mocha": "^8.2.1",
"sinon": "^9.2.2",
"source-map-support": "^0.5.19",
"three": "^0.127.0",
"three": "^0.129.0",
"typescript": "^4.1.2"
},
"publishConfig": {
Expand Down
6 changes: 3 additions & 3 deletions @here/harp-geometry/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,18 +28,18 @@
"@types/mocha": "^8.2.0",
"@types/node": "^14.0.5",
"@types/sinon": "^9.0.10",
"@types/three": "^0.127.0",
"@types/three": "^0.129.0",
"chai": "^4.0.2",
"cross-env": "^7.0.2",
"earcut": "^2.2.2",
"mocha": "^8.2.1",
"sinon": "^9.2.2",
"source-map-support": "^0.5.19",
"three": "^0.127.0",
"three": "^0.129.0",
"typescript": "^4.1.2"
},
"peerDependencies": {
"three": "^0.127.0"
"three": "^0.129.0"
},
"dependencies": {
"@here/harp-geoutils": "^0.25.0",
Expand Down
6 changes: 3 additions & 3 deletions @here/harp-geoutils/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,17 +23,17 @@
"@types/chai": "^4.2.14",
"@types/mocha": "^8.2.0",
"@types/sinon": "^9.0.10",
"@types/three": "^0.127.0",
"@types/three": "^0.129.0",
"chai": "^4.0.2",
"cross-env": "^7.0.2",
"mocha": "^8.2.1",
"sinon": "^9.2.2",
"source-map-support": "^0.5.19",
"three": "^0.127.0",
"three": "^0.129.0",
"typescript": "^4.1.2"
},
"peerDependencies": {
"three": "^0.127.0"
"three": "^0.129.0"
},
"publishConfig": {
"access": "public"
Expand Down
6 changes: 3 additions & 3 deletions @here/harp-lines/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,16 +32,16 @@
"@here/harp-utils": "^0.25.0",
"@types/chai": "^4.2.14",
"@types/mocha": "^8.2.0",
"@types/three": "^0.127.0",
"@types/three": "^0.129.0",
"chai": "^4.0.2",
"cross-env": "^7.0.2",
"mocha": "^8.2.1",
"source-map-support": "^0.5.19",
"three": "^0.127.0",
"three": "^0.129.0",
"typescript": "^4.1.2"
},
"peerDependencies": {
"three": "^0.127.0"
"three": "^0.129.0"
},
"publishConfig": {
"access": "public"
Expand Down
6 changes: 3 additions & 3 deletions @here/harp-map-controls/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,17 +33,17 @@
"@types/mocha": "^8.2.0",
"@types/node": "^14.0.5",
"@types/sinon": "^9.0.10",
"@types/three": "^0.127.0",
"@types/three": "^0.129.0",
"chai": "^4.0.2",
"cross-env": "^7.0.2",
"mocha": "^8.2.1",
"sinon": "^9.2.2",
"source-map-support": "^0.5.19",
"three": "^0.127.0",
"three": "^0.129.0",
"typescript": "^4.1.2"
},
"peerDependencies": {
"three": "^0.127.0"
"three": "^0.129.0"
},
"publishConfig": {
"access": "public"
Expand Down
2 changes: 1 addition & 1 deletion @here/harp-mapview-decoder/lib/ThemedTileDecoder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export abstract class ThemedTileDecoder implements ITileDecoder {
}

decodeTile(
data: ArrayBufferLike,
data: ArrayBufferLike | {},
tileKey: TileKey,
projection: Projection
): Promise<DecodedTile | undefined> {
Expand Down
Loading

0 comments on commit b1e7f22

Please sign in to comment.