-
Notifications
You must be signed in to change notification settings - Fork 5
/
dash.yaml
44 lines (44 loc) · 1.41 KB
/
dash.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
styles:
lines-dash:
doc:
author:
name: Patricio Gonzalez Vivo
twitter: patriciogv
version: 0.0.1
tangram-version: 0.0.7
licence: MIT
description: |
Apply a stripe pattern to a line
examples:
sandbox:
url: https://tangrams.github.io/tangram-sandbox/styles/elevation.yaml
img: https://tangrams.github.io/tangram-sandbox/styles/elevation.png
lines: 59-63
ui:
shaders:
defines:
DASH_SCALE:
type: number
label: Scale
range:
min: 1.
max: 1000.
step: 1.
DASH_SIZE:
type: number
label: Size
range:
min: 0.
max: 1.
step: 0.01
base: lines
texcoords: true
shaders:
defines:
DASH_SCALE: .1
DASH_SIZE: .5
blocks:
filter: |
if ( step(DASH_SIZE,fract(v_texcoord.y*DASH_SCALE)) == 0.){
discard;
}