-
Notifications
You must be signed in to change notification settings - Fork 38
Add fill-extrude-height, fill-extrude-base, and light root property #495
Changes from 1 commit
1d4e02e
277b7f3
ab5e653
ccbdf0d
40b2a36
348b476
256c1b8
b5b6be2
f317d2e
b07472a
cf1f41c
75a3cb4
139bbf2
e88937e
b814b4c
a89f6fc
bc2fc7d
d03f412
b1046f8
7bbb3e4
6f6a150
75131b5
76014c4
59d6f47
da73797
fc31ea0
12e212d
9db077c
c41f9e3
0df913b
c3a9fd3
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -49,17 +49,17 @@ | |
"default": "viewport", | ||
"values": { | ||
"map": { | ||
"doc": "The direction of the light source is aligned to the rotation of the map." | ||
"doc": "The position of the light source is aligned to the rotation of the map." | ||
}, | ||
"viewport": { | ||
"doc": "The direction of the light source is aligned to the rotation of the viewport." | ||
"doc": "The position of the light source is aligned to the rotation of the viewport." | ||
} | ||
}, | ||
"transition": false, | ||
"doc": "Whether extruded geometries are lit relative to the map or viewport.", | ||
"example": "map" | ||
}, | ||
"direction": { | ||
"position": { | ||
"type": "array", | ||
"default": [1.15, 210, 30], | ||
"length": 3, | ||
|
@@ -68,7 +68,7 @@ | |
"function": "interpolated", | ||
"zoom-function": true, | ||
"property-function": false, | ||
"doc": "Position of the light source relative to lit (extruded) geometries, in [r radial coordinate, a azimuthal angle, p polar angle] where r indicates the distance from the center of an object to its light, a indicates the position of the light relative to 0° (like a clock), and p indicates the height of the light (from 0°, directly above, to 180°, directly below).", | ||
"doc": "Position of the light source relative to lit (extruded) geometries, in [r radial coordinate, a azimuthal angle, p polar angle] where r indicates the distance from the center of an object to its light, a indicates the position of the light relative to 0° (0° corresponds to 12:00 on a clock, and degrees proceed clockwise; 0° with `light.anchor: viewport` corresponds to the top of the viewport, or with `light.anchor: map` to due north), and p indicates the height of the light (from 0°, directly above, to 180°, directly below).", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. “12:00 on a clock” is no longer necessary, because “top of the viewport” and “due north” are descriptive enough. Replace:
with:
The iOS and macOS SDKs have a script that translates the construct to something more appropriate for the language, so it’s best to use it when possible. |
||
"example": [1.5, 90, 80] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do you think our code would be more self-documenting if this were split into 3 separate properties? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Maybe more self-documenting, but I hesitate because:
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Using an There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It is common to express polar coordinates as a tuple as well. However, if the concern is that most developers would be unfamiliar with this convention, we could use the terms Whatever the case, I think we should be very explicit in our documentation for these properties, similar to Apple’s documentation for a similar construct. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The radial coordinate doesn't have an equivalent in I'm open to improvements to this spec description, but I think we should merge this for now. |
||
}, | ||
"color": { | ||
|
@@ -1695,7 +1695,6 @@ | |
"property-function": true, | ||
"default": 0, | ||
"minimum": 0, | ||
"units": "meters", | ||
"doc": "The height with which to extrude this fill layer.", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Specify |
||
"transition": true | ||
}, | ||
|
@@ -1706,7 +1705,6 @@ | |
"property-function": true, | ||
"default": 0, | ||
"minimum": 0, | ||
"units": "meters", | ||
"doc": "The height with which to extrude the base of this layer.", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Specify |
||
"transition": true, | ||
"requires": [ | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Specify
"length": 3
.