@duet3d/gcodeviewer 3.7.0-alpha.5 → 3.7.0-alpha.7
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/dist/GCodeLines/move.d.ts +1 -1
- package/dist/Renderables/bed.d.ts +3 -0
- package/dist/Renderables/ruler.d.ts +21 -0
- package/dist/Renderables/viewbox.d.ts +5 -0
- package/dist/Renderables/workplace.d.ts +16 -0
- package/dist/index.cjs.js +90 -5
- package/dist/index.es.js +90 -5
- package/dist/lineshader.d.ts +6 -2
- package/dist/processor.d.ts +28 -0
- package/dist/processorproperties.d.ts +3 -0
- package/dist/viewer-proxy.d.ts +14 -2
- package/dist/viewer.d.ts +28 -2
- package/dist/wasmprocessor.d.ts +3 -1
- package/package.json +5 -3
|
@@ -29,5 +29,5 @@ export default class Move extends Base {
|
|
|
29
29
|
static add(a: number[], b: number[]): number[];
|
|
30
30
|
static subtract(a: number[], b: number[]): number[];
|
|
31
31
|
static divide(a: number[], b: number[]): number[];
|
|
32
|
-
renderLine(nozzleSize?: number, padding?: number): MoveData;
|
|
32
|
+
renderLine(nozzleSize?: number, padding?: number, layerHeight?: number): MoveData;
|
|
33
33
|
}
|
|
@@ -24,6 +24,7 @@ export default class Bed {
|
|
|
24
24
|
private scene;
|
|
25
25
|
private bedMesh;
|
|
26
26
|
private bedLineColor;
|
|
27
|
+
private gridMajorSpacing;
|
|
27
28
|
private planeMaterial;
|
|
28
29
|
private boxMaterial;
|
|
29
30
|
private highlightLayer;
|
|
@@ -45,8 +46,10 @@ export default class Bed {
|
|
|
45
46
|
buildBox(): void;
|
|
46
47
|
setVisibility(visibility: boolean): void;
|
|
47
48
|
commitBedSize(): void;
|
|
49
|
+
private rebuildGridMaterial;
|
|
48
50
|
buildGridMaterial(): GridMaterial;
|
|
49
51
|
getBedColor(): string;
|
|
52
|
+
setGridMajorSpacing(spacing: number | null): void;
|
|
50
53
|
setBedColor(color: string): void;
|
|
51
54
|
getBedColor4(): Color4;
|
|
52
55
|
dispose(): void;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { Scene } from '@babylonjs/core/scene';
|
|
2
|
+
import { Mesh } from '@babylonjs/core/Meshes/mesh';
|
|
3
|
+
import { BuildVolume } from './bed';
|
|
4
|
+
export default class Ruler {
|
|
5
|
+
private scene;
|
|
6
|
+
private labels;
|
|
7
|
+
private volume;
|
|
8
|
+
visible: boolean;
|
|
9
|
+
color: string;
|
|
10
|
+
interval: number | null;
|
|
11
|
+
tickInterval: number;
|
|
12
|
+
registerClipIgnore: (mesh: Mesh) => void;
|
|
13
|
+
constructor(scene: Scene);
|
|
14
|
+
private static niceInterval;
|
|
15
|
+
private formatTick;
|
|
16
|
+
private addLabel;
|
|
17
|
+
build(volume: BuildVolume): void;
|
|
18
|
+
show(visible: boolean): void;
|
|
19
|
+
setInterval(interval: number | null): void;
|
|
20
|
+
dispose(): void;
|
|
21
|
+
}
|
|
@@ -11,10 +11,15 @@ export default class ViewBox {
|
|
|
11
11
|
private camera;
|
|
12
12
|
private mainCamera;
|
|
13
13
|
private edgeMaterial;
|
|
14
|
+
private highlightLayer;
|
|
15
|
+
private hoveredMesh;
|
|
14
16
|
visible: boolean;
|
|
15
17
|
onDirectionSelected: ((direction: ViewBoxDirection) => void) | null;
|
|
16
18
|
constructor(engine: Engine, mainCamera: ArcRotateCamera);
|
|
19
|
+
private pickMesh;
|
|
17
20
|
pick(x: number, y: number): ViewBoxDirection | null;
|
|
21
|
+
updateHover(x: number, y: number): void;
|
|
22
|
+
clearHover(): void;
|
|
18
23
|
private buildPlane;
|
|
19
24
|
private buildCorner;
|
|
20
25
|
private buildEdge;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Scene } from '@babylonjs/core/scene';
|
|
2
|
+
import { Mesh } from '@babylonjs/core/Meshes/mesh';
|
|
3
|
+
import { Vector3 } from '@babylonjs/core/Maths/math.vector';
|
|
4
|
+
export default class Workplace {
|
|
5
|
+
visible: boolean;
|
|
6
|
+
size: number;
|
|
7
|
+
registerClipIgnore: (mesh: Mesh) => void;
|
|
8
|
+
private scene;
|
|
9
|
+
private markers;
|
|
10
|
+
private offsets;
|
|
11
|
+
constructor(scene: Scene);
|
|
12
|
+
show(visible: boolean): void;
|
|
13
|
+
render(offsets: Vector3[]): void;
|
|
14
|
+
refresh(): void;
|
|
15
|
+
dispose(): void;
|
|
16
|
+
}
|