Sprite3D.js icon indicating copy to clipboard operation
Sprite3D.js copied to clipboard

The new Opacity behavior from the css-transforms breaks 3D objects (flattens them).

Open trusktr opened this issue 9 years ago • 0 comments

Hello Emeric,

Take your example at

http://sprite3d.minimal.be/CSS-Globe/?n=20

then apply the following CSS style into the page:

div#rotator {
    opacity: 0.5;
}

In Chrome 53 and up, you'll be surprised to note that your sphere of objects will be flattened into a single plane!


I'd like your opinion:

If we have a node (Sprite3D), and it has many descendants (a sub tree), what should happen when we apply opacity with a value less than 1 to it?

  1. It, and all of it's children should become transparent, multiplying opacities down the scene graph.
  2. It's content should become transparent but not that of its descendants.
  3. Same as (1), but the whole object should be flattened into a plane.

The reason I want your opinion is because the new specs for CSS 3D (css-transforms) state here that the answer is (3).

To see what I mean, view these two examples in Chrome 53 or higher:

  • https://jsfiddle.net/trusktr/ymonmo70/16
  • https://jsfiddle.net/trusktr/ymonmo70/17

The second example has opacity applied to the node that contains all the sub-nodes which compose the car. The opacity, according to spec, flattens the car into a plane (turns it into paper!).

I'm asking various 3D engine authors for opinions of what the correct or most expected behavior should be.

All the best, ~ Joe

trusktr avatar Sep 27 '16 03:09 trusktr