/// <reference types="gl-matrix/index.js" />
/*!
 * @maptalks/gl v0.109.0
 * LICENSE : UNLICENSED
 * (c) 2016-2025 maptalks.com
 */
export { default as createREGL } from '@maptalks/regl';
import * as reshader from '@maptalks/reshader.gl';
import { mat4, vec3 } from '@maptalks/reshader.gl';
export { reshader };
export { earcut, glMatrix, mat2, mat2d, mat3, mat4, quat, quat2, vec2, vec3, vec4 } from '@maptalks/reshader.gl';
import * as maptalks from 'maptalks';
import { Polygon, LayerJSONType, MixinConstructor, Extent } from 'maptalks';
import * as gl_matrix from 'gl-matrix';
export { GLContext } from '@maptalks/fusiongl';
export { default as color } from 'color';

declare const TerrainLayer_base: {
    new (...args: any[]): {
        _maskProjViewMatrix: gl_matrix.mat4;
        _maskExtentInWorld: [number, number, number, number];
        removeMask(masks: any): any;
        setMask(masks: any): any;
        onAdd(): void;
        getMasks(): any;
        onGeometryEvent(param: any): void;
        identifyMask(point: any, options: any): any[];
        remove(): void;
        updateMask(extent: any): {
            projViewMatrix: gl_matrix.mat4;
            extentInWorld: [number, number, number, number];
        };
        getProjViewMatrixInOrtho(extent: any): {
            mapExtent: any;
            projViewMatrix: gl_matrix.mat4;
        };
        updateMaskExtent(): void;
        getMaskExtent(): {
            extent: maptalks.Extent;
            ratio: number;
            minHeight: any;
        };
    };
} & typeof maptalks.TileLayer;
declare class TerrainLayer extends TerrainLayer_base {
    constructor(id: any, options: any);
    onAdd(): void;
    getTileUrl(x: any, y: any, z: any): string;
    _skuToken: string;
    _createSkuToken(): string;
    _getExaggeration(): any;
    setSkinLayers(skinLayers: any): void;
    _skinLayers: any;
    getSkinTiles(layer: any): {
        tileGrids: any[];
        count: number;
    };
    getSkinLayer(index: any): any;
    getSkinLayers(): any;
    getSkinCount(): any;
    queryTerrainByProjCoord(prjCoord: any, out: any): any;
    queryTileTerrainByProjCoord(prjCoord: any, tileId: any, tileIndex: any, out: any): any;
    queryTileTerrainByPointAtRes(point: any, res: any, tileId: any, tileIndex: any, out: any): any;
    queryTerrain(coordinate: any, out: any): any;
    queryTileMesh(tile: any, cb: any): void;
    getTerrainTiles(layer: any, tileInfo: any): any;
    isTerrainTileLoaded(tileId: any): boolean;
    updateMaterial(mat: any): void;
    setMaterial(mat: any): void;
    _createTileNode(x: any, y: any, z: any, idx: any, idy: any, res: any, error: any, parentId: any, extent2d: any, tileId: any): {
        parent: any;
        layer: string;
        x: any;
        y: any;
        z: any;
        idx: any;
        idy: any;
        res: any;
        extent2d: any;
        id: any;
        url: string;
        offset: any;
        error: any;
        children: any[];
    };
}

declare class Mask extends Polygon {
    getMode(): any;
    remove(): this;
    getMesh(regl: any, ratio: any, minHeight: any): any;
    _mesh: any;
    setCoordinates(coordinates: any): this;
    _createGeometry(regl: any): reshader.Geometry | {
        geometry: reshader.Geometry;
        copyGeometry: reshader.Geometry;
    };
    _createPOSITION(data: any, hasHeight: any): {
        positions: number[];
        uvs: number[];
        triangles: any;
    };
    _createTexcoords(vertices: any, dimension: any): number[];
    _createBilinearPOSITON(data: any): {
        positions: number[];
        uvs: number[];
        triangles: number[];
    };
    _positions: any[];
    clearMesh(): void;
    maskGeoJSON: any;
    _getMaskMode(): any;
    _getMaskColor(): any;
    _altitudeToPoint(altitude?: number): number;
    _setLocalTransform(mesh: any): void;
    _dispose(): void;
    containsPoint(coordinate: any): boolean;
    _contains(coordinates: any, coordinate: any): boolean;
    _calArea(coordinates: any): number;
}

declare class GroupGLLayer extends maptalks.Layer {
    /**
     * Reproduce a GroupGLLayer from layer's profile JSON.
     * @param  {Object} layerJSON - layer's profile JSON
     * @return {GroupGLLayer}
     * @static
     * @private
     * @function
     */
    static fromJSON(layerJSON: object): GroupGLLayer;
    options: GroupGLLayerOptions;
    layers: maptalks.Layer[];
    /**
     * @param id    - layer's id
     * @param layers      - layers to add
     * @param  [options=null]          - construct options
     */
    constructor(id: string, layers: maptalks.Layer[], options: GroupGLLayerOptions);
    sortLayersByZIndex(): void;
    setSceneConfig(sceneConfig: GroupGLLayerSceneConfig): this;
    getSceneConfig(): GroupGLLayerSceneConfig;
    getGroundConfig(): SceneGround;
    getWeatherConfig(): SceneWeather;
    getScanEffectConfig(): ScanEffect;
    /**
     * Add a new Layer.
     * @param layer - new layer
     * @param index - index to insert
     * @returns {GroupGLLayer} this
     */
    addLayer(layer: maptalks.Layer, index?: number): this;
    removeLayer(layer: maptalks.Layer): this;
    clearLayers(): this;
    getPolygonOffsetCount(): number;
    /**
     * Get children TileLayer
     * @returns {TileLayer[]}
     */
    getLayers(): maptalks.Layer[];
    /**
     * 导出GroupGLLayer的序列化JSON对象，可以用于反序列化为一个GroupGLLayer对象。
     * @english
     * Export the GroupGLLayer's profile json. <br>
     * Layer's profile is a snapshot of the layer in JSON format. <br>
     * It can be used to reproduce the instance by [fromJSON]{@link Layer#fromJSON} method
     * @return layer's profile JSON
     */
    toJSON(): LayerJSONType;
    onLoadEnd(): void;
    onRemove(): void;
    getChildLayer(id: string): maptalks.Layer | null;
    getLayer(id: string): maptalks.Layer | null;
    addAnalysis(analysis: Analysis): void;
    removeAnalysis(analysis: Analysis): void;
    clearAnalysis(): void;
    /**
     * 查询给定坐标上的数据要素
     *
     * @english
     * Identify the geometries on the given coordinate
     * @param  coordinate   - coordinate to identify
     * @param  options      - options
     * @return
     */
    identify(coordinate: maptalks.Coordinate, options: object): any[];
    /**
     * 查询给定容器坐标（containerPoint）上的数据要素
     * @english
     * Identify the data at the given point
     * @param point - container point to identify
     * @param options - the identify options
     **/
    identifyAtPoint(point: maptalks.Point, options?: any): any[];
    getTerrain(): TerrainOptions | undefined | null;
    setTerrain(info: TerrainOptions | null): this;
    removeTerrain(): this;
    updateTerrainMaterial(mat: object): void;
    queryTerrain(coord: maptalks.Coordinate, out: QueryHitResult): QueryHitResult;
    queryTerrainAtPoint(containerPoint: maptalks.Point): any;
    query3DTilesAtPoint(containerPoint: maptalks.Point): maptalks.Coordinate;
    _queryRayCast(containerPoint: maptalks.Point, meshes: any[]): any;
    queryTerrainByProjCoord(projCoord: maptalks.Coordinate, out: QueryHitResult): QueryHitResult;
    getTerrainLayer(): TerrainLayer | undefined;
    fire(...args: any[]): void;
}
type TerrainOptions = {
    type: 'mapbox' | 'tianditu' | 'cesium' | 'cesium-ion';
    urlTemplate: string;
    spatialReference?: string;
    shader?: 'lit' | 'default';
    subdomains?: string[];
    tileSystem?: number[];
    tileSize?: number;
    zoomOffset?: number;
    requireSkuToken?: boolean;
    depthMask?: boolean;
    depthFunc?: ComparisonOperatorType;
    blendSrc?: BlendingFunction;
    blendDst?: BlendingFunction;
    material?: object;
    masks?: Mask[];
};
type QueryHitResult = [number | null, 0 | 1];
type GroupGLLayerOptions = {
    renderer?: 'gl';
    antialias?: true;
    extensions?: string[];
    single?: boolean;
    onlyWebGL1?: boolean;
    optionalExtensions?: string[];
    forceRenderOnZooming?: true;
    forceRenderOnMoving?: true;
    forceRenderOnRotating?: true;
    viewMoveThreshold?: number;
    geometryEvents?: boolean;
    multiSamples?: number;
    forceRedrawPerFrame?: boolean;
    sceneConfig?: GroupGLLayerSceneConfig;
    terrain?: TerrainOptions;
};
declare enum SkyboxMode {
    AMBIENT = 0,
    REALISTIC = 1
}
type SceneEnvironment = {
    enable: boolean;
    mode?: SkyboxMode;
    level?: 0 | 1 | 2 | 3;
    brightness?: number;
};
type SceneGround = {
    enable?: boolean;
    renderPlugin: {
        type: 'lit' | 'fill';
    };
    symbol: {
        ssr?: true;
        material?: any;
        polygonFill?: number[];
        polygonOpacity?: number;
    };
};
type SceneWeather = {
    enable?: boolean;
    fog?: {
        enable?: boolean;
        start?: number;
        end?: number;
        color?: number[];
    };
    rain?: {
        enable?: boolean;
        density?: number;
        windDirectionX?: number;
        windDirectionY?: number;
        rainTexture: string;
    };
    snow?: {
        enable?: boolean;
    };
};
type ScanEffectItem = {
    center: maptalks.Coordinate;
    radius: number;
    speed: number;
    color: number[];
};
type ScanEffect = {
    enable?: boolean;
    effects: ScanEffectItem[];
};
type SceneShadow = {
    enable?: boolean;
    type?: 'esm';
    quality?: 'low' | 'medium' | 'high';
    opacity?: number;
    color?: number[];
    blurOffset?: number;
};
type ScenePostProcess = {
    enable?: boolean;
    antialias?: {
        enable?: boolean;
    };
    ssr?: {
        enable?: boolean;
    };
    sharpen?: {
        enable?: boolean;
        factor?: number;
    };
    bloom?: {
        enable?: boolean;
        factor?: number;
        threshold?: number;
        radius?: number;
    };
    outline: {
        enable?: boolean;
        highlightFactor?: number;
        outlineFactor?: number;
        outlineWidth?: number;
        outlineColor?: number[];
    };
    scanEffect?: ScanEffect;
};
type GroupGLLayerSceneConfig = {
    environment?: SceneEnvironment;
    shadow?: SceneShadow;
    ground?: SceneGround;
    weather?: SceneWeather;
    postProcess?: ScenePostProcess;
};

declare class GroundPainter {
    renderer: reshader.Renderer;
    static getGroundTransform(out: any, map: any): any;
    constructor(regl: any, layer: any);
    needToRedraw(): any;
    getMap(): any;
    getSymbol(): any;
    isEnable(): any;
    paint(context: any): boolean;
    _isInSSRPhase(context: any): boolean;
    update(): void;
    setToRedraw(): void;
    dispose(): void;
    _getShader(): any;
    _getUniformValues(context: any): any;
    _getCommonUniforms(context: any): any;
    _setIncludeUniformValues(uniforms: any, context: any): void;
    _disposeIblTextures(): void;
    _init(): void;
    _getExtraCommandProps(): {
        viewport: {
            x: number;
            y: number;
            width: () => any;
            height: () => any;
        };
        cull: {
            enable: boolean;
        };
        depth: {
            enable: boolean;
            mask: () => any;
            range: () => any;
            func: string;
        };
        blend: {
            enable: boolean;
            func: {
                src: string;
                dst: string;
            };
            equation: string;
        };
        polygonOffset: {
            enable: boolean;
            offset: {
                factor: (context: any, props: any) => any;
                units: (context: any, props: any) => any;
            };
        };
    };
    _hasIBL(): boolean;
    _createGround(): void;
    _transformGround(): void;
    _getGroundDefines(context: any): any;
    _updateMaterial(): void;
    _onMaterialComplete(): void;
    _createPatternTexture(image: any): any;
    _parseColor(c: any): any;
    _getUVOffsetAnim(): any;
    getRenderMeshes(): reshader.Mesh[];
}
//# sourceMappingURL=GroundPainter.d.ts.map

declare const canvasCompatible: <T extends maptalks.MixinConstructor>(Base: T) => {
    new (...args: any[]): {
        [x: string]: any;
        createContext(): void;
        clearContext(): void;
    };
} & T;
//# sourceMappingURL=CanvasCompatible.d.ts.map

declare function clearShowOnly(mesh: any): void;
declare function showOnly(regl: any, mesh: any, items: any, timestamp: any, feaIdIndiceMap: any): void;
declare function clearHighlight(mesh: any): void;
declare function highlightMesh(regl: any, mesh: any, highlighted: any, timestamp: any, feaIdIndiceMap: any): void;
declare function deleteHighlightBloomMesh(mesh: any): void;

declare const highlight_d_clearHighlight: typeof clearHighlight;
declare const highlight_d_clearShowOnly: typeof clearShowOnly;
declare const highlight_d_deleteHighlightBloomMesh: typeof deleteHighlightBloomMesh;
declare const highlight_d_highlightMesh: typeof highlightMesh;
declare const highlight_d_showOnly: typeof showOnly;
declare namespace highlight_d {
  export { highlight_d_clearHighlight as clearHighlight, highlight_d_clearShowOnly as clearShowOnly, highlight_d_deleteHighlightBloomMesh as deleteHighlightBloomMesh, highlight_d_highlightMesh as highlightMesh, highlight_d_showOnly as showOnly };
}

declare function fillIncludes(defines: any, uniformDeclares: any, context: any): void;
declare function setIncludeUniformValues(uniforms: any, context: any): void;

declare const context_d_fillIncludes: typeof fillIncludes;
declare const context_d_setIncludeUniformValues: typeof setIncludeUniformValues;
declare namespace context_d {
  export { context_d_fillIncludes as fillIncludes, context_d_setIncludeUniformValues as setIncludeUniformValues };
}

declare class HeatmapProcess {
    constructor(regl: any, sceneConfig: any, layer: any, colorStops: any, stencil: any, polygonOffset: any);
    renderer: reshader.Renderer;
    sceneConfig: any;
    _layer: any;
    _colorStops: any;
    _stencil: any;
    _polygonOffset: any;
    _outputSize: any[];
    render(scene: any, uniforms: any, fbo: any): number;
    dispose(): void;
    _createColorRamp(): void;
    _rampCanvas: HTMLCanvasElement;
    _rampCtx: CanvasRenderingContext2D;
    _colorRampTex: any;
    _check(): void;
    _init(): void;
    _createGround(): void;
    _ground: reshader.Mesh;
    _groundScene: reshader.Scene;
    _transformGround(): void;
    _createHeatmapTex(): void;
    _heatmapFBO: any;
    _createShader(): void;
    _heatmapShader: reshader.HeatmapShader;
    _displayShader: reshader.HeatmapDisplayShader;
}

declare function export_default<T extends MixinConstructor>(Base: T): {
    new (...args: any[]): {
        _maskProjViewMatrix: mat4;
        _maskExtentInWorld: [number, number, number, number];
        removeMask(masks: undefined | null | any): any;
        setMask(masks: any): any;
        onAdd(): void;
        getMasks(): any;
        onGeometryEvent(param: any): void;
        identifyMask(point: any, options: any): any[];
        remove(): void;
        updateMask(extent: any): {
            projViewMatrix: mat4;
            extentInWorld: [number, number, number, number];
        };
        getProjViewMatrixInOrtho(extent: any): {
            mapExtent: any;
            projViewMatrix: mat4;
        };
        updateMaskExtent(): void;
        getMaskExtent(): {
            extent: Extent;
            ratio: number;
            minHeight: any;
        };
    };
} & T;

declare function _default(Base: any): {
    new (): {
        [x: string]: any;
        setMask(extent: any, projViewMatrix: any, ratio: any, minHeight: any): void;
        viewport: {
            x: number;
            y: number;
            width: () => any;
            height: () => any;
        };
        _extentPass: reshader.ExtentPass;
        needToRedraw(): boolean;
        getMaskUniforms(): any;
        getMaskDefines(): {};
        _maskDefines: {};
        updateMaskDefines(mesh: any): void;
        _clearMask(): void;
        _deleteMaskUniforms(): void;
    };
    [x: string]: any;
};

declare class ClipMask extends Mask {
    constructor(coordinates: any, options: any);
    _createMesh(regl: any): reshader.Mesh;
    _updateUniforms(mesh: any, ratio: any, minHeight: any): void;
    setHeightRange(heightRange: any): void;
    getHeightRange(): any;
    _getHeightRange(): number[];
    _setDefines(mesh: any): void;
}

declare class ClipInsideMask extends ClipMask {
    _mode: string;
}

declare class ClipOutsideMask extends ClipMask {
    _mode: string;
}

declare class FlatMask extends Mask {
    constructor(coordinates: any, options: any);
    setFlatheight(flatHeight: any): void;
    _createMesh(regl: any): reshader.Mesh;
    _updateUniforms(mesh: any): void;
    _setDefines(mesh: any): void;
    _getHeightRange(): any[];
}

declare class FlatInsideMask$1 extends FlatMask {
    _mode: string;
}

declare class FlatInsideMask extends FlatMask {
    _mode: string;
}

declare class ColorMask extends Mask {
    constructor(coordinates: any, options: any);
    _mode: string;
    setHeightRange(heightRange: any): void;
    _createMesh(regl: any): reshader.Mesh;
    _updateUniforms(mesh: any, ratio: any, minHeight: any): void;
    _setDefines(mesh: any): void;
    _getHeightRange(): number[];
}

declare class VideoMask extends Mask {
    constructor(coordinates: any, options: any);
    _mode: string;
    play(): void;
    pause(): void;
    setAudio(audio: any): void;
    setUrl(url: any): void;
    getState(): string;
    _createMesh(regl: any): reshader.Mesh;
    _copyMesh: reshader.Mesh;
    _updateUniforms(mesh: any): void;
    _setDefines(mesh: any): void;
    _createVideoTexture(regl: any): any;
    _createVideo(): void;
    _videoState: string;
    _video: HTMLElement;
    _update(): void;
    _needUpdate(): boolean;
}

declare class ImageMask extends Mask {
    /**
     * @param  {Object} options.url   image resource url
     */
    constructor(coordinates: any, options: any);
    _mode: string;
    setUrl(url: any): void;
    _createMesh(regl: any): reshader.Mesh;
    _copyMesh: reshader.Mesh;
    _updateUniforms(mesh: any): void;
    _setDefines(mesh: any): void;
    _createTexture(imageTexture: any): void;
    getBBox(): [reshader.vec3, reshader.vec3];
}

declare class ElevateMask extends FlatMask {
    _mode: string;
    setElevation(elevation: any): void;
}

declare class BoxClipMask extends ClipMask {
    _position: any;
    setPosition(position: any): void;
    getPosition(): any;
    setWidth(width: any): void;
    setLength(length: any): void;
    setHeight(height: any): void;
    setRotation(rotation: any): void;
    _updateCoordinates(): void;
    _generateCoordinates(map: any, center: any, length: any, width: any, height: any, rotation: any): {
        coordinates: any[][];
        heightRange: any[];
    };
    _rotatePoint(points: any, center: any, rotation: any): any;
}

declare class BoxInsideClipper extends BoxClipMask {
    _mode: string;
}

declare class BoxOutsideClipper extends BoxClipMask {
    _mode: string;
}

declare class RayCaster {
    constructor(from: any, to: any, isLngLat?: boolean);
    _from: any;
    _to: any;
    _isLngLat: boolean;
    setFromPoint(from: any): void;
    setToPoint(to: any): void;
    test(meshes: any, map: any, options?: {}): {
        mesh: any;
        coordinates: {
            coordinate: any;
            indices: any[];
            normal: vec3;
        }[];
    }[];
    _testMesh(mesh: any, ray: any, map: any, positions: any, altitudes: any, indices: any, dim: any, matrix: any, count: any): {
        coordinate: any;
        indices: any[];
        normal: vec3;
    }[];
    _toWorldPosition(out: any, map: any, pos: any, altitude: any, matrix: any): any;
    _testIntersection(out: any, triangle: any, ray: any): any;
    _checkBBox(bbox: any, ray: any): any;
}

declare class Measure3DTool extends maptalks.DrawTool {
    constructor(options: any);
    _drawCoordinates: any[];
    addTo(map: any): this;
    _map: any;
    _addHelperLayer(): void;
    _afterEnable(): void;
    _afterDisable(): void;
    _getPickedCoordinate(e: any): any;
    _msOnDrawStart(e: any): void;
    _first: boolean;
    _msOnDrawVertex(e: any): void;
    _msOnMouseMove(e: any): void;
    _msOnDrawEnd(e: any): void;
    _drawEnd(): void;
    _helperGeometry: any;
    _label: any;
    remove(): void;
    clear(): void;
}

declare class Distance3DTool extends Measure3DTool {
    _helperLayer: maptalks.DrawToolLayer;
    _markerLayer: maptalks.DrawToolLayer;
    _drawVertexMarker(): void;
    _drawLabel(): void;
    _getUnitContent(length: any): string;
    _measure: any;
    _units: string;
    _addHelperGeometry(coordinate: any): void;
    getMeasureResult(): any;
}

declare class Area3DTool extends Measure3DTool {
    _helperLayer: maptalks.DrawToolLayer;
    _markerLayer: maptalks.DrawToolLayer;
    _drawVertexMarker(): void;
    _getPolygonCoordinates(coordinates: any): any;
    _drawLabel(): void;
    _getUnitContent(area: any): string;
    _measure: any;
    _units: string;
    _addHelperGeometry(coordinate: any): void;
    _polygon: maptalks.Polygon;
    getMeasureResult(): number;
}

declare class Height3DTool extends Measure3DTool {
    _helperLayer: maptalks.DrawToolLayer;
    _markerLayer: maptalks.DrawToolLayer;
    _drawVertexMarker(): void;
    _drawLabel(coordinates: any, distances: any): void;
    _getUnitContent(length: any): string;
    _measure: any;
    _units: string;
    _addHelperGeometry(coordinate: any): void;
    getMeasureResult(): any;
}

export { Area3DTool, BoxInsideClipper as BoxInsideClipMask, BoxOutsideClipper as BoxOutsideClipMask, canvasCompatible as CanvasCompatible, ClipInsideMask, ClipOutsideMask, ColorMask, context_d as ContextUtil, Distance3DTool, ElevateMask, FlatInsideMask$1 as FlatInsideMask, FlatInsideMask as FlatOutsideMask, GroundPainter, GroupGLLayer, HeatmapProcess, Height3DTool, highlight_d as HighlightUtil, ImageMask, export_default as MaskLayerMixin, _default as MaskRendererMixin, Measure3DTool, RayCaster, VideoMask };
