Is it possible to extrude shapes created using bufferGeometry?

Here is how I created the shape:

	// Define the vertices of the plane
	const vertices = new Float32Array([
		-5.5, 5.5, 0,   // Vertex 0
		5.5, 5.5, 0,    // Vertex 1
		5.5, 45.5, 20,   // Vertex 2
		-5.5, 45.5, 20   // Vertex 3
	]);

	// Define the indices to form two triangles
	const indices = new Uint16Array([
		0, 1, 2,   // Triangle 1
		0, 2, 3    // Triangle 2
	]);

	// Create a BufferGeometry
	const geometry = new THREE.BufferGeometry();

If I try to extrude using “THREE.ExtrudeBufferGeometry()” it seems not to be working and I get the following error:

Property ‘ExtrudeBufferGeometry’ may not exist on type ‘typeof import(“C:/Users/HP/AppData/Local/Microsoft/TypeScript/5.2/node_modules/@types/three/index”)’. Did you mean ‘ExtrudeGeometry’?

Those Buffer classes have been renamed to just ExtrudeGeometry since BufferGeometry is the default geometry type now.

ExtrudeGeometry three.js docs is confusingly named because it doesnt extrude a geometry, it extrudes a Path, creating a Geometry which sounds like kinda what you want…

You just need to send that array of vertices to a THREE.CatmullRomSpline or other Path type, then use ExtrudeGeometry on that to get your shape.