Skip to content

Commit

Permalink
Add gif recording.
Browse files Browse the repository at this point in the history
  • Loading branch information
derpylz committed Sep 2, 2020
1 parent c4e12af commit a8acb87
Show file tree
Hide file tree
Showing 10 changed files with 691 additions and 241 deletions.
6 changes: 6 additions & 0 deletions babyplots.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ export declare const buttonSVGs: {
labels: string;
publish: string;
replay: string;
record: string;
};
export declare const styleText: string;
export declare function matrixMax(matrix: number[][]): number;
Expand Down Expand Up @@ -81,6 +82,10 @@ export declare class Plots {
private _buttonBar;
private _labelManager;
private _backgroundColor;
private _recording;
private _turned;
private _capturer;
private _wasTurning;
canvas: HTMLCanvasElement;
scene: Scene;
camera: ArcRotateCamera;
Expand All @@ -95,6 +100,7 @@ export declare class Plots {
createButtons(whichBtns?: string[]): void;
private _downloadJson;
private _resetAnimation;
private _startRecording;
private _prepRender;
private _afterRender;
private _cameraFitPlot;
Expand Down
78 changes: 69 additions & 9 deletions babyplots.ts

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions dist/CCapture.all.min.js

Large diffs are not rendered by default.

76 changes: 3 additions & 73 deletions dist/babyplots.js

Large diffs are not rendered by default.

71 changes: 71 additions & 0 deletions dist/babyplots.js.LICENSE.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
/*! *****************************************************************************
Copyright (c) Microsoft Corporation. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
this file except in compliance with the License. You may obtain a copy of the
License at http://www.apache.org/licenses/LICENSE-2.0

THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
MERCHANTABLITY OR NON-INFRINGEMENT.

See the Apache Version 2.0 License for specific language governing permissions
and limitations under the License.
***************************************************************************** */

/**
* chroma.js - JavaScript library for color conversions
*
* Copyright (c) 2011-2019, Gregor Aisch
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
*
* 3. The name Gregor Aisch may not be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL GREGOR AISCH OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
* INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
* OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
* EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* -------------------------------------------------------
*
* chroma.js includes colors from colorbrewer2.org, which are released under
* the following license:
*
* Copyright (c) 2002 Cynthia Brewer, Mark Harrower,
* and The Pennsylvania State University.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
* either express or implied. See the License for the specific
* language governing permissions and limitations under the License.
*
* ------------------------------------------------------
*
* Named colors are taken from X11 Color Names.
* http://www.w3.org/TR/css3-color/#svg-color
*
* @preserve
*/
2 changes: 1 addition & 1 deletion dist/babyplots.js.map

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions dist/gif.worker.js

Large diffs are not rendered by default.

Loading

0 comments on commit a8acb87

Please sign in to comment.