Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: Update docs for V4 #2747

Merged
merged 27 commits into from
Apr 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ cd ios && pod install
* [Guides](https://react-native-vision-camera.com/docs/guides)
* [API](https://react-native-vision-camera.com/docs/api)
* [Example](./package/example/)
* [Frame Processor Plugins](https://react-native-vision-camera.com/docs/guides/frame-processor-plugins)
* [Frame Processor Plugins](https://react-native-vision-camera.com/docs/guides/frame-processor-plugins-community)

### ShadowLens

Expand Down
6 changes: 3 additions & 3 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,21 @@ This website is built using [Docusaurus 2](https://v2.docusaurus.io/), a modern

## Installation

```console
```sh
yarn install
```

## Local Development

```console
```sh
yarn start
```

This command starts a local development server and open up a browser window. Most changes are reflected live without having to restart the server.

## Build

```console
```sh
yarn build
```

Expand Down
9 changes: 1 addition & 8 deletions docs/docs/guides/CODE_SCANNING.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -119,16 +119,9 @@ render() {
</TabItem>
</Tabs>

## Separate Output

Since the Code Scanner is a separate camera output (just like photo or video), it cannot be attached simultaneously with photo and video enabled.
You need to disable either `photo`, `video`, or the `codeScanner`.

## Code result

The Code Scanner will call your [`onCodeScanned`](/docs/api/interfaces/CodeScanner#oncodescanned) callback with all detected codes ([`Code`](/docs/api/interfaces/Code)), including their decoded string value, and their coordinates on the screen relative to the Preview.

<br />
The Code Scanner will call your [`onCodeScanned`](/docs/api/interfaces/CodeScanner#oncodescanned) callback with all detected codes ([`Code`](/docs/api/interfaces/Code)), including their decoded string value, and their coordinates on the screen relative to subject area of the Code Scanner (the [`frame`](/docs/api/interfaces/Code#frame)).

## UPC-A vs EAN-13 codes

Expand Down
31 changes: 17 additions & 14 deletions docs/docs/guides/DEVICES.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,14 @@ import useBaseUrl from '@docusaurus/useBaseUrl'
Camera Devices are the physical (or "virtual") devices that can be used to record videos or capture photos.

* **Physical**: A physical Camera Device is a **camera lens on your phone**. Different physical Camera Devices have different specifications, such as different capture formats, resolutions, zoom levels, and more. Some phones have multiple physical Camera Devices.

> Examples: _"Backside Wide-Angle Camera"_, _"Frontside Wide-Angle Camera (FaceTime HD)"_, _"Ultra-Wide-Angle back camera"_
Examples:
- "Backside Wide-Angle Camera"
- "Frontside Wide-Angle Camera (FaceTime HD)"
- "Ultra-Wide-Angle back camera"
* **Virtual**: A virtual camera device is a **combination of one or more physical camera devices**, and provides features such as _virtual-device-switchover_ while zooming (see video on the right) or _combined photo delivery_ from all physical cameras to produce higher quality images.

> Examples: _"Triple-Camera"_, _"Dual-Wide-Angle Camera"_
Examples:
- "Triple-Camera"
- "Dual-Wide-Angle Camera"

## Select the default Camera

Expand All @@ -48,7 +51,7 @@ const device = useCameraDevice('back')

```ts
const devices = Camera.getAvailableCameraDevices()
const device = devices.find((d) => d.position === 'back')
const device = getCameraDevice(devices, 'back')
```

</TabItem>
Expand Down Expand Up @@ -91,15 +94,15 @@ A [`CameraDevice`](/docs/api/interfaces/CameraDevice) consists of the following

Here's a list of some Camera Devices an iPhone 13 Pro has:

- Back Wide Angle Camera (`['wide-angle-camera']`)
- Back Ultra-Wide Angle Camera (`['ultra-wide-angle-camera']`)
- Back Telephoto Camera (`['telephoto-camera']`)
- Back Dual Camera (Wide + Telephoto)
- Back Dual-Wide Camera (Ultra-Wide + Wide)
- Back Triple Camera (Ultra-Wide + Wide + Telephoto)
- Back LiDAR Camera (Wide + LiDAR-Depth)
- Front Wide Angle (`['wide-angle-camera']`)
- Front True-Depth (Wide + Depth)
- Back Wide Angle Camera **1x** (`['wide-angle-camera']`)
- Back Ultra-Wide Angle Camera **0.5x** (`['ultra-wide-angle-camera']`)
- Back Telephoto Camera **3x** (`['telephoto-camera']`)
- Back Dual Camera **1x** + **3x** (`['wide-angle-camera', 'telephoto-camera']`)
- Back Dual-Wide Camera **0.5x** + **1x** (`['ultra-wide-angle-camera', 'wide-angle-camera']`)
- Back Triple Camera **0.5x** + **1x** + **3x** (`['ultra-wide-angle-camera', 'wide-angle-camera', 'telephoto-camera']`)
- Back LiDAR Camera **1x** (`['wide-angle-camera']` + depth)
- Front Wide Angle **1x** (`['wide-angle-camera']`)
- Front True-Depth **1x** (`['wide-angle-camera']` + depth)

### Selecting Multi-Cams

Expand Down
2 changes: 1 addition & 1 deletion docs/docs/guides/ERRORS.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ The `CameraError` type is a baseclass type for all other errors and provides the
* `cause.stacktrace?`: A native Java stacktrace for the cause. (Android only)
* `cause.cause?`: The cause that caused this cause. (Recursive) (Optional)

:::note
:::info
See [the `CameraError.ts` file](https://github.com/mrousavy/react-native-vision-camera/blob/main/package/src/CameraError.ts) for a list of all possible error codes
:::

Expand Down
2 changes: 1 addition & 1 deletion docs/docs/guides/FOCUSING.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ So for example, `{ x: 0, y: 0 }` will focus to the upper left corner, while `{ x

Focussing adjusts auto-focus (AF) and auto-exposure (AE).

:::note
:::warning
`focus(...)` will fail if the selected Camera device does not support focusing (see [`CameraDevice.supportsFocus`](/docs/api/interfaces/CameraDevice#supportsfocus))
:::

Expand Down
Loading