TomTom Maps for JavaScript
    Preparing search index...

    Type Alias MapEffectsPass

    A full-screen GPU pass of your own, run inside the plugin's WebGL chain, such as a watercolour or posterise stylisation that the rest of the effects should then work on.

    type MapEffectsPass = {
        fragment: string;
        id: string;
        placement?: MapEffectsPassPlacement;
        uniforms?: MapEffectsPassUniforms | (() => MapEffectsPassUniforms);
    }
    Index
    fragment: string

    A GLSL ES 3.00 fragment shader with your own uniforms and main. The plugin declares the version, the precisions, uniform sampler2D uSource (the picture so far), in vec2 vUv and out vec4 fragColor. Declaring any of them again is a compile error.

    id: string

    Names the pass for MapEffects.removePass. Adding a pass under an id in use replaces it in place.

    Defaults to before-depth-of-field.

    The uniform values, or a function returning them, called on every draw. A function that throws skips the pass for that draw, with one warning.