xml3d / xml3d.js

The WebGL/JS implementation of XML3D
Other
75 stars 25 forks source link

Support the CSS z-index property to control drawing order of objects #156

Closed csvurt closed 8 years ago

csvurt commented 8 years ago

We'd like to be able to force some objects to always draw on top of or below others regardless of their spatial relationship in the scene. The CSS z-index property would be a perfect fit for this.

The rendering behavior should follow the same rules as positioned HTML elements do. z-index should also be considered in the picking passes.

csvurt commented 8 years ago

Right now this feature breaks if xml3d.css is not included in the page because mesh, group and model elements must have position: relative (or absolute) for the browser to calculate the z-index property correctly. I think we should set the position property during configuration of these elements instead of relying on an external CSS file like this.

csvurt commented 8 years ago

Merged into 5.1 with commit 0b7fcdc5e19e4b2bfba79112036763559b044c39