        ctx.globalCompositeOperation = 'screen';
    }

    let lastTime = 0;
    function animate(currentTime) {
        const deltaTime = currentTime - lastTime;
        lastTime = currentTime;
        time++;

        ctx.clearRect(0, 0, width, height); // 清晰的背景，或者用低alpha填充制造拖尾

        ribbons.forEach(ribbon => {
            ribbon.update(deltaTime || (1000/60)); // Provide a fallback for deltaTime on first frame
            ribbon.draw();
        });
        animationFra