meshwriter-cudu 3.0.3 → 3.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (32) hide show
  1. package/dist/meshwriter.cjs.js +14 -5
  2. package/dist/meshwriter.cjs.js.map +1 -1
  3. package/dist/meshwriter.esm.js +14 -5
  4. package/dist/meshwriter.esm.js.map +1 -1
  5. package/dist/meshwriter.min.js +1 -1
  6. package/dist/meshwriter.min.js.map +1 -1
  7. package/dist/meshwriter.umd.js +14 -5
  8. package/dist/meshwriter.umd.js.map +1 -1
  9. package/dist/src/fogPlugin.d.ts +6 -1
  10. package/fonts/baked/atkinson-hyperlegible-next-200.js +1973 -0
  11. package/fonts/baked/atkinson-hyperlegible-next-200.json +1 -1
  12. package/fonts/baked/atkinson-hyperlegible-next-300.js +1995 -0
  13. package/fonts/baked/atkinson-hyperlegible-next-300.json +1 -1
  14. package/fonts/baked/atkinson-hyperlegible-next-400.js +1949 -0
  15. package/fonts/baked/atkinson-hyperlegible-next-400.json +1 -1
  16. package/fonts/baked/atkinson-hyperlegible-next-500.js +1981 -0
  17. package/fonts/baked/atkinson-hyperlegible-next-500.json +1 -1
  18. package/fonts/baked/atkinson-hyperlegible-next-600.js +1982 -0
  19. package/fonts/baked/atkinson-hyperlegible-next-600.json +1 -1
  20. package/fonts/baked/atkinson-hyperlegible-next-700.js +1974 -0
  21. package/fonts/baked/atkinson-hyperlegible-next-700.json +1 -1
  22. package/fonts/baked/atkinson-hyperlegible-next-800.js +1977 -0
  23. package/fonts/baked/atkinson-hyperlegible-next-800.json +1 -1
  24. package/fonts/baked/manifest.json +10 -28
  25. package/package.json +3 -2
  26. package/src/fogPlugin.js +14 -5
  27. package/fonts/baked/atkinson-hyperlegible-next-250.json +0 -1
  28. package/fonts/baked/atkinson-hyperlegible-next-350.json +0 -1
  29. package/fonts/baked/atkinson-hyperlegible-next-450.json +0 -1
  30. package/fonts/baked/atkinson-hyperlegible-next-550.json +0 -1
  31. package/fonts/baked/atkinson-hyperlegible-next-650.json +0 -1
  32. package/fonts/baked/atkinson-hyperlegible-next-750.json +0 -1
@@ -564,7 +564,12 @@ class TextFogPlugin extends materialPluginBase.MaterialPluginBase {
564
564
 
565
565
  /**
566
566
  * Define our own fog uniforms since material.fogEnabled = false
567
- * means Babylon's built-in fog uniforms won't be available
567
+ * means Babylon's built-in fog uniforms won't be available.
568
+ *
569
+ * - ubo: Used when Uniform Buffer Objects are enabled (Safari)
570
+ * - fragment: Used when UBOs are disabled (Chrome) - provides standalone declarations
571
+ *
572
+ * Babylon.js chooses between these based on engine capabilities.
568
573
  */
569
574
  getUniforms() {
570
575
  return {
@@ -573,7 +578,10 @@ class TextFogPlugin extends materialPluginBase.MaterialPluginBase {
573
578
  { name: 'textFogColor', size: 3, type: 'vec3' }
574
579
  ],
575
580
  vertex: '',
576
- fragment: ''
581
+ fragment: `
582
+ uniform vec4 textFogInfos;
583
+ uniform vec3 textFogColor;
584
+ `
577
585
  };
578
586
  }
579
587
 
@@ -636,11 +644,12 @@ class TextFogPlugin extends materialPluginBase.MaterialPluginBase {
636
644
 
637
645
  if (shaderType === 'fragment') {
638
646
  return {
639
- // Declare uniforms and varying in fragment shader
647
+ // Declare varying in fragment shader
648
+ // Note: textFogInfos and textFogColor uniforms come from the Material UBO
649
+ // (defined in getUniforms). Don't redeclare them here - Safari's strict
650
+ // GLSL compiler rejects duplicate declarations.
640
651
  'CUSTOM_FRAGMENT_DEFINITIONS': `
641
652
  #ifdef MESHWRITER_TEXT_FOG
642
- uniform vec4 textFogInfos;
643
- uniform vec3 textFogColor;
644
653
  varying vec3 textFogDistance;
645
654
  #endif
646
655
  `,