Friday, May 17, 2024
 Popular · Latest · Hot · Upcoming
143
rated 0 times [  148] [ 5]  / answers: 1 / hits: 15157  / 11 Years ago, thu, august 15, 2013, 12:00:00

As I understand it, Geometry stores a javascript object structure of the vertices and faces and BufferGeometry just stores the raw gl data via Float32Arrays, etc.



Is there any way to turn standard Geometry into BufferGeometry, which is a lot more memory compact with less objects? For example if I create a new SphereGeometry, is there a way to easily transform that to a BufferGeometry?


More From » three.js

 Answers
29

This answer only applies to versions of three.js prior to r.125.


The Legacy Geometry class has been removed.




var bufferGeometry = new THREE.BufferGeometry().fromGeometry( geometry );

three.js r.124


[#76326] Wednesday, August 14, 2013, 11 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
taylert

Total Points: 627
Total Questions: 91
Total Answers: 108

Location: Mayotte
Member since Mon, Sep 12, 2022
2 Years ago
taylert questions
;