-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* get extrudeLinear working * fix formatting
- Loading branch information
Showing
12 changed files
with
275 additions
and
106 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
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,21 @@ | ||
import { JsCadFixture } from "../lib/components/jscad-fixture" | ||
import { ExtrudeLinear } from "../lib/jscad-fns" | ||
import { Polygon } from "../lib/jscad-fns/polygon" | ||
|
||
export default () => ( | ||
<JsCadFixture> | ||
<ExtrudeLinear height={2}> | ||
<Polygon | ||
points={[ | ||
[-2, -1], | ||
[2, -1], | ||
[2.5, 2], | ||
[1, 1], | ||
[0, 2], | ||
[-1, 1], | ||
[-2, 2], | ||
]} | ||
/> | ||
</ExtrudeLinear> | ||
</JsCadFixture> | ||
) |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import type * as FN from "./jscad-fns" | ||
|
||
declare global { | ||
namespace JSX { | ||
interface IntrinsicElements { | ||
extrudeLinear: FN.ExtrudeLinearProps | ||
cube: FN.CubeProps | ||
sphere: FN.SphereProps | ||
cuboid: FN.CuboidProps | ||
roundedCuboid: FN.RoundedCuboidProps | ||
geodesicSphere: FN.GeodesicSphereProps | ||
ellipsoid: FN.EllipsoidProps | ||
cylinder: FN.CylinderProps | ||
roundedCylinder: FN.RoundedCylinderProps | ||
cylinderElliptic: FN.CylinderEllipticProps | ||
torus: FN.TorusProps | ||
jscadPolygon: FN.PolygonProps | ||
} | ||
} | ||
} |
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,23 @@ | ||
export type ExtrudeLinearProps = { | ||
height: number | ||
twistAngle?: number | ||
twistSteps?: number | ||
children: any | ||
} | ||
|
||
export function ExtrudeLinear({ | ||
height, | ||
twistAngle, | ||
twistSteps, | ||
children, | ||
}: ExtrudeLinearProps) { | ||
return ( | ||
<extrudeLinear | ||
height={height} | ||
twistAngle={twistAngle} | ||
twistSteps={twistSteps} | ||
> | ||
{children} | ||
</extrudeLinear> | ||
) | ||
} |
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
Oops, something went wrong.