It looks like right now BufferGeometry will only draw out to triangles, so you you cannot have it draw lines (unless you do something like make the two of the three triangle vertices the same, but that is pretty hacky). It supports meshes and particles, so maybe soon it will support lines. Here is the line in the source
ThreeJS: Use BufferGeometry with Line
-
04-12-2021 - |
Frage
For performance reasons, I would like to migrate to BufferGeometry
instead of Geometry
. It works great for Mesh
and ParticleSystem
objects, but when setting the geometry of a Line
to a BufferGeometry
, initLineBuffer()
expects a geometry.vertices
Vector3 array which a BufferGeometry does not have.
The call stack: render --> initWebGLObjects --> addObject --> initLineBuffers
Is there a simple solution for this, or do I need to hack? ;)
Lösung 2
Andere Tipps
BufferGeometry does support lines now. Look at webgl_buffergeometry_lines.html example.
Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow