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

Function generateCorruptedPlaceholder

renderer.js:942–968  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

940}
941// Expose inverted filters globally so search.js can read the state (keep the same object reference)
942window.invertedFilters = invertedFilters;
943
944// Define loadModel function at top level so it's available immediately (before DOMContentLoaded)
945// Helper function to parse zip path format
946function parseZipPath(filePath) {
947 if (filePath.includes('::')) {
948 const [zipPath, entryPath] = filePath.split('::');
949 return { zipPath, entryPath, isZipEntry: true };
950 }
951 return { zipPath: filePath, entryPath: null, isZipEntry: false };
952}
953
954// Helper function to get model color based on settings
955function getModelColor() {
956 const colorSetting = window.currentRenderColor || '#cccccc';
957
958 if (colorSetting === 'rainbow') {
959 return new THREE.Color().setHSL(Math.random(), 1.0, 0.5);
960 } else if (colorSetting === 'pastel-rainbow') {
961 return new THREE.Color().setHSL(Math.random(), 1.0, 0.8);
962 } else {
963 return new THREE.Color(colorSetting);
964 }
965}
966
967// Extensions that are valid for library (scan/add). Used for isValidFile.
968const EXTENSIONS_VALID_FOR_LIBRARY = new Set(['.stl', '.3mf', '.3ds', '.amf', '.blender', '.dae', '.dxf', '.dwg', '.fbx', '.f3d', '.f3z', '.gcode', '.igs', '.iges', '.lys', '.lyt', '.obj', '.ply', '.step', '.stp', '.svg', '.x3d']);
969
970// Map file extension (with or without dot) to label for typed placeholder
971const EXTENSION_TO_PLACEHOLDER_LABEL = {

Callers 2

renderSTLThumbnailFunction · 0.85
renderModelToPNGFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected