-
-
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
b282c43
commit 4f49f11
Showing
3 changed files
with
59 additions
and
3 deletions.
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,47 @@ | ||
import { | ||
MeshComponent, | ||
MeshComponentParams | ||
} from '../../core/MeshComponent'; | ||
|
||
import { | ||
LatheBufferGeometry, | ||
LatheGeometry, | ||
Mesh, | ||
Vector2 | ||
} from 'three'; | ||
|
||
interface LatheParams extends MeshComponentParams { | ||
|
||
/** Geometry parameters */ | ||
geometry?: { | ||
|
||
/** | ||
* Array of Vector2s. The x-coordinate of each point must be greater than zero. | ||
*/ | ||
points: Array<Vector2>; | ||
} | ||
|
||
/** Sets whether to build a buffered geometry */ | ||
buffer?: boolean; | ||
} | ||
|
||
export class Lathe extends MeshComponent { | ||
|
||
/** | ||
* @constructor Creates a Lath | ||
* @param params parameters | ||
*/ | ||
constructor(params?: LatheParams); | ||
|
||
/** | ||
* Build lifecycle creates a mesh using input params. | ||
* @param params | ||
*/ | ||
build(params?: LatheParams): Mesh; | ||
|
||
/** | ||
* Builds the geometry | ||
* @param params | ||
*/ | ||
buildGeometry(params?: LatheParams): LatheGeometry | LatheBufferGeometry; | ||
} |
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