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.uniformsAn object that holds the uniforms that describe how the material's effects should be rendered. Each entry is a live
UniformInterface: assign to itsvalueand the running effect updates. You should not replace this property directly.-
uSpeed
material.uniforms.uSpeedThe
uSpeeduniform 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
uSpeeduniform is more than0.0, the value of theuSeeduniform will have no effect.-
value
material.uniforms.uSpeed.valueAny 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.typeThe 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.uVolatilityWhen 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
uVolatilityuniform.-
value
material.uniforms.uVolatility.valueAny floating point value is acceptable, however you will likely want to keep this value below
1.0.LiquidDistortMaterialassumes a maximum amount of distortion you would typically want through this material, which is reached at1.0(100%). Exceeding this is, however, entirely acceptable.The default value is
0.15. -
type
material.uniforms.uVolatility.typeThe 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.uSeedWhen animating, i.e., when the value of the
uSpeeduniform is more than0.0, variations in how the distortion determined by theuVolatilityuniform are applied to your text are handled automatically. However, when the value of theuSpeeduniform is at0.0, determining the application of theuVolatilityuniform is left to you. To adjust distortion variation in this case, use theuSeeduniform.-
value
material.uniforms.uSeed.valueAny floating point value is acceptable.
The default value is
0.1. -
type
material.uniforms.uSeed.typeThe 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.
-
-