Commit be996f88 authored by iSergio's avatar iSergio
Browse files

Added options.fadingEnabled parameter to ShadowMap to control whether shadows...

Added options.fadingEnabled parameter to ShadowMap to control whether shadows fade out when the light source is close to the horizon.
parent c0303f6e
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -53,6 +53,12 @@ public class ShadowMap {
     */
    @JsProperty
    public boolean enabled;
    /**
     * Determines whether shadows start to fade out once the light gets closer to the horizon.
     * Default: true
     */
    @JsProperty
    public boolean fadingEnabled;

    /**
     * Creates a shadow map from the provided light camera. The normalOffset bias
+18 −2
Original line number Diff line number Diff line
@@ -86,9 +86,25 @@ public class ShadowMapOptions {
     * A camera representing the light source.
     */
    @JsProperty
    Camera lightCamera;
    public Camera lightCamera;
    /**
     * Whether shadows start to fade out once the light gets closer to the horizon.
     */
    @JsProperty
    public boolean fadingEnabled;

    @JsConstructor
    public ShadowMapOptions() {
    private ShadowMapOptions() {
    }

    /**
     *
     * @param lightCamera A camera representing the light source.
     * @return ShadowMapOptions instance.
     */
    public static ShadowMapOptions create(Camera lightCamera) {
        ShadowMapOptions options = new ShadowMapOptions();
        options.lightCamera = lightCamera;
        return options;
    }
}