Skip to content

Commit

Permalink
Fix for zero scale meshObjects.
Browse files Browse the repository at this point in the history
  • Loading branch information
derpylz committed Jan 11, 2022
1 parent 5883e31 commit 6aa871e
Show file tree
Hide file tree
Showing 12 changed files with 157 additions and 36 deletions.
10 changes: 10 additions & 0 deletions build/babyplots.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,13 @@ export interface LegendData {
legendTitleFontSize?: number;
legendTitleFontColor?: string;
}
export declare class CustomLoadingScreen implements ILoadingScreen {
loadingUIText: string;
loadingUIBackgroundColor: string;
constructor(loadingUIText: string);
displayLoadingUI(): void;
hideLoadingUI(): void;
}
export declare abstract class Plot {
protected _scene: Scene;
allLoaded: boolean;
Expand Down Expand Up @@ -178,6 +185,7 @@ export declare function matrixMax(matrix: number[][]): number;
export declare function matrixMin(matrix: number[][]): number;
export declare function getUniqueVals(source: string[]): string[];
import { TransformNode } from "@babylonjs/core/Meshes/transformNode";
import { ILoadingScreen } from "@babylonjs/core/Loading/loadingScreen";
export declare const PLOTTYPES: {
pointCloud: string[];
shapeCloud: string[];
Expand Down Expand Up @@ -228,6 +236,7 @@ export declare class Plots {
uiLayer: AdvancedDynamicTexture;
animPaused: boolean;
constructor(canvasElement: string, options?: {});
private _updateCameraUpVector;
fromJSON(plotData: {}): void;
createButtons(whichBtns?: string[]): void;
private _prepDownloadObj;
Expand All @@ -250,6 +259,7 @@ export declare class Plots {
dim: number[];
}, options: {}): this;
addPlot(coordinates: number[][], plotType: string, colorBy: string, colorVar: string[] | number[], options?: {}): Plots;
addMeshObject(meshString: string, options: {}): Plots;
addMeshStream(rootUrl: string, filePrefix: string, fileSuffix: string, fileIteratorStart: number, fileIteratorEnd: number, frameDelay: number, options: {}): Plots;
private _updateLegend;
private _drawStandaloneShapeLegend;
Expand Down
97 changes: 74 additions & 23 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.

11 changes: 11 additions & 0 deletions build/plotTypes/MeshObject.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import { Vector3 } from "@babylonjs/core/Maths/math";
import { Scene } from "@babylonjs/core/scene";
import { LegendData, Plot } from "../babyplots";
import "@babylonjs/loaders/glTF";
export declare class MeshObject extends Plot {
worldextends: {
min: Vector3;
max: Vector3;
};
constructor(scene: Scene, meshString: string, legendData: LegendData, xScale?: number, yScale?: number, zScale?: number, scaling?: number[], rotation?: number[], offset?: number[], name?: string);
}
54 changes: 54 additions & 0 deletions build/plotTypes/MeshObject.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/MeshObject.js.map

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

4 changes: 1 addition & 3 deletions build/plotTypes/MeshStream.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { ArcRotateCamera } from "@babylonjs/core/Cameras/arcRotateCamera";
import { AssetContainer } from "@babylonjs/core/assetContainer";
import { Scene } from "@babylonjs/core/scene";
import { LegendData, Plot } from "../babyplots";
Expand All @@ -9,7 +8,6 @@ export declare class MeshStream extends Plot {
private _filenames;
private _prevTime;
private _containers;
private _camera;
private _rotation;
private _offset;
private _clearCoat;
Expand All @@ -21,7 +19,7 @@ export declare class MeshStream extends Plot {
min: Vector3;
max: Vector3;
};
constructor(scene: Scene, camera: ArcRotateCamera, rootUrl: string, filePrefix: string, fileSuffix: string, fileIteratorStart: number, fileIteratorEnd: number, legendData: LegendData, xScale?: number, yScale?: number, zScale?: number, frameDelay?: number, rotation?: number[], offset?: number[], clearCoat?: boolean, clearCoatIntensity?: number, name?: string);
constructor(scene: Scene, rootUrl: string, filePrefix: string, fileSuffix: string, fileIteratorStart: number, fileIteratorEnd: number, legendData: LegendData, xScale?: number, yScale?: number, zScale?: number, frameDelay?: number, rotation?: number[], offset?: number[], clearCoat?: boolean, clearCoatIntensity?: number, name?: string);
_createMeshStream(): Promise<void>;
_loadMesh(filename: string): Promise<AssetContainer>;
goToFrame(n: number): void;
Expand Down
6 changes: 1 addition & 5 deletions build/plotTypes/MeshStream.js

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

Loading

0 comments on commit 6aa871e

Please sign in to comment.