10 Star 149 Fork 22

Vinlic / WebVideoCreator

Create your Gitee Account
Explore and code with more than 12 million developers,Free private repositories !:)
Sign up
Clone or Download
renderer-env.md 943 Bytes
Copy Edit Raw Blame History
Vinlic authored 2023-10-18 22:15 . update README

不确定性的渲染环境

在日常使用中,浏览器在执行动画渲染时并不是“实时同步”的,当系统负载较高时可能出现掉帧导致动画看上去不够平滑,并且为了提高性能浏览器通常会将部分解码/渲染任务交由其它线程处理,这导致动画间时间轴并不同步(video元素是一个典例:P)。这些对于视频渲染是不可靠的,视频的每一帧动画效果应该是确定性的。

确定性的渲染环境

对于执行渲染的代码来说它是无感的,一切照常发生,只是时间流速变得可控,RAF返回的currentTime、setTimeout/setInterval回调的调用时机、Date、performance.now等,都是根据当前已渲染的进度决定的。除了接管时钟,对于动态图像和内嵌视频这类通常不由开发者控制的媒体,采用了一些实验性的 WebCodecs API 进行了接管。

NodeJS
1
https://gitee.com/vblog/web-video-creator.git
git@gitee.com:vblog/web-video-creator.git
vblog
web-video-creator
WebVideoCreator
master

Search