constructor(renderer, {
        size = 128,
        falloff = 0.15,
        alpha = 1,
        dissipation = 0.98
    } = {}) {
        this.renderer = renderer;

        this.mouse = new Vector2();
        this.velocity = new Vector2();

        // Render targets
        this.renderTargetRead = new WebGLRenderTarget(size, size, {
            type: HalfFloatType,
            depthBuffer: false
        });

        this.renderTargetWrite = this.renderTargetRead.clone();

        // Output uniform containing render target textures
        this.uniform = { value: this.renderTargetRead.texture };

        // Flowmap material
        this.material = new RawShaderMaterial({
            glslVersion: GLSL3,
            uniforms: {
                tMap: this.uniform,

                uFalloff: { value: falloff },
                uAlpha: { value: alpha },
                uDissipation: { value: dissipation },

                // User needs to update these
                uAspect: { value: 1 },
                uMouse: { value: this.mouse },
                uVelocity: { value: this.velocity }
            },
            vertexShader,
            fragmentShader,
            blending: NoBlending,
            depthTest: false,
            depthWrite: false
        });

        // Fullscreen triangle
        this.screenCamera = new OrthographicCamera(-1, 1, 1, -1, 0, 1);
        this.screenTriangle = getFullscreenTriangle();
        this.screen = new Mesh(this.screenTriangle, this.material);
        this.screen.frustumCulled = false;
    }
@author pschroen / https://ufo.ai/

Based on https://oframe.github.io/ogl/examples/?src=mouse-flowmap.html by gordonnl