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.buffergeometry
replacingthree.geometry
computationally 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.buffergeometry
stored in_buffergeometry
automatically used? if not, can use instead of geometry boost performance? - there conversion methods:
three.buffergeometry
hastogeometry
,three.geometry
hastobuffergeometry
. if convert normal geometries buffer geometries using method, give me same performance increase compared drawing themthree.buffergeometry
start? - how , when should use
three.buffergeometry
? - when three.js stop supporting
three.geometry
in 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.
__directgeometry
internal 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
.buffergeometry
index
attribute defined allows sharing of vertices. non-indexedbuffergeometry
call "triangle soup". three.geometry
remain foreseeable future.
three.js r.73
Comments
Post a Comment