Skip to main content
Filter by
Sorted by
Tagged with
0 votes
0 answers
51 views

I'm experiencing an issue in a WebKit WebView environment where a videoElement either freezes or shows corrupted frames. I'm using @mediapipe/tasks-vision to perform face-detection-based data ...
sunniesfish's user avatar
1 vote
1 answer
153 views

I’m trying to use a web-worker to render a scene with threejs. I want to render some dynamic font using a CanvasTexture. But I find that when I use canvas in web-worker from ...
Altynai's user avatar
  • 35
-1 votes
1 answer
74 views

I know about [HTMLCanvasElement trransferControlToOffscreen()], this works well. But I need several Canvases for compositing operations. Is it possible to create canvas inside a worker without ...
user31056686's user avatar
0 votes
0 answers
88 views

With Javascript, I want to render heavy vector graphics. Upon zoom, the whole content should be re-rendered. To achieve it in a visually smooth way, I tried 3 solutions with Web Workers: Two UI ...
Vladiator's user avatar
  • 426
1 vote
0 answers
164 views

I have two canvases inside the body of an HTML-file. I access the first canvas normally from an main thread script and perform an animation with requestAnimationFrame. The second canvas should draw ...
Julian's user avatar
  • 54
3 votes
1 answer
103 views

My goal is to be able to leverage the GPU in a background thread to create an offscreen image that is rendered using the Skia Canvas class. Ideally I would have liked to use Compose multiplatform and ...
Thomas Cuthill's user avatar
0 votes
2 answers
81 views

My code snippet produces the output I want...well close. However, I am struggling to understand why scaleWidth and scaleHeight needed to be 400. My goal was to have the SVG drawn with a width & ...
Eric G's user avatar
  • 796
0 votes
1 answer
49 views

What I am trying to do is draw the SVG over the blue circle on the canvas. The blue circle should be the background. However, the result is just the SVG. The final result should look something like (...
Eric G's user avatar
  • 796
0 votes
1 answer
60 views

I am using canvg inside of a Web Worker to draw an SVG into an OffscreenCanvas. I will draw the SVG in black. Is it possible to apply a color to the SVG without modifying the SVG itself or using CSS? ...
Eric G's user avatar
  • 796
2 votes
2 answers
118 views

The specs say: When scaling up, if the imageSmoothingEnabled attribute is set to false, then the image must be rendered using nearest-neighbor interpolation. So when imageSmoothingEnabled is false ...
kaya51's user avatar
  • 45
1 vote
1 answer
110 views

I have a custom view where in onDraw(Canvas canvas), I need to draw on offscreen canvas, then draw the bitmap of offscreen canvas on view's canvas. Here the code in the view class : Bitmap bitmap = ...
totoaussi's user avatar
  • 721
0 votes
0 answers
156 views

I want some clientside image compression using a webworker. My code is already working on my local machine (FF, Chrome, Safari). Its e2e-tested with playwright 1.44.0. Running the tests locally ...
Theiaz's user avatar
  • 844
0 votes
1 answer
194 views

I want to use matter.js on a web worker with offscreen canvas, but the problem is it seems to throw errors about requestAnimationFrame. It tries to get it by using window.requestAnimationFrame but in ...
omega's user avatar
  • 44.5k
1 vote
0 answers
240 views

context: I am using a mapping library called openglobus to render a 3d planet. Openglobus has a tile layer, where you can give a function that generates tiles, that function can return canvasses. So ...
Sam's user avatar
  • 352
2 votes
1 answer
792 views

context: I am using a mapping library called openglobus to render a 3d planet. Openglobus has a tile layer, where you can give a function that generates tiles, that function can return canvasses. So ...
Sam's user avatar
  • 352
0 votes
1 answer
342 views

I'm working on a React Three Fiber project where I'm trying to render a dynamic texture from an OffscreenCanvas that's being updated in a WebWorker. However, all I'm getting is a black render on my ...
Joseph Ghaida's user avatar
1 vote
0 answers
91 views

Pure canvas can handle with OffscreenCanvas and web worker technology. <!-- index.html --> <canvas id="mainCanvas" width="300" height="150"></canvas> //...
Jimmy's user avatar
  • 43
1 vote
1 answer
463 views

I have a hidden canvas in a react app that I send to a web worker using transferControlToOffscreen (code). Everything is working, but after updating the canvas (fillRect for example) the worker ...
micahg's user avatar
  • 36
1 vote
0 answers
267 views

This is the first time I've asked a question on Stackoverflow and it's because I really got stuck. I have an animation in mapbox, which runs on the same thread as the h264-mp4-encoder video encoder. ...
palomino's user avatar
1 vote
1 answer
624 views

There's an example on Openlayers website: https://openlayers.org/en/latest/examples/offscreen-canvas.html It works fine but when I try to add an additional tile layer (XYZ or WMS) to the map, the ...
koalex's user avatar
  • 13
0 votes
1 answer
1k views

I'm having a strange issue with a ThreeJS scene in an OffscreenCanvas, but only with Safari. I create the OffscreenCanvas with this code: let canvasElm = g('avatar-canvas'); const offscreen = ...
GeorgePorge's user avatar
2 votes
1 answer
969 views

I’m having a strange issue with a fairly complex ThreeJS scene. I’ve spent a few days moving the entire 3D scene to an offscreencanvas and I’ve moved the loading of my GLB files and texture maps to a ...
GeorgePorge's user avatar
1 vote
1 answer
566 views

I tried to transfer an image drawn to an offscreen canvas by a web worker to a visible canvas. It works in Chrome, but not in Firefox. No error was thrown in the console, but the visible canvas ...
Qiyun Zhu's user avatar
  • 175
2 votes
1 answer
796 views

I'm experimenting with using OffscreenCanvas in webworkers and trying various strategies. In my original code I'm drawing on multiple canvas elements (stacked on top of each other) sequentially in a ...
Kruptein's user avatar
2 votes
1 answer
1k views

I want to transfer full control to worker and use off screen canvas. But there is an Image() which is tied to UI, see function makeImg. I am not intending to show the image, it has pure data usage for ...
armagedescu's user avatar
  • 2,417
-2 votes
1 answer
121 views

I am currently working with webworker and canvas for the first time and have a question about it. I have a webpage that needs to draw multiple elements on a canvas. When the canvas is full I want to ...
Sauriel's user avatar
  • 79
0 votes
0 answers
322 views

I'm trying to do some behind the scenes rendering work with WebGL and then copy the canvas data to an image. I'm able to accomplish this successfully with a physical canvas element on the page, ...
Benjamin Kosten's user avatar
0 votes
1 answer
960 views

Let's say I have a canvas: <canvas height="500" width="500"></canvas> I can capture a video from it using captureStream. So if I have a video element, I can pass it ...
lorefnon's user avatar
  • 13.1k
3 votes
1 answer
790 views

I have a video merger that gets different MediaStreamTrack from navigator.mediaDevices, Camera, and Display and sends them to a worker via MediaStreamTrackProcessor.reader which reads each stream ...
Saji's user avatar
  • 2,856
0 votes
1 answer
764 views

can anyone help me to implement a web worker? Main Code: dataset = "dataset" + document.getElementById("dataset").value const config = { xAxis: { type: '...
Yash Chauhan's user avatar
0 votes
1 answer
510 views

I'm trying make my action icon dynamic by manipulating it with offscreenCanvas(): service_worker.js const iconFile = `icon.png`; const canvas = new OffscreenCanvas(24, 24), ctx = canvas....
vanowm's user avatar
  • 10.4k
2 votes
0 answers
2k views

I am running a real-time process from the live media stream of the webcam, which requires the FPS to stay around 30FPS. getImageData was one of my main bottlenecks, it was requiring around 22ms to ...
Noor's user avatar
  • 51
1 vote
0 answers
106 views

I'm using the below code to convert 1 SVG to PNG. I convert the SVG to canvas to PNG. getDownloadURL = async () => { // Logic to convert SVG to PNG const svg = document....
codingrohtak's user avatar
2 votes
1 answer
3k views

I am using offscreencanvas (https://threejs.org/manual/#en/offscreencanvas) to render react-three-fiber elements on a separate thread. There are not a lot of resources about this on the internet (...
Samuel's user avatar
  • 113
1 vote
1 answer
219 views

I have 2 half circles which are one is red and other is green. I want to combine them, how can I do that? I am adding my canvas codes: const canvas_ok = new OffscreenCanvas(16, 16) const context_ok = ...
Ceren Keklik's user avatar
7 votes
1 answer
2k views

I am developing a web page that does some fairly heavy processing of SVG string data. Because these strings could get to be m/bs in size I would like to move the rendering of the SVGs (browser ...
chips's user avatar
  • 300
1 vote
1 answer
1k views

Ok so the question is a bit much, but it actually mentions every part of the "bug" I'm experiencing. I'm not sure if it is really a bug or if there is something I don't understand yet. I ...
Raphael Royer-Rivard's user avatar
0 votes
1 answer
548 views

As is known, we can't access the dom element from the workers. When I create AudioContext: var audioCtx = new (canvas.AudioContext || canvas.webkitAudioContext)(); I get: Uncaught ReferenceError: ...
badcode's user avatar
  • 610
0 votes
1 answer
1k views

I am trying to implement a in browser raster drawing plugin for the leaflet library that that extends the leaflets GridLayer api. Essentially for every tile there is function createTile that returns a ...
Nazmul Ahasan's user avatar
1 vote
1 answer
1k views

I need some help with finding a memory leak in a small, Browser / WebWorker JavaScript. I tracked it down into this little piece of code: /** * Resizes an Image * * @function ...
HOK's user avatar
  • 277
2 votes
1 answer
6k views

I'm rewritng a small javascript for being able to put it in a worker.js like it is documented here: Mozilla - Web_Workers_API The worker.js shall display an image on an OffscreenCanvas like it is ...
tonispark's user avatar
  • 143
0 votes
1 answer
1k views

OK so the question is self-explanatory. Currently, I am doing the following Using html2canvas npm package to convert my html to canvas. Converting Canvas to image canvas.toDataURL("...
Maaz Ahmad Khan's user avatar
0 votes
0 answers
190 views

The process is sent to the webworker according to the conditions in a loop as follows. while () {  if (~~~) {  worker.postMessage({ action: "init", data: offscreenCanvas }, [...
yir's user avatar
  • 11
2 votes
0 answers
1k views

I am trying to do below code for transferring canvas to worker: var mycanvas = document.getElementById('mycanvas'); var offscreenCanvas = mycanvas.transferControlToOffscreen(); // Uncaught ...
User7723337's user avatar
0 votes
0 answers
3k views

I'm trying to run multiple instances of my web worker. But I'm getting the following error in browser console : core.js:4081 ERROR DOMException: Failed to execute 'postMessage' on 'Worker': An ...
iJade's user avatar
  • 23.9k
1 vote
1 answer
863 views

I'm a beginner using web workers and I'm dealing with a little problem. I'm creating several workers to process audio buffers and draw its waveform on a offscreen canvas: main thread: // foreach file ...
franco.stramana's user avatar
0 votes
0 answers
1k views

I have Angular project that has generated web-worker with attached canvas to it using transferControlToOffscreen. Everything went well until I needed to create another OffscreenCanvas inside the web-...
Igor Vinogradov's user avatar
0 votes
2 answers
2k views

I'm trying to use the new API for the OffScreenCanvas. The idea is to move all logic regarding drawing and updating data for player, but leave some other logic in the main thread, like touch events (...
Amay's user avatar
  • 1,521
6 votes
1 answer
16k views

Hey everyone so I have a very complex canvas editor that allows a user to pick a video background, add text, gifs and Lottie animations using the Konvajs and Gifler libraries. It has come a long way ...
codernoob8's user avatar
1 vote
1 answer
3k views

I want to be able to send my canvas offscreen to a webworker more than once. Here's an example code: render() { const worker = new Worker("some url"); const offscreen = this.canvasRef.current....
Will's user avatar
  • 1,768