import { SvelteComponent } from 'svelte' export type FpsGraphChangeEvent = CustomEvent import type { FpsGraphBladeApi as FpsGraphRef } from '@kitschpatrol/tweakpane-plugin-essentials' import type { FpsGraphBladeParams as FpsGraphOptions } from '@kitschpatrol/tweakpane-plugin-essentials/dist/types/fps-graph/plugin.js' declare const __propDef: { props: { /** * Function to start a single frame measurement sample. * * If undefined, a `requestAnimationFrame` is used to indicate the overall * performance of the page. * * @default `undefined` */ begin?: () => void /** * Function to end a single frame measurement sample. * * If undefined, a `requestAnimationFrame` is used to indicate the overall * performance of the page. * * @default `undefined` */ end?: () => void } & (Omit< { /** * Blade configuration exposing Tweakpane's internal * [`BladeParams`](https://tweakpane.github.io/docs/api/interfaces/BaseBladeParams.html). */ options: FpsGraphOptions /** * Prevent interactivity and gray out the control. * * @default `false` */ disabled?: boolean /** * Custom color scheme. * * If undefined, inherits default Tweakpane theme equivalent to * `ThemeUtils.presets.standard`, or the theme set with * `setGlobalDefaultTheme()`. * * @default `undefined` */ theme?: import('..').Theme | undefined /** * Reference to internal Tweakpane * [`BladeApi`](https://tweakpane.github.io/docs/api/classes/BladeApi.html) * for this blade. * * This property is exposed for advanced use cases only, such as when * implementing convenience components wrapping ``'s functionality. * * Direct manipulation of Tweakpane's internals can break _Svelte Tweakpane * UI_ abstractions. * * @bindable * @readonly */ ref?: FpsGraphRef | undefined /** * Imported Tweakpane `TpPluginBundle` (aliased as `Plugin`) module to * automatically register in the ``'s containing ``. * * This property is exposed for advanced use cases only, such as when * implementing convenience components wrapping ``'s functionality in * combination with a Tweakpane plugin. * * Direct manipulation of Tweakpane's internals can break _Svelte Tweakpane * UI_ abstractions. * * @default `undefined` */ plugin?: import('../utils.js').Plugin | undefined }, 'ref' | 'options' | 'plugin' > & { /** * Lower bound of the FPS graph. * * @default `0` */ min?: number /** * Upper bound of the FPS graph. * * @default `90` */ max?: number /** * Function to start a single frame measurement sample. * * If undefined, a `requestAnimationFrame` is used to indicate the overall * performance of the page. * * @default `undefined` */ begin?: () => void /** * Function to end a single frame measurement sample. * * If undefined, a `requestAnimationFrame` is used to indicate the overall * performance of the page. * * @default `undefined` */ end?: () => void /** * Time in milliseconds between updates to the graph. * * @default `1000` */ interval?: number /** * Text displayed next to the FPS graph. * * @default `undefined` */ label?: string /** * Height of the FPS graph, in rows. * * @default `2` */ rows?: number }) slots: {} events: { /** * Fires when the FPS value changes, passing the latest FPS measurement. * * Note that the values described in the `FpsGraphChangeEvent` type are * available on the `event.detail` parameter. * * @event */ change: FpsGraphChangeEvent } } export type FpsGraphProps = typeof __propDef.props export type FpsGraphEvents = typeof __propDef.events export type FpsGraphSlots = typeof __propDef.slots /** * A control for monitoring and graphing frame rates over time. * * Integrates the [FPS Graph](https://github.com/tweakpane/plugin-essentials#fps-graph) control from * Tweakpane-creator [Hiroki Kokubun's](https://cocopon.me) [Essentials * plugin](https://github.com/tweakpane/plugin-essentials). * * By default, the component creates an internal `requestAnimationFrame` loop to measure the overall * performance of the page. If you want to measure the performance of a specific block of code, you can * bind the `begin` and `end` props for access to functions to fence the code of interest. (The default * internal loop will be cleaned up automatically on the bound functions first use.) * * See the `` component for a more advanced measurement and visualization strategies. * * If you'd like to observe or visualize the frame rate data elsewhere, a `change` event is provided to * notify when the FPS value changes. * * Usage outside of a `` component will implicitly wrap the FPS graph in ``. * * Note that _Svelte Tweakpane UI_ embeds a functionally identical [fork](https://github.com/kitschpatrol/tweakpane-plugin-essentials) of the plugin with build optimizations. The fork also changes the package name from `@tweakpane/plugin-essentials` to `@kitschpatrol/tweakpane-plugin-essentials` for consistency with other plugins. * * @emits {number} change - When the FPS value changes. * * @example * ```svelte * * * * * v.toFixed(0)} * label="Boxes (Monitor)" * /> * * * * *
* {#each Array.from({ length: gridSize }, (_, index) => index) as x} * {#each Array.from({ length: gridSize }, (_, index) => index) as y} *
* {/each} * {/each} *
* * * ``` * * @sourceLink * [FpsGraph.svelte](https://github.com/kitschpatrol/svelte-tweakpane-ui/blob/main/src/lib/monitor/FpsGraph.svelte) */ export default class FpsGraph extends SvelteComponent< FpsGraphProps, FpsGraphEvents, FpsGraphSlots > { get begin(): (() => void) & (() => void) get end(): (() => void) & (() => void) } export {}