Skip to content

Commit

Permalink
Styling of buttons; clean index; option workerPath
Browse files Browse the repository at this point in the history
  • Loading branch information
derpylz committed May 15, 2022
1 parent 48ab985 commit 653cea7
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 240 deletions.
2 changes: 1 addition & 1 deletion dist/babyplots.js

Large diffs are not rendered by default.

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

Large diffs are not rendered by default.

235 changes: 1 addition & 234 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -31,248 +31,15 @@
touch-action: none;
}
</style>
<script>
var gltfString = `{
"asset" : {
"generator" : "Khronos glTF Blender I/O v1.7.33",
"version" : "2.0"
},
"scene" : 0,
"scenes" : [
{
"name" : "Scene",
"nodes" : [
0
]
}
],
"nodes" : [
{
"mesh" : 0,
"name" : "Cube"
}
],
"materials" : [
{
"doubleSided" : true,
"name" : "Material",
"pbrMetallicRoughness" : {
"baseColorFactor" : [
0.8000000715255737,
0.23381935060024261,
0.09727766364812851,
1
],
"metallicFactor" : 0,
"roughnessFactor" : 0.4000000059604645
}
},
{
"doubleSided" : true,
"name" : "Material.001",
"pbrMetallicRoughness" : {
"baseColorFactor" : [
0.01814323477447033,
0.062369782477617264,
0.8000000715255737,
1
],
"metallicFactor" : 0,
"roughnessFactor" : 0.5
}
}
],
"meshes" : [
{
"name" : "Cube",
"primitives" : [
{
"attributes" : {
"POSITION" : 0,
"NORMAL" : 1,
"TEXCOORD_0" : 2
},
"indices" : 3,
"material" : 0
},
{
"attributes" : {
"POSITION" : 4,
"NORMAL" : 5,
"TEXCOORD_0" : 6
},
"indices" : 7,
"material" : 1
}
]
}
],
"accessors" : [
{
"bufferView" : 0,
"componentType" : 5126,
"count" : 180,
"max" : [
1,
1,
1
],
"min" : [
-1,
-1,
-1
],
"type" : "VEC3"
},
{
"bufferView" : 1,
"componentType" : 5126,
"count" : 180,
"type" : "VEC3"
},
{
"bufferView" : 2,
"componentType" : 5126,
"count" : 180,
"type" : "VEC2"
},
{
"bufferView" : 3,
"componentType" : 5123,
"count" : 270,
"type" : "SCALAR"
},
{
"bufferView" : 4,
"componentType" : 5126,
"count" : 36,
"max" : [
1,
1,
1
],
"min" : [
-1,
0.9015575051307678,
-1
],
"type" : "VEC3"
},
{
"bufferView" : 5,
"componentType" : 5126,
"count" : 36,
"type" : "VEC3"
},
{
"bufferView" : 6,
"componentType" : 5126,
"count" : 36,
"type" : "VEC2"
},
{
"bufferView" : 7,
"componentType" : 5123,
"count" : 54,
"type" : "SCALAR"
}
],
"bufferViews" : [
{
"buffer" : 0,
"byteLength" : 2160,
"byteOffset" : 0
},
{
"buffer" : 0,
"byteLength" : 2160,
"byteOffset" : 2160
},
{
"buffer" : 0,
"byteLength" : 1440,
"byteOffset" : 4320
},
{
"buffer" : 0,
"byteLength" : 540,
"byteOffset" : 5760
},
{
"buffer" : 0,
"byteLength" : 432,
"byteOffset" : 6300
},
{
"buffer" : 0,
"byteLength" : 432,
"byteOffset" : 6732
},
{
"buffer" : 0,
"byteLength" : 288,
"byteOffset" : 7164
},
{
"buffer" : 0,
"byteLength" : 108,
"byteOffset" : 7452
}
],
"buffers" : [
{
"byteLength" : 7560,
"uri" : "data:application/octet-stream;base64,AACAPwAAgD8AAIC/AACAPwAAgD8AAIC/AACAPwAAgD8AAIC/AACAPwAAgD8AAIC/AACAPwAAgL8AAIC/AACAPwAAgL8AAIC/AACAPwAAgL8AAIC/AACAPwAAgL8AAIC/AACAPwAAgL8AAIC/AACAPwAAgL8AAIC/AACAPwAAgD8AAIA/AACAPwAAgD8AAIA/AACAPwAAgD8AAIA/AACAPwAAgD8AAIA/AACAPwAAgL8AAIA/AACAPwAAgL8AAIA/AACAPwAAgL8AAIA/AACAPwAAgL8AAIA/AACAPwAAgL8AAIA/AACAPwAAgL8AAIA/AACAvwAAgD8AAIC/AACAvwAAgD8AAIC/AACAvwAAgD8AAIC/AACAvwAAgD8AAIC/AACAvwAAgL8AAIC/AACAvwAAgL8AAIC/AACAvwAAgL8AAIC/AACAv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AAAAAAAACAAAAAAAAAAAD//38/AAAAAAAAAAAAAIA/AAAAAP//fz8AAACAAACAPwAAAAAAAACAAACAvwAAAAAAAACA//9/vwAAAAAAAACAAAAAAAAAAAD//3+/AAAAAAAAgD8AAACAAACAvwAAAAAAAACA//9/vwAAAAAAAACAAAAAAAAAgL8AAACAAAAAAAAAAAD//3+/AACAvwAAAAAAAACA//9/vwAAAAAAAACAAAAAAAAAgL8AAACAAAAAAAAAAAD//38/AACAvwAAAAAAAACA//9/vwAAAAAAAACAAAAAAAAAAAD//38/AAAAAAAAgD8AAACAAAAAAAAAgL8AAACAAAAAAP//f78AAACAAAAAAAAAAAAAAIA///9/PwAAAAAAAACA//9/vwAAAAAAAACAAAAAAAAAgL8AAACAAAAAAP//f78AAACAAAAAAAAAAAAAAIA///9/vwAAAAAAAACAAAAAAAAAgL8AAACAAAAAAP//f78AAACAAAAAAAAAAAAAAIC/AAAAAAAAgL8AAACAAAAAAP//f78AAACAAAAAAAAAAAAAAIC///9/PwAAAAAAAACAAAAAAAAAAAD//38/AAAAAAAAgD8AAACA//9/PwAAAAAAAACAAACAPwAAAAAAAACAAAAAAAAAgL8AAACAAAAAAAAAAAD//38///9/PwAAAAAAAACAAACAPwAAAAAAAACAAAAAAAAAgL8AAACAAAAAAAAAAAD//3+///9/PwAAAAAAAACAAACAPwAAAAAAAACAAAAAAAAAAAD//3+/AAAAAAAAgD8AAACA//9/PwAAAAAAAACAAACAPwAAAAAAAACAAAAAAAAAAAAAAIC/AAAAAAAAAAD//3+/AAAAAP//fz8AAACAAACAPwAAAAAAAACAAAAAAP//f78AAACAAAAAAAAAAAAAAIC/AAAAAAAAAAD//3+/AACAPwAAAAAAAACAAACAvwAAAAAAAACAAAAAAP//f78AAACAAAAAAAAAAAAAAIC/AAAAAAAAAAD//3+/AACAvwAAAAAAAACAAAAAAAAAAAAAAIC/AAAAAAAAAAD//3+/AAAAAP//fz8AAACAAACAvwAAAAAAAACAAAAAAAAAAAAAAIA/AAAAAP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AAP//fz8AAACAAAAAAAAAgD8AAACA//9/PwAAAAAAAACAAAAAAAAAAAAAAIC/AAAAAP//fz8AAACAAAAAAAAAgD8AAACA//9/PwAAAAAAAACA//9/vwAAAAAAAACAAAAAAAAAAAAAAIC/AAAAAP//fz8AAACAAAAAAAAAgD8AAACA//9/vwAAAAAAAACAAAAAAAAAAAAAAIA/AAAAAAAAgD8AAACAAAAAAAAAAAAAAIA/AAAAAAAAgD8AAACA//9/PwAAAAAAAACAAAAAAAAAAAAAAIC/AAAAAAAAgD8AAACA//9/PwAAAAAAAACA//9/vwAAAAAAAACAAAAAAAAAAAAAAIC/AAAAAAAAgD8AAACAAAAgPwAAAD8AACA/AAAAPwAAID8AAIA+AAAgPwAAgD4AAGA/AAAAPwAAYD8AAAA/AABgPwAAgD4AAGA/AACAPhJ/JT/eAfU+En8lP94B9T4SfyU/3gH1PhJ/JT/eAfU+8IBaP94B9T7wgFo/3gH1PvCAWj/eAfU+8IBaP94B9T7ugFo/Iv6KPu6AWj8i/oo+7oBaPyL+ij7ugFo/Iv6KPhF/JT8i/oo+EX8lPyL+ij4RfyU/Iv6KPhF/JT8i/oo+En8lP94B9T4SfyU/3gH1PhJ/JT/eAfU+8IBaP94B9T7wgFo/3gH1PvCAWj/eAfU+7oBaPyL+ij7ugFo/Iv6KPu6AWj8i/oo+EX8lPyL+ij4RfyU/Iv6KPhF/JT8i/oo+CQAMABsACQAbABkAAAAEAA0AAAANAAoABQAHABIABQASAA4ABgACABYABgAWABEAAwABAAsAAwALABcAGgAcAB8AGgAfACMAFAAIABgAFAAYACEADwATACAADwAgAB0AEAAVACIAEAAiAB4A"
}
]
}
`
</script>
</head>

<body>
<canvas id="renderCanvas"></canvas>
<script>

var vis = new Baby.Plots("renderCanvas", {});
// vis.addMeshObject(gltfString, {});
// vis.turntable = true;
// vis.addMeshStream(
// "https://cdn.glitch.com/",
// "b12df82c-ed15-473a-b9aa-f1ccd97600ac%2FEat_",
// ".glb?v=1610559236379",
// 2,
// 101,
// 100,
// {
// meshRotation: [Math.PI /2, 0, 0],
// meshOffset: [-300, 0, -300],
// clearCoat: true,
// clearCoatIntensity: 0.5,
// }
// );
// vis.camera.radius = 800;
// vis.camera.alpha = 0;
// vis.camera.beta = 1;
// vis.addPlot([
// [6.671802, -4.664322, 4.977584],
// [6.397511, -5.695337, 5.750157],
// [6.834549, -4.452236, 5.134693],
// [5.876275, -6.303131, 4.273763],
// [5.795466, -6.470013, 4.276352]
// ], "line", "values", [
// 0.285020,
// 0.317455,
// 0.417574,
// 0.602124,
// 1
// ], {
// labels: ["cannon", "man", "rifle", "shoot", "shot"],
// labelColor: "match",
// labelSize: 50,
// hasAnimation: true
// })
vis.fromJSON(semantleExampleData);
vis.turntable = true;
vis.doRender();
vis.createButtons(["turntable", "json", "label"]);
window.onresize = function () {
Expand Down
1 change: 1 addition & 0 deletions src/babyplots.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,7 @@ export declare class Plots {
shapeLegendTitle: string;
uiLayer: AdvancedDynamicTexture;
animPaused: boolean;
workerPath: string;
constructor(canvasElement: string, options?: {});
private _updateCameraUpVector;
fromJSON(plotData: {}): void;
Expand Down
6 changes: 5 additions & 1 deletion src/babyplots.ts
Original file line number Diff line number Diff line change
Expand Up @@ -286,6 +286,8 @@ export class Plots {
uiLayer: AdvancedDynamicTexture;
/** Play or pause state of all animations */
animPaused: boolean = false;
/** Path to the directory containing the CCapture worker script */
workerPath: string;


/**
Expand All @@ -309,12 +311,14 @@ export class Plots {
rotationRate: 0.01,
shapeLegendTitle: "",
upAxis: "+y",
workerPath: "./",
}
Object.assign(opts, options);

this.turntable = opts.turntable;
this.rotationRate = opts.rotationRate;
this.shapeLegendTitle = opts.shapeLegendTitle;
this.workerPath = opts.workerPath;

// setup enginge and scene
this._backgroundColor = opts.backgroundColor;
Expand Down Expand Up @@ -998,7 +1002,7 @@ export class Plots {
if (this._recording) {
// start recording:
if (this._turned === 0) {
let worker = "./";
let worker = this.workerPath;
if (this.R) {
worker = "lib/babyplots-1/";
}
Expand Down
6 changes: 3 additions & 3 deletions src/utils/styleText.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@ export const styleText = [
".bbp.button-bar>.button.hidden { display: none; }",
".bbp.button-bar>.anim-slider { display: block; float: right; width: 150px; height: 30px }",
".bbp.button-bar>.anim-slider.hidden { display: none; }",
".bbp.button-bar>.button { float: right; width: 75px; height: 30px; cursor: pointer; border-radius: 2px; background-color: #f0f0f0; margin: 0 4px 0 0; }",
".bbp.button-bar>.button { float: right; width: 75px; height: 30px; cursor: pointer; border-radius: 2px; background-color: #f0f0f0; margin: 0 4px 0 0; transition: all 0.2s ease-in-out;}",
".bbp.button-bar>.button:hover { background-color: #ddd; }",
".bbp.button-bar>.button>svg { width: 75px; height: 30px; }",
".bbp.button-bar>.button.active { background-color: #afafaf; }",
".bbp.button-bar>.button.active:hover { background-color: #9f9f9f; }",
".bbp.button-bar>.button.active { background-color: #e95420; }",
".bbp.button-bar>.button.active:hover { background-color: #b52f00; }",
".bbp.button-bar>.button.streamctrl.loading { cursor: progress; }",
".bbp.button-bar>.button.streamctrl.loading:hover { background-color: #f0f0f0; }",
".bbp.button-bar>.button.streamctrl.loading>.btn-label.play,.bbp.button-bar>.button.streamctrl.loading>.btn-label.pause {display: none; }",
Expand Down

0 comments on commit 653cea7

Please sign in to comment.