当前位置:   article > 正文

用python画烟花-python 实现漂亮的烟花,樱花,玫瑰花

python绘制五颜六色的花瓣

//两个canvas

var tree = document.getElementById("tree");

tree.width = window.innerWidth;

tree.height = window.innerHeight ;

var tCxt = tree.getContext("2d");

var flower = document.getElementById("flower");

flower.width = window.innerWidth;

flower.height = window.innerHeight ;

var cxt = flower.getContext("2d");

var flowerList = [];//樱花列表

var rootTop = 450 ;//树起点

var flowerColor = "rgba(255,192,203,.3)" ;//花色

var flowerColorDeep = "rgba(241,158,194,.5)" ;//花色深

var treeColor2 = "rgba(255,192,203,.5)" ;//树枝颜色

var treeColor = "#FFF" ;//树干颜色

var fallList = [];//飘落樱花列表

var g = 0.01 ;//重力加速度

var gWind = 0.005;//风力加速度

var limitSpeedY = 1;//速度上限

var limitSpeedX = 1 ;//速度上限

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/小丑西瓜9/article/detail/682014
推荐阅读
相关标签
  

闽ICP备14008679号