itowns 2.42.1-next.12 → 2.42.1-next.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/itowns.js +1 -1
- package/dist/itowns.js.map +1 -1
- package/lib/Core/Style.js +3 -4
- package/lib/Layer/C3DTilesLayer.js +4 -4
- package/package.json +3 -1
package/lib/Core/Style.js
CHANGED
|
@@ -19,10 +19,9 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
|
|
|
19
19
|
const itowns_stroke_single_before = ".itowns-stroke-single:before {\n display: var(--text_stroke_display);\n content: attr(data-before);\n opacity: 1;\n position: absolute;\n -webkit-text-stroke-width: var(--text_stroke_width);\n -webkit-text-stroke-color: var(--text_stroke_color);\n left: 0;\n right: 0;\n bottom: 0;\n top: 0;\n z-index: -1;\n white-space: inherit;\n overflow-wrap: inherit;\n letter-spacing: inherit;\n text-align: inherit;\n padding: inherit;\n font-family: inherit;\n text-transform: inherit;\n max-width: inherit;\n font-size: inherit;\n}\n";
|
|
20
20
|
const cacheStyle = new _Cache.default();
|
|
21
21
|
exports.cacheStyle = cacheStyle;
|
|
22
|
-
const
|
|
23
|
-
const
|
|
22
|
+
const matrix = document.createElementNS('http://www.w3.org/2000/svg', 'svg').createSVGMatrix();
|
|
23
|
+
const canvas = document.createElement('canvas');
|
|
24
24
|
const inv255 = 1 / 255;
|
|
25
|
-
const canvas = typeof document !== 'undefined' ? document.createElement('canvas') : {};
|
|
26
25
|
function baseAltitudeDefault(properties, ctx) {
|
|
27
26
|
var _ctx$coordinates;
|
|
28
27
|
return (ctx === null || ctx === void 0 ? void 0 : (_ctx$coordinates = ctx.coordinates) === null || _ctx$coordinates === void 0 ? void 0 : _ctx$coordinates.z) || 0;
|
|
@@ -1131,7 +1130,7 @@ class Style {
|
|
|
1131
1130
|
const CustomStyle = {
|
|
1132
1131
|
itowns_stroke_single_before
|
|
1133
1132
|
};
|
|
1134
|
-
const customStyleSheet =
|
|
1133
|
+
const customStyleSheet = document.createElement('style');
|
|
1135
1134
|
customStyleSheet.type = 'text/css';
|
|
1136
1135
|
Object.keys(CustomStyle).forEach(key => {
|
|
1137
1136
|
customStyleSheet.innerHTML += `${CustomStyle[key]}\n\n`;
|
|
@@ -39,8 +39,8 @@ const update = (0, _dTilesProcessing.process3dTilesNode)();
|
|
|
39
39
|
|
|
40
40
|
/**
|
|
41
41
|
* Find tileId of object
|
|
42
|
-
*
|
|
43
42
|
* @param {THREE.Object3D} object - object
|
|
43
|
+
*
|
|
44
44
|
* @returns {number} tileId
|
|
45
45
|
*/
|
|
46
46
|
function findTileID(object) {
|
|
@@ -55,8 +55,8 @@ function findTileID(object) {
|
|
|
55
55
|
|
|
56
56
|
/**
|
|
57
57
|
* Check if object3d has feature
|
|
58
|
-
*
|
|
59
58
|
* @param {THREE.Object3D} object3d - object3d to check
|
|
59
|
+
*
|
|
60
60
|
* @returns {boolean} - true if object3d has feature
|
|
61
61
|
*/
|
|
62
62
|
function object3DHasFeature(object3d) {
|
|
@@ -229,6 +229,7 @@ class C3DTilesLayer extends _GeometryLayer.default {
|
|
|
229
229
|
* targets picked under specified coordinates. Intersects can be
|
|
230
230
|
* computed with view.pickObjectsAt(..). See fillHTMLWithPickingInfo()
|
|
231
231
|
* in 3dTilesHelper.js for an example.
|
|
232
|
+
*
|
|
232
233
|
* @returns {C3DTileFeature} - the closest C3DTileFeature of the intersects array
|
|
233
234
|
*/
|
|
234
235
|
getC3DTileFeatureFromIntersectsArray(intersects) {
|
|
@@ -274,7 +275,6 @@ class C3DTilesLayer extends _GeometryLayer.default {
|
|
|
274
275
|
|
|
275
276
|
/**
|
|
276
277
|
* Initialize C3DTileFeatures from tileContent
|
|
277
|
-
*
|
|
278
278
|
* @param {THREE.Object3D} tileContent - tile as THREE.Object3D
|
|
279
279
|
*/
|
|
280
280
|
initC3DTileFeatures(tileContent) {
|
|
@@ -339,8 +339,8 @@ class C3DTilesLayer extends _GeometryLayer.default {
|
|
|
339
339
|
/**
|
|
340
340
|
* Update style of the C3DTFeatures, an allowList of tile id can be passed to only update certain tile.
|
|
341
341
|
* Note that this function only update THREE.Object3D materials, in order to see style changes you should call view.notifyChange()
|
|
342
|
-
*
|
|
343
342
|
* @param {Array<number>|null} [allowTileIdList] - tile ids to allow in updateStyle computation if null all tiles are updated
|
|
343
|
+
*
|
|
344
344
|
* @returns {boolean} true if style updated false otherwise
|
|
345
345
|
*/
|
|
346
346
|
updateStyle() {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "itowns",
|
|
3
|
-
"version": "2.42.1-next.
|
|
3
|
+
"version": "2.42.1-next.13",
|
|
4
4
|
"description": "A JS/WebGL framework for 3D geospatial data visualization",
|
|
5
5
|
"main": "lib/Main.js",
|
|
6
6
|
"exports": {
|
|
@@ -76,6 +76,7 @@
|
|
|
76
76
|
"@babel/preset-env": "^7.22.5",
|
|
77
77
|
"@babel/register": "^7.22.5",
|
|
78
78
|
"@types/three": "^0.159.0",
|
|
79
|
+
"@xmldom/xmldom": "^0.8.10",
|
|
79
80
|
"babel-inline-import-loader": "^1.0.1",
|
|
80
81
|
"babel-loader": "^9.1.3",
|
|
81
82
|
"babel-plugin-inline-import": "^3.0.0",
|
|
@@ -107,6 +108,7 @@
|
|
|
107
108
|
"puppeteer": "^21.6.0",
|
|
108
109
|
"q": "^1.5.1",
|
|
109
110
|
"replace-in-file": "^7.0.2",
|
|
111
|
+
"sinon": "^17.0.1",
|
|
110
112
|
"three": "^0.159.0",
|
|
111
113
|
"typescript": "^5.3.3",
|
|
112
114
|
"webpack": "^5.89.0",
|