Skip to content

shawn0326/three.InstancedLine

Repository files navigation

three.InstancedLine

Instanced fat lines with miter joins. 👍 Inspired by spite/THREE.MeshLine and three-fatline.

  • Optimized the storage of the vertex buffer, saving memory.
  • Handle corners more smartly. If the corner is too small, break the corner to avoid sharp corners.
  • Support length-based uv & texture mapping.

screenshot.png

Usage

const line = new THREE.InstancedLine();
line.material.lineWidth = 5;
line.material.transparent = true;
line.material.opacity = 0.5;
line.material.color.setRGB(1, 0, 0);
line.geometry.setFromPoints(points);
scene.add(line);

About

Instanced fat lines with miter joins.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published