JavaFX 3D
Tom Eugelink
tbee at tbee.org
Mon Jun 4 22:20:44 PDT 2012
On 2012-06-04 23:11, Richard Bair wrote:
> Rectangle r1 = new Rectangle(10, 10, 100, 100);
> Rectangle r2 = new Rectangle(20, 20, 90, 90);
> Rectangle r3 = new Rectangle(30, 30, 80, 80);
> Rectangle r4 = new Rectangle(40, 40, 70, 70);
> Group g = new Group(r1, r2, r3, r4);
> g.setOpacity(.5);
>
> vs.
>
> Rectangle r1 = new Rectangle(10, 10, 100, 100);
> Rectangle r2 = new Rectangle(20, 20, 90, 90);
> Rectangle r3 = new Rectangle(30, 30, 80, 80);
> Rectangle r4 = new Rectangle(40, 40, 70, 70);
> Group g = new Group(r1, r2, r3, r4);
> for (Node n : g.getChildren()) n.setOpacity(.5);
>
>
> The first scene shows the normal 2D semantic for setting opacity on the group. The second scene shows what it would look like if you had set the opacity on the group but with normal 3D semantics (which essentially just pass the state down onto the children).
>
> So ultimately I don't think we can just treat everything as 3D. That makes sense if you are writing a 3D app, but it doesn't make sense if you are writing a 2D app. So some provision for 2.5D I think makes sense.
>
I'm totally trusting that your research and knowledge into this topic is correct, but I'm interested in the difference anyhow. The example you describe above does not bring any "ah ha" experience. I figured that the first example actually is a shorthand for the second. It apparently is not. In 2d: what if it were?
Tom
More information about the openjfx-dev
mailing list