Socket
Socket
Sign inDemoInstall

@here/harp-datasource-protocol

Package Overview
Dependencies
5
Maintainers
3
Versions
34
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.24.0 to 0.25.0

1

lib/StyleSetEvaluator.d.ts

@@ -88,2 +88,3 @@ import { Env, Expr, Value } from "./Expr";

private m_previousEnv;
private m_nextArrayBufferId;
constructor(m_options: StyleSetOptions);

@@ -90,0 +91,0 @@ /**

@@ -215,2 +215,3 @@ "use strict";

this.m_featureDependencies = [];
this.m_nextArrayBufferId = 0;
this.m_definitions = this.m_options.definitions;

@@ -503,2 +504,17 @@ this.styleSet = resolveReferences(this.m_options.styleSet, this.m_definitions);

}
else if (typeof attrValue === "object") {
return JSON.stringify(attrValue, (_, value) => {
if (value instanceof ArrayBuffer) {
// ArrayBuffers cannot be directly stringified. They can be converted
// to typed arrays and then stringified, but it's too slow. Instead,
// assign them unique ids.
let arrayBufferId = value.id;
if (arrayBufferId === undefined) {
arrayBufferId = value.id = this.m_nextArrayBufferId++;
}
return arrayBufferId;
}
return value;
});
}
else {

@@ -505,0 +521,0 @@ return JSON.stringify(attrValue);

15

lib/TechniqueDescriptors.js

@@ -139,3 +139,4 @@ "use strict";

transparent: { scope: AttrScope.TechniqueRendering, automatic: true },
lineWidth: AttrScope.TechniqueRendering
lineWidth: AttrScope.TechniqueRendering,
map: { scope: AttrScope.TechniqueRendering, automatic: true }
}

@@ -145,3 +146,3 @@ });

attrDescriptors: {
color: AttrScope.FeatureGeometry,
color: { scope: AttrScope.TechniqueRendering, automatic: true },
vertexColors: { scope: AttrScope.TechniqueRendering, automatic: true },

@@ -158,3 +159,11 @@ wireframe: { scope: AttrScope.TechniqueRendering, automatic: true },

refractionRatio: { scope: AttrScope.TechniqueRendering, automatic: true },
normalMapType: { scope: AttrScope.TechniqueRendering, automatic: true }
normalMapType: { scope: AttrScope.TechniqueRendering, automatic: true },
map: { scope: AttrScope.TechniqueRendering, automatic: true },
normalMap: { scope: AttrScope.TechniqueRendering, automatic: true },
displacementMap: { scope: AttrScope.TechniqueRendering, automatic: true },
roughnessMap: { scope: AttrScope.TechniqueRendering, automatic: true },
emissiveMap: { scope: AttrScope.TechniqueRendering, automatic: true },
bumpMap: { scope: AttrScope.TechniqueRendering, automatic: true },
metalnessMap: { scope: AttrScope.TechniqueRendering, automatic: true },
alphaMap: { scope: AttrScope.TechniqueRendering, automatic: true }
}

@@ -161,0 +170,0 @@ });

@@ -327,4 +327,4 @@ import { JsonExpr } from "./Expr";

textureCoordinateType?: TextureCoordinateType;
map?: string | TextureBuffer;
mapProperties?: TextureProperties;
map?: DynamicProperty<string | TextureBuffer>;
mapProperties?: DynamicProperty<TextureProperties>;
/**

@@ -334,5 +334,5 @@ * URL or texture buffer that should be used as normal map. See:

*/
normalMap?: string | TextureBuffer;
normalMapType?: number;
normalMapProperties?: TextureProperties;
normalMap?: DynamicProperty<string | TextureBuffer>;
normalMapType?: DynamicProperty<number>;
normalMapProperties?: DynamicProperty<TextureProperties>;
/**

@@ -342,4 +342,4 @@ * URL or texture buffer that should be used as displacement map. See:

*/
displacementMap?: string | TextureBuffer;
displacementMapProperties?: TextureProperties;
displacementMap?: DynamicProperty<string | TextureBuffer>;
displacementMapProperties?: DynamicProperty<TextureProperties>;
/**

@@ -349,4 +349,4 @@ * URL or texture buffer that should be used as roughness map. See:

*/
roughnessMap?: string | TextureBuffer;
roughnessMapProperties?: TextureProperties;
roughnessMap?: DynamicProperty<string | TextureBuffer>;
roughnessMapProperties?: DynamicProperty<TextureProperties>;
/**

@@ -356,4 +356,4 @@ * URL or texture buffer that should be used as emissive map. See:

*/
emissiveMap?: string | TextureBuffer;
emissiveMapProperties?: TextureProperties;
emissiveMap?: DynamicProperty<string | TextureBuffer>;
emissiveMapProperties?: DynamicProperty<TextureProperties>;
/**

@@ -363,4 +363,4 @@ * URL or texture buffer that should be used as bump map. See:

*/
bumpMap?: string | TextureBuffer;
bumpMapProperties?: TextureProperties;
bumpMap?: DynamicProperty<string | TextureBuffer>;
bumpMapProperties?: DynamicProperty<TextureProperties>;
/**

@@ -370,4 +370,4 @@ * URL or texture buffer that should be used as metalness map. See:

*/
metalnessMap?: string | TextureBuffer;
metalnessMapProperties?: TextureProperties;
metalnessMap?: DynamicProperty<string | TextureBuffer>;
metalnessMapProperties?: DynamicProperty<TextureProperties>;
/**

@@ -377,4 +377,4 @@ * URL or texture buffer that should be used as alpha map. See:

*/
alphaMap?: string | TextureBuffer;
alphaMapProperties?: TextureProperties;
alphaMap?: DynamicProperty<string | TextureBuffer>;
alphaMapProperties?: DynamicProperty<TextureProperties>;
}

@@ -1081,2 +1081,10 @@ /**

lineWidth?: DynamicProperty<number>;
map?: DynamicProperty<string | TextureBuffer>;
mapProperties?: DynamicProperty<TextureProperties>;
/**
* Whether and how texture coordinates should be generated. No texture coordinates are
* generated if `undefined`.
* Should be set if a `map` is assigned.
*/
textureCoordinateType?: TextureCoordinateType;
}

@@ -1083,0 +1091,0 @@ /**

@@ -268,2 +268,6 @@ import { Expr, JsonExpr } from "./Expr";

/**
* Type guard to check if an object is an instance of a technique with textures.
*/
export declare function supportsTextures(technique: Technique): technique is FillTechnique | StandardTechnique | ExtrudedPolygonTechnique | TerrainTechnique;
/**
* Get the texture coordinate type if the technique supports it.

@@ -270,0 +274,0 @@ */

@@ -8,3 +8,3 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.setTechniqueRenderOrderOrPriority = exports.composeTechniqueTextureName = exports.addBuffersToTransferList = exports.textureCoordinateType = exports.needsVertexNormals = exports.isLabelRejectionLineTechnique = exports.isShaderTechnique = exports.isTextTechnique = exports.isTerrainTechnique = exports.isStandardTechnique = exports.isExtrudedPolygonTechnique = exports.isFillTechnique = exports.isStandardExtrudedLineTechnique = exports.isBasicExtrudedLineTechnique = exports.isExtrudedLineTechnique = exports.isSegmentsTechnique = exports.isSpecialDashesLineTechnique = exports.isSolidLineTechnique = exports.isLineTechnique = exports.isLineMarkerTechnique = exports.isPoiTechnique = exports.isSquaresTechnique = exports.isCirclesTechnique = exports.TRANSPARENCY_PROPERTY_KEYS = exports.TEXTURE_PROPERTY_KEYS = void 0;
exports.setTechniqueRenderOrderOrPriority = exports.composeTechniqueTextureName = exports.addBuffersToTransferList = exports.textureCoordinateType = exports.supportsTextures = exports.needsVertexNormals = exports.isLabelRejectionLineTechnique = exports.isShaderTechnique = exports.isTextTechnique = exports.isTerrainTechnique = exports.isStandardTechnique = exports.isExtrudedPolygonTechnique = exports.isFillTechnique = exports.isStandardExtrudedLineTechnique = exports.isBasicExtrudedLineTechnique = exports.isExtrudedLineTechnique = exports.isSegmentsTechnique = exports.isSpecialDashesLineTechnique = exports.isSolidLineTechnique = exports.isLineTechnique = exports.isLineMarkerTechnique = exports.isPoiTechnique = exports.isSquaresTechnique = exports.isCirclesTechnique = exports.TRANSPARENCY_PROPERTY_KEYS = exports.TEXTURE_PROPERTY_KEYS = void 0;
const TechniqueParams_1 = require("./TechniqueParams");

@@ -171,20 +171,18 @@ /**

/**
* Type guard to check if an object is an instance of a technique with textures.
*/
function supportsTextures(technique) {
return (isFillTechnique(technique) ||
isStandardTechnique(technique) ||
isExtrudedPolygonTechnique(technique) ||
isTerrainTechnique(technique));
}
exports.supportsTextures = supportsTextures;
/**
* Get the texture coordinate type if the technique supports it.
*/
function textureCoordinateType(technique) {
if (isStandardTechnique(technique)) {
return technique.textureCoordinateType;
}
else if (isExtrudedPolygonTechnique(technique)) {
return technique.textureCoordinateType;
}
else if (isTerrainTechnique(technique)) {
return technique.textureCoordinateType;
}
else if (isShaderTechnique(technique)) {
return technique.textureCoordinateType;
}
else {
return undefined;
}
return supportsTextures(technique) || isShaderTechnique(technique)
? technique.textureCoordinateType
: undefined;
}

@@ -191,0 +189,0 @@ exports.textureCoordinateType = textureCoordinateType;

{
"name": "@here/harp-datasource-protocol",
"version": "0.24.0",
"version": "0.25.0",
"description": "Components used for the decoding and styling of data that is used by the Datasources.",

@@ -27,12 +27,12 @@ "main": "index.js",

"dependencies": {
"@here/harp-geometry": "^0.24.0",
"@here/harp-geoutils": "^0.24.0",
"@here/harp-utils": "^0.24.0",
"@here/harp-geometry": "^0.25.0",
"@here/harp-geoutils": "^0.25.0",
"@here/harp-utils": "^0.25.0",
"csscolorparser": "^1.0.3"
},
"devDependencies": {
"@here/harp-test-utils": "^0.24.0",
"@here/harp-test-utils": "^0.25.0",
"@types/chai": "^4.2.14",
"@types/mocha": "^8.2.0",
"@types/three": "^0.126.0",
"@types/three": "^0.127.0",
"chai": "^4.0.2",

@@ -42,3 +42,3 @@ "cross-env": "^7.0.2",

"source-map-support": "^0.5.19",
"three": "^0.126.0",
"three": "^0.127.0",
"ts-json-schema-generator": "^0.68.1",

@@ -48,3 +48,3 @@ "typescript": "^4.1.2"

"peerDependencies": {
"three": "^0.126.0"
"three": "^0.127.0"
},

@@ -54,3 +54,3 @@ "publishConfig": {

},
"gitHead": "74bf1b008abf47d331ed0cdb968911967a1b514d"
"gitHead": "51adfc43303e44617a6ff2a5f5daf9d004cd037e"
}

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc