@snap/camera-kit
Version:
Camera Kit Web
34 lines • 1.4 kB
TypeScript
/** @category Bootstrapping and Configuration */
export type LensPerformanceCluster = 0 | 1 | 2 | 3 | 4 | 5 | 6;
/** @internal */
export type BenchmarkResult = {
name: string;
value: number;
};
/**
* Some lenses may decide to modify their behavior based on the performance of the current environment. If you are
* using such lenses, providing an estimation of lens performance may lead to better user experience (especially on
* low-performance devices).
*
* The cluster value will be an integer from 1-6 which classifies expected lens performance, where 6 is the highest-
* performing cluster and 1 the lowest.
*
* All the raw benchmark results used to estimate the performance cluster are also included for reporting purposes.
*
* @category Bootstrapping and Configuration
*/
export interface EstimatedLensPerformance {
cluster: LensPerformanceCluster;
benchmarks: BenchmarkResult[];
webglRendererInfo: string;
}
/**
* Run benchmarks which attempt to predict expected lens performance, and assign a cluster (i.e. a performance rating)
* which the CameraKit SDK can use to optimize certain lenses.
*
* @returns A rating from 1-6, indicating expected Lens performance.
*
* @category Bootstrapping and Configuration
*/
export declare function estimateLensPerformance(): Promise<EstimatedLensPerformance>;
//# sourceMappingURL=estimateLensPerformanceCluster.d.ts.map