MCPcopy Create free account
hub / github.com/TechJeeper/Printventory / onPreviewResize

Function onPreviewResize

preview.js:711–721  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

709 .replace(/\(/g, '%28')
710 .replace(/\)/g, '%29')
711 .replace(/'/g, '%27')
712 .replace(/\[/g, '%5B')
713 .replace(/\]/g, '%5D');
714 } catch (error) {
715 console.error('Error encoding file path:', error);
716 return `file://${filePath.replace(/\\/g, '/').replace(/#/g, '%23').replace(/\s/g, '%20')}`;
717 }
718 }
719
720 const MAX_STL_TRIANGLES = 10000000;
721
722 function validateSTLBuffer(buffer) {
723 if (buffer.byteLength < 84) throw new Error('STL file too small to be valid');
724 const dv = new DataView(buffer);

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected