Client API. The Codename One framework your app is built on: this runs on the device, not in a backend.
public final class Liquid
- Object
- Liquid
Glowing and moving liquids, and the light water throws on what lies
under it. Use with
Material.Type.PBR; the glow is emissive, so add
bloom for the full effect.Fields
public static final String COLOR = "liqColor" | VEC3 the cool colour: lava crust, slime, the floor under water. |
public static final String GLOW = "liqGlow" | VEC3 the hot colour: molten cracks, glow, caustic light. |
public static final String INTENSITY = "liqIntensity" | FLOAT how bright the glow is. |
public static final String SCALE = "liqScale" | FLOAT pattern repeats per world unit. |
public static final String SURFACE = "liqSurface" | FLOAT world height of the water surface, for caustics. |
Methods
public static ShaderMaterial lava() | Lava: dark cooling plates drifting over molten cracks that pulse. |
public static ShaderMaterial toxic() | Toxic sludge: glossy, slowly churning, with glowing bubbles that swell and pop. |
public static ShaderMaterial caustics() | Caustics: the dancing net of light under a water surface, added to whatever the mesh already looks like. |
Inherited methods
Field details
COLOR
public static final String COLOR = "liqColor"VEC3 the cool colour: lava crust, slime, the floor under water.GLOW
public static final String GLOW = "liqGlow"VEC3 the hot colour: molten cracks, glow, caustic light.INTENSITY
public static final String INTENSITY = "liqIntensity"FLOAT how bright the glow is.SCALE
public static final String SCALE = "liqScale"FLOAT pattern repeats per world unit.SURFACE
public static final String SURFACE = "liqSurface"FLOAT world height of the water surface, for caustics.Method details
lava
public static ShaderMaterial lava()Lava: dark cooling plates drifting over molten cracks that pulse.
Returns
a new shader material
toxic
public static ShaderMaterial toxic()Toxic sludge: glossy, slowly churning, with glowing bubbles that swell
and pop.
Returns
a new shader material
caustics
public static ShaderMaterial caustics()Caustics: the dancing net of light under a water surface, added to
whatever the mesh already looks like. Only below
SURFACE, fading
with depth. Put it on the sea bed, pool walls and anything sunk.Returns
a new shader material