@buerli.io/headless 0.5.0-beta.1 → 0.5.0-beta.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/cjs/history.js +1726 -0
- package/build/cjs/index.js +35 -0
- package/build/cjs/solid.js +490 -0
- package/build/cjs/utils/selection.js +32 -0
- package/build/{history.js → esm/history.js} +673 -207
- package/build/{index.js → esm/index.js} +0 -0
- package/build/{solid.js → esm/solid.js} +71 -16
- package/build/{utils → esm/utils}/selection.js +0 -0
- package/build/{history.d.ts → types/history.d.ts} +323 -212
- package/build/types/index.d.ts +25 -0
- package/build/{solid.d.ts → types/solid.d.ts} +13 -3
- package/build/{utils → types/utils}/selection.d.ts +0 -0
- package/package.json +8 -8
- package/build/index.d.ts +0 -18
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import history from './history';
|
|
2
|
+
import solid, { createPolyline } from './solid';
|
|
3
|
+
export { solid, history, createPolyline };
|
|
4
|
+
/**
|
|
5
|
+
* Because babel typescript tools can not handle the type definitions
|
|
6
|
+
* in an other way, they have to be re-exported as you can see in this code region.
|
|
7
|
+
*
|
|
8
|
+
* Please have a look at https://github.com/awv-informatik/buerli/pull/129 for more information.
|
|
9
|
+
*/
|
|
10
|
+
import { ApiHistory as ApiHistory1, ConstraintType as ConstraintType1, Transform as Transform1, DimensionType as DimensionType1, FastenedOriginConstraintType as FastenedOriginConstraintType1, FastenedConstraintType as FastenedConstraintType1, RevoluteConstraintType as RevoluteConstraintType1, SliderConstraintType as SliderConstraintType1, PlanarConstraintType as PlanarConstraintType1, ParallelConstraintType as ParallelConstraintType1, CylindricalConstraintType as CylindricalConstraintType1 } from './history';
|
|
11
|
+
export declare type ApiHistory = ApiHistory1;
|
|
12
|
+
export declare type ConstraintType = ConstraintType1;
|
|
13
|
+
export declare type Transform = Transform1;
|
|
14
|
+
export declare type DimensionType = DimensionType1;
|
|
15
|
+
export declare type FastenedOriginConstraintType = FastenedOriginConstraintType1;
|
|
16
|
+
export declare type FastenedConstraintType = FastenedConstraintType1;
|
|
17
|
+
export declare type RevoluteConstraintType = RevoluteConstraintType1;
|
|
18
|
+
export declare type SliderConstraintType = SliderConstraintType1;
|
|
19
|
+
export declare type PlanarConstraintType = PlanarConstraintType1;
|
|
20
|
+
export declare type ParallelConstraintType = ParallelConstraintType1;
|
|
21
|
+
export declare type CylindricalConstraintType = CylindricalConstraintType1;
|
|
22
|
+
import { ApiNoHistory as ApiNoHistory1, FilletPoint as FilletPoint1, Polyline as Polyline1 } from './solid';
|
|
23
|
+
export declare type ApiNoHistory = ApiNoHistory1;
|
|
24
|
+
export declare type Polyline = Polyline1;
|
|
25
|
+
export declare type FilletPoint = FilletPoint1;
|
|
@@ -96,12 +96,22 @@ export declare type ApiNoHistory = {
|
|
|
96
96
|
*/
|
|
97
97
|
createBufferGeometry: (solidId: VID) => Promise<BufferGeometry | undefined>;
|
|
98
98
|
/**
|
|
99
|
-
* Creates ThreeJS scene from
|
|
100
|
-
* @param
|
|
99
|
+
* Creates ThreeJS scene from the given solids.
|
|
100
|
+
* @param solids ids of the solids to create scene from
|
|
101
|
+
* @param options optional object to define different settings.
|
|
102
|
+
* @param meshPerGeometry boolean flag to define if the solids will have a mesh for each geometry element
|
|
103
|
+
* or if the geometries will be combined to one mesh
|
|
101
104
|
* @example // tbd
|
|
102
105
|
* @image // tbd
|
|
103
106
|
*/
|
|
104
|
-
createScene: (
|
|
107
|
+
createScene: (solids: VID[], options?: {
|
|
108
|
+
meshPerGeometry?: boolean;
|
|
109
|
+
}) => Promise<{
|
|
110
|
+
scene: Scene;
|
|
111
|
+
part: THREE.Group;
|
|
112
|
+
solids: THREE.Group[];
|
|
113
|
+
meshes: THREE.Mesh[];
|
|
114
|
+
}>;
|
|
105
115
|
/**
|
|
106
116
|
* Creates a simple cylinder.
|
|
107
117
|
* @param height height of the cylinder (z-axis)
|
|
File without changes
|
package/package.json
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@buerli.io/headless",
|
|
3
|
-
"version": "0.5.0-beta.
|
|
3
|
+
"version": "0.5.0-beta.3",
|
|
4
4
|
"description": "A non-manifold CAD workflow for the web",
|
|
5
5
|
"author": "AWV Informatik AG <info@awv-informatik.ch>",
|
|
6
6
|
"license": "ISC",
|
|
7
7
|
"repository": {},
|
|
8
|
-
"main": "build/index.js",
|
|
9
|
-
"module": "build/index.js",
|
|
10
|
-
"types": "build/index.d.ts",
|
|
8
|
+
"main": "build/cjs/index.js",
|
|
9
|
+
"module": "build/esm/index.js",
|
|
10
|
+
"types": "build/types/index.d.ts",
|
|
11
11
|
"sideEffects": false,
|
|
12
12
|
"scripts": {
|
|
13
13
|
"ver": "npm version",
|
|
14
|
-
"prepack": "npm run clean && npm run build",
|
|
15
|
-
"clean": "rimraf ./build && rimraf
|
|
14
|
+
"prepack": "npm run clean && npm run build -- --sourceMap false && npm run build:cjs -- --sourceMap false",
|
|
15
|
+
"clean": "rimraf ./build* && rimraf tsconfig.tsbuildinfo",
|
|
16
16
|
"build": "tsc -v && tsc",
|
|
17
|
-
"build:
|
|
17
|
+
"build:cjs": "tsc --target es2017 --module commonjs --composite false --declaration false --declarationDir null --outDir ./build/cjs",
|
|
18
18
|
"test": "echo no tests yet",
|
|
19
19
|
"lint": "eslint \"./src/**/*.ts?(x)\"",
|
|
20
20
|
"prettify": "prettier --write \"./{src,tests}/**/*.{js,jsx,ts,tsx,json}\""
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"three": ">=0.138"
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"@buerli.io/classcad": "0.5.0-beta.
|
|
33
|
+
"@buerli.io/classcad": "0.5.0-beta.3",
|
|
34
34
|
"flat-promise": "^1.0.3"
|
|
35
35
|
}
|
|
36
36
|
}
|
package/build/index.d.ts
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import history from './history';
|
|
2
|
-
import solid, { createPolyline } from './solid';
|
|
3
|
-
export { solid, history, createPolyline };
|
|
4
|
-
/**
|
|
5
|
-
* Because babel typescript tools can not handle the type definitions
|
|
6
|
-
* in an other way, they have to be re-exported as you can see in this code region.
|
|
7
|
-
*
|
|
8
|
-
* Please have a look at https://github.com/awv-informatik/buerli/pull/129 for more information.
|
|
9
|
-
*/
|
|
10
|
-
import { ApiHistory as ApiHistory1, ConstraintType as ConstraintType1, Transform as Transform1, DimensionType as DimensionType1 } from './history';
|
|
11
|
-
export declare type ApiHistory = ApiHistory1;
|
|
12
|
-
export declare type ConstraintType = ConstraintType1;
|
|
13
|
-
export declare type Transform = Transform1;
|
|
14
|
-
export declare type DimensionType = DimensionType1;
|
|
15
|
-
import { ApiNoHistory as ApiNoHistory1, FilletPoint as FilletPoint1, Polyline as Polyline1 } from './solid';
|
|
16
|
-
export declare type ApiNoHistory = ApiNoHistory1;
|
|
17
|
-
export declare type Polyline = Polyline1;
|
|
18
|
-
export declare type FilletPoint = FilletPoint1;
|