Skip to main content

Function: createFrameProcessor()

createFrameProcessor(frameProcessor): ReadonlyFrameProcessor

Create a new Frame Processor function which you can pass to the <Camera>. (See "Frame Processors")

Make sure to add the 'worklet' directive to the top of the Frame Processor function, otherwise it will not get compiled into a worklet.

Also make sure to memoize the returned object, so that the Camera doesn't reset the Frame Processor Context each time.

Parameters​

• frameProcessor

Returns​

ReadonlyFrameProcessor

Worklet​

Defined in​

hooks/useFrameProcessor.ts:16