Is there any possibility to convert 3D element (obj or gltf details and relevant nodal coordinates) into HTML < div's> and CSS to recreate the same object.
Asked
Active
Viewed 1,255 times
2 Answers
0
No, this isn't really possible. HTML and CSS are not designed to represent 3D geometries. Some clever things are possible with ascii art (for a very simplified style) or CSS box shadow (which is hard work, and not automatic).
ThreeJS has a CSS3DRenderer, but per its documentation, it doesn't support normal materials or geometry — it's used to position normal HTML elements within a 3D projection, for overlays and annotations.

Don McCurdy
- 10,975
- 2
- 37
- 75
-
1Hey Don thank's for answering the question. Recently I was discovered tridiv.com, a Julian Garnier project. Tridiv is a web-based editor for creating 3D shapes in CSS. So I was thinking that maybe is possible to assign values with js from nodal coordinates to a CSS transform property. – CoinMaster Crypto Dec 11 '18 at 14:32
-
Perhaps, but doing that for an arbitrary model is much harder than the simple shapes that tridiv.com supports. Some features a model might have (textures wrapping, skinning) simply won't work in CSS. If you are OK with those limitations and using SVG, [SVGRenderer](https://threejs.org/docs/#examples/renderers/SVGRenderer) is another option. – Don McCurdy Dec 11 '18 at 17:02
0
Take a look of this;
https://github.com/lucascassiano/cinema4d-3divs
Cinema4D(Python) Script to export 3D planes as 3D React Components
with some changes it could work.

Jhegs
- 497
- 5
- 8