mrdoob / three.js

JavaScript 3D Library.
https://threejs.org/
MIT License
101.97k stars 35.33k forks source link

New CSS3D renderer #13788

Closed K-Adam closed 6 years ago

K-Adam commented 6 years ago

Hi!

I am working on a new CSS3D renderer, which supports BufferGeometry. It can display any type of polygon, not just rectangular shapes. Multimaterials and texture mapping is also supported.

I added the CSS3DObject and CSS3DSprite classes to the project, so the original CSS3D examples will also work.

The examples can be found here: http://css3d.tk/

I would like to contribute it to the project. Should I replace the existing CSS3DRenderer then, or create a CSS3DRenderer2 class?

Mugen87 commented 6 years ago

Instead of adding a new renderer or replacing the old one, i vote to add selected features to the existing CSS3DRenderer. For example it would be nice to add support for orthographic cameras if possible, see #11534.

mrdoob commented 6 years ago

@WestLangley did this years ago already but I opted not to merge it.

My opinion still stands:

Although it's obviously possible to hack around CSS3D to render 3D models, it remains a hack and it's not the right technology for it. It would also create confusion for new developers that do not know what the difference is between CSS3D, Canvas and WebGL.

Definitely appreciate the effort though!

WestLangley commented 6 years ago

@WestLangley did this years ago already

https://raw.githack.com/westlangley/three.js/dev-css/examples/css3d_morphtargets_horse.html

Mugen87 commented 6 years ago

Although it's obviously possible to hack around CSS3D to render 3D models, it remains a hack and it's not the right technology for it.

I agree with this. Users should focus on WebGL for real 3D rendering.