Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v3.7.0-beta.1 #13278

Merged
merged 77 commits into from
Sep 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
77 commits
Select commit Hold shift + click to select a range
c4ba929
flood light radius documentation update; deprecation of feature-state…
astojilj Aug 15, 2024
9fdbee2
Enforce using property signature for functions (internal-1746)
stepankuzmin Aug 15, 2024
9bccba2
Update dependencies (internal-1750)
stepankuzmin Aug 18, 2024
879c126
Add featuresets style spec (internal-1749)
zmiao Aug 19, 2024
dd53faf
Update @typescript-eslint (internal-1754)
stepankuzmin Aug 19, 2024
71f6a6a
Enable `strictNullChecks` in typings tests (internal-1756)
stepankuzmin Aug 19, 2024
8a9d4ba
Remove fill-extrusion-line-alignment (internal-1757)
endanke Aug 19, 2024
26dabf7
Strongly typed layout and paint properties API (internal-1751)
stepankuzmin Aug 19, 2024
19082f1
Bump playwright from 1.46.0 to 1.46.1 (internal-1760)
dependabot[bot] Aug 19, 2024
634fdbb
Bump stylelint from 16.8.1 to 16.8.2 (internal-1764)
dependabot[bot] Aug 19, 2024
304700b
Bump esbuild from 0.23.0 to 0.23.1 (internal-1766)
dependabot[bot] Aug 19, 2024
5cdf70d
Bump the eslint-dependencies group across 1 directory with 3 updates …
dependabot[bot] Aug 20, 2024
c6d5a9c
Bump eslint-plugin-jsdoc from 50.0.1 to 50.2.2 (internal-1763)
dependabot[bot] Aug 20, 2024
7ae319d
Bump @types/node from 22.2.0 to 22.4.1 (internal-1765)
dependabot[bot] Aug 20, 2024
e065e87
Bump @octokit/rest from 21.0.1 to 21.0.2 (internal-1761)
dependabot[bot] Aug 20, 2024
6dd3aa2
Fix fill-extrusion-line-width rendering with large polygons (internal…
endanke Aug 20, 2024
1886bf0
Enforce no redundant type constituents (internal-1747)
stepankuzmin Aug 20, 2024
5b68608
Enforce consistent type imports (internal-1767)
stepankuzmin Aug 20, 2024
cf76c1a
[MAPS3D-1435] fix zoom dependency issues in clip layer (internal-1744)
akoylasar Aug 20, 2024
95b3d62
Enforce import order (internal-1768)
stepankuzmin Aug 20, 2024
7c3160f
Add featureNamespace to featureset selector (internal-1770)
zmiao Aug 21, 2024
a83d2c9
[MAPS-1436] Shader changes needed for control over gap between consec…
akoylasar Aug 21, 2024
ffc5b1a
Enforce no unused vars (internal-1771)
stepankuzmin Aug 21, 2024
fc27fe8
Minor type improvements (internal-1772)
stepankuzmin Aug 22, 2024
ce220af
Combine symbol_icon and symbol_sdf shaders (internal-1773)
endanke Aug 22, 2024
f574746
Remove symbol_text_and_icon shaders (internal-1774)
endanke Aug 23, 2024
9a96575
Get current sourceLayer feature state on every bucket update (interna…
endanke Aug 23, 2024
23d2148
boost model shader precision (internal-1776)
alexey-romanov Aug 26, 2024
98ce8f9
Added ParsingContext::parseObjectValue to have a better error message…
woodroof Aug 26, 2024
17fac24
Bump eslint-import-resolver-typescript from 3.6.1 to 3.6.3 (internal-…
dependabot[bot] Aug 26, 2024
b3444cb
Bump tsx from 4.17.0 to 4.18.0 (internal-1779)
dependabot[bot] Aug 27, 2024
e2cca13
Bump the eslint-dependencies group with 3 updates (internal-1778)
dependabot[bot] Aug 27, 2024
cc01081
Bump @types/node from 22.4.1 to 22.5.0 (internal-1781)
dependabot[bot] Aug 27, 2024
b781a24
Handle infinite miter length (internal-1783)
endanke Aug 27, 2024
0a4fd50
Add symbol-elevation (internal-1758)
endanke Aug 27, 2024
58cfc72
Rename elevation_meters attribute to z_offset (internal-1784)
endanke Aug 27, 2024
01e2431
Hide line vertices with zero opacity (internal-1785)
endanke Aug 28, 2024
b6b63f3
v3.7.0-alpha.1 (internal-1787)
underoot Aug 28, 2024
6b738a7
Fix incorrect isInside flag direction of wall attributes (internal-1789)
endanke Aug 30, 2024
75c95af
[MAPS3D-1397] Skip rendering landmarks when the camera is inside them…
lasselammi Aug 30, 2024
0dcb912
Render test that covers Standard style flood light activation on ligh…
astojilj Sep 2, 2024
e73bc71
Create index buffer of wall geometries without earcut (internal-1793)
endanke Sep 2, 2024
26e00ff
Fix amount of coordinates in a_join_normal_inside (internal-1795)
endanke Sep 2, 2024
8c438c4
Use correct tile and symbol order when sortSymbolbyViewport is needed…
zmiao Sep 2, 2024
be4b09a
Bump postcss from 8.4.41 to 8.4.44 (internal-1800)
dependabot[bot] Sep 2, 2024
132171e
Bump @types/node from 22.5.0 to 22.5.2 (internal-1797)
dependabot[bot] Sep 2, 2024
0dda4bb
additional render tests for flood light (internal-1802)
astojilj Sep 3, 2024
61c5bde
Use highp values in texture sampling calculations (internal-1803)
endanke Sep 3, 2024
4558d33
Add elevated rendering support to fill shaders (internal-1805)
mpulkki-mapbox Sep 4, 2024
3cfb6d7
Bump tsx from 4.18.0 to 4.19.0 (internal-1798)
dependabot[bot] Sep 4, 2024
df7bc97
Bump stylelint from 16.8.2 to 16.9.0 (internal-1801)
dependabot[bot] Sep 4, 2024
bd520de
Bump the eslint-dependencies group with 3 updates (internal-1796)
dependabot[bot] Sep 4, 2024
92cb7b9
Increase pattern padding and fill wrapped corners (internal-1806)
endanke Sep 5, 2024
f394c2e
Add one pixel transparent margin for wrapped pattern padding (interna…
endanke Sep 6, 2024
8ed1ae9
Hide fill extrusions with data-driven zero alpha color (internal-1812)
endanke Sep 9, 2024
85e64de
Add fill-extrusion-cast-shadows property to control shadow casting of…
endanke Sep 9, 2024
716f6a3
Update native API versions (internal-1814)
endanke Sep 9, 2024
e0eadac
[GLJS-878] Add Map Interactions API (internal-1786)
mourner Sep 9, 2024
5d9c4b4
Skip shadow pass for FEs if cast shadows is disabled (internal-1815)
endanke Sep 9, 2024
2e8a53c
Bump postcss from 8.4.44 to 8.4.45 (internal-1818)
dependabot[bot] Sep 9, 2024
a18c8e4
Bump cssnano from 7.0.5 to 7.0.6 (internal-1821)
dependabot[bot] Sep 9, 2024
0b968a6
Bump typescript from 5.5.4 to 5.6.2 (internal-1820)
dependabot[bot] Sep 10, 2024
368918d
Bump eslint-plugin-import from 2.29.1 to 2.30.0 (internal-1823)
dependabot[bot] Sep 10, 2024
2bfb24e
Bump @types/node from 22.5.2 to 22.5.4 (internal-1819)
dependabot[bot] Sep 10, 2024
69b50ea
Mark some fill-extrusion properties as public in Style-Spec (internal…
chriswhong Sep 10, 2024
eecb259
Add fill-z-offset (internal-1825)
endanke Sep 10, 2024
87d268f
Hide fill layer vertices with zero opacity (internal-1826)
endanke Sep 10, 2024
9ba071d
Bump playwright from 1.46.1 to 1.47.0 (internal-1824)
dependabot[bot] Sep 11, 2024
176956f
Bump diff from 5.2.0 to 7.0.0 (internal-1822)
dependabot[bot] Sep 11, 2024
f868373
[GLJS-937] Update draped hillshade immediately (internal-1791)
underoot Sep 12, 2024
1e4e453
Bump the eslint-dependencies group with 3 updates (internal-1817)
dependabot[bot] Sep 12, 2024
de4a766
[GLJS-262] Improve `Map#fitBounds` for the alternative projections (i…
stepankuzmin Sep 12, 2024
0dcce62
Enable usage of config expression in layer filters (internal-1829)
endanke Sep 12, 2024
5affccd
Allow `string` event type in Map event handlers (internal-1830)
stepankuzmin Sep 12, 2024
00dd47d
Use boolean type for Directional light `cast-shadows` property (inter…
stepankuzmin Sep 12, 2024
089d5fe
Minor typing fixes (internal-1833)
stepankuzmin Sep 12, 2024
823534d
v3.7.0-beta.1 (internal-1832)
underoot Sep 12, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
32 changes: 24 additions & 8 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,10 @@
"plugin:@typescript-eslint/recommended-type-checked"
],
"parserOptions": {
"EXPERIMENTAL_useProjectService": true
"projectService": {
"defaultProject": "./tsconfig.json",
"allowDefaultProject": ["*.js"]
}
},
"plugins": [
"jsdoc",
Expand All @@ -33,26 +36,32 @@
},
"rules": {
// temporarily disabled for easier migration to TypeScript
"no-loss-of-precision": "off",
"@typescript-eslint/no-this-alias": "off",
"@typescript-eslint/ban-ts-comment": "off",
"@typescript-eslint/unbound-method": "off",
"@typescript-eslint/no-unsafe-call": "off",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-unsafe-return": "off",
"@typescript-eslint/no-unsafe-argument": "off",
"@typescript-eslint/no-misused-promises": "off",
"@typescript-eslint/no-unsafe-assignment": "off",
"@typescript-eslint/no-loss-of-precision": "off",
"@typescript-eslint/no-unsafe-member-access": "off",
"@typescript-eslint/no-redundant-type-constituents": "off",
"@typescript-eslint/only-throw-error": "off",

// TypeScript specific rules
"@typescript-eslint/method-signature-style": "error",
"@typescript-eslint/no-floating-promises": "off",
"@typescript-eslint/consistent-type-exports": "off",
"@typescript-eslint/consistent-type-imports": "off",
"@typescript-eslint/consistent-type-exports": "error",
"@typescript-eslint/consistent-type-imports": "error",
"@typescript-eslint/restrict-template-expressions": ["off", { "allowNever": true }],
"@typescript-eslint/no-unnecessary-type-constraint": "off",
"@typescript-eslint/no-unused-vars": ["off", { "argsIgnorePattern": "^_" }],
"no-unused-vars": "off",
"@typescript-eslint/no-unused-vars": ["error", {
"args": "none",
"caughtErrors": "none",
"ignoreRestSiblings": true
}],

// Disable those rules since TypeScript provides the same checks as part of standard type checking
// See https://typescript-eslint.io/troubleshooting/performance-troubleshooting/#eslint-plugin-import
Expand All @@ -61,11 +70,17 @@
"import/default": "off",
"import/no-named-as-default-member": "off",
"import/no-unresolved": "off",
"import/no-named-as-default": "off",

// Import plugin rules
"no-duplicate-imports": "off",
"import/no-duplicates": "error",

"import/order": ["error", {
"groups": [["builtin", "external", "internal", "unknown", "parent", "sibling", "index", "object"], "type"],
"newlines-between": "always"
}],

// Restrict imports outside of the style-spec
"import/no-restricted-paths": ["error", {
"zones": [{
Expand Down Expand Up @@ -124,7 +139,7 @@
}],
"no-multiple-empty-lines": ["error", {
"max": 1
}],
}]
},
"overrides": [
{
Expand Down Expand Up @@ -256,6 +271,7 @@
"es6": true
},
"ignorePatterns": [
"dist/**/*"
"dist/**/*",
"src/style-spec/bin/*"
]
}
17 changes: 9 additions & 8 deletions 3d-style/data/bucket/model_bucket.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,20 @@ import {register} from '../../../src/util/web_worker_transfer';
import loadGeometry from '../../../src/data/load_geometry';
import toEvaluationFeature from '../../../src/data/evaluation_feature';
import EvaluationParameters from '../../../src/style/evaluation_parameters';
import Point from '@mapbox/point-geometry';
import {vec3} from 'gl-matrix';
import {InstanceVertexArray} from '../../../src/data/array_types';
import assert from 'assert';
import {warnOnce} from '../../../src/util/util';
import {rotationScaleYZFlipMatrix} from '../../util/model_util';
import {tileToMeter} from '../../../src/geo/mercator_coordinate';
import {instanceAttributes} from '../model_attributes';
import {ReplacementSource, regionsEquals, transformPointToTile, pointInFootprint, skipClipping} from '../../../3d-style/source/replacement_source';
import {regionsEquals, transformPointToTile, pointInFootprint, skipClipping} from '../../../3d-style/source/replacement_source';
import {LayerTypeMask} from '../../../3d-style/util/conflation';
import {isValidUrl} from '../../../src/style-spec/validate/validate_model';

import type ModelStyleLayer from '../../style/style_layer/model_style_layer';
import {isValidUrl} from '../../../src/style-spec/validate/validate_model';
import type {ReplacementSource} from '../../../3d-style/source/replacement_source';
import type Point from '@mapbox/point-geometry';
import type {EvaluationFeature} from '../../../src/data/evaluation_feature';
import type {mat4} from 'gl-matrix';
import type {CanonicalTileID, OverscaledTileID, UnwrappedTileID} from '../../../src/source/tile_id';
Expand All @@ -26,7 +27,6 @@ import type {
IndexedFeature,
PopulateParameters
} from '../../../src/data/bucket';

import type Context from '../../../src/gl/context';
import type VertexBuffer from '../../../src/gl/vertex_buffer';
import type {FeatureState} from '../../../src/style-spec/expression/index';
Expand Down Expand Up @@ -249,10 +249,10 @@ class ModelBucket implements Bucket {
if (regionsEquals(this.activeReplacements, newReplacements)) {
return false;
}

this.activeReplacements = newReplacements;

let reuploadNeeded = false;

for (const modelId in this.instancesPerModel) {
const perModelVertexArray: PerModelAttributes = this.instancesPerModel[modelId];
const va = perModelVertexArray.instancedDataArray;
Expand All @@ -265,7 +265,8 @@ class ModelBucket implements Bucket {
const i16 = (i + offset) * 16;

let x_ = va.float32[i16 + 0];
x_ = x_ > EXTENT ? x_ - EXTENT : x_;
const wasHidden = x_ > EXTENT;
x_ = wasHidden ? x_ - EXTENT : x_;
const x = Math.floor(x_);
const y = va.float32[i16 + 1];

Expand All @@ -278,13 +279,13 @@ class ModelBucket implements Bucket {
}

const p = transformPointToTile(x, y, coord.canonical, region.footprintTileId.canonical);
hidden = pointInFootprint(p, region);
hidden = pointInFootprint(p, region.footprint);

if (hidden) break;
}

va.float32[i16] = hidden ? x_ + EXTENT : x_;
reuploadNeeded = reuploadNeeded || hidden;
reuploadNeeded = reuploadNeeded || (hidden !== wasHidden);
}
}
}
Expand Down
9 changes: 5 additions & 4 deletions 3d-style/data/bucket/tiled_3d_model_bucket.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import Point from '@mapbox/point-geometry';
import browser from '../../../src/util/browser';
import {register} from '../../../src/util/web_worker_transfer';
import {uploadNode, destroyNodeArrays, destroyBuffers, ModelTraits, HEIGHTMAP_DIM} from '../model';
import {OverscaledTileID} from '../../../src/source/tile_id';
import {FeatureVertexArray} from '../../../src/data/array_types';
import {number as interpolate} from '../../../src/style-spec/util/interpolate';
import {clamp} from '../../../src/util/util';
Expand All @@ -12,18 +11,18 @@ import {ZoomConstantExpression} from '../../../src/style-spec/expression/index';
import {Aabb} from '../../../src/util/primitives';
import {vec3, mat4} from 'gl-matrix';

import type {OverscaledTileID, CanonicalTileID, UnwrappedTileID} from '../../../src/source/tile_id';
import type ModelStyleLayer from '../../style/style_layer/model_style_layer';
import type {ReplacementSource} from '../../source/replacement_source';
import type {Bucket} from '../../../src/data/bucket';
import type {Node} from '../model';
import type {EvaluationFeature} from '../../../src/data/evaluation_feature';
import type {CanonicalTileID, UnwrappedTileID} from '../../../src/source/tile_id';
import type Context from '../../../src/gl/context';
import type {ProjectionSpecification} from '../../../src/style-spec/types';
import type Painter from '../../../src/render/painter';
import type {vec4} from 'gl-matrix';
import type {Terrain} from '../../../src/terrain/terrain';
import FeatureIndex from '../../../src/data/feature_index';
import type FeatureIndex from '../../../src/data/feature_index';
import type {GridIndex} from '../../../src/types/grid-index';
import type {TileFootprint} from '../../../3d-style/util/conflation';

Expand Down Expand Up @@ -80,6 +79,7 @@ export class Tiled3dModelFeature {
node: Node;
aabb: Aabb;
emissionHeightBasedParams: Array<[number, number, number, number, number]>;
cameraCollisionOpacity: number;
constructor(node: Node) {
this.node = node;
this.evaluatedRMEA = [[1, 0, 0, 1],
Expand All @@ -93,6 +93,7 @@ export class Tiled3dModelFeature {
this.evaluatedScale = [1, 1, 1];
this.evaluatedColor = [];
this.emissionHeightBasedParams = [];
this.cameraCollisionOpacity = 1;
// Needs to calculate geometry
this.feature = {type: 'Point', id: node.id, geometry: [], properties: {'height' : getNodeHeight(node)}};
this.aabb = this._getLocalBounds();
Expand Down Expand Up @@ -555,7 +556,7 @@ class Tiled3dModelBucket implements Bucket {
const mesh = nodeInfo.node.meshes[0];
const meshAabb = mesh.transformedAabb;
if (x < meshAabb.min[0] || y < meshAabb.min[1] || x > meshAabb.max[0] || y > meshAabb.max[1]) continue;
if (nodeInfo.node.hidden === true) return {height: 0.0, maxHeight: nodeInfo.feature.properties["height"], hidden: false, verticalScale: nodeInfo.evaluatedScale[2]};
if (nodeInfo.node.hidden === true) return {height: Infinity, maxHeight: nodeInfo.feature.properties["height"], hidden: false, verticalScale: nodeInfo.evaluatedScale[2]};

assert(mesh.heightmap);

Expand Down
6 changes: 3 additions & 3 deletions 3d-style/data/model.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
import LngLat from '../../src/geo/lng_lat';
import Color from '../../src/style-spec/util/color';
import Texture from '../../src/render/texture';
import {ModelLayoutArray, TriangleIndexArray, NormalLayoutArray, TexcoordLayoutArray, FeatureVertexArray} from '../../src/data/array_types';
import {StructArray} from '../../src/util/struct_array';
import {Aabb} from '../../src/util/primitives';
import {mat4, vec4} from 'gl-matrix';
import {modelAttributes, normalAttributes, texcoordAttributes, color3fAttributes, color4fAttributes, featureAttributes} from './model_attributes';
Expand All @@ -12,6 +9,9 @@ import {number as interpolate} from '../../src/style-spec/util/interpolate';
import MercatorCoordinate, {getMetersPerPixelAtLatitude, getLatitudeScale, mercatorZfromAltitude} from '../../src/geo/mercator_coordinate';
import {rotationScaleYZFlipMatrix, getBoxBottomFace, rotationFor3Points, convertModelMatrixForGlobe} from '../util/model_util';

import type {StructArray} from '../../src/util/struct_array';
import type {ModelLayoutArray, TriangleIndexArray, NormalLayoutArray, TexcoordLayoutArray, FeatureVertexArray} from '../../src/data/array_types';
import type Color from '../../src/style-spec/util/color';
import type {vec2, vec3, quat} from 'gl-matrix';
import type Context from '../../src/gl/context';
import type IndexBuffer from '../../src/gl/index_buffer';
Expand Down
Loading
Loading