@gs.i/thick-line-builder
TypeScript icon, indicating that this package has built-in type declarations

0.3.5-alpha • Public • Published

Thick Line Builder

Extend line strings into triangle meshes with uv, dynamic width and miter/bevel/round joint.

This tool generates "noodle-like" meshes, with no thickness, that always face the positive z-axis.

This tool can generate optional UV(u along the length and v long the width) that is evenly distributed along the actual length rather than the count of points. UV will be delicately handled for different kind of joint to "morph" along the shape of the line.

An alternative method, buildMultiThickLine, is provided to generate non-continuous line segments with continuous UV. If you want a single geometry with non-continuous line segments and independent UV. Use buildThickLine to generate geom for each segment and merge them.

If you want thick lines that always face the camera (extended in screen space). You should use @gs.i/frontend-gline. Gline generates thick lines with miter and bevel joint in shaders.

miter

bevel with continuous UV

round

Readme

Keywords

none

Package Sidebar

Install

npm i @gs.i/thick-line-builder

Weekly Downloads

2

Version

0.3.5-alpha

License

MIT

Unpacked Size

24.8 kB

Total Files

10

Last publish

Collaborators

  • yy888666222
  • gaomeng1900