Java 类javafx.scene.effect.Light.Distant 实例源码

项目:openjfx-8u-dev-tests    文件:Effects2App.java   
List<NamedEffect> getNamedEffectList() {
    List<NamedEffect> nes = new ArrayList<NamedEffect>();
    nes.add(new NamedEffect("default", new Lighting()));
    nes.add(new NamedEffect("distant light", LightingBuilder.create().light(new Distant()
    {{ setAzimuth(90f); setElevation(50);}}).build()));
    nes.add(new NamedEffect("point light", LightingBuilder.create().light(new Point(
            70, 120, 10, Color.WHITE)).build()));
    nes.add(new NamedEffect("spot light", LightingBuilder.create().light(new Spot() {{
            setX(70);setY(120);setZ(50);
            setPointsAtX(150);setPointsAtY(0);setPointsAtZ(0);
        }}).build()));

    nes.add(new NamedEffect("diffuse: 0.5", LightingBuilder.create().diffuseConstant(0.5f).build()));
    nes.add(new NamedEffect("specularC: 1.5", LightingBuilder.create().specularConstant(1.5f).build()));
    nes.add(new NamedEffect("specularExp: 35", LightingBuilder.create().specularExponent(35f).build()));
    nes.add(new NamedEffect("scale: 7", LightingBuilder.create().surfaceScale(7f).build()));
    nes.add(new NamedEffect("bump input", LightingBuilder.create().bumpInput(new DropShadow()).build()));
    nes.add(new NamedEffect("content input", LightingBuilder.create().contentInput(new DropShadow()).build()));

    return nes;
}
项目:openjfx-8u-dev-tests    文件:CanvasEffects2App.java   
List<NamedEffect> getNamedEffectList() {
    List<NamedEffect> nes = new ArrayList<NamedEffect>();
    nes.add(new NamedEffect("default", new Lighting()));
    nes.add(new NamedEffect("distant light", new Lighting() {{
        setLight(new Distant() {{ setAzimuth(90f); setElevation(50);}});}}));
    nes.add(new NamedEffect("point light", new Lighting() {{
        setLight(new Point() {{ setX(70);setY(120);setZ(10);}});}}));
    nes.add(new NamedEffect("spot light", new Lighting() {{
        setLight(new Spot() {{
            setX(70);setY(120);setZ(50);
            setPointsAtX(150);setPointsAtY(0);setPointsAtZ(0);
        }});}}));

    nes.add(new NamedEffect("diffuse: 0.5", new Lighting() {{ setDiffuseConstant(0.5f);}}));
    nes.add(new NamedEffect("specularC: 1.5", new Lighting() {{ setSpecularConstant(1.5f);}}));
    nes.add(new NamedEffect("specularExp: 35", new Lighting() {{ setSpecularExponent(35f);}}));
    nes.add(new NamedEffect("scale: 7", new Lighting() {{ setSurfaceScale(7f);}}));
    nes.add(new NamedEffect("bump input", new Lighting() {{ setBumpInput(new DropShadow());}}));
    nes.add(new NamedEffect("content input", new Lighting() {{ setContentInput(new DropShadow());}}));

    return nes;
}