修改间距大值 缓冲区bug
This commit is contained in:
@ -50,7 +50,8 @@ function PolylineFlow() {
|
||||
result.rotate
|
||||
);
|
||||
result.lineBackAlpha = this.lineBackAlpha;
|
||||
result.frameNumber = Cesium.getTimestamp();
|
||||
result.frameTime = Cesium.getTimestamp();
|
||||
// result.frameNumber = Cesium.getTimestamp();
|
||||
return result;
|
||||
}
|
||||
|
||||
@ -88,7 +89,8 @@ function PolylineFlow() {
|
||||
vec2 st = materialInput.st;
|
||||
//获取当前帧数,10秒内变化0-1
|
||||
// float time = fract(czm_frameNumber * speed / 60.0);
|
||||
float time = fract(abs(speed) * czm_frameNumber * 0.01);
|
||||
// float time = fract(abs(speed) * czm_frameNumber * 0.01);
|
||||
float time = fract(frameTime / 1000.0 / abs(speed));
|
||||
//长度1/10
|
||||
// time = time * (1.0 + 0.1);
|
||||
float staticAlpha = rotate?smoothstep(0.0,1.0, 1.0-st.s) * step(-1.0,-(1.0-st.s)):smoothstep(0.0,1.0, st.s) * step(-1.0,-st.s);
|
||||
@ -114,6 +116,7 @@ function PolylineFlow() {
|
||||
color: new Cesium.Color(1.0, 1.0, 1.0, 1.0),
|
||||
speed: 0.1,
|
||||
rotate: true,
|
||||
frameTime: Cesium.getTimestamp(),
|
||||
lineBackAlpha: 0.05,
|
||||
},
|
||||
source: Cesium.Material.PolylineFlowMaterialSource,
|
||||
|
Reference in New Issue
Block a user