Skip to content

Commit

Permalink
Version 1.5.0: Add Lines
Browse files Browse the repository at this point in the history
  • Loading branch information
derpylz committed Mar 23, 2022
1 parent 5237a6d commit 1f68bf7
Show file tree
Hide file tree
Showing 22 changed files with 218 additions and 30 deletions.
2 changes: 2 additions & 0 deletions build/babyplots.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,8 @@ export declare const PLOTTYPES: {
surface: string[];
heatMap: string[];
imageStack: string[];
meshObject: string[];
Line: string[];
};
export declare function isValidPlot(plotData: {}): boolean;
export declare class Plots {
Expand Down
34 changes: 32 additions & 2 deletions build/babyplots.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion build/babyplots.js.map

Large diffs are not rendered by default.

16 changes: 16 additions & 0 deletions build/plotTypes/Line.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import { Scene } from "@babylonjs/core/scene";
import { LegendData, CoordinatePlot } from "../babyplots";
import { AnnotationManager } from "../utils/Label";
export declare class Line extends CoordinatePlot {
labels: string[];
labelSize: number;
labelColor: string;
private _hasAnimation;
private _looping;
private _animDirection;
private _animationFrames;
private _animationDelay;
constructor(scene: Scene, coordinates: number[][], colorVar: string[], size: number, legendData: LegendData, hasAnimation?: boolean, animationDelay?: number, animationDuration?: number, xScale?: number, yScale?: number, zScale?: number, name?: string, labels?: string[], labelSize?: number, labelColor?: string, annotationManager?: AnnotationManager);
private _createLine;
private _addLabels;
}
72 changes: 72 additions & 0 deletions build/plotTypes/Line.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions build/plotTypes/Line.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion build/plotTypes/PointCloud.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion build/plotTypes/PointCloud.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions build/utils/Label.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ declare class Label {
size: number;
color: string;
fixed: boolean;
constructor(text: string, position: Vector3, scene: Scene, color?: string);
constructor(text: string, position: Vector3, scene: Scene, color?: string, size?: number);
setText(text: string): void;
update(camera: ArcRotateCamera, scene: Scene): void;
fix(): void;
Expand Down Expand Up @@ -61,7 +61,7 @@ export declare class AnnotationManager {
redrawInfo(): void;
displayInfo(text: string, target: TransformNode): void;
clearInfo(): void;
addLabel(text: string, position?: number[]): number;
addLabel(text: string, position?: number[], color?: string, size?: number): number;
addLabels(labelList: [[number, number, number, string]]): void;
private _editLabelText;
private _removeLabel;
Expand Down
17 changes: 12 additions & 5 deletions build/utils/Label.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 1f68bf7

Please sign in to comment.