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 replacing three.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:

enter image description here

here in three.geometry:

enter image description here

here in three.shapegeometry:

enter image description here

my questions:

  1. what three.directgeometry , do? (i cannot seem find documentation on this)
  2. is three.buffergeometry stored in _buffergeometry automatically used? if not, can use instead of geometry boost performance?
  3. there conversion methods: three.buffergeometry has togeometry , three.geometry has tobuffergeometry. if convert normal geometries buffer geometries using method, give me same performance increase compared drawing them three.buffergeometry start?
  4. how , when should use three.buffergeometry?
  5. when three.js stop supporting three.geometry in favor of three.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.

  1. __directgeometry internal data structure used transition between three.geometry , three.buffergeometry. not mess it.
  2. three.buffergeometry.togeometry() , three.geometry.tobuffergeometry() convenience methods. first 1 helpful if model loads buffergeometry , feel more comfortable manipulating geometry. if want answers regarding performance, need test. buffer geometries load faster.
  3. 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-indexed buffergeometry call "triangle soup".
  4. three.geometry remain foreseeable future.

three.js r.73


Comments

Popular posts from this blog

Hatching array of circles in AutoCAD using c# -

ios - UITEXTFIELD InputView Uipicker not working in swift -