This is the documentation of version 0.61.0. Go to the latest version, 1.0.0-rc.5.
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 — a stylisation such as a watercolour or a posterise 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: 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.