跳到正文
网页珍奇柜Web Curio

水球星球

WaterBall,matsuoka-601,2025 年

正在布展…

本柜的现场复刻:按原作的技术思路从零编写,不含原作的代码和素材。为什么不直接展出原作:原作只能在支持 WebGPU 的浏览器里运行;为了让它长期可用,本柜用 WebGL 从零复刻。原作请点上方「去看原作」。

它是怎么做的

  1. 第 1 步与 WebGPU-Ocean 相同的 MLS-MPM 流体核心
  2. 第 2 步重力方向逐粒子指向球心,形成环绕球体的海洋
  3. 第 3 步屏幕空间流体渲染重建平滑水面
  4. 第 4 步交互拖拽改变视角与扰动

复刻配方

一段技术配方,可以直接交给 AI 编程助手,也可以自己照着写。想指定技术栈、位置和性能预算,就把它加入实现方案。

Reuse an MLS-MPM fluid solver but compute gravity per particle as a vector toward the planet's center instead of a constant down vector. Add a solid inner sphere as a boundary in the grid update step by zeroing the inward normal component of velocity inside it. Render with screen-space fluid techniques (depth splat, bilateral blur, normal reconstruction) plus a simple planet core shaded underneath. Let drags rotate the camera and inject an impulse into nearby grid cells.

档案

技术

交互

能不能拿来用

原作以 MIT 许可开源:可以阅读源码学习,按许可证条款使用;在自己的项目里引用时保留原作者署名。

性能开销

视觉强度

实现难度

尺度为策展判断(1 到 5),用于比较和推荐。

核实记录:Demo loads (200, requires WebGPU); repo has MIT licence.