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.
- package/dist/meshwriter.cjs.js +14 -5
- package/dist/meshwriter.cjs.js.map +1 -1
- package/dist/meshwriter.esm.js +14 -5
- package/dist/meshwriter.esm.js.map +1 -1
- package/dist/meshwriter.min.js +1 -1
- package/dist/meshwriter.min.js.map +1 -1
- package/dist/meshwriter.umd.js +14 -5
- package/dist/meshwriter.umd.js.map +1 -1
- package/dist/src/fogPlugin.d.ts +6 -1
- package/fonts/baked/atkinson-hyperlegible-next-200.js +1973 -0
- package/fonts/baked/atkinson-hyperlegible-next-200.json +1 -1
- package/fonts/baked/atkinson-hyperlegible-next-300.js +1995 -0
- package/fonts/baked/atkinson-hyperlegible-next-300.json +1 -1
- package/fonts/baked/atkinson-hyperlegible-next-400.js +1949 -0
- package/fonts/baked/atkinson-hyperlegible-next-400.json +1 -1
- package/fonts/baked/atkinson-hyperlegible-next-500.js +1981 -0
- package/fonts/baked/atkinson-hyperlegible-next-500.json +1 -1
- package/fonts/baked/atkinson-hyperlegible-next-600.js +1982 -0
- package/fonts/baked/atkinson-hyperlegible-next-600.json +1 -1
- package/fonts/baked/atkinson-hyperlegible-next-700.js +1974 -0
- package/fonts/baked/atkinson-hyperlegible-next-700.json +1 -1
- package/fonts/baked/atkinson-hyperlegible-next-800.js +1977 -0
- package/fonts/baked/atkinson-hyperlegible-next-800.json +1 -1
- package/fonts/baked/manifest.json +10 -28
- package/package.json +3 -2
- package/src/fogPlugin.js +14 -5
- package/fonts/baked/atkinson-hyperlegible-next-250.json +0 -1
- package/fonts/baked/atkinson-hyperlegible-next-350.json +0 -1
- package/fonts/baked/atkinson-hyperlegible-next-450.json +0 -1
- package/fonts/baked/atkinson-hyperlegible-next-550.json +0 -1
- package/fonts/baked/atkinson-hyperlegible-next-650.json +0 -1
- package/fonts/baked/atkinson-hyperlegible-next-750.json +0 -1
package/dist/meshwriter.esm.js
CHANGED
|
@@ -560,7 +560,12 @@ class TextFogPlugin extends MaterialPluginBase {
|
|
|
560
560
|
|
|
561
561
|
/**
|
|
562
562
|
* Define our own fog uniforms since material.fogEnabled = false
|
|
563
|
-
* means Babylon's built-in fog uniforms won't be available
|
|
563
|
+
* means Babylon's built-in fog uniforms won't be available.
|
|
564
|
+
*
|
|
565
|
+
* - ubo: Used when Uniform Buffer Objects are enabled (Safari)
|
|
566
|
+
* - fragment: Used when UBOs are disabled (Chrome) - provides standalone declarations
|
|
567
|
+
*
|
|
568
|
+
* Babylon.js chooses between these based on engine capabilities.
|
|
564
569
|
*/
|
|
565
570
|
getUniforms() {
|
|
566
571
|
return {
|
|
@@ -569,7 +574,10 @@ class TextFogPlugin extends MaterialPluginBase {
|
|
|
569
574
|
{ name: 'textFogColor', size: 3, type: 'vec3' }
|
|
570
575
|
],
|
|
571
576
|
vertex: '',
|
|
572
|
-
fragment:
|
|
577
|
+
fragment: `
|
|
578
|
+
uniform vec4 textFogInfos;
|
|
579
|
+
uniform vec3 textFogColor;
|
|
580
|
+
`
|
|
573
581
|
};
|
|
574
582
|
}
|
|
575
583
|
|
|
@@ -632,11 +640,12 @@ class TextFogPlugin extends MaterialPluginBase {
|
|
|
632
640
|
|
|
633
641
|
if (shaderType === 'fragment') {
|
|
634
642
|
return {
|
|
635
|
-
// Declare
|
|
643
|
+
// Declare varying in fragment shader
|
|
644
|
+
// Note: textFogInfos and textFogColor uniforms come from the Material UBO
|
|
645
|
+
// (defined in getUniforms). Don't redeclare them here - Safari's strict
|
|
646
|
+
// GLSL compiler rejects duplicate declarations.
|
|
636
647
|
'CUSTOM_FRAGMENT_DEFINITIONS': `
|
|
637
648
|
#ifdef MESHWRITER_TEXT_FOG
|
|
638
|
-
uniform vec4 textFogInfos;
|
|
639
|
-
uniform vec3 textFogColor;
|
|
640
649
|
varying vec3 textFogDistance;
|
|
641
650
|
#endif
|
|
642
651
|
`,
|