Hi everyone,
I’m currently building a CAD-style drawing tool in the browser using Three.js, something similar to AutoCAD.
The tool allows users to draw and edit a large number of points, lines, arcs, and hatched areas. It’s still a prototype, but the core interaction features are working: placing points, drawing lines and arcs, editing geometry, and filling polygons.
I’m using WebGPURenderer (via import maps and local Three.js builds) to make the app more future-proof. I’m also planning to integrate large point clouds using Potree.org, which is also moving towards WebGPU.
Current Setup:
Renderer: WebGPURenderer
Points: Created as individual Mesh
objects using SphereGeometry
+ MeshBasicMaterial
Lines: Using Line
+ LineBasicMaterial
Hatches/Polygons: With ShapeGeometry
+ MeshBasicMaterial
Interaction: Full support for adding, deleting, dragging points, drawing curves and filling shapes
Goals:
Handle thousands of points, lines, and filled areas smoothly
Support for zooming, interactivity, and real-time editing
Future use of WebGPU features (compute, better shaders, point cloud rendering)
What I noticed:
WebGPU rendering sometimes feels less performant than WebGL, especially for lines.
Example:
WebGPU (slower):
https://threejs.org/examples/?q=line#webgpu_lines_fat
WebGL (much smoother):
https://threejs.org/examples/?q=line#webgpu_lines_fat_raycasting
Questions:
-
Is WebGPU currently a good choice for this kind of technical drawing tool?**
Or is WebGL still better in terms of performance? -
Is using
Mesh
withSphereGeometry
for every point efficient,
or should I switch toTHREE.Points
orCircleGeometry
for better performance? -
For lines – should I switch to
Line2
withLineMaterial
to get consistent screen-space thickness?
And which version ofLine2
is recommended for WebGPU?examples/jsm/lines/Line2.js
(WebGL?)
examples/jsm/lines/webgpu/Line2.js
(WebGPU version?) -
What’s the best practice for rendering thousands of points and lines with maximum performance?
Any advice, experience, or suggestions would be really appreciated
Thanks in advance