Skip to content

Commit

Permalink
Use boolean type for Directional light cast-shadows property (inter…
Browse files Browse the repository at this point in the history
…nal-1831)
  • Loading branch information
stepankuzmin authored and underoot committed Sep 12, 2024
1 parent 5affccd commit 00dd47d
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 4 deletions.
3 changes: 0 additions & 3 deletions src/style-spec/reference/v8.json
Original file line number Diff line number Diff line change
Expand Up @@ -483,9 +483,6 @@
"default": false,
"doc": "Enable/Disable shadow casting for this light",
"transition": false,
"expression": {
"interpolated": false
},
"property-type": "data-constant",
"sdk-support": {
"basic functionality": {
Expand Down
2 changes: 1 addition & 1 deletion src/style-spec/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,7 @@ export type DirectionalLightSpecification = {
"color-transition"?: TransitionSpecification,
"intensity"?: PropertyValueSpecification<number>,
"intensity-transition"?: TransitionSpecification,
"cast-shadows"?: ExpressionSpecification,
"cast-shadows"?: boolean,
"shadow-intensity"?: PropertyValueSpecification<number>,
"shadow-intensity-transition"?: TransitionSpecification
},
Expand Down
14 changes: 14 additions & 0 deletions test/build/typings/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -394,6 +394,20 @@ map.setTerrain({'source': 'mapbox-dem', 'exaggeration': 1.5});
map.setTerrain(undefined);
map.setTerrain(null);

//
// 3D Lights
//

map.setLights([
{
"id": "directional",
"type": "directional",
"properties": {
"cast-shadows": true,
}
}
]);

//
// Query features
//
Expand Down

0 comments on commit 00dd47d

Please sign in to comment.