Skip to content

Commit

Permalink
Update dist
Browse files Browse the repository at this point in the history
  • Loading branch information
remcoder committed Nov 21, 2023
1 parent 9448e5b commit f85e6df
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 3 deletions.
1 change: 1 addition & 0 deletions demo/js/demo.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ function initDemo() {
extrusionColor: 'hotpink',
backgroundColor: preferDarkMode.matches ? '#111' : '#eee',
travelColor: new THREE.Color('lime')
// minLayerThreshold: 0.1
}));

// set default colors on inputs
Expand Down
12 changes: 11 additions & 1 deletion dist/gcode-preview.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,17 @@ declare class Parser {
lines: string[];
preamble: Layer;
layers: Layer[];
currentLayer: Layer;
curZ: number;
maxZ: number;
metadata: Metadata;
tolerance: number;
/**
* Create a new Parser instance.
*
* @param minLayerThreshold - If specified, the minimum layer height to be considered a new layer. If not specified, the default value is 0.
* @returns A new Parser instance.
*/
constructor(minLayerThreshold: number);
parseGCode(input: string | string[]): {
layers: Layer[];
metadata: Metadata;
Expand All @@ -50,6 +57,7 @@ declare class Parser {
private isAlpha;
private parseParams;
private groupIntoLayers;
get maxLayer(): Layer;
parseMetadata(metadata: GCodeCommand[]): Metadata;
}
interface Parser {
Expand Down Expand Up @@ -83,12 +91,14 @@ declare type GCodePreviewOptions = {
lastSegmentColor?: ColorRepresentation;
lineWidth?: number;
nonTravelMoves?: string[];
minLayerThreshold?: number;
startLayer?: number;
targetId?: string;
topLayerColor?: ColorRepresentation;
travelColor?: ColorRepresentation;
};
declare class WebGLPreview {
minLayerThreshold: number;
parser: Parser;
targetId: string;
scene: Scene;
Expand Down
2 changes: 1 addition & 1 deletion dist/gcode-preview.es.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/gcode-preview.js

Large diffs are not rendered by default.

0 comments on commit f85e6df

Please sign in to comment.