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? ;)

有帮助吗?

解决方案 2

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

其他提示

BufferGeometry does support lines now. Look at webgl_buffergeometry_lines.html example.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top