Skip to content

charton API


charton API / @chart-on/core / index / FrameObserver

Interface: FrameObserver ​

Defined in: packages/core/src/plugins.ts:69

Watches the chart's frame loop (PluginContext.onFrame). Every member is optional and called synchronously, so keep them cheap: request runs on every redraw request, the others on every drawn frame.

Methods ​

end()? ​

optional end(kind): void

Defined in: packages/core/src/plugins.ts:77

The frame is drawn; kind says which layers it redrew, as RenderStats.kind.

Parameters ​

kind ​

"overlay" | "scene" | "cursor"

Returns ​

void


lap()? ​

optional lap(phase): void

Defined in: packages/core/src/plugins.ts:75

The frame finished phase, or work between phases when null.

Parameters ​

phase ​

FramePhase | null

Returns ​

void


request()? ​

optional request(reason): void

Defined in: packages/core/src/plugins.ts:71

Something asked for a frame; reason says what.

Parameters ​

reason ​

RedrawReason

Returns ​

void


start()? ​

optional start(): void

Defined in: packages/core/src/plugins.ts:73

A frame starts drawing.

Returns ​

void