pailhead
pailhead

Reputation: 5431

What is THREE.DirectGeometry?

The only thing i could find is:

DirectGeometry is an internal class that you generally should not be messing with

and that it used to be called "DynamicGeometry" a while ago?

I mess with a lot of internals of three.js, like make my own shaders, extend the library, make custom buffer geometries etc.

What i understand is THREE.Geometry gives me a lot of structure that's easy to navigate which comes at a performance cost. Also needs to be converted to buferr geometry at some point. On the opposite end of the spectrum, i have a THREE.BufferGeometry that i can assemble out of THREE.BufferAttributes which in turn use typed arrays.

Where does direct geometry fit?

Upvotes: 2

Views: 2935

Answers (1)

WestLangley
WestLangley

Reputation: 104833

DirectGeometry was a class internal to the three.js library and was used as temporary storage to convert an object of type Geometry to an object of type BufferGeometry.

I see no reason why you would be using DirectGeometry at the application layer.

The class has been removed from the library since r125, check this link if you need access to the past implementation: https://github.com/mrdoob/three.js/blob/r124/src/core/DirectGeometry.js

Upvotes: 5

Related Questions