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.2.0-beta.1 (bug fixes and miscellaneous improvements) #13084

Merged
merged 52 commits into from
Feb 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
52 commits
Select commit Hold shift + click to select a range
b215541
improve Flow typing for WebGL2
mourner Jan 19, 2024
f224abe
[MAPS3D-1214] z offset, when there are multiple extrusions, gets max …
astojilj Jan 19, 2024
8008345
Add imports support to map.areTilesLoaded (internal-1060)
stepankuzmin Jan 20, 2024
2d941c3
[MAPS3D-1208] Don't use ALPHA textures since desktop OpenGL removed s…
aleksigron Jan 24, 2024
e955df7
Supporting rotated elevated rasters
woodroof Jan 16, 2024
20f4cdc
Sorting elevated raster triangles by longitude in order to not render…
woodroof Jan 23, 2024
5479864
Moved lowerBound and upperBound to util.js
woodroof Jan 23, 2024
3c9791a
Additional render tests
woodroof Jan 23, 2024
9e0f92c
Disallow usage of flat qualifier (internal-1068)
endanke Jan 25, 2024
ef27bbc
Adding forgotten w multiplication for raster elevation (internal-1070)
woodroof Jan 26, 2024
b6c37ba
Additional elevated rasters fixes (internal-1071)
woodroof Jan 26, 2024
1d644d1
Update test to use existing in native database cache tiles (internal-…
woodroof Jan 29, 2024
8e38e93
Don't propagate flyTo padding to the transform (internal-1069)
stepankuzmin Jan 29, 2024
5843a3a
Bump puppeteer-core from 21.7.0 to 21.10.0 (internal-1079)
dependabot[bot] Jan 30, 2024
d07d459
Bump @babel/eslint-parser from 7.22.15 to 7.23.9 (internal-1076)
dependabot[bot] Jan 30, 2024
2a9e11c
Bump tape from 5.7.3 to 5.7.4 (internal-1081)
dependabot[bot] Jan 30, 2024
f3c0004
Bump eslint-plugin-jsdoc from 48.0.2 to 48.0.4 (internal-1077)
dependabot[bot] Jan 30, 2024
34f4210
Bump selenium-webdriver from 4.16.0 to 4.17.0 (internal-1078)
dependabot[bot] Jan 30, 2024
ad86567
Bump @babel/core from 7.23.7 to 7.23.9 (internal-1080)
dependabot[bot] Jan 30, 2024
c8d534b
Update caniuse db (internal-1083)
stepankuzmin Jan 30, 2024
a4b93d1
remove unnecessary require annotations for flood-light and ambient oc…
akoylasar Jan 30, 2024
ad47802
Enable negative fill extrusion flood light ground radius (internal-1072)
endanke Jan 31, 2024
c6e12c5
add new render tests (internal-1084)
zmiao Jan 31, 2024
c1babfc
[MAPS3D-1251] model-emissive-strength support (internal-1082)
akoylasar Jan 31, 2024
94241a5
v3.2.0-alpha.1 (internal-1085)
stepankuzmin Jan 31, 2024
3548dfa
Introduce control to configure diff calculation for render tests (int…
akoylasar Feb 1, 2024
4f303e8
Enforce highp preciseness for raster array prelude function arguments…
pozdnyakov Feb 1, 2024
00ae914
Warn if `url` or `tiles` is missing for the tiled sources in the Styl…
stepankuzmin Feb 5, 2024
0e8268f
Add Standard Style to the Release Testing (internal-1088)
stepankuzmin Feb 5, 2024
3d8d2d3
Bump postcss from 8.4.33 to 8.4.34 (internal-1095)
dependabot[bot] Feb 6, 2024
0155d77
Bump puppeteer-core from 21.10.0 to 22.0.0 (internal-1096)
dependabot[bot] Feb 6, 2024
2403307
Bump eslint-plugin-jsdoc from 48.0.4 to 48.0.5 (internal-1097)
dependabot[bot] Feb 6, 2024
145b687
Update landmark models to the stable version (internal-1099)
jtorresfabra Feb 6, 2024
0d38fcf
Bump @babel/eslint-parser from 7.23.9 to 7.23.10 (internal-1098)
dependabot[bot] Feb 6, 2024
5a83fa1
Use shared config options (internal-1092)
stepankuzmin Feb 6, 2024
e3ccd74
Use current evaluation context in `getConfig` (internal-1103)
stepankuzmin Feb 7, 2024
b60d381
[GLJS-588] Fix `config` expression chaining through nested styles (in…
mourner Feb 8, 2024
9d6d9ac
[MAPS3D-1258] extend buildings cutoff behavior to use scale and rando…
astojilj Feb 8, 2024
c328f32
Fix minor typing issues (internal-1111)
stepankuzmin Feb 8, 2024
0c373e3
Fix source minzoom issue in trees-light-aligned-update-data-driven-fa…
astojilj Feb 9, 2024
71f201f
Fix minor typing issues (internal-1120)
stepankuzmin Feb 12, 2024
664d036
Bump chokidar from 3.5.3 to 3.6.0 (internal-1123)
dependabot[bot] Feb 14, 2024
97c7739
Bump postcss from 8.4.34 to 8.4.35 (internal-1124)
dependabot[bot] Feb 14, 2024
f311572
Bump eslint-plugin-jsdoc from 48.0.5 to 48.0.6 (internal-1122)
dependabot[bot] Feb 14, 2024
fac2966
Bump diff from 5.1.0 to 5.2.0 (internal-1125)
dependabot[bot] Feb 14, 2024
a44ae02
Bump eslint-plugin-html from 7.1.0 to 8.0.0 (internal-1126)
dependabot[bot] Feb 14, 2024
0149a12
Disable flow explicitly in some files (internal-1129)
stepankuzmin Feb 14, 2024
dda0eb3
Fix type imports (internal-1132)
stepankuzmin Feb 14, 2024
25d5756
[MAPS3D-1237] out-of-the box trackable parameters with UI (internal-1…
alexey-romanov Feb 15, 2024
f0672b7
GLJS-680 Added render test for slot in non-EB style (internal-1134)
underoot Feb 15, 2024
77b5fc5
Use mipmap with pattern images (internal-1035)
endanke Feb 15, 2024
4568501
v3.2.0-beta.1 (internal-1141)
underoot Feb 15, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
The table of contents is too big for display.
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 @@ -557,4 +557,4 @@ jobs:
else
echo "Error: Non-2xx response code - $response_code"
exit 1
fi
fi
2 changes: 1 addition & 1 deletion .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
"no-eq-null": "off",
"no-lonely-if": "off",
"no-new": "off",
"no-unused-vars": ["error", {"argsIgnorePattern": "^_$"}],
"no-unused-vars": ["error", {"argsIgnorePattern": "^_"}],
"no-warning-comments": "error",
"no-mixed-operators": ["error", {"groups": [["&", "|", "^", "~", "<<", ">>", ">>>"], ["&&", "||"]]}],
"object-curly-spacing": ["error", "never"],
Expand Down
2 changes: 2 additions & 0 deletions 3d-style/data/bucket/tiled_3d_model_bucket.js
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,8 @@ class Tiled3dModelBucket implements Bucket {
const doorLightChanged = previousDoorColor !== nodeInfo.evaluatedColor[PartIndices.door] ||
previousDoorRMEA !== nodeInfo.evaluatedRMEA[PartIndices.door];
updateNodeFeatureVertices(nodeInfo, doorLightChanged);
} else {
nodeInfo.evaluatedRMEA[0][2] = layer.paint.get('model-emissive-strength').evaluate(evaluationFeature, {}, canonical);
}
nodeInfo.evaluatedScale = (layer.paint.get('model-scale').evaluate(evaluationFeature, {}, canonical): any);
if (!this.updatePbrBuffer(nodeInfo.node)) {
Expand Down
1 change: 0 additions & 1 deletion 3d-style/data/model.js
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,6 @@ export default class Model {
}

export function uploadTexture(texture: ModelTexture, context: Context, useSingleChannelTexture: boolean = false) {
// $FlowFixMe[prop-missing]
const textureFormat = useSingleChannelTexture ? context.gl.R8 : context.gl.RGBA;
if (!texture.uploaded) {
const useMipmap = texture.sampler.minFilter >= context.gl.NEAREST_MIPMAP_NEAREST;
Expand Down
7 changes: 3 additions & 4 deletions 3d-style/render/draw_model.js
Original file line number Diff line number Diff line change
Expand Up @@ -758,7 +758,8 @@ function drawBatchedModels(painter: Painter, source: SourceCache, layer: ModelSt
mat4.scale(normalMatrix, normalMatrix, normalScale);

const worldViewProjection = mat4.multiply([], tr.expandedFarZProjMatrix, modelMatrix);

const hasMapboxFeatures = modelTraits & ModelTraits.HasMapboxMeshFeatures;
const emissiveStrength = hasMapboxFeatures ? 0.0 : nodeInfo.evaluatedRMEA[0][2];
for (let i = 0; i < node.meshes.length; ++i) {
const mesh = node.meshes[i];
const isLight = i === node.lightMeshIndex;
Expand All @@ -778,8 +779,7 @@ function drawBatchedModels(painter: Painter, source: SourceCache, layer: ModelSt
};
const dynamicBuffers = [];
setupMeshDraw(((programOptions.defines: any): Array<string>), dynamicBuffers, mesh, painter);

if (!(modelTraits & ModelTraits.HasMapboxMeshFeatures)) {
if (!hasMapboxFeatures) {
(programOptions.defines: any).push('DIFFUSE_SHADED');
}

Expand Down Expand Up @@ -822,7 +822,6 @@ function drawBatchedModels(painter: Painter, source: SourceCache, layer: ModelSt
pbr.roughnessFactor = 0.5;

// Set emissive strength to zero for landmarks, as it is already used embedded in the PBR buffer.
const emissiveStrength = 0.0;
const uniformValues = modelUniformValues(
new Float32Array(worldViewProjection),
new Float32Array(lightingMatrix),
Expand Down
41 changes: 24 additions & 17 deletions 3d-style/render/shadow_renderer.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,10 @@ export type TileShadowVolume = {

type ShadowNormalOffsetMode = 'vector-tile' | 'model-tile';

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

class ShadowReceiver {
constructor(aabb: Aabb, lastCascade: ?number) {
Expand Down Expand Up @@ -158,6 +160,9 @@ export class ShadowRenderer {
this._uniformValues = defaultShadowUniformValues();

this.useNormalOffset = false;

painter.tp.registerParameter(shadowParameters, ["Shadows"], "cascadeCount", {min: 1, max: 2, step: 1});
painter.tp.registerParameter(shadowParameters, ["Shadows"], "shadowMapResolution", {min: 32, max: 2048, step: 32});
}

destroy() {
Expand Down Expand Up @@ -199,11 +204,12 @@ export class ShadowRenderer {
}

const context = painter.context;
const width = shadowMapResolution;
const height = shadowMapResolution;
const width = shadowParameters.shadowMapResolution;
const height = shadowParameters.shadowMapResolution;

if (this._cascades.length === 0) {
for (let i = 0; i < cascadeCount; ++i) {
if (this._cascades.length === 0 || shadowParameters.shadowMapResolution !== this._cascades[0].texture.size[0]) {
this._cascades = [];
for (let i = 0; i < shadowParameters.cascadeCount; ++i) {
const useColor = painter._shadowMapDebug;

const gl = context.gl;
Expand Down Expand Up @@ -246,13 +252,13 @@ export class ShadowRenderer {
const cascadeSplitDist = transform.cameraToCenterDistance * 1.5;
const shadowCutoutDist = cascadeSplitDist * 3.0;
const cameraInvProj = new Float64Array(16);
for (let cascadeIndex = 0; cascadeIndex < cascadeCount; ++cascadeIndex) {
for (let cascadeIndex = 0; cascadeIndex < this._cascades.length; ++cascadeIndex) {
const cascade = this._cascades[cascadeIndex];

let near = transform.height / 50.0;
let far = 1.0;

if (cascadeCount === 1) {
if (shadowParameters.cascadeCount === 1) {
far = shadowCutoutDist;
} else {
if (cascadeIndex === 0) {
Expand All @@ -263,7 +269,7 @@ export class ShadowRenderer {
}
}

const [matrix, radius] = createLightMatrix(transform, this.shadowDirection, near, far, shadowMapResolution, verticalRange);
const [matrix, radius] = createLightMatrix(transform, this.shadowDirection, near, far, shadowParameters.shadowMapResolution, verticalRange);
cascade.scale = transform.scale;
cascade.matrix = matrix;
cascade.boundingSphereRadius = radius;
Expand All @@ -272,11 +278,12 @@ export class ShadowRenderer {
cascade.frustum = Frustum.fromInvProjectionMatrix(cameraInvProj, 1, 0, true);
cascade.far = far;
}
this._uniformValues['u_fade_range'] = [this._cascades[1].far * 0.75, this._cascades[1].far];
const fadeRangeIdx = this._cascades.length - 1;
this._uniformValues['u_fade_range'] = [this._cascades[fadeRangeIdx].far * 0.75, this._cascades[fadeRangeIdx].far];
this._uniformValues['u_shadow_intensity'] = shadowIntensity;
this._uniformValues['u_shadow_direction'] = [this.shadowDirection[0], this.shadowDirection[1], this.shadowDirection[2]];
this._uniformValues['u_shadow_texel_size'] = 1 / shadowMapResolution;
this._uniformValues['u_shadow_map_resolution'] = shadowMapResolution;
this._uniformValues['u_shadow_texel_size'] = 1 / shadowParameters.shadowMapResolution;
this._uniformValues['u_shadow_map_resolution'] = shadowParameters.shadowMapResolution;
this._uniformValues['u_shadowmap_0'] = TextureSlots.ShadowMap0;
this._uniformValues['u_shadowmap_1'] = TextureSlots.ShadowMap0 + 1;

Expand Down Expand Up @@ -323,7 +330,7 @@ export class ShadowRenderer {
// shadows.
this._numCascadesToRender = this._receivers.computeRequiredCascades(painter.transform.getFrustum(0), painter.transform.worldSize, this._cascades);

context.viewport.set([0, 0, shadowMapResolution, shadowMapResolution]);
context.viewport.set([0, 0, shadowParameters.shadowMapResolution, shadowParameters.shadowMapResolution]);

for (let cascade = 0; cascade < this._numCascadesToRender; ++cascade) {
painter.currentShadowCascade = cascade;
Expand Down Expand Up @@ -428,7 +435,7 @@ export class ShadowRenderer {
const lightMatrix = new Float64Array(16);
const tileMatrix = transform.calculatePosMatrix(unwrappedTileID, transform.worldSize);

for (let i = 0; i < cascadeCount; i++) {
for (let i = 0; i < this._cascades.length; i++) {
mat4.multiply(lightMatrix, this._cascades[i].matrix, tileMatrix);
uniforms[i === 0 ? 'u_light_matrix_0' : 'u_light_matrix_1'] = Float32Array.from(lightMatrix);
context.activeTexture.set(gl.TEXTURE0 + TextureSlots.ShadowMap0 + i);
Expand All @@ -439,9 +446,9 @@ export class ShadowRenderer {

if (this.useNormalOffset) {
const meterInTiles = tileToMeter(unwrappedTileID.canonical);
const texelScale = 2.0 / transform.tileSize * EXTENT / shadowMapResolution;
const texelScale = 2.0 / transform.tileSize * EXTENT / shadowParameters.shadowMapResolution;
const shadowTexelInTileCoords0 = texelScale * this._cascades[0].boundingSphereRadius;
const shadowTexelInTileCoords1 = texelScale * this._cascades[1].boundingSphereRadius;
const shadowTexelInTileCoords1 = texelScale * this._cascades[this._cascades.length - 1].boundingSphereRadius;
// Instanced model tiles could have smoothened (shared among neighbor faces) normals. Normal is not surface normal
// and this is why it is needed to increase the offset. 3.0 in case of model-tile could be alternatively replaced by
// 2.0 if normal would not get scaled by dotScale in shadow_normal_offset().
Expand All @@ -467,7 +474,7 @@ export class ShadowRenderer {
const uniforms = this._uniformValues;

const lightMatrix = new Float64Array(16);
for (let i = 0; i < cascadeCount; i++) {
for (let i = 0; i < shadowParameters.cascadeCount; i++) {
mat4.multiply(lightMatrix, this._cascades[i].matrix, worldMatrix);
uniforms[i === 0 ? 'u_light_matrix_0' : 'u_light_matrix_1'] = Float32Array.from(lightMatrix);
context.activeTexture.set(gl.TEXTURE0 + TextureSlots.ShadowMap0 + i);
Expand Down
12 changes: 6 additions & 6 deletions 3d-style/shaders/model.fragment.glsl
Original file line number Diff line number Diff line change
Expand Up @@ -144,15 +144,14 @@ vec4 getBaseColor() {
}
texColor.w = 1.0;
#endif
// Convert to linear
texColor.rgb = sRGBToLinear(texColor.rgb);

if(u_baseTextureIsAlpha) {
if (texColor.w < 0.5) {
if (texColor.r < 0.5) {
discard;
}
albedo *= mix(vec4(texColor.rgb, texColor.a), vec4(texColor.a), float(u_baseTextureIsAlpha));
} else {
// gltf material
texColor.rgb = sRGBToLinear(texColor.rgb);
albedo *= texColor;
}
#endif
Expand Down Expand Up @@ -428,7 +427,8 @@ void main() {
vec4 finalColor;
#ifdef DIFFUSE_SHADED
vec3 N = getNormal();
vec3 diffuse = getDiffuseShadedColor(getBaseColor().rgb, N, lightDir, lightColor);
vec3 baseColor = getBaseColor().rgb;
vec3 diffuse = getDiffuseShadedColor(baseColor, N, lightDir, lightColor);
// Ambient Occlusion
#ifdef HAS_TEXTURE_u_occlusionTexture
// For b3dm tiles where models contains occlusion textures we interpret them similarly to how
Expand All @@ -437,7 +437,7 @@ vec4 finalColor;
float ao = (texture(u_occlusionTexture, uv_2f).r - 1.0) * u_aoIntensity + 1.0;
diffuse *= ao;
#endif
finalColor = vec4(diffuse, 1.0) * u_opacity;
finalColor = vec4(mix(diffuse, baseColor, u_emissive_strength), 1.0) * u_opacity;
#else // DIFFUSE_SHADED
Material mat = getPBRMaterial();
vec3 color = computeLightContribution(mat, lightDir, lightColor);
Expand Down
8 changes: 4 additions & 4 deletions 3d-style/style/lights.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@ class Lights<P: Object> extends Evented {
this._options = options;
this.properties = new PossiblyEvaluated(properties);

this._transitionable = new Transitionable(properties, new Map(configOptions));
this._transitionable.setTransitionOrValue<LightsSpecification['properties']>(options.properties);
this._transitionable = new Transitionable(properties, scope, new Map(configOptions));
this._transitionable.setTransitionOrValue<$PropertyType<LightsSpecification, 'properties'>>(options.properties);
this._transitioning = this._transitionable.untransitioned();
}

updateConfig(configOptions?: ?ConfigOptions) {
this._transitionable.setTransitionOrValue<LightsSpecification['properties']>(this._options.properties, new Map(configOptions));
this._transitionable.setTransitionOrValue<$PropertyType<LightsSpecification, 'properties'>>(this._options.properties, new Map(configOptions));
}

updateTransitions(parameters: TransitionParameters) {
Expand All @@ -48,7 +48,7 @@ class Lights<P: Object> extends Evented {

set(options: LightsSpecification, configOptions?: ?ConfigOptions) {
this._options = options;
this._transitionable.setTransitionOrValue<LightsSpecification['properties']>(options.properties, configOptions);
this._transitionable.setTransitionOrValue<$PropertyType<LightsSpecification, 'properties'>>(options.properties, configOptions);
}

shadowsEnabled(): boolean {
Expand Down
4 changes: 2 additions & 2 deletions 3d-style/style/style_layer/model_style_layer.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ class ModelStyleLayer extends StyleLayer {
paint: PossiblyEvaluated<PaintProps>;
layout: PossiblyEvaluated<LayoutProps>;

constructor(layer: LayerSpecification, options?: ?ConfigOptions) {
super(layer, properties, options);
constructor(layer: LayerSpecification, scope: string, options?: ?ConfigOptions) {
super(layer, properties, scope, options);
}

createBucket(parameters: BucketParameters<ModelStyleLayer>): ModelBucket {
Expand Down
3 changes: 2 additions & 1 deletion 3d-style/util/draco_decoder_gltf.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
// @noflow
/* global WebAssembly: false */
/* eslint-disable new-cap, flowtype/require-valid-file-annotation */
/* eslint-disable new-cap */

// Emscripten-based JavaScript wrapper for Google Draco WASM decoder, manually optimized for much smaller size
export function DracoDecoderModule(wasmPromise) {
Expand Down
20 changes: 20 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,23 @@
## 3.2.0-beta.1

### Features and improvements ✨

- Added imports support in `map.areTilesLoaded`.
- Added support of rotation of elevated raster layers.
- Added support of negative values for `fill-extrusion-flood-light-ground-radius` property.
- Config options of one imported fragment can be used in another fragments.
- Improved cutoff behavior of buildings.

### Bug fixes 🐞

- Fix an issue where `map.flyTo` with `padding` option was setting and overriding map's padding.
- Issue a warning instead of a validation error if `url` or `tiles` is missing from source, i.e. in MapTiler source.
- Fix the moiré effects on patterns in tilted map views.
- Removing role attribute for non-visible alerts. (h/t [@jakubmakielkowski](https://github.com/jakubmakielkowski)) [#13051](https://github.com/mapbox/mapbox-gl-js/pull/13051)
- Fix an elevation of symbols above multiple fill extrusions, when some of them hidden or lowered.
- Fix `config` expression chaining through nested styles.
- Proper clean up of actor cancel callbacks. (h/t [@temas](https://github.com/temas)) [#13074](https://github.com/mapbox/mapbox-gl-js/pull/13074)

## 3.1.2

### Bug fixes 🐞
Expand Down
4 changes: 4 additions & 0 deletions build/node-loader.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ export async function resolve(specifier, context, nextResolve) {
return {url, shortCircuit: true};
}

if (specifier == 'tracked_parameters_proxy') {
specifier = './tracked_parameters_mock.js';
}

return nextResolve(specifier);
}

Expand Down
6 changes: 6 additions & 0 deletions build/rollup_plugins.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import minifyStyleSpec from './rollup_plugin_minify_style_spec.js';
import {createFilter} from '@rollup/pluginutils';
import strip from '@rollup/plugin-strip';
import replace from '@rollup/plugin-replace';
import alias from '@rollup/plugin-alias';

// Common set of plugins/transformations shared across different rollup
// builds (main mapboxgl bundle, style-spec package, benchmarks bundle)
Expand All @@ -20,6 +21,11 @@ export const plugins = ({minified, production, test, bench, keepClassNames}) =>
json({
exclude: 'src/style-spec/reference/v8.json'
}),
alias({
entries: [
{ find: 'tracked_parameters_proxy', replacement: production ? 'src/tracked-parameters/tracked_parameters_mock.js' : 'src/tracked-parameters/tracked_parameters_ui.js' },
]
}),
(production && !bench) ? strip({
sourceMap: true,
functions: ['PerformanceUtils.*', 'WorkerPerformanceUtils.*', 'Debug.*', 'performance.mark']
Expand Down
1 change: 1 addition & 0 deletions debug/10186.html
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@

const map = window.map = new mapboxgl.Map({
container: 'map',
enableEmbeddedDevUI: true,
style: {
'version': 8,
'name': "Blank",
Expand Down
1 change: 1 addition & 0 deletions debug/2762.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@

var map = new mapboxgl.Map({
container: 'map',
enableEmbeddedDevUI: true,
style: {
"version": 8,
"sources": {
Expand Down
1 change: 1 addition & 0 deletions debug/3895.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@

var map = window.map = new mapboxgl.Map({
container: 'map',
enableEmbeddedDevUI: true,
center: [-68.13734351262877, 45.137451890638886],
zoom: 5,
style: 'mapbox://styles/mapbox/streets-v10',
Expand Down
10 changes: 8 additions & 2 deletions debug/3d-playground.html
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,9 @@
this.floodLightColor = {r:255, g:255, b:146};
this.floodLightIntensity = 0.0;
this.floodLightGroundAttenuation = 0.69;
this.floodLightGroundRadius = 0.0;
this.buildingColor = {r:255, g:255, b:255};
this.buildingAlpha = 1.0;
this.buildingOpacity = 1;
this.cutoffFadeRange = 0.0;
this.ambientLightColor = {r:255, g:255, b:255};
Expand Down Expand Up @@ -385,6 +387,7 @@
});
const verticalGradient = buildings.addInput(demo3d, 'verticalGradient');
const buildingColor = buildings.addInput(demo3d, 'buildingColor');
const buildingAlpha = buildings.addInput(demo3d, 'buildingAlpha', {min:0.0, max:1.0});
const buildingOpacity = buildings.addInput(demo3d, 'buildingOpacity', {min:0.0, max:1.0});
const cutoffFadeRange = buildings.addInput(demo3d, 'cutoffFadeRange', {min:0.0, max:1.0});
const edgeRadius = buildings.addInput(demo3d, 'edgeRadius');
Expand All @@ -393,7 +396,7 @@
buildings.on('change', (ev) => {
map.setPaintProperty(demo3d.buildingExtrusion, 'fill-extrusion-vertical-gradient', demo3d.verticalGradient);
map.setPaintProperty(demo3d.buildingExtrusion, 'fill-extrusion-color',
'rgb(' + demo3d.buildingColor.r + ', ' + demo3d.buildingColor.g + ', ' + demo3d.buildingColor.b + ')');
'rgba(' + demo3d.buildingColor.r + ', ' + demo3d.buildingColor.g + ', ' + demo3d.buildingColor.b + ', ' + demo3d.buildingAlpha + ')');
map.setPaintProperty(demo3d.buildingExtrusion, 'fill-extrusion-opacity', demo3d.buildingOpacity);
map.setPaintProperty(demo3d.buildingExtrusion, 'fill-extrusion-cutoff-fade-range', demo3d.cutoffFadeRange);
map.setLayoutProperty(demo3d.buildingExtrusion, 'fill-extrusion-edge-radius', demo3d.edgeRadius);
Expand All @@ -416,6 +419,7 @@
const floodLightColor = groundEffects.addInput(demo3d, 'floodLightColor');
const floodLightIntensity = groundEffects.addInput(demo3d, 'floodLightIntensity', {min:0.0, max:1.0});
const floodLightGroundAttenuation = groundEffects.addInput(demo3d, 'floodLightGroundAttenuation', {min:0.0, max:1.0});
const floodLightGroundRadius = groundEffects.addInput(demo3d, 'floodLightGroundRadius', {min:-50.0, max:50.0});
groundEffects.on('change', (ev) => {
map.setPaintProperty(demo3d.buildingExtrusion, 'fill-extrusion-ambient-occlusion-intensity', demo3d.aoIntensity);
map.setPaintProperty(demo3d.buildingExtrusion, 'fill-extrusion-ambient-occlusion-radius', demo3d.aoWallRadius);
Expand All @@ -426,6 +430,7 @@
'rgb(' + demo3d.floodLightColor.r + ', ' + demo3d.floodLightColor.g + ', ' + demo3d.floodLightColor.b + ')');
map.setPaintProperty(demo3d.buildingExtrusion, 'fill-extrusion-flood-light-intensity', demo3d.floodLightIntensity);
map.setPaintProperty(demo3d.buildingExtrusion, 'fill-extrusion-flood-light-ground-attenuation', demo3d.floodLightGroundAttenuation);
map.setPaintProperty(demo3d.buildingExtrusion, 'fill-extrusion-flood-light-ground-radius', demo3d.floodLightGroundRadius);
});
};

Expand All @@ -437,7 +442,8 @@
bearing: 60,
style: window.dynamic,
hash: true,
projection: 'globe'
projection: 'globe',
enableEmbeddedDevUI: true
});

const r = 255 * 0.75;
Expand Down