DownloadTexture / download canvas with html - ANSWERED

I need to download the canvas as an image. The DownloadTexture op works well, but on iOS instead of an download promt, the image shows up immediately in the window. I tried to manipulate the ops code, but didn’t succeed as yet.

Download a canvas as an image works pretty easy from html with an anchor an a few lines of js. But when I try that with the cables canvas, the image is empty. I tried to load the cables content to another canvas, but that doesn’t work either.

Is it somehow possible to download the cables canvas “external” via html? It would give me a bit more flexibilty to develop an responsive ui.

Thanks so far

Hi there,
Thanks for reporting this. We’ll look into it as soon as possible.

please try using {canvas:{preserveDrawingBuffer:true}} in the new CABLES.Patch constructor options.
then you can read pixels back from the canvas.
(its webgl behaviour nothing special to cables)

also ios can not automatically save files, the user has to long press an image and select “save to camera roll” or something, so this will probably not supported by the downloadTexture op.