def fzero_fountain(start_col=16,
color=(0, 255, 255),
border_color=(255, 0, 0),
border_thickness=10,
height=50):
"""
F-Zero Launcher - make a f-zero speed boost arrow around the start_col
"""
# get 5 pixels to either side to select the 11 columns in this section
cols = map(lambda c: c % STATE.layout.columns, range(start_col - 5, start_col + 5 + 1))
# group them by levels to make an f-zero speed boost arrow
levels = [[cols[5]],
[cols[4], cols[6]],
[cols[3], cols[7]],
[cols[2], cols[8]],
[cols[1], cols[9]],
[cols[0], cols[10]]]
def make_line((i, col)):
# fade the colors on the edges
def get_color():
hsv = colorsys.rgb_to_hsv(color[0] // 255, color[1] // 255, color[2] // 255)
rgb = colorsys.hsv_to_rgb(hsv[0], hsv[1], hsv[2] - (i * 0.12))
return (rgb[0] * 255, rgb[1] * 255, rgb[2] * 255)
return RisingLine(
height=height,
start_col=col,
delay=i * 80,
color=get_color(),
border_color=border_color,
border_thickness=border_thickness)
fireworks.py 文件源码
python
阅读 19
收藏 0
点赞 0
评论 0
评论列表
文章目录