雪のようにヒラヒラと降るSUBLIINE

					
	let snowflakes = []; // 雪片を格納する配列
	let svgImage; // SVG画像を格納する変数
	let maxSnowflakes = 30; // 画面上に表示する最大の雪片数

	function preload() {
		// SVG画像の読み込み
		svgImage = loadImage("subline_logo.svg");
	}

	function setup() {
		createCanvas(windowWidth, windowHeight);
		noStroke();
		frameRate(30); // フレームレートを設定
	}

	function draw() {
		background(255);

		// 画面上に表示する雪片の数が最大数未満の場合にのみ新しい雪片を生成
		if (snowflakes.length < maxSnowflakes && random(1) < 0.1) {
			let x = random(width);
			let y = random(-100, -10);
			let size = random(30, 80);
			let speed = random(1, 3);
			snowflakes.push(new Snowflake(x, y, size, speed));
		}

		// 雪片を表示
		for (let i = snowflakes.length - 1; i >= 0; i--) {
			let flake = snowflakes[i];
			flake.update();
			flake.display();

			// 画面外の雪片を削除
			if (flake.y > height + flake.size) {
				snowflakes.splice(i, 1);
			}
		}
	}

	// 雪片テンプレ
	class Snowflake {
		constructor(x, y, size, speed) {
			this.x = x;
			this.y = y;
			this.size = size;
			this.speed = speed;
			this.opacity = random(50, 255); // ランダム透明度
			this.wind = random(-1, 1); // 横風の表現
		}

		update() {
			this.y += random(this.speed - 1, this.speed + 1);
			this.x += this.wind;

			if (this.y > height + this.size) {
				this.y = -this.size;
				this.x = random(width);
			}
		}

		display() {
			tint(255, this.opacity);
			image(svgImage, this.x, this.y, this.size, this.size);
			noTint();
		}
	}