javascript - Three.js - Questions about (the use of) THREE.BufferGeometry -
as understood using buffer geometries increase performance , decrease memory usage because it reduces cost of passing data gpu.
and understood from @westlangley post here:
three.buffergeometryreplacingthree.geometrycomputationally more efficient.
i using three.js - r72.
when draw geometries make meshes , add them scene see there 2 properties inside geomtries __directgeometry , _buffergeometry.
here in three.boxgeometry:
here in three.geometry:
here in three.shapegeometry:
my questions:
- what
three.directgeometry, do? (i cannot seem find documentation on this) - is
three.buffergeometrystored in_buffergeometryautomatically used? if not, can use instead of geometry boost performance? - there conversion methods:
three.buffergeometryhastogeometry,three.geometryhastobuffergeometry. if convert normal geometries buffer geometries using method, give me same performance increase compared drawing themthree.buffergeometrystart? - how , when should use
three.buffergeometry? - when three.js stop supporting
three.geometryin favor ofthree.buffergeometry?
note: couldn't find detailed information on when , how use buffer geometries or when going replacing three.geometry. if has source or reference please leave comment.
__directgeometryinternal data structure used transition betweenthree.geometry,three.buffergeometry. not mess it.three.buffergeometry.togeometry(),three.geometry.tobuffergeometry()convenience methods. first 1 helpful if model loadsbuffergeometry, feel more comfortable manipulatinggeometry. if want answers regarding performance, need test. buffer geometries load faster.- there many examples showing use of
buffergeometry. wise if understood difference between "indexed" , "non-indexed"buffergeometry.buffergeometryindexattribute defined allows sharing of vertices. non-indexedbuffergeometrycall "triangle soup". three.geometryremain foreseeable future.
three.js r.73



Comments
Post a Comment