meshwriter-cudu 3.0.2 → 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 +112 -39
- package/dist/meshwriter.cjs.js.map +1 -1
- package/dist/meshwriter.esm.js +112 -39
- 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 +112 -39
- package/dist/meshwriter.umd.js.map +1 -1
- package/dist/src/fogPlugin.d.ts +35 -4
- 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 +100 -30
- package/src/material.js +12 -9
- 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/src/fogPlugin.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Plugin that applies scene fog to text materials
|
|
3
|
-
*
|
|
2
|
+
* Plugin that applies scene fog to text materials uniformly.
|
|
3
|
+
* Handles fog for both diffuse and emissive components in one pass.
|
|
4
4
|
*/
|
|
5
5
|
export class TextFogPlugin extends MaterialPluginBase {
|
|
6
6
|
/**
|
|
@@ -14,19 +14,50 @@ export class TextFogPlugin extends MaterialPluginBase {
|
|
|
14
14
|
* @param {import('@babylonjs/core/Meshes/mesh').Mesh} mesh
|
|
15
15
|
*/
|
|
16
16
|
prepareDefines(defines: object, scene: import("@babylonjs/core/scene").Scene, mesh: import("@babylonjs/core/Meshes/mesh").Mesh): void;
|
|
17
|
+
/**
|
|
18
|
+
* Define our own fog uniforms since material.fogEnabled = false
|
|
19
|
+
* means Babylon's built-in fog uniforms won't be available.
|
|
20
|
+
*
|
|
21
|
+
* - ubo: Used when Uniform Buffer Objects are enabled (Safari)
|
|
22
|
+
* - fragment: Used when UBOs are disabled (Chrome) - provides standalone declarations
|
|
23
|
+
*
|
|
24
|
+
* Babylon.js chooses between these based on engine capabilities.
|
|
25
|
+
*/
|
|
17
26
|
getUniforms(): {
|
|
18
|
-
ubo:
|
|
27
|
+
ubo: {
|
|
28
|
+
name: string;
|
|
29
|
+
size: number;
|
|
30
|
+
type: string;
|
|
31
|
+
}[];
|
|
32
|
+
vertex: string;
|
|
33
|
+
fragment: string;
|
|
19
34
|
};
|
|
35
|
+
/**
|
|
36
|
+
* Bind fog values from the scene to our custom uniforms
|
|
37
|
+
* @param {import('@babylonjs/core/Materials/uniformBuffer').UniformBuffer} uniformBuffer
|
|
38
|
+
* @param {import('@babylonjs/core/scene').Scene} scene
|
|
39
|
+
* @param {import('@babylonjs/core/Engines/engine').Engine} engine
|
|
40
|
+
* @param {import('@babylonjs/core/Meshes/subMesh').SubMesh} subMesh
|
|
41
|
+
*/
|
|
42
|
+
bindForSubMesh(uniformBuffer: import("@babylonjs/core/Materials/uniformBuffer").UniformBuffer, scene: import("@babylonjs/core/scene").Scene, engine: import("@babylonjs/core/Engines/engine").Engine, subMesh: import("@babylonjs/core/Meshes/subMesh").SubMesh): void;
|
|
20
43
|
/**
|
|
21
44
|
* Clean up the plugin
|
|
22
45
|
*/
|
|
23
46
|
dispose(): void;
|
|
24
47
|
/**
|
|
25
|
-
* Inject shader code to
|
|
48
|
+
* Inject shader code to calculate fog distance and apply fog blending
|
|
26
49
|
* @param {string} shaderType - 'vertex' or 'fragment'
|
|
27
50
|
*/
|
|
28
51
|
getCustomCode(shaderType: string): {
|
|
52
|
+
CUSTOM_VERTEX_DEFINITIONS: string;
|
|
53
|
+
CUSTOM_VERTEX_MAIN_END: string;
|
|
54
|
+
CUSTOM_FRAGMENT_DEFINITIONS?: undefined;
|
|
55
|
+
CUSTOM_FRAGMENT_BEFORE_FRAGCOLOR?: undefined;
|
|
56
|
+
} | {
|
|
57
|
+
CUSTOM_FRAGMENT_DEFINITIONS: string;
|
|
29
58
|
CUSTOM_FRAGMENT_BEFORE_FRAGCOLOR: string;
|
|
59
|
+
CUSTOM_VERTEX_DEFINITIONS?: undefined;
|
|
60
|
+
CUSTOM_VERTEX_MAIN_END?: undefined;
|
|
30
61
|
};
|
|
31
62
|
}
|
|
32
63
|
import { MaterialPluginBase } from './babylonImports.js';
|