Skip to content

How to render on offscreen-canvas #46

Open
@sheepbox8646

Description

@sheepbox8646

首先,我很开心能找到这个项目

Remotion有一个包基于react-native-skia封装了一些做视频用的组件:

https://www.remotion.dev/docs/skia/skia-canvas

而我们团队正在开发一个叫VueMotion(https://github.com/Bug-Duck/vuemotion)的动画引擎,准备集成入Skia, 最初方案是CanvasKit-WASM, 但是如果封装下去工程量会非常大,所以我无意间搜索到了vue-skia

但是我研究了一下发现无法渲染到离屏画布上, 请问有什么解决方案?如果没有的话,我觉得可以封装类似于以下的API:

<script setup>
// ...
const ele = ref(null)
const { surface }  = useOffscreenCanvas(ele) 
// ...
</script>
<template>
<template>
  <v-surface ref="ele">
    ...
  </v-surface>
</template>
</template>

最终的需求是获取到图片的Blob对象。

如果看到了麻烦看一眼,谢谢!!!!!!!!!qwq

Metadata

Metadata

Assignees

No one assigned

    Labels

    help wantedExtra attention is neededquestionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions