@buerli.io/react-cad 0.7.1-beta.1 → 0.8.0
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/components/UI/CAD/Solids/useMenuItems.d.ts +2 -1
- package/build/components/UI/CAD/hooks/index.d.ts +1 -0
- package/build/components/UI/CAD/hooks/useIsSketchActive.d.ts +2 -0
- package/build/components/graphics/GeometryOverrides/GeometryOverridesManager.d.ts +5 -0
- package/build/components/graphics/GeometryOverrides/GeometryOverridesStore.d.ts +18 -0
- package/build/components/graphics/GeometryOverrides/index.d.ts +2 -0
- package/build/components/graphics/GeometryOverrides/useOverrideGeometryColor.d.ts +3 -0
- package/build/components/graphics/Outlines/AAPass.d.ts +8 -0
- package/build/components/graphics/Outlines/IDPass.d.ts +1 -0
- package/build/components/graphics/Outlines/Outline.d.ts +3 -8
- package/build/components/graphics/Outlines/OutlineEffect.d.ts +16 -14
- package/build/components/graphics/Outlines/OutlineMaterial.d.ts +2 -0
- package/build/components/graphics/Outlines/WidenPass.d.ts +17 -0
- package/build/components/graphics/PluginGeometryBounds.d.ts +8 -0
- package/build/components/graphics/SelectedMateObj.d.ts +1 -1
- package/build/components/graphics/WorkAxisObj.d.ts +1 -1
- package/build/components/graphics/WorkCSysObj.d.ts +11 -0
- package/build/components/graphics/WorkCoordSystemObj.d.ts +2 -1
- package/build/components/graphics/WorkPlaneObj.d.ts +2 -1
- package/build/components/graphics/WorkPointObj.d.ts +1 -1
- package/build/components/graphics/graphics.d.ts +6 -6
- package/build/index.cjs.js +2897 -1739
- package/build/index.d.ts +8 -2
- package/build/index.js +2856 -1707
- package/build/plugins/EntityDeletion/Root.d.ts +6 -0
- package/build/plugins/EntityDeletion/index.d.ts +4 -0
- package/build/plugins/Sketch/View/graphics/Merged/ArcGeometry.d.ts +1 -1
- package/build/plugins/Sketch/View/graphics/hooks.d.ts +7 -2
- package/build/plugins/WorkCSys/Root.d.ts +6 -0
- package/build/plugins/WorkCSys/View.d.ts +6 -0
- package/build/plugins/WorkCSys/index.d.ts +14 -0
- package/package.json +12 -12
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import 'antd/dist/antd.css';
|
|
3
|
+
import { DrawingID, ObjectID } from '@buerli.io/core';
|
|
3
4
|
import { MenuItems } from '../common/Menu';
|
|
4
|
-
export declare function useMenuItems(setEditName: React.Dispatch<React.SetStateAction<boolean>>): MenuItems;
|
|
5
|
+
export declare function useMenuItems(drawingId: DrawingID, solidId: ObjectID, setEditName: React.Dispatch<React.SetStateAction<boolean>>): MenuItems;
|
|
@@ -3,6 +3,7 @@ export { useCurrentProduct } from './useCurrentProduct';
|
|
|
3
3
|
export { EditMode, useEditMode } from './useEditMode';
|
|
4
4
|
export { useHasPending } from './useHasPending';
|
|
5
5
|
export { useIsLoading } from './useIsLoading';
|
|
6
|
+
export { useIsSketchActive } from './useIsSketchActive';
|
|
6
7
|
export { useMenuItems } from './useMenuItems';
|
|
7
8
|
export { useObjectDetails } from './useObjectDetails';
|
|
8
9
|
export { useOperationSequence } from './useOperationSequence';
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { ObjectID } from '@buerli.io/core';
|
|
2
|
+
export declare type OverrideValues = {
|
|
3
|
+
meshColor?: THREE.Color;
|
|
4
|
+
meshOpacity?: number;
|
|
5
|
+
lineColor?: THREE.Color;
|
|
6
|
+
lineOpacity?: number;
|
|
7
|
+
};
|
|
8
|
+
export declare type Override = {
|
|
9
|
+
priority: number;
|
|
10
|
+
values: OverrideValues;
|
|
11
|
+
solidIds?: ObjectID[];
|
|
12
|
+
};
|
|
13
|
+
export declare type GeometryOverridesStateT = {
|
|
14
|
+
overrides: Record<string, Override>;
|
|
15
|
+
addOverride: (name: string, override: Override) => void;
|
|
16
|
+
removeOverride: (name: string) => void;
|
|
17
|
+
};
|
|
18
|
+
export declare const useGeometryOverridesStore: import("zustand").UseBoundStore<import("zustand").StoreApi<GeometryOverridesStateT>>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import * as THREE from 'three';
|
|
2
|
+
import { Pass } from 'postprocessing';
|
|
3
|
+
export declare class AAPass extends Pass {
|
|
4
|
+
material: THREE.RawShaderMaterial;
|
|
5
|
+
constructor();
|
|
6
|
+
setSize(width: number, height: number): void;
|
|
7
|
+
render(renderer: THREE.WebGLRenderer, inputBuffer: THREE.WebGLRenderTarget, outputBuffer: THREE.WebGLRenderTarget): void;
|
|
8
|
+
}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="postprocessing" />
|
|
2
1
|
import React from 'react';
|
|
3
2
|
import { Object3D } from 'three';
|
|
4
3
|
import { OutlineEffect } from './OutlineEffect';
|
|
@@ -9,14 +8,10 @@ export declare type OutlineProps = ConstructorParameters<typeof OutlineEffect>[2
|
|
|
9
8
|
selectionLayer: number;
|
|
10
9
|
}>;
|
|
11
10
|
export declare const Outline: React.ForwardRefExoticComponent<{
|
|
12
|
-
edgeStrength?: number | undefined;
|
|
13
|
-
edgeColor1?: number | undefined;
|
|
14
|
-
edgeColor2?: number | undefined;
|
|
15
|
-
edgeColor3?: number | undefined;
|
|
16
|
-
resolutionScale?: number | undefined;
|
|
17
11
|
width?: number | undefined;
|
|
18
|
-
|
|
19
|
-
|
|
12
|
+
edgeColor1?: [import("three").ColorRepresentation, import("three").ColorRepresentation] | undefined;
|
|
13
|
+
edgeColor2?: [import("three").ColorRepresentation, import("three").ColorRepresentation] | undefined;
|
|
14
|
+
edgeColor3?: [import("three").ColorRepresentation, import("three").ColorRepresentation] | undefined;
|
|
20
15
|
} & Partial<{
|
|
21
16
|
selections1: Object3D[][];
|
|
22
17
|
selections2: Object3D[][];
|
|
@@ -1,33 +1,35 @@
|
|
|
1
1
|
import * as THREE from 'three';
|
|
2
|
-
import { Effect, ClearPass,
|
|
2
|
+
import { Effect, ClearPass, ShaderPass, Selection } from 'postprocessing';
|
|
3
3
|
import { IDPass } from './IDPass';
|
|
4
|
+
import { WidenPass } from './WidenPass';
|
|
5
|
+
import { AAPass } from './AAPass';
|
|
4
6
|
export declare class OutlineEffect extends Effect {
|
|
5
7
|
scene: THREE.Scene;
|
|
6
8
|
camera: THREE.Camera;
|
|
7
9
|
idRT: THREE.WebGLRenderTarget;
|
|
8
10
|
outlineRT: THREE.WebGLRenderTarget;
|
|
11
|
+
aaRT: THREE.WebGLRenderTarget;
|
|
9
12
|
clearPass: ClearPass;
|
|
10
13
|
idPass: IDPass;
|
|
11
14
|
outlinePass: ShaderPass;
|
|
12
|
-
|
|
15
|
+
widenPass: WidenPass;
|
|
16
|
+
aaPass: AAPass;
|
|
13
17
|
selections1: Selection[];
|
|
14
18
|
selections2: Selection[];
|
|
15
19
|
selections3: Selection[];
|
|
16
20
|
time: number;
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
edgeColor1?: number | undefined;
|
|
21
|
-
edgeColor2?: number | undefined;
|
|
22
|
-
edgeColor3?: number | undefined;
|
|
23
|
-
resolutionScale?: number | undefined;
|
|
21
|
+
isColorSwitchNeeded: (selection: Selection, color: THREE.Color, colorS: THREE.Color) => boolean;
|
|
22
|
+
processSelection: (renderer: THREE.WebGLRenderer, selection: Selection, color: THREE.Color, colorS: THREE.Color, id: number) => void;
|
|
23
|
+
constructor(scene: THREE.Scene, camera: THREE.Camera, { width, edgeColor1, edgeColor2, edgeColor3, }?: {
|
|
24
24
|
width?: number | undefined;
|
|
25
|
-
|
|
26
|
-
|
|
25
|
+
edgeColor1?: [THREE.ColorRepresentation, THREE.ColorRepresentation] | undefined;
|
|
26
|
+
edgeColor2?: [THREE.ColorRepresentation, THREE.ColorRepresentation] | undefined;
|
|
27
|
+
edgeColor3?: [THREE.ColorRepresentation, THREE.ColorRepresentation] | undefined;
|
|
27
28
|
});
|
|
28
|
-
set
|
|
29
|
-
set
|
|
30
|
-
set
|
|
29
|
+
set width(value: number);
|
|
30
|
+
set edgeColor1(value: [THREE.ColorRepresentation, THREE.ColorRepresentation]);
|
|
31
|
+
set edgeColor2(value: [THREE.ColorRepresentation, THREE.ColorRepresentation]);
|
|
32
|
+
set edgeColor3(value: [THREE.ColorRepresentation, THREE.ColorRepresentation]);
|
|
31
33
|
set selectionLayer(value: number);
|
|
32
34
|
update(renderer: THREE.WebGLRenderer, inputBuffer: THREE.WebGLRenderTarget, deltaTime: number): void;
|
|
33
35
|
setSize(width: number, height: number): void;
|
|
@@ -2,6 +2,8 @@ import * as THREE from 'three';
|
|
|
2
2
|
export declare class OutlineMaterial extends THREE.ShaderMaterial {
|
|
3
3
|
constructor(texelSize?: THREE.Vector2);
|
|
4
4
|
set inputBuffer(value: THREE.Texture);
|
|
5
|
+
set idColor(value: THREE.Color);
|
|
6
|
+
set isColorSwitchNeeded(value: boolean);
|
|
5
7
|
setTexelSize(x: number, y: number): void;
|
|
6
8
|
setSize(width: number, height: number): void;
|
|
7
9
|
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import * as THREE from 'three';
|
|
2
|
+
import { Pass, CopyMaterial } from 'postprocessing';
|
|
3
|
+
export declare class WidenPass extends Pass {
|
|
4
|
+
material: THREE.RawShaderMaterial;
|
|
5
|
+
copyMaterial: CopyMaterial;
|
|
6
|
+
renderTargetA: THREE.WebGLRenderTarget;
|
|
7
|
+
renderTargetB: THREE.WebGLRenderTarget;
|
|
8
|
+
passes: number;
|
|
9
|
+
pxPass: boolean;
|
|
10
|
+
constructor({ width }: {
|
|
11
|
+
width: number;
|
|
12
|
+
});
|
|
13
|
+
set width(value: number);
|
|
14
|
+
setSize(width: number, height: number): void;
|
|
15
|
+
render(renderer: THREE.WebGLRenderer, inputBuffer: THREE.WebGLRenderTarget, outputBuffer: THREE.WebGLRenderTarget): void;
|
|
16
|
+
initialize(renderer: THREE.WebGLRenderer, alpha: boolean, frameBufferType?: number): void;
|
|
17
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import * as THREE from 'three';
|
|
3
|
+
import { DrawingID, ObjectID } from '@buerli.io/core';
|
|
4
|
+
export declare const WorkCSysObj: React.FC<{
|
|
5
|
+
drawingId: DrawingID;
|
|
6
|
+
objectId: ObjectID;
|
|
7
|
+
color?: THREE.ColorRepresentation;
|
|
8
|
+
opacity?: number;
|
|
9
|
+
userData?: any;
|
|
10
|
+
handlers?: any;
|
|
11
|
+
}>;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import * as THREE from 'three';
|
|
2
3
|
import { DrawingID, ObjectID } from '@buerli.io/core';
|
|
3
4
|
export declare const WorkCoordSystemObj: React.FC<{
|
|
4
5
|
drawingId: DrawingID;
|
|
5
6
|
objectId: ObjectID;
|
|
6
|
-
color?:
|
|
7
|
+
color?: THREE.ColorRepresentation;
|
|
7
8
|
opacity?: number;
|
|
8
9
|
userData?: any;
|
|
9
10
|
handlers?: any;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import * as THREE from 'three';
|
|
2
3
|
import { DrawingID, ObjectID } from '@buerli.io/core';
|
|
3
4
|
export declare const WorkPlaneObj: React.FC<{
|
|
4
5
|
drawingId: DrawingID;
|
|
5
6
|
objectId: ObjectID;
|
|
6
|
-
color?:
|
|
7
|
+
color?: THREE.ColorRepresentation;
|
|
7
8
|
opacity?: number;
|
|
8
9
|
userData?: any;
|
|
9
10
|
handlers?: any;
|
|
@@ -3,7 +3,7 @@ import { DrawingID, ObjectID } from '@buerli.io/core';
|
|
|
3
3
|
export declare const WorkPointObj: React.FC<{
|
|
4
4
|
drawingId: DrawingID;
|
|
5
5
|
objectId: ObjectID;
|
|
6
|
-
color?:
|
|
6
|
+
color?: THREE.ColorRepresentation;
|
|
7
7
|
opacity?: number;
|
|
8
8
|
userData?: any;
|
|
9
9
|
handlers?: any;
|
|
@@ -3,7 +3,7 @@ import * as THREE from 'three';
|
|
|
3
3
|
export declare const Point: React.FC<{
|
|
4
4
|
position: THREE.Vector3;
|
|
5
5
|
radius: number;
|
|
6
|
-
color:
|
|
6
|
+
color: THREE.ColorRepresentation;
|
|
7
7
|
opacity?: number;
|
|
8
8
|
handlers?: any;
|
|
9
9
|
userData?: any;
|
|
@@ -13,7 +13,7 @@ export declare const Arrow: React.FC<{
|
|
|
13
13
|
direction: THREE.Vector3;
|
|
14
14
|
length: number;
|
|
15
15
|
width: number;
|
|
16
|
-
color:
|
|
16
|
+
color: THREE.ColorRepresentation;
|
|
17
17
|
opacity?: number;
|
|
18
18
|
handlers?: any;
|
|
19
19
|
userData?: any;
|
|
@@ -21,7 +21,7 @@ export declare const Arrow: React.FC<{
|
|
|
21
21
|
}>;
|
|
22
22
|
export declare const OriginPoint: React.FC<{
|
|
23
23
|
position?: THREE.Vector3;
|
|
24
|
-
color:
|
|
24
|
+
color: THREE.ColorRepresentation;
|
|
25
25
|
opacity?: number;
|
|
26
26
|
handlers?: any;
|
|
27
27
|
userData?: any;
|
|
@@ -31,7 +31,7 @@ export declare const AxisArrow: React.FC<{
|
|
|
31
31
|
direction: THREE.Vector3;
|
|
32
32
|
length?: number;
|
|
33
33
|
width?: number;
|
|
34
|
-
color:
|
|
34
|
+
color: THREE.ColorRepresentation;
|
|
35
35
|
opacity?: number;
|
|
36
36
|
handlers?: any;
|
|
37
37
|
userData?: any;
|
|
@@ -41,14 +41,14 @@ export declare const Csys: React.FC<{
|
|
|
41
41
|
matrix: THREE.Matrix4;
|
|
42
42
|
opacity: number;
|
|
43
43
|
handlers?: any;
|
|
44
|
-
color?:
|
|
44
|
+
color?: THREE.ColorRepresentation;
|
|
45
45
|
userData?: any;
|
|
46
46
|
}>;
|
|
47
47
|
export declare const SelectedCsys: React.FC<{
|
|
48
48
|
matrix: THREE.Matrix4;
|
|
49
49
|
opacity?: number;
|
|
50
50
|
handlers?: any;
|
|
51
|
-
color?:
|
|
51
|
+
color?: THREE.ColorRepresentation;
|
|
52
52
|
userData?: any;
|
|
53
53
|
}>;
|
|
54
54
|
export declare const Caption: React.FC<{
|