# \#buffergeometry

**URL:** https://discourse.threejs.org/tag/buffergeometry/217.md

[Latest](https://discourse.threejs.org/latest.md) · [Categories](https://discourse.threejs.org/categories.md) · [Tags](https://discourse.threejs.org/tags.md)

---

## [Is it safe to use BufferGeometry.setAttribute?](https://discourse.threejs.org/t/is-it-safe-to-use-buffergeometry-setattribute/92917)

<div class="topic-metadata">

**Author:** [@Dmitry\_Pryadkin](https://discourse.threejs.org/u/Dmitry_Pryadkin)\
**Replies:** 5\
**Last updated:** [July 16, 2026, 3:32pm UTC](https://discourse.threejs.org/t/is-it-safe-to-use-buffergeometry-setattribute/92917 "2026-07-16T15:32:27Z")

</div>

Hi Everyone, I’m using threejs to stream 3d objects data continuously with fair amount of geometry generation on the fly. Below code illustrates this approach where I recreate buffer attributes only if needed, leaving …

---

## [Three-mesh-bvh: A plugin for fast geometry raycasting and spatial queries!](https://discourse.threejs.org/t/three-mesh-bvh-a-plugin-for-fast-geometry-raycasting-and-spatial-queries/26394)

<div class="topic-metadata">

**Author:** [@gkjohnson](https://discourse.threejs.org/u/gkjohnson)\
**Replies:** 78\
**Last updated:** [July 12, 2026, 11:49pm UTC](https://discourse.threejs.org/t/three-mesh-bvh-a-plugin-for-fast-geometry-raycasting-and-spatial-queries/26394 "2026-07-12T23:49:47Z")

</div>

Hello! I wanted to share the three-mesh-bvh package I maintain which, among other things, can be used to greatly improve raycasting performance by multiple orders of magnitude against highly complex geometry as well as e…

---

## [Get the closest point of an object's surface from any Vector3](https://discourse.threejs.org/t/get-the-closest-point-of-an-objects-surface-from-any-vector3/91491)

<div class="topic-metadata">

**Author:** [@bobWinner](https://discourse.threejs.org/u/bobWinner)\
**Replies:** 16\
**Last updated:** [June 11, 2026, 3:42am UTC](https://discourse.threejs.org/t/get-the-closest-point-of-an-objects-surface-from-any-vector3/91491 "2026-06-11T03:42:22Z")

</div>

I need to get the closest point of an object’s surface from any Vector3. It is basically this question : https://codepen.io/maurizzzio/pen/pERqxV?editors=0010 Unfornunatly the algorythm in the answer is outdated bec…

---

## [Three.js Tunnel Effect: Buffer Data + Quaternions](https://discourse.threejs.org/t/three-js-tunnel-effect-buffer-data-quaternions/90097)

<div class="topic-metadata">

**Author:** [@robotbobby](https://discourse.threejs.org/u/robotbobby)\
**Replies:** 1\
**Last updated:** [March 1, 2026, 7:39pm UTC](https://discourse.threejs.org/t/three-js-tunnel-effect-buffer-data-quaternions/90097 "2026-03-01T19:39:35Z")

</div>

Great effect with just a few lines of JavaScript!

---

## [High-Performance Instanced Windmills](https://discourse.threejs.org/t/high-performance-instanced-windmills/89933)

<div class="topic-metadata">

**Author:** [@red-reddington](https://discourse.threejs.org/u/red-reddington)\
**Replies:** 3\
**Last updated:** [February 20, 2026, 2:31am UTC](https://discourse.threejs.org/t/high-performance-instanced-windmills/89933 "2026-02-20T02:31:33Z")

</div>

Inspired by a classic CodePen from @prisoner849, this demo renders 1000 windmills in a single scene using instanced meshes for minimal draw calls. Each blade features twist along its length and dynamic wobble per instanc…

---

## [Wireframe of quads](https://discourse.threejs.org/t/wireframe-of-quads/17924)

<div class="topic-metadata">

**Author:** [@prisoner849](https://discourse.threejs.org/u/prisoner849)\
**Replies:** 22\
**Last updated:** [January 18, 2026, 10:39pm UTC](https://discourse.threejs.org/t/wireframe-of-quads/17924 "2026-01-18T22:39:49Z")

</div>

Hi, community! Here is a solution for those types of geometries that are a distorted plane in general. https://codepen.io/prisoner849/full/azZJMPE Code: setGeom(new THREE.PlaneGeometry(5, 5, 11, 12), 0x00ffff, -10…

---

## [Can I completely disable the calculation and storage of vertex normals on a geometry?](https://discourse.threejs.org/t/can-i-completely-disable-the-calculation-and-storage-of-vertex-normals-on-a-geometry/88373)

<div class="topic-metadata">

**Author:** [@torrent](https://discourse.threejs.org/u/torrent)\
**Replies:** 3\
**Last updated:** [December 2, 2025, 2:00am UTC](https://discourse.threejs.org/t/can-i-completely-disable-the-calculation-and-storage-of-vertex-normals-on-a-geometry/88373 "2025-12-02T02:00:55Z")

</div>

I have a very large BufferGeometry that I manually provide the vertices, indices, and uv attributes to. This BufferGeometry represents a large heightmap. When I make a Mesh out of this geometry, I apply a custom MeshLamb…

---

## [Generation of SDFGeometry online and locally](https://discourse.threejs.org/t/generation-of-sdfgeometry-online-and-locally/83262)

<div class="topic-metadata">

**Author:** [@hofk](https://discourse.threejs.org/u/hofk)\
**Replies:** 37\
**Last updated:** [October 15, 2025, 6:38pm UTC](https://discourse.threejs.org/t/generation-of-sdfgeometry-online-and-locally/83262 "2025-10-15T18:38:51Z")

</div>

Triangulation of SDFs to efficiently transfer SDFs into BufferGeometry. All primitives are generated with the functions ported from GLSL to PHP or JavaScript as SDF. A slightly modified triangulation algorithm (original…

---

## [How to make a point on a 3D mesh sphere highlight with connected edges on hover in Three.js?](https://discourse.threejs.org/t/how-to-make-a-point-on-a-3d-mesh-sphere-highlight-with-connected-edges-on-hover-in-three-js/86195)

<div class="topic-metadata">

**Author:** [@Parisa\_Shahbazi](https://discourse.threejs.org/u/Parisa_Shahbazi)\
**Replies:** 4\
**Last updated:** [August 16, 2025, 12:31pm UTC](https://discourse.threejs.org/t/how-to-make-a-point-on-a-3d-mesh-sphere-highlight-with-connected-edges-on-hover-in-three-js/86195 "2025-08-16T12:31:34Z")

</div>

Hi, I have a 3D sphere made of glowing or colored points, where the points are connected by lines forming a mesh (like a wireframe). I want to implement an interactive effect: When the mouse hovers over a point, t…

---

## [Three-mesh-bvh preventing construction of BufferGeometry & Raycaster](https://discourse.threejs.org/t/three-mesh-bvh-preventing-construction-of-buffergeometry-raycaster/85778)

<div class="topic-metadata">

**Author:** [@Christopher\_Mattiske](https://discourse.threejs.org/u/Christopher_Mattiske)\
**Replies:** 3\
**Last updated:** [August 6, 2025, 11:53pm UTC](https://discourse.threejs.org/t/three-mesh-bvh-preventing-construction-of-buffergeometry-raycaster/85778 "2025-08-06T23:53:58Z")

</div>

I’m using three-mesh-bvh and I’ve run into some issues with its extensions to ‘three’. Since it’s exporting BufferGeometry and Raycaster as interfaces rather than classes, anywhere I construct new BufferGeometry() or new…

---

## [How to implement editable faces with push/pull behavior like SketchUp or Coohom in Three.js?](https://discourse.threejs.org/t/how-to-implement-editable-faces-with-push-pull-behavior-like-sketchup-or-coohom-in-three-js/85460)

<div class="topic-metadata">

**Author:** [@Parisa\_Shahbazi](https://discourse.threejs.org/u/Parisa_Shahbazi)\
**Replies:** 2\
**Last updated:** [July 24, 2025, 4:00pm UTC](https://discourse.threejs.org/t/how-to-implement-editable-faces-with-push-pull-behavior-like-sketchup-or-coohom-in-three-js/85460 "2025-07-24T16:00:30Z")

</div>

Hi everyone, I’m trying to implement a feature in Three.js similar to the Push/Pull tool in SketchUp (or the face extrusion tool in Coohom), where a user can click on a face of a 3D box, see a draggable arrow appear, an…

---

## [Joined adjacent edges](https://discourse.threejs.org/t/joined-adjacent-edges/83475)

<div class="topic-metadata">

**Author:** [@prisoner849](https://discourse.threejs.org/u/prisoner849)\
**Replies:** 3\
**Last updated:** [June 3, 2025, 9:18am UTC](https://discourse.threejs.org/t/joined-adjacent-edges/83475 "2025-06-03T09:18:51Z")

</div>

Hi community! This started with the thought “I want to join the vertices of edges of adjacent faces with lines” Like this: The geometry has to be non-indexed. And its position attribute is shared with the object of…

---

## [Triangulation of SDFs ](https://discourse.threejs.org/t/triangulation-of-sdfs/80861)

<div class="topic-metadata">

**Author:** [@hofk](https://discourse.threejs.org/u/hofk)\
**Replies:** 7\
**Last updated:** [May 4, 2025, 7:31pm UTC](https://discourse.threejs.org/t/triangulation-of-sdfs/80861 "2025-05-04T19:31:28Z")

</div>

Note Online generation of SDF geometries is now available. 05/28/2025 Generation of SDFGeometry online After creating SDFs via three.js material and shader, (SDFs in the scene - raymarching ) I am now working on t…

---

## [RapierHelper - Debug buffer geometry not updating with WebGPURenderer](https://discourse.threejs.org/t/rapierhelper-debug-buffer-geometry-not-updating-with-webgpurenderer/81919)

<div class="topic-metadata">

**Author:** [@EmanYmton](https://discourse.threejs.org/u/EmanYmton)\
**Replies:** 1\
**Last updated:** [May 2, 2025, 3:30pm UTC](https://discourse.threejs.org/t/rapierhelper-debug-buffer-geometry-not-updating-with-webgpurenderer/81919 "2025-05-02T15:30:49Z")

</div>

Hello everyone, I tried to use RapierHelper (available from r176) to debug a RapierJS physic world, based on the three.js physics - rapier3d character controller exemple, rendered with WebGPURenderer. The physic works …

---

## [\[newbie\] geometry.setIndex() doesn't work](https://discourse.threejs.org/t/newbie-geometry-setindex-doesnt-work/80701)

<div class="topic-metadata">

**Author:** [@punk\_coders](https://discourse.threejs.org/u/punk_coders)\
**Replies:** 2\
**Last updated:** [April 5, 2025, 12:21am UTC](https://discourse.threejs.org/t/newbie-geometry-setindex-doesnt-work/80701 "2025-04-05T00:21:22Z")

</div>

I tried this simple example: // create a test object for lightmapping const indexBuffer = new Uint16Array(\[ 0, 1, 2, 0, 2, 3 \]); const vertBuffer = new Float32Array(\[ 0 …

---

## [Room Generation using BufferGeometry](https://discourse.threejs.org/t/room-generation-using-buffergeometry/80021)

<div class="topic-metadata">

**Author:** [@KHades95](https://discourse.threejs.org/u/KHades95)\
**Replies:** 3\
**Last updated:** [March 25, 2025, 2:20pm UTC](https://discourse.threejs.org/t/room-generation-using-buffergeometry/80021 "2025-03-25T14:20:11Z")

</div>

Hello Everyone. Hope you had a good weekend. I am facing on problem face of walls while generating room walls using BufferGemetry. I think normals are related to FrontSide and BackSide when render. so I generated the…

---

## [How to export a Gltf as Quad data?](https://discourse.threejs.org/t/how-to-export-a-gltf-as-quad-data/24153)

<div class="topic-metadata">

**Author:** [@prominent](https://discourse.threejs.org/u/prominent)\
**Replies:** 11\
**Last updated:** [January 30, 2025, 2:36am UTC](https://discourse.threejs.org/t/how-to-export-a-gltf-as-quad-data/24153 "2025-01-30T02:36:29Z")

</div>

I know that the three.js does not support quads, however, I am wondering how the GLTFExporter can be modified to support exporting everything as quads. Can I simply supply the gltfexporter with buffergeometry that uses …

---

## [How to make an arc using the buffer geometry](https://discourse.threejs.org/t/how-to-make-an-arc-using-the-buffer-geometry/76308)

<div class="topic-metadata">

**Author:** [@Ningomba](https://discourse.threejs.org/u/Ningomba)\
**Replies:** 2\
**Last updated:** [January 11, 2025, 1:17pm UTC](https://discourse.threejs.org/t/how-to-make-an-arc-using-the-buffer-geometry/76308 "2025-01-11T13:17:00Z")

</div>

Dear freinds, I want to make a 3d shape. In the right triangle, instead of having the hypotenuse flat plane i want to have a concave arc. So how can i make this kind of arc. I have the code by using the extrude geometry…

---

## [Shape made from BufferGeometry not casting/receiving shadows when other shapes are](https://discourse.threejs.org/t/shape-made-from-buffergeometry-not-casting-receiving-shadows-when-other-shapes-are/75111)

<div class="topic-metadata">

**Author:** [@Jamchild](https://discourse.threejs.org/u/Jamchild)\
**Replies:** 18\
**Last updated:** [December 16, 2024, 7:46am UTC](https://discourse.threejs.org/t/shape-made-from-buffergeometry-not-casting-receiving-shadows-when-other-shapes-are/75111 "2024-12-16T07:46:17Z")

</div>

Hello, new to three.js (but not to 3D programming) and generally loving it! I’m creating a cube in my own custom shape class using BufferGeometry, and everything works as expected when I add it to my scene except that it…

---

## [Trilinear interpolation of vertices](https://discourse.threejs.org/t/trilinear-interpolation-of-vertices/7991)

<div class="topic-metadata">

**Author:** [@prisoner849](https://discourse.threejs.org/u/prisoner849)\
**Replies:** 4\
**Last updated:** [November 11, 2024, 11:34pm UTC](https://discourse.threejs.org/t/trilinear-interpolation-of-vertices/7991 "2024-11-11T23:34:12Z")

</div>

Hi community! Here is a pic: And there is a working demo: https://codepen.io/prisoner849/pen/LoKQoR Interpolation comes by 8 control points in an array of a modified material’s uniform. Y | \[2\]------…

---

## [Extend SkeletonHelper to accommodate "fat" lines? (Perhaps with LineSegments2)](https://discourse.threejs.org/t/extend-skeletonhelper-to-accommodate-fat-lines-perhaps-with-linesegments2/59436)

<div class="topic-metadata">

**Author:** [@mhazani](https://discourse.threejs.org/u/mhazani)\
**Replies:** 4\
**Last updated:** [October 17, 2024, 7:46am UTC](https://discourse.threejs.org/t/extend-skeletonhelper-to-accommodate-fat-lines-perhaps-with-linesegments2/59436 "2024-10-17T07:46:52Z")

</div>

Hi folks, As the title says, I’m trying to get lines of variable width for the skeleton helper (for a skeletal animation). It currently extends LineSegments which doesn’t allow variable line width - and I’m struggling t…

---

## [How to dynamically shape geometry, define labeling positions, and obtain edge positions in geometry.](https://discourse.threejs.org/t/how-to-dynamically-shape-geometry-define-labeling-positions-and-obtain-edge-positions-in-geometry/70477)

<div class="topic-metadata">

**Author:** [@AkashGuptaEmk\_AkEmk](https://discourse.threejs.org/u/AkashGuptaEmk_AkEmk)\
**Replies:** 0\
**Last updated:** [September 9, 2024, 10:22am UTC](https://discourse.threejs.org/t/how-to-dynamically-shape-geometry-define-labeling-positions-and-obtain-edge-positions-in-geometry/70477 "2024-09-09T10:22:35Z")

</div>

kindly check the rivet shape and how to labeling cylinder and hemisphere top radius. @mrdoob @Nishant\_Mishra

---

## [How do I display this intersected edge?](https://discourse.threejs.org/t/how-do-i-display-this-intersected-edge/70015)

<div class="topic-metadata">

**Author:** [@Wobi9e](https://discourse.threejs.org/u/Wobi9e)\
**Replies:** 2\
**Last updated:** [August 28, 2024, 11:49am UTC](https://discourse.threejs.org/t/how-do-i-display-this-intersected-edge/70015 "2024-08-28T11:49:39Z")

</div>

Hello, I have a problem and I dont know how to solve it. I hope someone of you can help me with that. As you can see in the attached image, I have created a “XRay-Cube” that displays Objects that lie below the bufferge…

---

## [‌Best way of traverse (high performance in large models)](https://discourse.threejs.org/t/best-way-of-traverse-high-performance-in-large-models/69519)

<div class="topic-metadata">

**Author:** [@Parisa\_Shahbazi](https://discourse.threejs.org/u/Parisa_Shahbazi)\
**Replies:** 1\
**Last updated:** [August 20, 2024, 7:37pm UTC](https://discourse.threejs.org/t/best-way-of-traverse-high-performance-in-large-models/69519 "2024-08-20T19:37:28Z")

</div>

Hi Imagine I have a large model of 300MB with a lot of objects. I have 10 groups in My object. What is the best way to filter, find, and select my Groups? I think traversing all objects can cause low performance

---

## [Need help with a implementing expansion functionality using three js](https://discourse.threejs.org/t/need-help-with-a-implementing-expansion-functionality-using-three-js/68972)

<div class="topic-metadata">

**Author:** [@SRIDHAR.M](https://discourse.threejs.org/u/SRIDHAR.M)\
**Replies:** 17\
**Last updated:** [August 19, 2024, 3:22pm UTC](https://discourse.threejs.org/t/need-help-with-a-implementing-expansion-functionality-using-three-js/68972 "2024-08-19T15:22:33Z")

</div>

I was trying to do expansion of a instance mesh on screen using user input in three js but can’t find the method to do even expansion that increased the thickness of the material. if i move the vertex positions and give …

---

## [How can I get a group of triangles that comprise a cube face?](https://discourse.threejs.org/t/how-can-i-get-a-group-of-triangles-that-comprise-a-cube-face/67997)

<div class="topic-metadata">

**Author:** [@casamigos17](https://discourse.threejs.org/u/casamigos17)\
**Replies:** 4\
**Last updated:** [July 10, 2024, 11:16pm UTC](https://discourse.threejs.org/t/how-can-i-get-a-group-of-triangles-that-comprise-a-cube-face/67997 "2024-07-10T23:16:39Z")

</div>

I’m trying to get the triangles that create a cube mesh face. This is what I tried: The box geometry mesh turns to have a groups array of 6 items. I assumed that since a cube has 6 faces, each of this objects was stor…

---

## [How to limit moving decal on a mesh?How to find exact position of the sides of each mesh؟](https://discourse.threejs.org/t/how-to-limit-moving-decal-on-a-mesh-how-to-find-exact-position-of-the-sides-of-each-mesh/67048)

<div class="topic-metadata">

**Author:** [@Parisa\_Shahbazi](https://discourse.threejs.org/u/Parisa_Shahbazi)\
**Replies:** 2\
**Last updated:** [June 30, 2024, 5:27am UTC](https://discourse.threejs.org/t/how-to-limit-moving-decal-on-a-mesh-how-to-find-exact-position-of-the-sides-of-each-mesh/67048 "2024-06-30T05:27:30Z")

</div>

Hi. I am creating a 3d T-shirt configurator and for design images and texts on it I use decalGeometry. You can imagine that we want to control the position of one mesh in the scene upon another mesh. How Can I do that…

---

## [Fix BufferGeometry](https://discourse.threejs.org/t/fix-buffergeometry/66819)

<div class="topic-metadata">

**Author:** [@Lock\_Basta](https://discourse.threejs.org/u/Lock_Basta)\
**Replies:** 1\
**Last updated:** [June 13, 2024, 12:24pm UTC](https://discourse.threejs.org/t/fix-buffergeometry/66819 "2024-06-13T12:24:51Z")

</div>

Hi all, I’m trying to create a WallGeometry (like in Cesium; I have a pet project called Cesium + Three), but I have my geometry crashing when updating for some reason. What is the problem? I do everything in this class: …

---

## [Point projection onto rectangular mesh](https://discourse.threejs.org/t/point-projection-onto-rectangular-mesh/66349)

<div class="topic-metadata">

**Author:** [@moxx1234](https://discourse.threejs.org/u/moxx1234)\
**Replies:** 2\
**Last updated:** [June 4, 2024, 7:36am UTC](https://discourse.threejs.org/t/point-projection-onto-rectangular-mesh/66349 "2024-06-04T07:36:39Z")

</div>

Hello everyone! I’m trying to project points on the meshes with rectangular bufferGeometry const { width, height } = this.size const vertices = new Float32Array(\[ -width / 2, 0, 0, -width / 2, height, 0, wid…

---

## [Passing updated vertex buffers between shader passes on GPU](https://discourse.threejs.org/t/passing-updated-vertex-buffers-between-shader-passes-on-gpu/65759)

<div class="topic-metadata">

**Author:** [@mac](https://discourse.threejs.org/u/mac)\
**Replies:** 5\
**Last updated:** [May 22, 2024, 2:05am UTC](https://discourse.threejs.org/t/passing-updated-vertex-buffers-between-shader-passes-on-gpu/65759 "2024-05-22T02:05:06Z")

</div>

Picture this scenario: I have a PLY file containing vertex data loaded into a scene, I then add vertex noise based on a flowfield affecting the positions/ particle sizes by using a GPGPU texture which then I pass on as …

[Next page](https://discourse.threejs.org/tag/buffergeometry/217.md?match_all_tags=true&page=1&tags%5B%5D=buffergeometry)
