Performance with drawing lines
See original GitHub issueI am using this very basic code to draw lines:
for (var i = 0; i < Lines.length; ++i)
{
material = new THREE.LineBasicMaterial( { color: 0xff7700, opacity: 1, linewidth: 3.0});
line = new THREE.Line( Lines[i], material);
scene.add( line );
}
The problem is that is very inefficent: I am displaying 3D model with edges and in some cases, when I get almost 800 “lines” I see a big performance hit.
So I tried to merge geometry client side with this:
var combined = new THREE.Geometry();
for (var i = 0; i < Lines.length; ++i)
{
THREE.GeometryUtils.merge( combined, Lines[i] );
}
line = new THREE.Line( combined, new THREE.LineBasicMaterial( { color: 0xff7700, opacity: 1, linewidth: 3.0}));
scene.add( line );
but doesn’t work because I have a huge single continuos line and not many disjoint ones (also it takes a lot to merge them into one).
So I was wondering if you could give some tips to efficiently render many edges in a scene? Should I draw lines as real meshes with an almost degenerate triangle for a single edge?
Thanks
Issue Analytics
- State:
- Created 12 years ago
- Comments:11 (6 by maintainers)
Top Results From Across the Web
performance art, drawings, art inspiration - Pinterest
Oct 19, 2021 - Explore Sidney Pink's board "Drawing Performance", followed by 124 people on Pinterest. See more ideas about performance art, drawings, ......
Read more >Performative Drawing Day - London, 8 March 2020 - YouTube
Mark making in drawing performance is often a result of powerful physical gesture and body movement connects elements of line, movement, ...
Read more >HTML canvas performance when drawing lots of lines
When I start getting to the performance limit, there is a noticeable delay between the end of the draw calls and the update...
Read more >Association of stability of line drawing and drawing performance
The study presents a simple method to predict the drawing performance of designers or artists by measuring the stability of their line drawings....
Read more >Performance Drawing - Bloomsbury Publishing
The authors draw a picture of the changing boundaries between art forms, showing how the blurred lines between artistic disciplines are the ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

If you use
LinePiecestype ofLinethen lines are assumed to be individually separated line chunks and you can do whatever you want with them.Check
webgl_lines_sphereexample.As stated in the guidelines, help requests should be done in stackoverflow. This board is for bugs or feature requests.