Cambria
Cambria

Reputation: 153

What is Buffer Geometry of three.js?

The explanation presented in the three.js documentation about the command BufferGeometry is quite hard to understand to me.

BufferGeometry

It says..

BufferGeometry is a representation of mesh, line, or point geometry. Includes vertex positions, face indices, normals, colors, UVs, and custom attributes within buffers, reducing the cost of passing all this data to the GPU.

I didn't quite understand what those sentences meant.

What is the purpose of BufferGeometry? How do you visualize BufferGeometry in real life?

Thank you!

Upvotes: 2

Views: 1617

Answers (1)

Mugen87
Mugen87

Reputation: 31026

An instance of this class holds the geometry data intended for rendering.

If you want to visualize these data, you have to define a material and the type of 3D object (mesh, lines or points). The code example of the documentation page shows the respective JavaScript statements.

Upvotes: 3

Related Questions