(selectedDesigner, elementId = 'model-designer')
| 13686 | |
| 13687 | const script = document.createElement('script'); |
| 13688 | script.id = GOATCOUNTER_SCRIPT_ID; |
| 13689 | script.async = true; |
| 13690 | script.setAttribute('data-goatcounter', GOATCOUNTER_ENDPOINT); |
| 13691 | script.src = GOATCOUNTER_SCRIPT_SRC; |
| 13692 | document.head.appendChild(script); |
| 13693 | } else { |
| 13694 | console.log('Disabling GoatCounter'); |
| 13695 | if (existing) existing.remove(); |
| 13696 | // Neuter any already-loaded GoatCounter so further counts are no-ops |
| 13697 | window.goatcounter = { |
| 13698 | no_onload: true, |
| 13699 | count: function () {} |
| 13700 | }; |
| 13701 | } |
| 13702 | } |
| 13703 | window.toggleAnalytics = toggleAnalytics; |
| 13704 | |
| 13705 | // Add function for generating thumbnails for multiple models |
| 13706 | async function generateThumbnailsForModels(models, options = {}) { |
| 13707 | const headless = !!options.headless; |
| 13708 | const cancelRef = options.cancelRef || null; |
| 13709 | const skipHash = !!options.skipHash; |
| 13710 | const progressOffset = typeof options.progressOffset === 'number' ? options.progressOffset : 0; |
| 13711 | const progressTotal = typeof options.progressTotal === 'number' ? options.progressTotal : models.length; |
| 13712 | console.log(`[DEBUG] generateThumbnailsForModels: Starting thumbnail generation for ${models.length} models.`); |
| 13713 |
no outgoing calls
no test coverage detected