blotter

LiquidDistortMaterial

Like watching the tiles on the bottom of a swimming pool, the LiquidDistortMaterial washes over your text to apply a liquid-like distortion.

LiquidDistortMaterial extends Material, and therefore has the same properties and functions as Material.

  • construction

    import { LiquidDistortMaterial } from "blotter.ts/materials";
    
    const material = new LiquidDistortMaterial();
  • uniforms material.uniforms

    An object that holds the uniforms that describe how the material's effects should be rendered. Each entry is a live UniformInterface: assign to its value and the running effect updates. You should not replace this property directly.

    • uSpeed material.uniforms.uSpeed

      The uSpeed uniform describes the speed of the animation applied to the distortion on your text.

      Note that when the distortion is animating, i.e., when the value of the uSpeed uniform is more than 0.0, the value of the uSeed uniform will have no effect.

      • value material.uniforms.uSpeed.value

        Any floating point value is acceptable, however you will likely want to keep this value below 1.0. This value acts as a multiplier against the default uniform passed to all effects, uGlobalTime, which represents the time in seconds since the effect started. Therefore, smaller values slow animation while higher values speed up animation. Play around, you'll get the idea.

        The default value is 1.

      • type material.uniforms.uSpeed.type

        The uniform type of the value being passed to the shader. "1f" means the value is a single float (e.g. 0.5). You should not change this property.

    • uVolatility material.uniforms.uVolatility

      When liquid distortion is applied to your text, the amount of distortion – the difference between normal looking text and highly abstracted text – is determined by the uVolatility uniform.

      • value material.uniforms.uVolatility.value

        Any floating point value is acceptable, however you will likely want to keep this value below 1.0. LiquidDistortMaterial assumes a maximum amount of distortion you would typically want through this material, which is reached at 1.0 (100%). Exceeding this is, however, entirely acceptable.

        The default value is 0.15.

      • type material.uniforms.uVolatility.type

        The uniform type of the value being passed to the shader. "1f" means the value is a single float (e.g. 0.5). You should not change this property.

    • uSeed material.uniforms.uSeed

      When animating, i.e., when the value of the uSpeed uniform is more than 0.0, variations in how the distortion determined by the uVolatility uniform are applied to your text are handled automatically. However, when the value of the uSpeed uniform is at 0.0, determining the application of the uVolatility uniform is left to you. To adjust distortion variation in this case, use the uSeed uniform.

      • value material.uniforms.uSeed.value

        Any floating point value is acceptable.

        The default value is 0.1.

      • type material.uniforms.uSeed.type

        The uniform type of the value being passed to the shader. "1f" means the value is a single float (e.g. 0.5). You should not change this property.

source code