Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Geometry vs. BufferGeometry best practice for new projects? (r68)

Tags:

three.js

I've read a lot of comments on BufferGeometry and Geometry. Most of the comments are from February 2014. But I don't know if they are still correct.

As far as I understand the comments, BufferGeometry should be faster, less memory hungry, and less user friendly.

I made some tests with the project I am working on, and I couldn't confirm these claims. I used ThreeJS r68. I created 9 Objects each with 12,000 faces. I tested speed and memory usage with: Geometry, BufferGeometry and BufferGeometry(dynamic = true). The memory usage was always ~650 MB. The speed was always ~90 FPS. (or ~340FPS on a different computer) I could only confirm the less user friendly ;)

With iOS8 (releasing tomorrow?) and the goal to get my application to work on tablets, my question is:

Should I use Geometry or BufferGeometry? Or did ThreeJS develop so fast since February 2014 that there is no difference anymore, because in reality Geometry is just a front end for BufferGeometry?

best regards Benedikt

like image 879
Benedikt Avatar asked Sep 09 '14 12:09

Benedikt


1 Answers

If BufferGeometry meets your needs, use it. It will be faster and less memory-hungry.

like image 96
bjorke Avatar answered Sep 25 '22 08:09

bjorke