Open Madixin opened 6 months ago
I want to test use webworker to render lottie for canvas,but got error: Failed to execute 'postMessage' on 'Worker': An OffscreenCanvas could not be cloned because it was not transferred.
I copy code from https://chromium.googlesource.com/chromium/src/+/refs/tags/78.0.3895.4/third_party/lottie/README.md
let offscreenCanvas = document.getElementById('a').transferControlToOffscreen(); let animationData = JSON_LOTTIE_ANIMATION_DATA; let worker = new Worker('lottie_worker.min.js'); worker.postMessage({ canvas: offscreenCanvas, animationData: animationData, drawSize: { width: 200, height: 100 } params: { loop: true, autoplay: true } })
Tell us about your environment lottie-web-5.12.2 lottie-web-5.10.2
Is there any sample to show how to use lottie_worke?
I want to test use webworker to render lottie for canvas,but got error: Failed to execute 'postMessage' on 'Worker': An OffscreenCanvas could not be cloned because it was not transferred.
I copy code from https://chromium.googlesource.com/chromium/src/+/refs/tags/78.0.3895.4/third_party/lottie/README.md
Tell us about your environment lottie-web-5.12.2 lottie-web-5.10.2