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
bb342b5094
|
@ -20,23 +20,6 @@
|
|||
<script src="./assets/dat.gui.min.js"></script>
|
||||
<script src="../build/L7.js"></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;
|
||||
const scene = new L7.Scene({
|
||||
id: 'map',
|
||||
|
@ -53,7 +36,8 @@ scene.on('loaded', () => {
|
|||
zIndex: 2
|
||||
})
|
||||
.source(data)
|
||||
.color('#F08D41')
|
||||
//.color('#F08D41')
|
||||
.color('#ff893a')
|
||||
.animate({enable:true})
|
||||
.render();
|
||||
});
|
||||
|
@ -70,8 +54,8 @@ scene.on('loaded', () => {
|
|||
opacity:1.0,
|
||||
baseColor:'rgb(16,16,16)',
|
||||
windowColor:'rgb(30,60,89)',
|
||||
brightColor:'rgb(155,217,255)',
|
||||
|
||||
//brightColor:'rgb(155,217,255)'
|
||||
brightColor:'rgb(255,176,38)'
|
||||
})
|
||||
.render();
|
||||
|
||||
|
|
|
@ -15,8 +15,8 @@ varying float v_size;
|
|||
|
||||
vec3 getWindowColor(float n, float hot, vec3 brightColor, vec3 darkColor) {
|
||||
float s = step(hot, n);
|
||||
//vec3 color = mix(brightColor,brightColor - vec3(0.4,0.4,0.4),n);
|
||||
vec3 color = mix(brightColor,vec3(1.0,1.0,1.0),n);
|
||||
vec3 color = mix(brightColor,vec3(0.9,0.9,1.0),n);
|
||||
|
||||
return mix(darkColor, color, s);
|
||||
}
|
||||
float random (vec2 st) {
|
||||
|
@ -87,7 +87,7 @@ void main() {
|
|||
if(ux == targetColId){
|
||||
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);
|
||||
vec3 color = mix(baseColor, getWindowColor(n,hot,brightColor,windowColor), s);
|
||||
//vec3 color = mix(baseColor, getWindowColor(n,hot,brightColor,windowColor), 1.0);
|
||||
|
|
Loading…
Reference in New Issue