Skip to content

Commit

Permalink
Fixed #67 : Add quick capture mecanism
Browse files Browse the repository at this point in the history
  • Loading branch information
sebavan committed Oct 10, 2017
1 parent a0af75e commit a5ff6fa
Show file tree
Hide file tree
Showing 21 changed files with 308 additions and 160 deletions.
2 changes: 1 addition & 1 deletion dist/spector.bundle.js

Large diffs are not rendered by default.

24 changes: 13 additions & 11 deletions dist/spector.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -996,7 +996,7 @@ declare namespace SPECTOR {
onMaxCommand: IEvent<IContextSpy>;
spy(): void;
unSpy(): void;
startCapture(maxCommands?: number): void;
startCapture(maxCommands?: number, quickCapture?: boolean): void;
stopCapture(): ICapture;
setMarker(marker: string): void;
clearMarker(): void;
Expand Down Expand Up @@ -1040,7 +1040,7 @@ declare namespace SPECTOR.Spies {
constructor(options: IContextSpyOptions, time: ITime, logger: ILogger);
spy(): void;
unSpy(): void;
startCapture(maxCommands?: number): void;
startCapture(maxCommands?: number, quickCapture?: boolean): void;
stopCapture(): ICapture;
isCapturing(): boolean;
setMarker(marker: string): void;
Expand Down Expand Up @@ -1407,7 +1407,7 @@ declare namespace SPECTOR.Spies {
declare namespace SPECTOR {
interface IStateSpy {
readonly contextInformation: IContextInformation;
startCapture(currentCapture: ICapture): void;
startCapture(currentCapture: ICapture, quickCapture: boolean): void;
stopCapture(currentCapture: ICapture): void;
captureState(commandCapture: ICommandCapture): void;
}
Expand All @@ -1428,7 +1428,7 @@ declare namespace SPECTOR.Spies {
private readonly stateTrackers;
private readonly onCommandCapturedCallbacks;
constructor(options: IStateSpyOptions, logger: ILogger);
startCapture(currentCapture: ICapture): void;
startCapture(currentCapture: ICapture, quickCapture: boolean): void;
stopCapture(currentCapture: ICapture): void;
captureState(commandCapture: ICommandCapture): void;
private initAvailableStateTrackers();
Expand Down Expand Up @@ -1471,7 +1471,7 @@ declare namespace SPECTOR {
readonly stateName: string;
readonly requireStartAndStopStates: boolean;
registerCallbacks(callbacks: CommandCapturedCallbacks): void;
startCapture(): State;
startCapture(loadFromContext: boolean, quickCapture: boolean): State;
stopCapture(): State;
getStateData(): StateData;
}
Expand All @@ -1494,14 +1494,15 @@ declare namespace SPECTOR.States {
protected readonly toggleCapture: (capture: boolean) => void;
protected previousState: State;
protected currentState: State;
protected quickCapture: boolean;
private readonly changeCommandsByState;
private readonly consumeCommands;
private readonly commandNameToStates;
private readonly requireInitAndEndState;
private capturedCommandsByState;
constructor(options: IStateOptions, logger: ILogger);
readonly requireStartAndStopStates: boolean;
startCapture(loadFromContext?: boolean): State;
startCapture(loadFromContext: boolean, quickCapture: boolean): State;
stopCapture(): State;
registerCallbacks(callbacks: CommandCapturedCallbacks): void;
getStateData(): StateData;
Expand Down Expand Up @@ -2481,6 +2482,7 @@ declare namespace SPECTOR {
private canvasSpy;
private captureNextFrames;
private captureNextCommands;
private quickCapture;
private capturingContext;
private captureMenu;
private resultView;
Expand All @@ -2499,11 +2501,11 @@ declare namespace SPECTOR {
spyCanvases(): void;
spyCanvas(canvas: HTMLCanvasElement): void;
getAvailableContexts(): IAvailableContext[];
captureCanvas(canvas: HTMLCanvasElement, commandCount?: number): void;
captureContext(context: WebGLRenderingContexts, commandCount?: number): void;
captureContextSpy(contextSpy: IContextSpy, commandCount?: number): void;
captureNextFrame(obj: HTMLCanvasElement | WebGLRenderingContexts): void;
startCapture(obj: HTMLCanvasElement | WebGLRenderingContexts, commandCount: number): void;
captureCanvas(canvas: HTMLCanvasElement, commandCount?: number, quickCapture?: boolean): void;
captureContext(context: WebGLRenderingContexts, commandCount?: number, quickCapture?: boolean): void;
captureContextSpy(contextSpy: IContextSpy, commandCount?: number, quickCapture?: boolean): void;
captureNextFrame(obj: HTMLCanvasElement | WebGLRenderingContexts, quickCapture?: boolean): void;
startCapture(obj: HTMLCanvasElement | WebGLRenderingContexts, commandCount: number, quickCapture?: boolean): void;
stopCapture(): ICapture;
setMarker(marker: string): void;
clearMarker(): void;
Expand Down
Loading

0 comments on commit a5ff6fa

Please sign in to comment.