gemini 3.1 pro 生成的“鸟群模拟”器 (视频是官方demo 版本) 试玩链接: prompt: Write a single-file HTML/JS interactive web application to simulate a 3D starling murmuration. Requirements: 1. Core: Implement the Boids algorithm (separation, alignment, cohesion) using Three.js to render a massive 3D flock. 2. Visuals: Apply a realistic atmospheric sky shader with dynamic sun positioning. 3. UI: Build a modern, glassmorphism control panel on the right. Include tabs: "BOIDS", "ENVIRONMENT", and "EFFECTS". 4. Controls: Under the "ENVIRONMENT" tab, add working dat.gui-style sliders for: Sun Elevation, Sun Azimuth, Sky Turbidity, Sky Rayleigh, Mie Coefficient, Mie Directional G, Ambient Light, and Directional Light. 5. Interactivity: Integrate webcam hand-tracking (e.g., MediaPipe) allowing user hand gestures to manipulate or repel the flock. 6. Audio: Use Web Audio API to create a generative ambient score that shifts dynamically based on the flock's average speed and density. prompt 中文版: 编写一个单文件 HTML/JS 交互式 Web 应用程序,以模拟 3D 椋鸟群飞(鸟群涌现)效果。 需求: 1. 核心:使用 Three.js 实现 Boids 算法(分离 separation、对齐 alignment、凝聚 cohesion),以渲染大规模的 3D 鸟群。 2. 视觉:应用逼真的大气天空着色器(sky shader),并包含动态的太阳定位功能。 3. UI:在页面右侧构建一个现代的、毛玻璃效果(glassmorphism)的控制面板。包含选项卡:“鸟群(BOIDS)”、“环境(ENVIRONMENT)”和“特效(EFFECTS)”。 4. 控制:在“环境(ENVIRONMENT)”选项卡下,添加可用的 dat.gui 风格的滑块,用于控制:太阳高度角(Sun Elevation)、太阳方位角(Sun Azimuth)、天空浑浊度(Sky Turbidity)、天空瑞利散射(Sky Rayleigh)、米氏散射系数(Mie Coefficient)、米氏散射方向性 G(Mie Directional G)、环境光(Ambient Light)和平行光(Directional Light)。 5. 交互:集成网络摄像头手部追踪功能(例如 MediaPipe),允许用户通过手势来操控或驱散鸟群。 6. 音频:使用 Web Audio API 创建生成式环境配乐,该配乐能够根据鸟群的平均速度和密度进行动态变化。