Three.js: Quad support in current Three.js version

Created on 30 Jun 2017  ·  5Comments  ·  Source: mrdoob/three.js

Description of the problem

Upon my thorough studies and research, I came to know that current Three.js version doesn't support quad and supports only tria and quad was deprecated since Three.js 60 version.
I do want to know whether we could incorporate quad support in current Three.js version and whether it associates with the performance or rendering issues.
What could be done to optimise the performance with quad support in current Three.js version.

Thanks & Regards,
Aasha Joney

Three.js version
  • [ ] Dev
  • [x] r85
  • [ ] ...
Browser
  • [x] All of them
  • [ ] Chrome
  • [ ] Firefox
  • [ ] Internet Explorer
OS
  • [x] All of them
  • [ ] Windows
  • [ ] macOS
  • [ ] Linux
  • [ ] Android
  • [ ] iOS
Question

Most helpful comment

It is complicated... WebGL itself doesn't support quads.

webgl primitives

We could create some geometry classes which could operate with quads, but we'll have to convert to triangles before sending them to WebGL anyway.

All 5 comments

It is complicated... WebGL itself doesn't support quads.

webgl primitives

We could create some geometry classes which could operate with quads, but we'll have to convert to triangles before sending them to WebGL anyway.

This should probably be handled outside of the core. Why limit things to quads anyway? I've been using my own Ngon class for a while now.

BTW, this:

It is complicated... WebGL itself doesn't support quads.

😄

I love this attitude, three should at it's core be a better way to use webgl. Arbitrary data structures should be built on top of it.

How could the THREE.js versions below 60 supported quad and why that could not be incorporated into the current version.?

Three does not have any opinions on quads. You can support it yourself.

why that could not be incorporated into the current version.?

It would be more code to download that is not used by everyone.

How could the THREE.js versions below 60 supported quad and why that could not be incorporated into the current version.?

We decided to simplify the codebase. The renderer no longer handles quads.

Instead, loaders that support quads, convert the quads to triangles during the loading process.

Was this page helpful?
0 / 5 - 0 ratings