Skip to content

ryanking1809/three-line-raycast

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

three-line-raycast

Raycast function for three.js Line2 that accounts for line width

npm install three-line-raycast

How to use

Import Line2 & LineRaycast

import { Line2 } from "three/examples/jsm/lines/Line2.js";
import { LineRaycast } from 'three-line-raycast'

Create Line2 and add LineRaycast

First create a Line2 Mesh, then add the LineRaycast function.

Details on Line2 can be found at the three.js example

line = new Line2( geometry, matLine );
line.raycast = LineRaycast;

That's it! Now you can use the raycast on lines!

About

Raycast function for three.js line2 that accounts for line width

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors