docs: Update documentation titles
This commit is contained in:
parent
7dddc0ae44
commit
08d04d1be1
@ -107,6 +107,8 @@ const frameProcessor = useFrameProcessor((frame) => {
|
|||||||
}, [])
|
}, [])
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## Implementations
|
||||||
|
|
||||||
### Long-running Frame Processors
|
### Long-running Frame Processors
|
||||||
|
|
||||||
If your Frame Processor takes longer than a single frame interval to execute, or runs asynchronously, you can create a **copy of the frame** and dispatch the actual frame processing to a **separate thread**.
|
If your Frame Processor takes longer than a single frame interval to execute, or runs asynchronously, you can create a **copy of the frame** and dispatch the actual frame processing to a **separate thread**.
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
---
|
---
|
||||||
id: frame-processors-plugins-final
|
id: frame-processors-plugins-final
|
||||||
title: Finish creating your Frame Processor Plugin
|
title: Creating Frame Processor Plugins
|
||||||
sidebar_label: Finish creating your Frame Processor Plugin
|
sidebar_label: Finish creating your Frame Processor Plugin
|
||||||
---
|
---
|
||||||
|
|
||||||
## Make your Frame Processor Plugin available to JS
|
## Expose your Frame Processor Plugin to JS
|
||||||
|
|
||||||
To make the Frame Processor Plugin available to the Frame Processor Worklet Runtime, create the following wrapper function in JS/TS:
|
To make the Frame Processor Plugin available to the Frame Processor Worklet Runtime, create the following wrapper function in JS/TS:
|
||||||
|
|
||||||
@ -39,7 +39,7 @@ module.exports = {
|
|||||||
You have to restart metro-bundler for changes in the `babel.config.js` file to take effect.
|
You have to restart metro-bundler for changes in the `babel.config.js` file to take effect.
|
||||||
:::
|
:::
|
||||||
|
|
||||||
### Test it!
|
## Test it!
|
||||||
|
|
||||||
Simply call the wrapper Worklet in your Frame Processor:
|
Simply call the wrapper Worklet in your Frame Processor:
|
||||||
|
|
||||||
@ -57,7 +57,7 @@ function App() {
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
### Next Steps
|
## Next Steps
|
||||||
|
|
||||||
If you want to distribute your Frame Processor Plugin, simply use npm.
|
If you want to distribute your Frame Processor Plugin, simply use npm.
|
||||||
|
|
||||||
|
@ -1,13 +1,13 @@
|
|||||||
---
|
---
|
||||||
id: frame-processors-plugins-android
|
id: frame-processors-plugins-android
|
||||||
title: Creating Frame Processor Plugins for Android
|
title: Creating Frame Processor Plugins
|
||||||
sidebar_label: Creating Frame Processor Plugins (Android)
|
sidebar_label: Creating Frame Processor Plugins (Android)
|
||||||
---
|
---
|
||||||
|
|
||||||
import Tabs from '@theme/Tabs';
|
import Tabs from '@theme/Tabs';
|
||||||
import TabItem from '@theme/TabItem';
|
import TabItem from '@theme/TabItem';
|
||||||
|
|
||||||
## Creating a Frame Processor
|
## Creating a Frame Processor Plugin for Android
|
||||||
|
|
||||||
The Frame Processor Plugin API is built to be as extensible as possible, which allows you to create custom Frame Processor Plugins.
|
The Frame Processor Plugin API is built to be as extensible as possible, which allows you to create custom Frame Processor Plugins.
|
||||||
In this guide we will create a custom QR Code Scanner Plugin which can be used from JS.
|
In this guide we will create a custom QR Code Scanner Plugin which can be used from JS.
|
||||||
|
@ -1,13 +1,13 @@
|
|||||||
---
|
---
|
||||||
id: frame-processors-plugins-ios
|
id: frame-processors-plugins-ios
|
||||||
title: Creating Frame Processor Plugins for iOS
|
title: Creating Frame Processor Plugins
|
||||||
sidebar_label: Creating Frame Processor Plugins (iOS)
|
sidebar_label: Creating Frame Processor Plugins (iOS)
|
||||||
---
|
---
|
||||||
|
|
||||||
import Tabs from '@theme/Tabs';
|
import Tabs from '@theme/Tabs';
|
||||||
import TabItem from '@theme/TabItem';
|
import TabItem from '@theme/TabItem';
|
||||||
|
|
||||||
## Creating a Frame Processor
|
## Creating a Frame Processor Plugin for iOS
|
||||||
|
|
||||||
The Frame Processor Plugin API is built to be as extensible as possible, which allows you to create custom Frame Processor Plugins.
|
The Frame Processor Plugin API is built to be as extensible as possible, which allows you to create custom Frame Processor Plugins.
|
||||||
In this guide we will create a custom QR Code Scanner Plugin which can be used from JS.
|
In this guide we will create a custom QR Code Scanner Plugin which can be used from JS.
|
||||||
@ -48,12 +48,12 @@ VISION_EXPORT_FRAME_PROCESSOR(scanQRCodes)
|
|||||||
@end
|
@end
|
||||||
```
|
```
|
||||||
|
|
||||||
4. **Implement your Frame Processing.** See the [Example Plugin (Objective-C)](https://github.com/mrousavy/react-native-vision-camera/blob/main/example/ios/Frame%20Processor%20Plugins/Example%20Plugin%20%28Objective%2DC%29) for reference.
|
|
||||||
|
|
||||||
:::note
|
:::note
|
||||||
The JS function name will be equal to the Objective-C function name you choose (with a `__` prefix). Make sure it is unique across other Frame Processor Plugins.
|
The JS function name will be equal to the Objective-C function name you choose (with a `__` prefix). Make sure it is unique across other Frame Processor Plugins.
|
||||||
:::
|
:::
|
||||||
|
|
||||||
|
4. **Implement your Frame Processing.** See the [Example Plugin (Objective-C)](https://github.com/mrousavy/react-native-vision-camera/blob/main/example/ios/Frame%20Processor%20Plugins/Example%20Plugin%20%28Objective%2DC%29) for reference.
|
||||||
|
|
||||||
</TabItem>
|
</TabItem>
|
||||||
<TabItem value="swift">
|
<TabItem value="swift">
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user