Client API. The Codename One framework your app is built on: this runs on the device, not in a backend.
public final class ScenePresets
- Object
- ScenePresets
Complete looks: a sun, the sky’s light, fog, tone mapping, post effects
and a matching Sky dome, tuned to work together. Start from one and
adjust; every part is an ordinary object you can change.
import com.codename1.gpu.*;
import com.codename1.gpu.shaders.ScenePresets;
void frame(GraphicsDevice device, int w, int h) {
ScenePresets.Preset look = ScenePresets.harbourDusk();
look.apply(device);
Material dome = new Material(Material.Type.UNLIT).setShader(look.getSky()).setFogged(false);
// per frame, after drawing the scene:
device.beginPostProcess(look.getPost(), w, h);
}Nested types
class ScenePresets.Preset | A light, environment, post chain and sky dome that belong together. |
Methods
public static ScenePresets.Preset harbourDusk() | Golden hour by the sea: a low warm sun across the water, a deep blue sky lighting the shadows, light haze, and a soft bloom on the highlights. |
public static ScenePresets.Preset clearNoon() | Bright midday: a high white sun, blue sky light, crisp shadows. |
public static ScenePresets.Preset overcast() | Overcast: no hard shadows to speak of, flat grey light, thick haze. |
public static ScenePresets.Preset night() | Night: cold moonlight, deep blue shadows, strong bloom for lamps and emissive surfaces. |
public static ScenePresets.Preset desert() | Desert: a harsh white sun, hot sand bouncing light into the shadows, heat haze on the horizon. |
public static ScenePresets.Preset arctic() | Arctic: a low pale sun, blue-white snow light from everywhere, cold grade. |
Inherited methods
Method details
harbourDusk
public static ScenePresets.Preset harbourDusk()Golden hour by the sea: a low warm sun across the water, a deep blue
sky lighting the shadows, light haze, and a soft bloom on the
highlights.
Returns
a new preset
clearNoon
public static ScenePresets.Preset clearNoon()Bright midday: a high white sun, blue sky light, crisp shadows.
Returns
a new preset
overcast
public static ScenePresets.Preset overcast()Overcast: no hard shadows to speak of, flat grey light, thick haze.
Returns
a new preset
night
public static ScenePresets.Preset night()Night: cold moonlight, deep blue shadows, strong bloom for lamps and
emissive surfaces.
Returns
a new preset
desert
public static ScenePresets.Preset desert()Desert: a harsh white sun, hot sand bouncing light into the shadows,
heat haze on the horizon.
Returns
a new preset
arctic
public static ScenePresets.Preset arctic()Arctic: a low pale sun, blue-white snow light from everywhere, cold
grade.
Returns
a new preset