Skip to content

Commit

Permalink
Adds types for Extrude, adds missing export for other meshes #297
Browse files Browse the repository at this point in the history
  • Loading branch information
hirako2000 committed Jul 29, 2017
1 parent 4306293 commit e659b55
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 2 deletions.
3 changes: 3 additions & 0 deletions types/components/meshes/index.d.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
export * from './Box';
export * from './Cone';
export * from './Cylinder'
export * from './Dodecahedron';
export * from './Extrude';
export * from './Sphere';
export * from './Text';
export * from './Tetrahedron';
Expand Down
43 changes: 41 additions & 2 deletions types/whs-tests.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
import {MeshStandardMaterial} from 'three';
import {
MeshStandardMaterial,
Shape,
Vector2
} from 'three';

import {
Loop,
Expand All @@ -13,9 +17,10 @@ import {
Box,
Cone,
CubeCamera,
Extrude,
OrthographicCamera,
PerspectiveCamera,
Sphere,
Sphere
} from './components';

import {
Expand Down Expand Up @@ -103,6 +108,40 @@ const cone = new Cone({build: false});
cone.buildGeometry({buffer: true});
cone.addTo(app);

const shape = new Shape([
new Vector2(-4,-4),
new Vector2(-2,0),
new Vector2(-4,4),
new Vector2(0,2),
new Vector2(4,4),
new Vector2(2,0),
new Vector2(4,-4),
new Vector2(0,-2)
]);

let extrude = new Extrude({
build: false,
geometry: {
shapes: shape,
options: {
bevelEnabled: false,
bevelSize: 0,
amount: 2
}
}
});

extrude = new Extrude({
geometry: {
shapes: [shape, shape],
options: {
bevelEnabled: false,
bevelSize: 0,
amount: 2
}
}
});

// Cameras

const cubeCamera = new CubeCamera({
Expand Down

0 comments on commit e659b55

Please sign in to comment.