1
1
mirror of https://github.com/Rundll86/Dog-Lynx-And-HCN.git synced 2026-06-07 20:27:13 +08:00

feat(UI): 重构能量条为垂直样式并调整UI布局

refactor: 修改能量恢复随机范围从0.01-0.15调整为0.01-0.1
style: 更新着色器进度范围提示从0.0-2.0改为-0.0-2.0
feat: 新增垂直颜色条组件和样式资源
chore: 恢复测试波次为普通模式
This commit is contained in:
2025-09-09 22:26:16 +08:00
parent 547e059c5b
commit a7d1264830
9 changed files with 120 additions and 42 deletions
+1 -1
View File
@@ -1,5 +1,5 @@
shader_type canvas_item;
uniform float progress:hint_range(0.0, 2.0, 0.01)=0.5;
uniform float progress:hint_range(-0.0, 2.0, 0.01)=0.5;
uniform float backAlpha:hint_range(0.0, 1.0, 0.01)=0.25;
uniform float edgeHeight:hint_range(0.0, 1.0, 0.01)=0.05;
uniform float trailHeight:hint_range(0.0, 1.0, 0.01)=0.3;
+15
View File
@@ -0,0 +1,15 @@
shader_type canvas_item;
uniform float progress:hint_range(-0.0, 2.0, 0.01)=0.5;
uniform float backAlpha:hint_range(0.0, 1.0, 0.01)=0.25;
uniform float edgeHeight:hint_range(0.0, 1.0, 0.01)=0.05;
uniform float trailHeight:hint_range(0.0, 1.0, 0.01)=0.3;
uniform float trailAlpha:hint_range(0.0, 1.0, 0.01)=0.5;
void fragment() {
if(UV.y>=progress){
COLOR.a*=backAlpha;
}else if(distance(UV.y,progress)<edgeHeight){
COLOR.rgb*=255.0;
}else if(progress-UV.y<=trailHeight){
COLOR.rgb*=1.0+(trailHeight/(progress-UV.y)-1.0)*trailAlpha;
}
}