npm.io
1.0.9 • Published 7 years ago

three-path-builder

Licence
MIT
Version
1.0.9
Deps
0
Size
25 kB
Vulns
0
Weekly
0
Stars
155

ES6 NPM package for three.path Library. Full documentation you can find here: https://github.com/shawn0326/three.path#readme

Required 'three' npm package https://www.npmjs.com/package/three

Import:

import { PathBuilder } from 'three-path-builder';

Usage Example:

const pointsArr = [new THREE.Vector3(0, 0, 0), new THREE.Vector3(2, 2, 2)];

const pathBuilder = new PathBuilder();

const pathPointList = new pathBuilder.PathPointList();

pathPointList.set(pointsArr, cornerRadius, cornerSplit, false);

const geometry = new pathBuilder.PathTubeGeometry();

geometry.update(pathPointList, {
    radius: 0.75,
    radialSegments: 16,
    progress: 1
});```

Keywords