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

Function createSVGIcon

renderer.js:14609–14620  ·  view source on GitHub ↗
(svgString, size = 16)

Source from the content-addressed store, hash-verified

14607 const simpleLight = new THREE.DirectionalLight(0xffffff, 1.0);
14608 simpleLight.position.set(1, 1, 1).normalize();
14609 scene.add(simpleLight);
14610 }
14611
14612 // Use loadModel function which has proper path encoding handling and embedded image check
14613 // loadModel is available globally via window.loadModel
14614 const loadModelFunc = window.loadModel || loadModel;
14615 if (!loadModelFunc) {
14616 throw new Error('loadModel function is not available.');
14617 }
14618
14619 // Add a timeout to prevent hanging indefinitely (e.g. on network shares or parsing errors)
14620 const timeoutMs = 30000; // 30 seconds should be enough even for large models
14621 let timeoutId;
14622 const timeoutPromise = new Promise((_, reject) => {
14623 timeoutId = setTimeout(() => reject(new Error(`Loading model timed out after ${timeoutMs}ms`)), timeoutMs);

Callers 2

createListViewHeaderFunction · 0.85
createModelItemFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected