-
-
Notifications
You must be signed in to change notification settings - Fork 390
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4f49f11
commit a20fee9
Showing
3 changed files
with
69 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
import { | ||
MeshComponent, | ||
MeshComponentParams | ||
} from '../../core/MeshComponent'; | ||
|
||
import { | ||
BufferGeometry, | ||
Geometry, | ||
LineCurve3, | ||
Mesh | ||
} from 'three'; | ||
|
||
interface LineParams extends MeshComponentParams { | ||
|
||
/** Geometry parameters */ | ||
geometry: { | ||
|
||
/** | ||
* A LineCurve3 representing the curve to trace as a line | ||
* @type {LineCurve3} | ||
*/ | ||
curve: LineCurve3; | ||
|
||
/** | ||
* Points is the number of pieces to divide the curve into. | ||
* Default is 50. | ||
*/ | ||
points?: number; | ||
} | ||
|
||
/** Sets whether to build a buffered geometry */ | ||
buffer?: boolean; | ||
} | ||
|
||
export class Line extends MeshComponent { | ||
|
||
/** | ||
* @constructor Creates a Line | ||
* @param params parameters | ||
*/ | ||
constructor(params?: LineParams); | ||
|
||
/** | ||
* Build lifecycle creates a mesh using input params. | ||
* @param params | ||
*/ | ||
build(params?: LineParams): Mesh; | ||
|
||
/** | ||
* Builds the geometry | ||
* @param params | ||
*/ | ||
buildGeometry(params?: LineParams): Geometry | BufferGeometry; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters