find_uniform_patch.cjs 900 B

1234567891011121314151617181920212223242526
  1. const fs = require('fs');
  2. const content = fs.readFileSync('public/Cesium/Cesium.js', 'utf8');
  3. // Search for pattern near the error string
  4. const idx1 = content.indexOf('Unrecognized');
  5. console.log('Unrecognized at byte:', idx1);
  6. if (idx1 >= 0) {
  7. const start = Math.max(0, idx1 - 100);
  8. const end = Math.min(content.length, idx1 + 100);
  9. console.log('Context:', content.substring(start, end));
  10. }
  11. // Also search for the string parts
  12. const searchTerms = ['unrecognized', 'uniform type'];
  13. for (const term of searchTerms) {
  14. let pos = 0;
  15. let count = 0;
  16. while ((pos = content.indexOf(term, pos)) >= 0 && count < 3) {
  17. const start = Math.max(0, pos - 60);
  18. const end = Math.min(content.length, pos + 60);
  19. console.log('\nFound "' + term + '" at byte', pos);
  20. console.log(' Context:', content.substring(start, end));
  21. pos++;
  22. count++;
  23. }
  24. }