本文共 3164 字,大约阅读时间需要 10 分钟。
//江南秋,有落叶let gravity = 1;let timeUnit = 0.5;let windy = false;let landScape = null;var falg = false;function setup() { createCanvas(windowWidth,windowHeight); //createCanvas(windowWidth, windowHeight); frameRate(24); landScape = new LandScape([], []); createTree(200); landScape.checkBloom(200); createTree(300); landScape.checkBloom(300); createTree(800); landScape.checkBloom(800); //translate(200,100);}function draw() { translate(350,100); DrawShiner(0, 0,"SUN"); scale(0.5); let wind = createVector(0, 0); if (windy) { wind = createVector(random(5, 15), 0); } landScape.update(wind); landScape.checkUp(); landScape.display();}function mousePressed() { landScape.checkBloom(200); landScape.checkBloom(300); landScape.checkBloom(800);}function keyPressed() { if (key == ' ') { windy = !windy; }}
//江南冬//var box;var circleX = 0;var car = 0;var snowParticles = []; //雪的粒子集合var WarterSets = []; //水纹的集合function setup() { createCanvas(600, 600); noStroke(); circleX = 0; WarterSets = GenerateWater();}function draw() { background(30, 73, 100, 170); //SUNDrawShiner(450, 100,"MOON"); //调用A1_0115_circle中的光晕圆//BUILDINGSfill(0, 80);//rect(0, 290, 100, 200);//图书馆的主楼rect(240, 180, 110, 350);//120,200,100,300windowsOfBuilding1(240, 180);rect(350, 380, 110, 150);windowsOfBuildingRight(350, 380);rect(130, 380, 110, 150);windowsOfBuildingleft(130, 380);//rect(410, 350, 200, 300);//rect(520, 300, 100, 50);//FILL GROUND//fill(255);fill(200, 250, 250);rect(0, 500, 600, 200);//GROUNDfill(0);ellipse(0, 500, 200, 100);ellipse(0, 500, 300, 50);ellipse(300, 500, 70, 20);ellipse(500, 500, 100, 40);ellipse(450, 500, 100, 20);ellipse(300, 500, 70, 20);ellipse(580, 490, 170, 100);//BRIDGEfill(255, 150);rect(0, 428, 600, 2);fill(0);//quad(width/2+500, height/2+150, width/2+576, height/2+170, width/2-586, height/2+170, width/2-560, height/2+150);rect(0, 430, 600, 5);rect(20, 430, 5, 20);rect(40, 430, 5, 20);rect(60, 430, 5, 20);rect(80, 430, 5, 20);rect(100, 430, 5, 20);rect(120, 430, 5, 20);rect(140, 430, 5, 20);rect(160, 430, 5, 20);rect(180, 430, 5, 20);rect(200, 430, 5, 20);rect(220, 430, 5, 20);rect(240, 430, 5, 20);rect(260, 430, 5, 20);rect(280, 430, 5, 20);rect(300, 430, 5, 20);rect(320, 430, 5, 20);rect(340, 430, 5, 20);rect(360, 430, 5, 20);rect(380, 430, 5, 20);rect(400, 430, 5, 20);rect(420, 430, 5, 20);rect(440, 430, 5, 20);rect(460, 430, 5, 20);rect(480, 430, 5, 20);rect(500, 430, 5, 20);rect(520, 430, 5, 20);rect(540, 430, 5, 20);rect(560, 430, 5, 20);rect(580, 430, 5, 20);//BRIDGE SHADOWfill(0, 50);rect(0, 505, 600, 10);//REFLECTIONfill(100, 150);rect(0, 500, 600, 200);//SNOWfill(255, 150);if(random()>0.8){ snowParticles.push(new MeteorCircle(random(0,600),0,3,random(5,12)));}for(let i = 0;i
var counter = 0;var cars = [];var cars2 = [];var rn, rn2 = 0;var sx = 650;var sy = 0;var sz = 20;var sun;function setup() { createCanvas(windowWidth,windowHeight); background(253, 226, 228);}function draw() { DrawSummerBridge(400,150); DrawSummerWave(430,500,750,120); //DrawSummerSun(3700,700); DrawSummerSun(3700,700); //sun.DrawSummerSun();}
转载地址:http://swph.baihongyu.com/