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.6.0-beta.1 #13244

Merged
merged 38 commits into from
Jul 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
7d11804
Switch to Node v20 (internal-1654)
stepankuzmin Jul 18, 2024
d0d5df3
Moved release list publishing to Circle CI (internal-1656)
underoot Jul 19, 2024
2d4e799
[MAPS3D-1413] update layers dependent only of particular config key (…
alexey-romanov Jul 19, 2024
195770d
add standard satellite style to example page (internal-1657)
akoylasar Jul 19, 2024
322f269
Replace `lodash.clonedeep` with `structuredClone` (internal-1659)
stepankuzmin Jul 19, 2024
1fea1bb
Revert missing `MapBoxZoomEvent` JSDoc (internal-1662)
stepankuzmin Jul 19, 2024
03165ab
Fix Standard Satellite style link (internal-1661)
stepankuzmin Jul 19, 2024
57ed0d3
Preserve jobid query param when caching tiles (internal-1658)
rreusser Jul 22, 2024
71b1ec9
Bump playwright from 1.45.1 to 1.45.3 (internal-1667)
dependabot[bot] Jul 23, 2024
f30747c
Bump @types/node from 20.14.10 to 20.14.11 (internal-1668)
dependabot[bot] Jul 23, 2024
4a3fe3e
Bump @octokit/rest from 21.0.0 to 21.0.1 (internal-1669)
dependabot[bot] Jul 23, 2024
3362625
Bump eslint-plugin-jsdoc from 48.7.0 to 48.8.3 (internal-1671)
dependabot[bot] Jul 23, 2024
60d7cfc
Bump the eslint-dependencies group with 3 updates (internal-1666)
dependabot[bot] Jul 23, 2024
1d6cc8b
Bump the vitest-dependencies group with 3 updates (internal-1676)
dependabot[bot] Jul 23, 2024
26464c3
Bump typescript from 5.5.3 to 5.5.4 (internal-1677)
dependabot[bot] Jul 23, 2024
67db6af
Fix canvas fingerprinting noise check (internal-1678)
stepankuzmin Jul 23, 2024
aaa3a23
Improve TypeScript typings (internal-1679)
stepankuzmin Jul 23, 2024
7347b39
Render test that exposes elevated line occlusion depthRange issue in …
astojilj Jul 24, 2024
fa00b10
Add JSDocs for rasterarray source (internal-1685)
pratikyadav Jul 24, 2024
2bb0d74
Update RTL text plugin version (internal-1683)
stepankuzmin Jul 25, 2024
ffb090c
Move programs pre-compilation to browser idle phase (internal-1660)
underoot Jul 25, 2024
8c589ad
Verbose logging on failed Expression evaluation (internal-1687)
stepankuzmin Jul 26, 2024
50d9fe6
[MAPS3D-1357] Fix 3D model layer shadow normal offsets (internal-1690)
nicozink Jul 26, 2024
5e8ca32
Fix `isSourceLoaded` on `sourcedata` events (internal-1692)
stepankuzmin Jul 26, 2024
18a36ad
Render inner glow effect on circle layers with negative blur (interna…
endanke Jul 29, 2024
c00d11c
Bump testem from 3.15.0 to 3.15.1 (internal-1698)
dependabot[bot] Jul 30, 2024
9c809e5
Bump @types/node from 20.14.11 to 22.0.0 (internal-1699)
dependabot[bot] Jul 30, 2024
4a705cf
Bump postcss from 8.4.39 to 8.4.40 (internal-1697)
dependabot[bot] Jul 30, 2024
00570a2
[GLJS-939] Fire `error` source data event when tile not found (intern…
stepankuzmin Jul 30, 2024
2536f8c
Bump stylelint from 16.7.0 to 16.8.0 (internal-1700)
dependabot[bot] Jul 30, 2024
df1ac87
Bump the eslint-dependencies group with 3 updates (internal-1695)
dependabot[bot] Jul 30, 2024
c56c3ac
Bump eslint-plugin-jsdoc from 48.8.3 to 48.9.2 (internal-1696)
dependabot[bot] Jul 30, 2024
8c1b08e
Fix Map#queryRenderedFeatures type overload (internal-1702)
stepankuzmin Jul 30, 2024
b1847c8
Use public GFS wind data set in raster-particle-layer example (intern…
Nelarius Jul 30, 2024
ab4d69e
[GLJS-899] Added support of TileJSON inline (internal-1581)
underoot Jul 30, 2024
3d92f50
coalesce updated GeoJSON features by ID to avoid memory accumulation …
mourner Jul 30, 2024
9c76622
v3.6.0-beta.1 (internal-1705)
underoot Jul 31, 2024
fcfe089
Updated version of style-spec in package-lock (internal-1706)
underoot Jul 31, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ workflows:

linux-defaults: &linux-defaults
docker:
- image: cimg/node:18.20-browsers
- image: cimg/node:20.15-browsers
working_directory: ~/mapbox-gl-js

mac-defaults: &mac-defaults
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,12 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v4

- if: matrix.language == 'javascript-typescript'
name: Setup Node.js 20.x
uses: actions/setup-node@v4
with:
node-version: 20.x

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
Expand Down
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
18.20.2
20.15.1
4 changes: 3 additions & 1 deletion 3d-style/render/shadow_renderer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ type ShadowNormalOffsetMode = 'vector-tile' | 'model-tile';

const shadowParameters = {
cascadeCount: 2,
normalOffset: 3,
shadowMapResolution: 2048
};

Expand Down Expand Up @@ -168,6 +169,7 @@ export class ShadowRenderer {

painter.tp.registerParameter(this, ["Shadows"], "_forceDisable", {label: "forceDisable"}, () => { this.painter.style.map.triggerRepaint(); });
painter.tp.registerParameter(shadowParameters, ["Shadows"], "cascadeCount", {min: 1, max: 2, step: 1});
painter.tp.registerParameter(shadowParameters, ["Shadows"], "normalOffset", {min: 0, max: 10, step: 0.05});
painter.tp.registerParameter(shadowParameters, ["Shadows"], "shadowMapResolution", {min: 32, max: 2048, step: 32});
painter.tp.registerBinding(this, ["Shadows"], "_numCascadesToRender", {readonly: true, label: 'numCascadesToRender'});
}
Expand Down Expand Up @@ -500,7 +502,7 @@ export class ShadowRenderer {
this.useNormalOffset = normalOffset;

if (normalOffset) {
const scale = 5.0; // Experimentally found value
const scale = shadowParameters.normalOffset;
uniforms["u_shadow_normal_offset"] = [1.0, scale, scale]; // meterToTile isn't used
uniforms["u_shadow_bias"] = [0.00006, 0.0012, 0.012]; // Reduce constant offset
} else {
Expand Down
4 changes: 3 additions & 1 deletion 3d-style/shaders/_prelude_shadow.vertex.glsl
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@ vec3 shadow_normal_offset(vec3 normal) {
}

vec3 shadow_normal_offset_model(vec3 normal) {
float dotScale = min(1.0 - dot(normal, u_shadow_direction), 1.0) * 0.5 + 0.5;
vec3 transformed_normal = vec3(-normal.xy, normal.z);
float NDotL = dot(normalize(transformed_normal), u_shadow_direction);
float dotScale = min(1.0 - NDotL, 1.0) * 0.5 + 0.5;
return normal * dotScale;
}

Expand Down
4 changes: 2 additions & 2 deletions 3d-style/shaders/model.fragment.glsl
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ in highp vec4 v_position_height;
in lowp vec4 v_color_mix;

#ifdef RENDER_SHADOWS
in vec4 v_pos_light_view_0;
in vec4 v_pos_light_view_1;
in highp vec4 v_pos_light_view_0;
in highp vec4 v_pos_light_view_1;
in float v_depth_shadows;
#endif

Expand Down
6 changes: 3 additions & 3 deletions 3d-style/shaders/model.vertex.glsl
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ uniform highp mat4 u_normal_matrix;
#ifdef RENDER_SHADOWS
uniform mat4 u_light_matrix_0;
uniform mat4 u_light_matrix_1;
out vec4 v_pos_light_view_0;
out vec4 v_pos_light_view_1;
out highp vec4 v_pos_light_view_0;
out highp vec4 v_pos_light_view_1;
out float v_depth_shadows;
#endif

Expand Down Expand Up @@ -181,7 +181,7 @@ void main() {
vec3 offset = shadow_normal_offset(vec3(-normal_3f.xy, normal_3f.z));
shadow_pos.xyz += offset * shadow_normal_offset_multiplier0();
#else
vec3 offset = shadow_normal_offset_model(normalize(normal_3f));
vec3 offset = shadow_normal_offset_model(normal_3f);
shadow_pos.xyz += offset * shadow_normal_offset_multiplier0();
#endif
#endif // HAS_ATTRIBUTE_a_normal_3f
Expand Down
18 changes: 18 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,21 @@
## 3.6.0-beta.1

### Features and improvements ✨
- Improve initial load performance.
- Add inner glow effect for negative `circle-blur` values.
- Add support for inlining TileJSON in style source definitions using `data` field.
- Improve 3D models' shadow appearance.
- Improve performance of updating config values of a style.
- Add more descriptive expression evaluation error messages.
- Improve TypeScript typings.

### Bug fixes 🐞
- Fix `isSourceLoaded` flag on `sourcedata` event for already loaded sources.
- Fix firing `load` event when all tiles fail to load.
- Fix performance issues when GeoJSON in `dynamic` mode is updated too frequently.
- Fix rasterarray layer flickering from stale tiles cache.
- Fix spikes when viewing terrain-enabled maps in certain environments.

## 3.5.2

- Improve 3D models rendering performance.
Expand Down
10 changes: 5 additions & 5 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ Install the Xcode Command Line Tools Package
xcode-select --install
```

Install [node.js](https://nodejs.org/) version 18
Install [node.js](https://nodejs.org/) version 20
```bash
brew install node@18
brew install node@20
```

Clone the repository
Expand All @@ -26,10 +26,10 @@ npm install

### Linux

Install [git](https://git-scm.com/), [node.js](https://nodejs.org/) version 18, [GNU Make](http://www.gnu.org/software/make/), and libglew-dev
Install [git](https://git-scm.com/), [node.js](https://nodejs.org/) version 20, [GNU Make](http://www.gnu.org/software/make/), and libglew-dev
```bash
sudo apt-get update
curl -sL https://deb.nodesource.com/setup_18.x | sudo bash -
curl -sL https://deb.nodesource.com/setup_20.x | sudo bash -
sudo apt-get install build-essential git nodejs libglew-dev libxi-dev
```

Expand All @@ -45,7 +45,7 @@ npm install

### Windows

Install [git](https://git-scm.com/), [node.js](https://nodejs.org/) version 18, [npm and node-gyp](https://github.com/Microsoft/nodejs-guidelines/blob/master/windows-environment.md#compiling-native-addon-modules).
Install [git](https://git-scm.com/), [node.js](https://nodejs.org/) version 20, [npm and node-gyp](https://github.com/Microsoft/nodejs-guidelines/blob/master/windows-environment.md#compiling-native-addon-modules).

Clone the repository
```bash
Expand Down
1 change: 1 addition & 0 deletions build/generate-typed-style-spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,7 @@ export type ResolvedImageSpecification = string;
export type PromoteIdSpecification = {[_: string]: string} | string;

export type FilterSpecification =
| ExpressionSpecification
| ['has', string]
| ['!has', string]
| ['==', string, string | number | boolean]
Expand Down
6 changes: 0 additions & 6 deletions build/publish.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,3 @@ git tag --points-at HEAD | while read tag; do
echo "Unrecognized tag: $tag"
fi
done

if [ -n "$(git tag --points-at HEAD)" ]; then
node build/generate-release-list.js &&
aws s3 cp --acl public-read --content-type application/json dist/versions.json s3://mapbox-gl-js/versions.json &&
aws s3 cp --acl public-read --content-type application/javascript dist/versions.jsonp s3://mapbox-gl-js/versions.jsonp
fi
3 changes: 3 additions & 0 deletions build/upload.sh
Original file line number Diff line number Diff line change
Expand Up @@ -88,3 +88,6 @@ do
aws s3 cp --acl public-read --content-type ${mimetype} ./dist/${file} s3://mapbox-gl-js/${tag}/${file}
fi
done

aws s3 cp --acl public-read --content-type application/json dist/versions.json s3://mapbox-gl-js/versions.json &&
aws s3 cp --acl public-read --content-type application/javascript dist/versions.jsonp s3://mapbox-gl-js/versions.jsonp
2 changes: 1 addition & 1 deletion buildspec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ version: 0.2
phases:
install:
runtime-versions:
nodejs: 18
nodejs: 20
commands:
- echo "//registry.npmjs.org/:_authToken=$NPMAccessToken" > ~/.npmrc
- npm whoami
Expand Down
7 changes: 7 additions & 0 deletions debug/circles.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
<div id='checkboxes'>
<label><input id='terrain-checkbox' type='checkbox' checked> terrain</label><br />
<label><input id='globe-checkbox' type='checkbox'> globe</label><br />
<label><input type="range" min="-100" max="100" value="0" class="slider" id="blur-slider"> blur: </label><label id='glow'>0.0</label><br />
</div>

<script src='../dist/mapbox-gl-dev.js'></script>
Expand Down Expand Up @@ -101,6 +102,12 @@
map.setProjection(this.checked ? "globe" : null);
};

document.getElementById('blur-slider').oninput = function() {
const glow = parseInt(this.value) / 100.0;
map.setPaintProperty("circles", 'circle-blur', glow);
document.getElementById('glow').innerHTML = glow;
};

let hovered = [];
window.addEventListener('mousemove', function(e) {
e.point = new mapboxgl.Point(e.clientX, e.clientY);
Expand Down
2 changes: 1 addition & 1 deletion debug/i18n.html
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@
});

map.addControl(new mapboxgl.ScaleControl());
mapboxgl.setRTLTextPlugin('https://api.mapbox.com/mapbox-gl-js/plugins/mapbox-gl-rtl-text/v0.2.3/mapbox-gl-rtl-text.js');
mapboxgl.setRTLTextPlugin('https://api.mapbox.com/mapbox-gl-js/plugins/mapbox-gl-rtl-text/v0.3.0/mapbox-gl-rtl-text.js');

map.on('style.load', () => {
map.addSource('mapbox://mapbox.mapbox-streets-v8-i18n', {
Expand Down
Loading
Loading