docs: New README (#1744)
* Update README.md * Update README.md * Update README.md * Update README.md * Revert "Update README.md" This reverts commit 8ce4949388323dc8d81366972b350476b77a8b99. * Update README.md * Update README.md * Update README.md * Revert "Update README.md" This reverts commit 11c4655890d78728cff3ab31b8578f86ba6cbf0f. * Delete settings.json * Delete CODE_OF_CONDUCT.md * Move `.clang-format` to `cpp/` * Update README.md * update docs * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md * Update sidebars.js
This commit is contained in:
parent
65aa9b49b7
commit
2a5c33323b
3
.vscode/settings.json
vendored
3
.vscode/settings.json
vendored
@ -1,3 +0,0 @@
|
|||||||
{
|
|
||||||
"typescript.tsdk": "node_modules/typescript/lib"
|
|
||||||
}
|
|
@ -1,76 +0,0 @@
|
|||||||
# Contributor Covenant Code of Conduct
|
|
||||||
|
|
||||||
## Our Pledge
|
|
||||||
|
|
||||||
In the interest of fostering an open and welcoming environment, we as
|
|
||||||
contributors and maintainers pledge to making participation in our project and
|
|
||||||
our community a harassment-free experience for everyone, regardless of age, body
|
|
||||||
size, disability, ethnicity, sex characteristics, gender identity and expression,
|
|
||||||
level of experience, education, socio-economic status, nationality, personal
|
|
||||||
appearance, race, religion, or sexual identity and orientation.
|
|
||||||
|
|
||||||
## Our Standards
|
|
||||||
|
|
||||||
Examples of behavior that contributes to creating a positive environment
|
|
||||||
include:
|
|
||||||
|
|
||||||
* Using welcoming and inclusive language
|
|
||||||
* Being respectful of differing viewpoints and experiences
|
|
||||||
* Gracefully accepting constructive criticism
|
|
||||||
* Focusing on what is best for the community
|
|
||||||
* Showing empathy towards other community members
|
|
||||||
|
|
||||||
Examples of unacceptable behavior by participants include:
|
|
||||||
|
|
||||||
* The use of sexualized language or imagery and unwelcome sexual attention or
|
|
||||||
advances
|
|
||||||
* Trolling, insulting/derogatory comments, and personal or political attacks
|
|
||||||
* Public or private harassment
|
|
||||||
* Publishing others' private information, such as a physical or electronic
|
|
||||||
address, without explicit permission
|
|
||||||
* Other conduct which could reasonably be considered inappropriate in a
|
|
||||||
professional setting
|
|
||||||
|
|
||||||
## Our Responsibilities
|
|
||||||
|
|
||||||
Project maintainers are responsible for clarifying the standards of acceptable
|
|
||||||
behavior and are expected to take appropriate and fair corrective action in
|
|
||||||
response to any instances of unacceptable behavior.
|
|
||||||
|
|
||||||
Project maintainers have the right and responsibility to remove, edit, or
|
|
||||||
reject comments, commits, code, wiki edits, issues, and other contributions
|
|
||||||
that are not aligned to this Code of Conduct, or to ban temporarily or
|
|
||||||
permanently any contributor for other behaviors that they deem inappropriate,
|
|
||||||
threatening, offensive, or harmful.
|
|
||||||
|
|
||||||
## Scope
|
|
||||||
|
|
||||||
This Code of Conduct applies both within project spaces and in public spaces
|
|
||||||
when an individual is representing the project or its community. Examples of
|
|
||||||
representing a project or community include using an official project e-mail
|
|
||||||
address, posting via an official social media account, or acting as an appointed
|
|
||||||
representative at an online or offline event. Representation of a project may be
|
|
||||||
further defined and clarified by project maintainers.
|
|
||||||
|
|
||||||
## Enforcement
|
|
||||||
|
|
||||||
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
|
||||||
reported by creating an issue on the GitHub repository. All
|
|
||||||
complaints will be reviewed and investigated and will result in a response that
|
|
||||||
is deemed necessary and appropriate to the circumstances. The project team is
|
|
||||||
obligated to maintain confidentiality with regard to the reporter of an incident.
|
|
||||||
Further details of specific enforcement policies may be posted separately.
|
|
||||||
|
|
||||||
Project maintainers who do not follow or enforce the Code of Conduct in good
|
|
||||||
faith may face temporary or permanent repercussions as determined by other
|
|
||||||
members of the project's leadership.
|
|
||||||
|
|
||||||
## Attribution
|
|
||||||
|
|
||||||
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
|
|
||||||
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
|
|
||||||
|
|
||||||
[homepage]: https://www.contributor-covenant.org
|
|
||||||
|
|
||||||
For answers to common questions about this code of conduct, see
|
|
||||||
https://www.contributor-covenant.org/faq
|
|
65
README.md
65
README.md
@ -6,53 +6,41 @@
|
|||||||
</picture>
|
</picture>
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
<div align="center">
|
|
||||||
<img src="docs/static/img/11.png" width="50%">
|
|
||||||
<br />
|
|
||||||
<br />
|
|
||||||
<blockquote><b>📸 The Camera library that sees the vision.</b></blockquote>
|
|
||||||
<pre align="center">npm i <a href="https://www.npmjs.com/package/react-native-vision-camera">react-native-vision-camera</a><br/>npx pod-install </pre>
|
|
||||||
<a align="center" href='https://ko-fi.com/F1F8CLXG' target='_blank'>
|
|
||||||
<img height='36' style='border:0px;height:36px;' src='https://az743702.vo.msecnd.net/cdn/kofi2.png?v=0' border='0' alt='Buy Me a Coffee at ko-fi.com' />
|
|
||||||
</a>
|
|
||||||
<br/>
|
|
||||||
<a align="center" href="https://github.com/mrousavy?tab=followers">
|
|
||||||
<img src="https://img.shields.io/github/followers/mrousavy?label=Follow%20%40mrousavy&style=social" />
|
|
||||||
</a>
|
|
||||||
<br />
|
|
||||||
<a align="center" href="https://twitter.com/mrousavy">
|
|
||||||
<img src="https://img.shields.io/twitter/follow/mrousavy?label=Follow%20%40mrousavy&style=social" />
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<br/>
|
|
||||||
<br />
|
<br />
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<img align="right" width="35%" src="docs/static/img/example.png">
|
<img align="right" width="35%" src="docs/static/img/example.png">
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
### ‼️‼️‼️‼️‼️ ✨ VisionCamera V3 ‼️‼️‼️‼️‼️
|
### Features
|
||||||
|
|
||||||
**See [this discussion](https://github.com/mrousavy/react-native-vision-camera/issues/1376) for the latest upcoming version of VisionCamera**
|
VisionCamera is a powerful and fast Camera component for React Native. It features:
|
||||||
|
|
||||||
|
* Photo and Video capture
|
||||||
|
* Customizable devices and multi-cameras ("fish-eye" zoom)
|
||||||
|
* Customizable resolutions and aspect-ratios (4k/8k images)
|
||||||
|
* Customizable FPS (30..240 FPS)
|
||||||
|
* [Frame Processors](https://react-native-vision-camera.com/docs/guides/frame-processors) (JS worklets to run QR-Code scanning, facial recognition, AI object detection, realtime video chats, ...)
|
||||||
|
* Smooth zooming (Reanimated)
|
||||||
|
* Fast pause and resume
|
||||||
|
* HDR & Night modes
|
||||||
|
* Custom C++/GPU accelerated video pipeline (OpenGL)
|
||||||
|
|
||||||
|
Install VisionCamera from npm:
|
||||||
|
|
||||||
|
```sh
|
||||||
|
yarn add react-native-vision-camera
|
||||||
|
cd ios && pod install
|
||||||
|
```
|
||||||
|
|
||||||
|
..and get started by [setting up permissions](https://react-native-vision-camera.com/docs/guides)!
|
||||||
|
|
||||||
### Documentation
|
### Documentation
|
||||||
|
|
||||||
* [Guides](https://react-native-vision-camera.com/docs/guides)
|
* [Guides](https://react-native-vision-camera.com/docs/guides)
|
||||||
* [API](https://react-native-vision-camera.com/docs/api)
|
* [API](https://react-native-vision-camera.com/docs/api)
|
||||||
* [Example](./example/)
|
* [Example](./example/)
|
||||||
|
* [Frame Processor Plugins](https://react-native-vision-camera.com/docs/guides/frame-processor-plugin-list)
|
||||||
### Features
|
|
||||||
|
|
||||||
* Photo and Video capture
|
|
||||||
* Customizable devices and multi-cameras (smoothly zoom out to "fish-eye" camera)
|
|
||||||
* Customizable FPS
|
|
||||||
* [Frame Processors](https://react-native-vision-camera.com/docs/guides/frame-processors) (JS worklets to run QR-Code scanning, facial recognition, AI object detection, realtime video chats, ...)
|
|
||||||
* Smooth zooming (Reanimated)
|
|
||||||
* Fast pause and resume
|
|
||||||
* HDR & Night modes
|
|
||||||
|
|
||||||
> See the [example](./example/) app
|
|
||||||
|
|
||||||
### Example
|
### Example
|
||||||
|
|
||||||
@ -72,6 +60,8 @@ function App() {
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
> See the [example](./example/) app
|
||||||
|
|
||||||
### Adopting at scale
|
### Adopting at scale
|
||||||
|
|
||||||
<a href="https://github.com/sponsors/mrousavy">
|
<a href="https://github.com/sponsors/mrousavy">
|
||||||
@ -82,6 +72,9 @@ VisionCamera is provided _as is_, I work on it in my free time.
|
|||||||
|
|
||||||
If you're integrating VisionCamera in a production app, consider [funding this project](https://github.com/sponsors/mrousavy) and <a href="mailto:me@mrousavy.com?subject=Adopting VisionCamera at scale">contact me</a> to receive premium enterprise support, help with issues, prioritize bugfixes, request features, help at integrating VisionCamera and/or Frame Processors, and more.
|
If you're integrating VisionCamera in a production app, consider [funding this project](https://github.com/sponsors/mrousavy) and <a href="mailto:me@mrousavy.com?subject=Adopting VisionCamera at scale">contact me</a> to receive premium enterprise support, help with issues, prioritize bugfixes, request features, help at integrating VisionCamera and/or Frame Processors, and more.
|
||||||
|
|
||||||
<br />
|
### Socials
|
||||||
|
|
||||||
#### 🚀 Get started by [setting up permissions](https://react-native-vision-camera.com/docs/guides/)!
|
* 🐦 [**Follow me on Twitter**](https://twitter.com/mrousavy) for updates
|
||||||
|
* 📝 [**Check out my blog**](https://mrousavy.com/blog) for examples and experiments
|
||||||
|
* 💖 [**Sponsor me on GitHub**](https://github.com/sponsors/mrousavy) to support my work
|
||||||
|
* 🍪 [**Buy me a Ko-Fi**](https://ko-fi.com/mrousavy) to support my work
|
||||||
|
@ -54,7 +54,7 @@ Frame processors are by far not limited to Hotdog detection, other examples incl
|
|||||||
Because they are written in JS, Frame Processors are **simple**, **powerful**, **extensible** and **easy to create** while still running at **native performance**. (Frame Processors can run up to **1000 times a second**!) Also, you can use **fast-refresh** to quickly see changes while developing or publish [over-the-air updates](https://github.com/microsoft/react-native-code-push) to tweak the Hotdog detector's sensitivity in live apps without pushing a native update.
|
Because they are written in JS, Frame Processors are **simple**, **powerful**, **extensible** and **easy to create** while still running at **native performance**. (Frame Processors can run up to **1000 times a second**!) Also, you can use **fast-refresh** to quickly see changes while developing or publish [over-the-air updates](https://github.com/microsoft/react-native-code-push) to tweak the Hotdog detector's sensitivity in live apps without pushing a native update.
|
||||||
|
|
||||||
:::note
|
:::note
|
||||||
Frame Processors require [**react-native-worklets-core**](https://github.com/chrfalch/react-native-worklets-core) 1.0.0 or higher.
|
Frame Processors require [**react-native-worklets-core**](https://github.com/margelo/react-native-worklets-core) 1.0.0 or higher.
|
||||||
:::
|
:::
|
||||||
|
|
||||||
### Interacting with Frame Processors
|
### Interacting with Frame Processors
|
||||||
@ -127,10 +127,10 @@ Since Frame Processors run synchronously with the Camera Pipeline, anything taki
|
|||||||
```ts
|
```ts
|
||||||
const frameProcessor = useFrameProcessor((frame) => {
|
const frameProcessor = useFrameProcessor((frame) => {
|
||||||
'worklet'
|
'worklet'
|
||||||
console.log('I'm running synchronously at 60 FPS!')
|
console.log("I'm running synchronously at 60 FPS!")
|
||||||
runAsync(() => {
|
runAsync(() => {
|
||||||
'worklet'
|
'worklet'
|
||||||
console.log('I'm running asynchronously, possibly at a lower FPS rate!')
|
console.log("I'm running asynchronously, possibly at a lower FPS rate!")
|
||||||
})
|
})
|
||||||
}, [])
|
}, [])
|
||||||
```
|
```
|
||||||
@ -142,10 +142,10 @@ Some Frame Processor Plugins don't need to run on every Frame, for example a Fra
|
|||||||
```ts
|
```ts
|
||||||
const frameProcessor = useFrameProcessor((frame) => {
|
const frameProcessor = useFrameProcessor((frame) => {
|
||||||
'worklet'
|
'worklet'
|
||||||
console.log('I'm running synchronously at 60 FPS!')
|
console.log("I'm running synchronously at 60 FPS!")
|
||||||
runAtTargetFps(2, () => {
|
runAtTargetFps(2, () => {
|
||||||
'worklet'
|
'worklet'
|
||||||
console.log('I'm running synchronously at 2 FPS!')
|
console.log("I'm running synchronously at 2 FPS!")
|
||||||
})
|
})
|
||||||
}, [])
|
}, [])
|
||||||
```
|
```
|
||||||
@ -201,7 +201,7 @@ If you are using the [react-hooks ESLint plugin](https://www.npmjs.com/package/e
|
|||||||
|
|
||||||
#### Frame Processors
|
#### Frame Processors
|
||||||
|
|
||||||
**Frame Processors** are JS functions that will be **workletized** using [react-native-worklets-core](https://github.com/chrfalch/react-native-worklets-core). They are created on a **parallel camera thread** using a separate JavaScript Runtime (_"VisionCamera JS-Runtime"_) and are **invoked synchronously** (using JSI) without ever going over the bridge. In a **Frame Processor** you can write normal JS code, call back to the React-JS Thread (e.g. `setState`), use [Shared Values](https://docs.swmansion.com/react-native-reanimated/docs/fundamentals/shared-values/) and call **Frame Processor Plugins**.
|
**Frame Processors** are JS functions that will be **workletized** using [react-native-worklets-core](https://github.com/margelo/react-native-worklets-core). They are created on a **parallel camera thread** using a separate JavaScript Runtime (_"VisionCamera JS-Runtime"_) and are **invoked synchronously** (using JSI) without ever going over the bridge. In a **Frame Processor** you can write normal JS code, call back to the React-JS Thread (e.g. `setState`), use [Shared Values](https://docs.swmansion.com/react-native-reanimated/docs/fundamentals/shared-values/) and call **Frame Processor Plugins**.
|
||||||
|
|
||||||
> See [**the example Frame Processor**](https://github.com/mrousavy/react-native-vision-camera/blob/cf68a4c6476d085ec48fc424a53a96962e0c33f9/example/src/CameraPage.tsx#L199-L203)
|
> See [**the example Frame Processor**](https://github.com/mrousavy/react-native-vision-camera/blob/cf68a4c6476d085ec48fc424a53a96962e0c33f9/example/src/CameraPage.tsx#L199-L203)
|
||||||
|
|
||||||
|
@ -42,9 +42,9 @@ expo install react-native-vision-camera
|
|||||||
</TabItem>
|
</TabItem>
|
||||||
</Tabs>
|
</Tabs>
|
||||||
|
|
||||||
VisionCamera requires **iOS 11 or higher**, and **Android-SDK version 21 or higher**. See [Troubleshooting](/docs/guides/troubleshooting) if you're having installation issues.
|
VisionCamera requires **iOS 12 or higher**, and **Android-SDK version 26 or higher**. See [Troubleshooting](/docs/guides/troubleshooting) if you're having installation issues.
|
||||||
|
|
||||||
> **(Optional)** If you want to use [**Frame Processors**](/docs/guides/frame-processors), you need to install [**react-native-worklets-core**](https://github.com/chrfalch/react-native-worklets-core) 1.0.0 or higher.
|
> **(Optional)** If you want to use [**Frame Processors**](/docs/guides/frame-processors), you need to install [**react-native-worklets-core**](https://github.com/margelo/react-native-worklets-core) 1.0.0 or higher.
|
||||||
|
|
||||||
## Updating manifests
|
## Updating manifests
|
||||||
|
|
||||||
|
@ -15,9 +15,9 @@ module.exports = {
|
|||||||
'guides/frame-processors-plugins-ios',
|
'guides/frame-processors-plugins-ios',
|
||||||
'guides/frame-processors-plugins-android',
|
'guides/frame-processors-plugins-android',
|
||||||
'guides/frame-processors-plugins-final',
|
'guides/frame-processors-plugins-final',
|
||||||
'guides/frame-processor-plugin-list'
|
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
'guides/frame-processor-plugin-list',
|
||||||
'guides/zooming',
|
'guides/zooming',
|
||||||
'guides/focusing',
|
'guides/focusing',
|
||||||
'guides/errors',
|
'guides/errors',
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
if which clang-format >/dev/null; then
|
if which clang-format >/dev/null; then
|
||||||
find cpp ios android/src/main/cpp -type f \( -name "*.h" -o -name "*.cpp" -o -name "*.m" -o -name "*.mm" \) -print0 | while read -d $'\0' file; do
|
find cpp ios android/src/main/cpp -type f \( -name "*.h" -o -name "*.cpp" -o -name "*.m" -o -name "*.mm" \) -print0 | while read -d $'\0' file; do
|
||||||
clang-format -i "$file"
|
clang-format -style=file:./cpp/.clang-format -i "$file"
|
||||||
done
|
done
|
||||||
else
|
else
|
||||||
echo "warning: clang-format not installed, download from https://clang.llvm.org/docs/ClangFormat.html (or run brew install clang-format)"
|
echo "warning: clang-format not installed, download from https://clang.llvm.org/docs/ClangFormat.html (or run brew install clang-format)"
|
||||||
|
Loading…
Reference in New Issue
Block a user