Skip to content

Commit 00dd47d

Browse files
stepankuzminunderoot
authored andcommitted
Use boolean type for Directional light cast-shadows property (internal-1831)
1 parent 5affccd commit 00dd47d

3 files changed

Lines changed: 15 additions & 4 deletions

File tree

src/style-spec/reference/v8.json

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -483,9 +483,6 @@
483483
"default": false,
484484
"doc": "Enable/Disable shadow casting for this light",
485485
"transition": false,
486-
"expression": {
487-
"interpolated": false
488-
},
489486
"property-type": "data-constant",
490487
"sdk-support": {
491488
"basic functionality": {

src/style-spec/types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -347,7 +347,7 @@ export type DirectionalLightSpecification = {
347347
"color-transition"?: TransitionSpecification,
348348
"intensity"?: PropertyValueSpecification<number>,
349349
"intensity-transition"?: TransitionSpecification,
350-
"cast-shadows"?: ExpressionSpecification,
350+
"cast-shadows"?: boolean,
351351
"shadow-intensity"?: PropertyValueSpecification<number>,
352352
"shadow-intensity-transition"?: TransitionSpecification
353353
},

test/build/typings/index.ts

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -394,6 +394,20 @@ map.setTerrain({'source': 'mapbox-dem', 'exaggeration': 1.5});
394394
map.setTerrain(undefined);
395395
map.setTerrain(null);
396396

397+
//
398+
// 3D Lights
399+
//
400+
401+
map.setLights([
402+
{
403+
"id": "directional",
404+
"type": "directional",
405+
"properties": {
406+
"cast-shadows": true,
407+
}
408+
}
409+
]);
410+
397411
//
398412
// Query features
399413
//

0 commit comments

Comments
 (0)