Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Three.js - What is PlaneBufferGeometry

What is PlaneBufferGeometry exactly and how it is different from PlaneGeometry? (r69)

like image 244
Milk3dfx Avatar asked Nov 29 '14 03:11

Milk3dfx


People also ask

What is BufferGeometry?

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.

What is 3 js face?

Represents a section bounded by a specific amount of half-edges. The current implementation assumes that a face always consist of three edges.

What is the use of three js?

js is a cross-browser JavaScript library and application programming interface (API) used to create and display animated 3D computer graphics in a web browser using WebGL. The source code is hosted in a repository on GitHub.


1 Answers

PlaneBufferGeometry is a low memory alternative for PlaneGeometry. the object itself differs in a lot of ways. for instance, the vertices are located in PlaneBufferGeometry are located in PlaneBufferGeometry.attributes.position instead of PlaneGeometry.vertices

you can take a quick look in the browser console to figure out more differences, but as far as i understand, since the vertices are usually spaced on a uniform distance (X and Y) from each other, only the heights (Z) need to be given to position a vertex.

like image 54
Kevin Kuyl Avatar answered Oct 07 '22 16:10

Kevin Kuyl