-
Notifications
You must be signed in to change notification settings - Fork 5
/
cross.yaml
38 lines (37 loc) · 1.27 KB
/
cross.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
import:
- ../shapes/cross.yaml
styles:
points-cross:
doc:
author:
name: Patricio Gonzalez Vivo
twitter: patriciogv
version: 0.0.1
tangram-version: 0.0.7
licence: MIT
description: |
Draws a '+' shape in each point. To learn more about shapes on shaders read [this chapter from The Nook of Shader](http://thebookofshaders.com/07/)
examples:
sandbox:
url: https://tangrams.github.io/tangram-sandbox/styles/callejas.yaml
img: https://tangrams.github.io/tangram-sandbox/styles/callejas.png
lines: 96-99
ui:
shaders:
defines:
CROSS_ALPHA:
type: number
label: Alpha
range:
min: 0.
max: 1.
step: 0.01
base: points
mix: [shapes-cross]
texcoord: true
shaders:
defines:
CROSS_ALPHA: .75
blocks:
color: |
color.a = clamp(cross(v_texcoord.xy,vec2(2.,.5)),0.,1.)*CROSS_ALPHA;