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
demo代码如下:
func scaleAnimationDemo() -> VideoLab { // 1. LayerGroup var timeRange = CMTimeRange(start: CMTime.zero, duration: CMTime(seconds: 5, preferredTimescale: 600)) let keyTimes = [CMTime(seconds: 0, preferredTimescale: 600), CMTime(seconds: 5, preferredTimescale: 600)] let animation1 = KeyframeAnimation(keyPath: "scale", values: [1, 1.2], keyTimes: keyTimes, timingFunctions: [.quadraticEaseInOut]) var transform = Transform.identity transform.animations = [animation1] // Add sub-renderLayer1 let image = UIImage(named: "image2.HEIC") let imageSource = ImageSource(cgImage: image?.cgImage) imageSource.selectedTimeRange = CMTimeRange(start: CMTime.zero, duration: timeRange.duration) timeRange = imageSource.selectedTimeRange let renderLayer1 = RenderLayer(timeRange: timeRange, source: imageSource) renderLayer1.transform = transform // 2. Composition let composition = RenderComposition() composition.renderSize = CGSize(width: 2016, height: 1512) composition.layers = [renderLayer1] // 3. VideoLab let videoLab = VideoLab(renderComposition: composition) return videoLab }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
demo.mp4
demo代码如下:
The text was updated successfully, but these errors were encountered: