We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I use skia with react-native-vision-camera, and want to Transform the video frame, rotateY is work, but perspective not work
1.4.2
1.use with react-native-vision-camera
2.on the camera frameProcessor event, try to Transform the video frame
` import { Matrix4, PaintStyle, perspective, processTransform3d, processTransformProps, rotateX, scale, Skia,SkImage, TileMode } from '@shopify/react-native-skia'; import { useEffect } from 'react'; import { StyleSheet, Text } from 'react-native';
import { Camera, useCameraDevice, useCameraPermission, useSkiaFrameProcessor, useFrameProcessor } from 'react-native-vision-camera'; export function CameraRealtimeDetection() { const device = useCameraDevice('back'); const { hasPermission, requestPermission } = useCameraPermission(); useEffect(() => { requestPermission(); }, [requestPermission]); const frameProcessor2 = useSkiaFrameProcessor((frame) => { 'worklet'; var matrix = processTransform3d([ { rotateY: 45 }, // work √ { perspective: 100 }, // no work × ]) frame.concat(matrix) frame.render() }, []); if (!hasPermission) { return <Text>No permission</Text>; } if (device == null) { return <Text>No device</Text>; } return ( <Camera style={[{height:300,width:200}]} device={device} isActive={true} frameProcessor={frameProcessor2} /> ); }
`
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Description
I use skia with react-native-vision-camera, and want to Transform the video frame, rotateY is work, but perspective not work
Version
1.4.2
Steps to reproduce
1.use with react-native-vision-camera
2.on the camera frameProcessor event, try to Transform the video frame
Snack, code example, screenshot, or link to a repository
`
import { Matrix4, PaintStyle, perspective, processTransform3d, processTransformProps, rotateX, scale, Skia,SkImage, TileMode } from '@shopify/react-native-skia';
import { useEffect } from 'react';
import { StyleSheet, Text } from 'react-native';
`
The text was updated successfully, but these errors were encountered: