Skip to content

Commit 3722071

Browse files
dakersankhesh
authored andcommitted
fix(OBJWriter): OffscreenCanvas doesn't have toBlob
1 parent 423112c commit 3722071

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Sources/IO/Misc/OBJWriter/index.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,9 @@ function vtkOBJWriter(publicAPI, model) {
181181
zipContent[`${modelFilename}.obj`] = strToU8(model.output[0]);
182182
zipContent[`${materialFilename}.mtl`] = strToU8(model.mtl);
183183

184-
const canvas = new OffscreenCanvas(imageData.width, imageData.height);
184+
const canvas = document.createElement('canvas');
185+
canvas.width = imageData.width;
186+
canvas.height = imageData.height;
185187
const ctx = canvas.getContext('2d');
186188
ctx.putImageData(imageData, 0, 0);
187189

0 commit comments

Comments
 (0)