question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Drawing lines documentation refers to Geometry instead of BufferGeometry

See original GitHub issue
Description of the problem

The “Drawing lines” documentation uses Geometries in the code snippet. It should be updated to use BufferGeometries.

Using BufferGeometry is pretty much the same number of lines of code:

const geometry = new THREE.BufferGeometry();
  
const points = [];
points.push(new THREE.Vector3( -10, 0, 0) );
points.push(new THREE.Vector3( 0, 10, 0) );
points.push(new THREE.Vector3( 10, 0, 0) );

geometry.setAttribute( 'position', new THREE.Float32BufferAttribute( points, 3 ) );
Three.js version
  • Dev
  • r112
Browser
  • All of them
  • Chrome
  • Firefox
  • Internet Explorer
OS
  • All of them
  • Windows
  • macOS
  • Linux
  • Android
  • iOS
Hardware Requirements (graphics card, VR Device, …)

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
NicolasRannoucommented, Jan 22, 2020

O, the text of the documentation should also be updated! (it was using regular Geometry because it was easier, which is not the case anymore)

0reactions
Mugen87commented, Jan 22, 2020

54011b6c0fbd324d2dcff98d53485deb869be2d4

Read more comments on GitHub >

github_iconTop Results From Across the Web

Drawing lines – three.js docs
Let's say you want to draw a line or a circle, not a wireframe Mesh. First we need to set up the renderer,...
Read more >
THREE.js - passing attributes to BufferGeometry instead of ...
This line bufferLineGeo.fromGeometry( lineGeo );. will not populate the position attribute if no faces are defined. Do this instead
Read more >
Getting Creative with The Built-In Geometries
Technically speaking, the geometries we will create are “buffer” geometries, which means that their data is stored in flat arrays called buffers.
Read more >
geometryEngine | API Reference | ArcGIS Maps SDK for ...
A client-side geometry engine for testing, measuring, and analyzing the spatial relationship between two or more 2D geometries. If more than one geometry...
Read more >
boxes/BufferGeometry.html at master · hudmol/boxes
boxes/three.js/docs/api/core/BufferGeometry.html ... Use addDrawCall to add draw calls, rather than modifying this array directly.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found