mirror of https://gitee.com/antv-l7/antv-l7
Merge branch 'dev' of gitlab.alipay-inc.com:datavis/L7_beta into dev
This commit is contained in:
commit
6b4ff13795
|
@ -20,23 +20,6 @@
|
||||||
<script src="./assets/dat.gui.min.js"></script>
|
<script src="./assets/dat.gui.min.js"></script>
|
||||||
<script src="../build/L7.js"></script>
|
<script src="../build/L7.js"></script>
|
||||||
<script>
|
<script>
|
||||||
const gui = new dat.GUI({ autoPlace: false });
|
|
||||||
const customContainer = document.getElementById('gui');
|
|
||||||
customContainer.appendChild(gui.domElement);
|
|
||||||
var palette = {
|
|
||||||
baseColor: '#3CB4F0', // CSS string
|
|
||||||
windowColor: '#65CEF7', // RGB array
|
|
||||||
brightColor: '#98E3FA', // RGB with alpha
|
|
||||||
};
|
|
||||||
gui.addColor(palette, 'baseColor').onChange(()=>{
|
|
||||||
changeStyle();
|
|
||||||
});
|
|
||||||
gui.addColor(palette, 'windowColor').onChange(()=>{
|
|
||||||
changeStyle();
|
|
||||||
});
|
|
||||||
gui.addColor(palette, 'brightColor').onChange(()=>{
|
|
||||||
changeStyle();
|
|
||||||
});
|
|
||||||
var buildLayer =null;
|
var buildLayer =null;
|
||||||
const scene = new L7.Scene({
|
const scene = new L7.Scene({
|
||||||
id: 'map',
|
id: 'map',
|
||||||
|
@ -53,7 +36,8 @@ scene.on('loaded', () => {
|
||||||
zIndex: 2
|
zIndex: 2
|
||||||
})
|
})
|
||||||
.source(data)
|
.source(data)
|
||||||
.color('#F08D41')
|
//.color('#F08D41')
|
||||||
|
.color('#ff893a')
|
||||||
.animate({enable:true})
|
.animate({enable:true})
|
||||||
.render();
|
.render();
|
||||||
});
|
});
|
||||||
|
@ -70,8 +54,8 @@ scene.on('loaded', () => {
|
||||||
opacity:1.0,
|
opacity:1.0,
|
||||||
baseColor:'rgb(16,16,16)',
|
baseColor:'rgb(16,16,16)',
|
||||||
windowColor:'rgb(30,60,89)',
|
windowColor:'rgb(30,60,89)',
|
||||||
brightColor:'rgb(155,217,255)',
|
//brightColor:'rgb(155,217,255)'
|
||||||
|
brightColor:'rgb(255,176,38)'
|
||||||
})
|
})
|
||||||
.render();
|
.render();
|
||||||
|
|
||||||
|
|
|
@ -15,8 +15,8 @@ varying float v_size;
|
||||||
|
|
||||||
vec3 getWindowColor(float n, float hot, vec3 brightColor, vec3 darkColor) {
|
vec3 getWindowColor(float n, float hot, vec3 brightColor, vec3 darkColor) {
|
||||||
float s = step(hot, n);
|
float s = step(hot, n);
|
||||||
//vec3 color = mix(brightColor,brightColor - vec3(0.4,0.4,0.4),n);
|
vec3 color = mix(brightColor,vec3(0.9,0.9,1.0),n);
|
||||||
vec3 color = mix(brightColor,vec3(1.0,1.0,1.0),n);
|
|
||||||
return mix(darkColor, color, s);
|
return mix(darkColor, color, s);
|
||||||
}
|
}
|
||||||
float random (vec2 st) {
|
float random (vec2 st) {
|
||||||
|
@ -87,7 +87,7 @@ void main() {
|
||||||
if(ux == targetColId){
|
if(ux == targetColId){
|
||||||
n =0.;
|
n =0.;
|
||||||
}
|
}
|
||||||
float timeP = min(0.95, abs ( sin(u_time/6.0) ) );
|
float timeP = min(0.75, abs ( sin(u_time/6.0) ) );
|
||||||
float hot = smoothstep(1.0,0.0,timeP);
|
float hot = smoothstep(1.0,0.0,timeP);
|
||||||
vec3 color = mix(baseColor, getWindowColor(n,hot,brightColor,windowColor), s);
|
vec3 color = mix(baseColor, getWindowColor(n,hot,brightColor,windowColor), s);
|
||||||
//vec3 color = mix(baseColor, getWindowColor(n,hot,brightColor,windowColor), 1.0);
|
//vec3 color = mix(baseColor, getWindowColor(n,hot,brightColor,windowColor), 1.0);
|
||||||
|
|
Loading…
Reference in New Issue