<SkiaCanvas />
一个封装 Remotion 上下文的 React Native Skia <Canvas /> 组件。
🌐 A React Native Skia <Canvas /> component that wraps Remotion contexts.
你可以把 @shopify/react-native-skia 中的元素放入其中!
🌐 You can place elements from @shopify/react-native-skia in it!
import { SkiaCanvas } from "@remotion/skia";
import { Fill } from "@shopify/react-native-skia";
import React from "react";
import { useVideoConfig } from "remotion";
const MySkiaVideo : React .FC = () => {
const { width , height } = useVideoConfig ();
return (
<SkiaCanvas width ={width } height ={height }>
<Fill color ="black" />
</SkiaCanvas >
);
};属性
🌐 Props
width
画布的宽度(像素)。
🌐 The width of the canvas in pixels.
height
画布的高度(像素)
🌐 The height of the canvas in pixels.
继承的属性
🌐 Inherited props
<Canvas> 接受的所有属性也都被接受。
🌐 All the props that are accepted by <Canvas> are accepted as well.
另请参阅
🌐 See also