Questions tagged [buffer-geometry]

A geometry class used in the WebGL framework Three.js to increase performance.

A buffer geometry is a certain type of geometry in the Three.js library that will increase performance and decrease memory usage because it reduces the cost of passing all this data to the GPU.

The official documentation for THREE.BufferGeometry can be found here

139 questions
3
votes
1 answer

THREE.JS | Delaunator.JS THREE.BufferGeometry UV mapping

That's really weird, but I couldn't find any solution for uv mapping Delaunator.JS outputs. Let's say I have a very basic set of points defined by: for(var z = -512; z <= 512; z += 256){ for(var x = -512; x <= 512; x += 256){ …
VVK
  • 435
  • 2
  • 27
3
votes
2 answers

ParametricBufferGeometry in THREE.js

In cloth simulation example code there is something called ParametricBufferGeometry which takes 3 parameters What does that function actually mean ? clothGeometry = new THREE.ParametricBufferGeometry(clothFunction, cloth.w, cloth.h); In the docs I…
RedBall
  • 311
  • 4
  • 12
3
votes
1 answer

how do I access the attributes of bufferGeometry from an an A-Frame component

I am writing a component that needs to access and modify position, normal, and uv attributes on a model read into A-Frame as an asset. I can get close to accessing the data, but can't quite get there.…
Scott Singer
  • 141
  • 1
  • 9
3
votes
1 answer

Get screen coordinates of a vertex in a THREE.js Points object using bufferGeometry

I want to have a DOM node track a particle in my THREE.js simulation. My simulation is built with the Points object, using a bufferGeometry. I'm setting the positions of each vertex in the render loop. Over the course of the simulation I'm moving /…
greenbean
  • 178
  • 1
  • 7
3
votes
1 answer

Is it possible to use Float64Array instead of Float32Array in THREE.BufferGeometry

I am having some trouble with BufferGeometry since it uses Float32Array to specify positions. The values i need to plot ( Using THREE.Points ) are large numbers for example "2732124.760877" and i loose most of the precision when using Float32Array…
pulasthi
  • 1,730
  • 1
  • 17
  • 29
3
votes
2 answers

How to merge two BufferGeometries in one BufferGeometry in Three.JS?

How to merge two buffer geometries in one THREE.BufferGeometry in ThreeJS ? var modelGeometry = null; geometry = new THREE.CylinderGeometry( 10, 10, 10 ); if (modelGeometry == null) { modelGeometry = new…
Evgy
  • 386
  • 1
  • 3
  • 10
3
votes
1 answer

Three.js Buffergeometry Morphing

Is it possible to morph two buffergeometries in three.js? Is there a good example to reference? I am especially interested in manually morphing using morph target influences.
Jeff Weinberg
  • 414
  • 4
  • 9
3
votes
1 answer

three.js: BufferGeometry and textures

I'm trying to load textures on a THREE.BufferGeometry, but the texture isn't showing up. If I use normal geometry, the texture shows up. Are textures unsupported with BufferGeometry or am I doing something wrong? This works: var geom = new…
dan
  • 33
  • 3
2
votes
1 answer

How to apply SubdivisionModifier on BufferGeometry?

Can someone give me a pointer on where should start? I am trying to port this code → http://glennchun.github.io/free-form-deformation/ to the latest threejs Version. the major challenge I’m facing is how to divide Geometry into multiple Faces. Since…
any post
  • 87
  • 10
2
votes
0 answers

React Native - Three js - STLLoader returned BufferGeometry not showing

Using STLLoader from Three.js Loaders. The stl file / object is loaded successfully but when added to the scene through mesh, it does not show on the screen. Have tried all sorts of mesh materials to create mesh but nothing is appearing. Here is the…
2
votes
0 answers

How to optimise changing materials on a large BufferGeometry in THREE.js

Requirements Render a very large geometry (>1 million triangles) via webgl, and via user interaction change the color of some of the triangles. 60fps should be maintained. The geometry cannot be simplified, should be rendered as is, with all the…
Mabedan
  • 857
  • 8
  • 30
2
votes
1 answer

THREE.JS UV map over entire THREE.BufferGeometry

Here is a very simple Three.JS sketch, resulting following render: As you may see this THREE.BufferGeometry is a 8x8 matrix and by setting UVs in this way: for(var i = 0; i < points.length; i += 4){ quad_uvs.push(...[0.0, 0.0, 1.0, 0.0, 1.0, 1.0,…
VVK
  • 435
  • 2
  • 27
2
votes
0 answers

ThreeJS, Ionic, Angular2+ - How to modify position BufferGeometry / BufferAttribute values - It says Index Signature ArrayLike is read only

I have everything for a 3d implementation with Three.js working in a plain js app. I am using BufferGeometry for lines and meshes and I am modifying the position attribute to modify their shapes. Now I am using Ionic and converting the 3d stuff…
2
votes
1 answer

With Instancing, I am not able to change the transparency/opacity of the individual child geometries

I have a simple model consisting of 1000 instances of sphere. I am trying to use instancing to reduce the number of draw calls. However, I am not able to change the transparency/opacity of the individual child geometries. I already tried the…
2
votes
1 answer

Converting BufferGeometry to Geometry with FBXLoader in Three.js

Here is my code to load a .fbx object, which loads an object as BufferGeometry by default: var loader = new THREE.FBXLoader(); async function loadFiles(scene,props) { const {files, path, childName, fn} = props; if (index > files.length - 1)…
qbuffer
  • 383
  • 4
  • 14
1
2
3
9 10