import type { IAnimateOption, IAttribute, IBlendOptions, IBuffer, ICameraService, IElements, IFontService, IGlobalConfigService, IIconService, ILayer, ILayerModel, ILayerService, IMapService, IModel, IModelUniform, IPickingService, IRenderOptions, IRendererService, IShaderModuleService, IStencilOptions, IStyleAttributeService, ITexture2D, ITexture2DInitializationOptions, ShaderDefine, ShaderInject, Triangulation } from '@antv/l7-core'; import { COMMON_ATTRIBUTE_LOCATION } from './CommonStyleAttribute'; export type styleSingle = number | string | [string, (single: any) => number] | [string, [number, number]]; export type styleOffset = string | [number, number] | [string, (single: any) => number]; export type styleColor = string | [string, (single: any) => string] | [string, [string, string]]; export interface IDataTextureFrame { data: number[]; width: number; height: number; } export interface ICellProperty { attr: string; count: number; } type AttributeLayoutLocationType = typeof COMMON_ATTRIBUTE_LOCATION & Record; export default class BaseModel implements ILayerModel { triangulation: Triangulation; uniformBuffers: IBuffer[]; textures: ITexture2D[]; /** * Attribute Layout Location in Shader */ protected get attributeLocation(): AttributeLayoutLocationType; createTexture2D: (options: ITexture2DInitializationOptions) => ITexture2D; preStyleAttribute: Record; protected encodeStyleAttribute: Record; protected layer: ILayer; protected dataTexture: ITexture2D; protected DATA_TEXTURE_WIDTH: number; protected dataTextureTest: boolean; protected readonly configService: IGlobalConfigService; protected shaderModuleService: IShaderModuleService; protected rendererService: IRendererService; protected iconService: IIconService; protected fontService: IFontService; protected styleAttributeService: IStyleAttributeService; protected mapService: IMapService; protected cameraService: ICameraService; protected layerService: ILayerService; protected pickingService: IPickingService; protected attributeUnifoms: IBuffer; protected commonUnifoms: IBuffer; constructor(layer: ILayer); getBlend(): IBlendOptions; getStencil(option: Partial): Partial; getDefaultStyle(): unknown; getUninforms(): IModelUniform; getAnimateUniforms(): IModelUniform; needUpdate(): Promise; buildModels(): Promise; initModels(): Promise; clearModels(refresh?: boolean): void; getAttribute(): { attributes: { [attributeName: string]: IAttribute; }; elements: IElements; }; prerender(): void; render(renderOptions?: Partial): void; protected registerBuiltinAttributes(): void; protected animateOption2Array(option: IAnimateOption): number[]; protected startModelAnimate(): void; protected getInject(): ShaderInject; protected getDefines(): Record; protected getStyleAttribute(): { [key: string]: any; }; protected registerStyleAttribute(): void; /** * 注册 Position 属性 64 位地位部分,当经纬度数据开启双精度浮点数使用, * 避免大于 20层级以上出现数据偏移 */ protected registerPosition64LowAttribute(enable64bitPosition?: boolean): void; updateEncodeAttribute(type: string, flag: boolean): void; initUniformsBuffer(): void; protected getUniformsBufferInfo(uniformsOption: { [key: string]: any; }): { uniformsOption: { [key: string]: any; }; uniformsLength: number; uniformsArray: number[]; }; protected getCommonUniformsInfo(): { uniformsArray: number[]; uniformsLength: number; uniformsOption: { [key: string]: any; }; }; updateStyleUnifoms(): void; } export {};