@maptalks/vt 0.108.3 → 0.108.5
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/maptalks.vt.d.ts +267 -6
- package/dist/maptalks.vt.es.js +21 -14
- package/dist/maptalks.vt.es.js.map +1 -1
- package/dist/maptalks.vt.js +21 -14
- package/dist/maptalks.vt.js.map +1 -1
- package/package.json +3 -3
package/dist/maptalks.vt.d.ts
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @maptalks/vt v0.108.
|
|
2
|
+
* @maptalks/vt v0.108.5
|
|
3
3
|
* LICENSE : undefined
|
|
4
4
|
* (c) 2016-2025 maptalks.org
|
|
5
5
|
*/
|
|
6
6
|
import * as maptalks from 'maptalks';
|
|
7
7
|
import { FillSymbol, LineSymbol, MarkerCommonSymbol, TextSymbol, LayerIdentifyOptionsType, TileLayerOptionsType, LayerJSONType, OverlayLayerOptionsType } from 'maptalks';
|
|
8
|
-
import { reshader, GroundPainter } from '@maptalks/gl';
|
|
8
|
+
import { vec3, reshader, GroundPainter } from '@maptalks/gl';
|
|
9
|
+
import * as _______________gl_node_modules__maptalks_regl_dist_regl from '../../../../../gl/node_modules/@maptalks/regl/dist/regl';
|
|
9
10
|
|
|
10
11
|
interface FillDataConfig {
|
|
11
12
|
type?: "fill";
|
|
@@ -683,8 +684,107 @@ declare class DebugPainter {
|
|
|
683
684
|
declare class TileStencilRenderer {
|
|
684
685
|
constructor(regl: any, canvas: any, map: any);
|
|
685
686
|
_regl: any;
|
|
686
|
-
_geometry:
|
|
687
|
-
|
|
687
|
+
_geometry: {
|
|
688
|
+
data: Record<string, any>;
|
|
689
|
+
elements: any;
|
|
690
|
+
desc: {
|
|
691
|
+
positionSize?: number;
|
|
692
|
+
primitive?: _______________gl_node_modules__maptalks_regl_dist_regl.PrimitiveType;
|
|
693
|
+
positionAttribute?: string;
|
|
694
|
+
normalAttribute?: string;
|
|
695
|
+
uv0Attribute?: string;
|
|
696
|
+
uv1Attribute?: string;
|
|
697
|
+
color0Attribute?: string;
|
|
698
|
+
colorAttribute?: string;
|
|
699
|
+
tangentAttribute?: string;
|
|
700
|
+
pickingIdAttribute?: string;
|
|
701
|
+
textureCoordMatrixAttribute?: string;
|
|
702
|
+
altitudeAttribute?: string;
|
|
703
|
+
fillEmptyDataInMissingAttribute?: boolean;
|
|
704
|
+
static?: boolean;
|
|
705
|
+
};
|
|
706
|
+
semantic: Record<string, string>;
|
|
707
|
+
count: number;
|
|
708
|
+
properties: any;
|
|
709
|
+
indices: number[] | (Uint16Array | Uint32Array | Uint8Array | Int8Array | Int16Array | Float32Array);
|
|
710
|
+
boundingBox: {
|
|
711
|
+
min: vec3;
|
|
712
|
+
max: vec3;
|
|
713
|
+
vertex?: vec3[];
|
|
714
|
+
center: vec3;
|
|
715
|
+
combine(bbox: number[] | any): any;
|
|
716
|
+
dirty(): any;
|
|
717
|
+
getCenter(): vec3;
|
|
718
|
+
containPoint(p: number): boolean;
|
|
719
|
+
isFinite(): boolean;
|
|
720
|
+
updateVertex(): vec3[];
|
|
721
|
+
copy(out: any): any;
|
|
722
|
+
equals(box: any): boolean;
|
|
723
|
+
transform(positionMatrix: any, modelMatrix: any): any;
|
|
724
|
+
};
|
|
725
|
+
count1?: number;
|
|
726
|
+
offset?: number;
|
|
727
|
+
version: number;
|
|
728
|
+
getBuffer(name: string): any;
|
|
729
|
+
getAttrData(activeAttributes: {
|
|
730
|
+
name: string;
|
|
731
|
+
type: number;
|
|
732
|
+
}[] & {
|
|
733
|
+
key: string;
|
|
734
|
+
}): any;
|
|
735
|
+
getREGLData(regl: any, activeAttributes: {
|
|
736
|
+
name: string;
|
|
737
|
+
type: number;
|
|
738
|
+
}[] & {
|
|
739
|
+
key: string;
|
|
740
|
+
}, disableVAO: boolean): any;
|
|
741
|
+
generateBuffers(device: any): void;
|
|
742
|
+
getVertexCount(): number;
|
|
743
|
+
getColor0Size(): number;
|
|
744
|
+
deleteData(name: string): any;
|
|
745
|
+
updateData(name: string, data: any): any;
|
|
746
|
+
_updateGPUBuffer(buffer: GPUBuffer, data: any): any;
|
|
747
|
+
updateSubData(name: string, data: any, offset: number): any;
|
|
748
|
+
getPrimitive(): _______________gl_node_modules__maptalks_regl_dist_regl.PrimitiveType;
|
|
749
|
+
getElements(): any;
|
|
750
|
+
setElements(elements: any, count: number): any;
|
|
751
|
+
isIndexedElements(): boolean;
|
|
752
|
+
deleteElements(): any;
|
|
753
|
+
setDrawCount(count: number): any;
|
|
754
|
+
getDrawCount(): number;
|
|
755
|
+
setDrawOffset(offset: number): any;
|
|
756
|
+
getDrawOffset(): number;
|
|
757
|
+
dispose(): void;
|
|
758
|
+
isDisposed(): boolean;
|
|
759
|
+
updateBoundingBox(): void;
|
|
760
|
+
createTangent(name?: string): void;
|
|
761
|
+
createNormal(name?: string): void;
|
|
762
|
+
createBarycentric(name?: string): void;
|
|
763
|
+
buildUniqueVertex(): void;
|
|
764
|
+
getMemorySize(): number;
|
|
765
|
+
getElementsType(elements: number[] | (Uint16Array | Uint32Array | Uint8Array | Int8Array | Int16Array | Float32Array)): "uint8" | "uint16" | "uint32";
|
|
766
|
+
getCommandKey(device: any): string;
|
|
767
|
+
getBufferDescriptor(vertexInfo: any): any[];
|
|
768
|
+
};
|
|
769
|
+
_scene: {
|
|
770
|
+
sortedMeshes: {
|
|
771
|
+
opaques?: reshader.Mesh[];
|
|
772
|
+
transparents?: reshader.Mesh[];
|
|
773
|
+
};
|
|
774
|
+
sortFunction?: (a: reshader.Mesh, b: reshader.Mesh) => number;
|
|
775
|
+
meshes?: reshader.Mesh[];
|
|
776
|
+
setMeshes(meshes?: reshader.Mesh | reshader.Mesh[]): any;
|
|
777
|
+
addMesh(mesh: reshader.Mesh | reshader.Mesh[]): any;
|
|
778
|
+
removeMesh(mesh?: reshader.Mesh | reshader.Mesh[]): any;
|
|
779
|
+
getMeshes(): reshader.Mesh[];
|
|
780
|
+
clear(): any;
|
|
781
|
+
dirty(): any;
|
|
782
|
+
sortMeshes(cameraPosition?: vec3): void;
|
|
783
|
+
getSortedMeshes(): {
|
|
784
|
+
opaques?: reshader.Mesh[];
|
|
785
|
+
transparents?: reshader.Mesh[];
|
|
786
|
+
};
|
|
787
|
+
};
|
|
688
788
|
_meshes: any[];
|
|
689
789
|
_counter: number;
|
|
690
790
|
_canvas: any;
|
|
@@ -700,8 +800,169 @@ declare class TileStencilRenderer {
|
|
|
700
800
|
render(fbo: any): void;
|
|
701
801
|
_getMesh(): any;
|
|
702
802
|
_init(regl: any): void;
|
|
703
|
-
_shader:
|
|
704
|
-
|
|
803
|
+
_shader: {
|
|
804
|
+
draw(device: any, meshes: any): number;
|
|
805
|
+
_ensureContextDefines(v: any): void;
|
|
806
|
+
_runFilter(m: any): any;
|
|
807
|
+
getMeshCommand(device: any, mesh: any, renderProps: any): any;
|
|
808
|
+
_cmdKeys: {};
|
|
809
|
+
getShaderCommandKey(device: any, mesh: any, renderProps: any): any;
|
|
810
|
+
createMeshCommand(device: any, mesh: reshader.Mesh, commandProps: any, renderProps: any): any;
|
|
811
|
+
_compileWGSLSource(defines: any): {
|
|
812
|
+
vert: any;
|
|
813
|
+
frag: any;
|
|
814
|
+
};
|
|
815
|
+
run(deviceOrRegl: any, command: any, props: any): any;
|
|
816
|
+
_getCurrentRenderPassEncoder(device: {
|
|
817
|
+
wgpu: GPUDevice;
|
|
818
|
+
context: GPUCanvasContext;
|
|
819
|
+
adapter: GPUAdapter;
|
|
820
|
+
gltfManager?: any;
|
|
821
|
+
_supportedFormats: any;
|
|
822
|
+
hasExtension(extension: any): boolean;
|
|
823
|
+
getCommandEncoder(): GPUCommandEncoder;
|
|
824
|
+
endCommandEncoder(): void;
|
|
825
|
+
getDefaultFramebuffer(): {
|
|
826
|
+
device: any;
|
|
827
|
+
options: any;
|
|
828
|
+
width: number;
|
|
829
|
+
height: number;
|
|
830
|
+
readonly color: {
|
|
831
|
+
texture: GPUTexture;
|
|
832
|
+
device: any;
|
|
833
|
+
config: any;
|
|
834
|
+
readonly width: any;
|
|
835
|
+
readonly height: any;
|
|
836
|
+
updateFilter(): void;
|
|
837
|
+
_clearBindGroups(): void;
|
|
838
|
+
resize(width: any, height: any): void;
|
|
839
|
+
update(config: any): void;
|
|
840
|
+
getView(): GPUTextureView;
|
|
841
|
+
addBindGroup(bindGroup: any): void;
|
|
842
|
+
destroy(): void;
|
|
843
|
+
}[];
|
|
844
|
+
resize(width: any, height: any): void;
|
|
845
|
+
_update(): void;
|
|
846
|
+
getRenderPassDescriptor(): GPURenderPassDescriptor;
|
|
847
|
+
setClearOptions(options: any): void;
|
|
848
|
+
_resetClearOptions(): void;
|
|
849
|
+
destroy(): void;
|
|
850
|
+
};
|
|
851
|
+
getRenderPassEncoder(fbo: {
|
|
852
|
+
device: any;
|
|
853
|
+
options: any;
|
|
854
|
+
width: number;
|
|
855
|
+
height: number;
|
|
856
|
+
readonly color: {
|
|
857
|
+
texture: GPUTexture;
|
|
858
|
+
device: any;
|
|
859
|
+
config: any;
|
|
860
|
+
readonly width: any;
|
|
861
|
+
readonly height: any;
|
|
862
|
+
updateFilter(): void;
|
|
863
|
+
_clearBindGroups(): void;
|
|
864
|
+
resize(width: any, height: any): void;
|
|
865
|
+
update(config: any): void;
|
|
866
|
+
getView(): GPUTextureView;
|
|
867
|
+
addBindGroup(bindGroup: any): void;
|
|
868
|
+
destroy(): void;
|
|
869
|
+
}[];
|
|
870
|
+
resize(width: any, height: any): void;
|
|
871
|
+
_update(): void;
|
|
872
|
+
getRenderPassDescriptor(): GPURenderPassDescriptor;
|
|
873
|
+
setClearOptions(options: any): void;
|
|
874
|
+
_resetClearOptions(): void;
|
|
875
|
+
destroy(): void;
|
|
876
|
+
}): GPURenderPassEncoder;
|
|
877
|
+
addCommandBuffer(commandBuffer: GPUCommandBuffer, front: boolean): void;
|
|
878
|
+
submit(): void;
|
|
879
|
+
buffer(options: any): any;
|
|
880
|
+
framebuffer(width: any, height: any): {
|
|
881
|
+
device: any;
|
|
882
|
+
options: any;
|
|
883
|
+
width: number;
|
|
884
|
+
height: number;
|
|
885
|
+
readonly color: {
|
|
886
|
+
texture: GPUTexture;
|
|
887
|
+
device: any;
|
|
888
|
+
config: any;
|
|
889
|
+
readonly width: any;
|
|
890
|
+
readonly height: any;
|
|
891
|
+
updateFilter(): void;
|
|
892
|
+
_clearBindGroups(): void;
|
|
893
|
+
resize(width: any, height: any): void;
|
|
894
|
+
update(config: any): void;
|
|
895
|
+
getView(): GPUTextureView;
|
|
896
|
+
addBindGroup(bindGroup: any): void;
|
|
897
|
+
destroy(): void;
|
|
898
|
+
}[];
|
|
899
|
+
resize(width: any, height: any): void;
|
|
900
|
+
_update(): void;
|
|
901
|
+
getRenderPassDescriptor(): GPURenderPassDescriptor;
|
|
902
|
+
setClearOptions(options: any): void;
|
|
903
|
+
_resetClearOptions(): void;
|
|
904
|
+
destroy(): void;
|
|
905
|
+
};
|
|
906
|
+
texture(config: any): {
|
|
907
|
+
texture: GPUTexture;
|
|
908
|
+
device: any;
|
|
909
|
+
config: any;
|
|
910
|
+
readonly width: any;
|
|
911
|
+
readonly height: any;
|
|
912
|
+
updateFilter(): void;
|
|
913
|
+
_clearBindGroups(): void;
|
|
914
|
+
resize(width: any, height: any): void;
|
|
915
|
+
update(config: any): void;
|
|
916
|
+
getView(): GPUTextureView;
|
|
917
|
+
addBindGroup(bindGroup: any): void;
|
|
918
|
+
destroy(): void;
|
|
919
|
+
};
|
|
920
|
+
clear(options: any): void;
|
|
921
|
+
read(options: any): any;
|
|
922
|
+
destroy(): void;
|
|
923
|
+
}): GPURenderPassEncoder;
|
|
924
|
+
setFramebuffer(framebuffer: any): any;
|
|
925
|
+
dispose(): void;
|
|
926
|
+
vert: string;
|
|
927
|
+
frag: string;
|
|
928
|
+
wgslVert: string;
|
|
929
|
+
wgslFrag: string;
|
|
930
|
+
uid: number;
|
|
931
|
+
version: number;
|
|
932
|
+
extraCommandProps: any;
|
|
933
|
+
name: string;
|
|
934
|
+
shaderDefines: Record<string, string | number>;
|
|
935
|
+
setDefines(defines: any): void;
|
|
936
|
+
getVersion(regl: any, source: any): "" | "#version 300 es\n" | "#version 100\n";
|
|
937
|
+
getActiveVars(regl: any, vert: any, frag: any, hash: any): any;
|
|
938
|
+
_insertDefines(source: any, defines: any): string;
|
|
939
|
+
appendDescUniforms(regl: any, meshProps: any): any;
|
|
940
|
+
setUniforms(uniforms: any): any;
|
|
941
|
+
_compileSource(): void;
|
|
942
|
+
};
|
|
943
|
+
_renderer: {
|
|
944
|
+
device: any;
|
|
945
|
+
render(shader: any, uniforms: _______________gl_node_modules__maptalks_regl_dist_regl.Uniforms, scene: {
|
|
946
|
+
sortedMeshes: {
|
|
947
|
+
opaques?: reshader.Mesh[];
|
|
948
|
+
transparents?: reshader.Mesh[];
|
|
949
|
+
};
|
|
950
|
+
sortFunction?: (a: reshader.Mesh, b: reshader.Mesh) => number;
|
|
951
|
+
meshes?: reshader.Mesh[];
|
|
952
|
+
setMeshes(meshes?: reshader.Mesh | reshader.Mesh[]): any;
|
|
953
|
+
addMesh(mesh: reshader.Mesh | reshader.Mesh[]): any;
|
|
954
|
+
removeMesh(mesh?: reshader.Mesh | reshader.Mesh[]): any;
|
|
955
|
+
getMeshes(): reshader.Mesh[];
|
|
956
|
+
clear(): any;
|
|
957
|
+
dirty(): any;
|
|
958
|
+
sortMeshes(cameraPosition?: vec3): void;
|
|
959
|
+
getSortedMeshes(): {
|
|
960
|
+
opaques?: reshader.Mesh[];
|
|
961
|
+
transparents?: reshader.Mesh[];
|
|
962
|
+
};
|
|
963
|
+
}, framebuffer: _______________gl_node_modules__maptalks_regl_dist_regl.Framebuffer): number;
|
|
964
|
+
clear(options: _______________gl_node_modules__maptalks_regl_dist_regl.ClearOptions): void;
|
|
965
|
+
};
|
|
705
966
|
remove(): void;
|
|
706
967
|
}
|
|
707
968
|
|
package/dist/maptalks.vt.es.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @maptalks/vt v0.108.
|
|
2
|
+
* @maptalks/vt v0.108.5
|
|
3
3
|
* LICENSE : undefined
|
|
4
4
|
* (c) 2016-2025 maptalks.org
|
|
5
5
|
*/
|
|
@@ -12745,23 +12745,27 @@ class Gn extends xn {
|
|
|
12745
12745
|
} ];
|
|
12746
12746
|
}
|
|
12747
12747
|
paint(e) {
|
|
12748
|
-
|
|
12748
|
+
if (this.isShadowIncludeChanged(e)) {
|
|
12749
|
+
this.shader.dispose();
|
|
12750
|
+
const t = this._getExtraCommandProps();
|
|
12751
|
+
this._createShader(e, t);
|
|
12752
|
+
}
|
|
12749
12753
|
super.paint(e);
|
|
12750
12754
|
}
|
|
12751
12755
|
isEnableTileStencil(t) {
|
|
12752
12756
|
const n = "VectorTileLayer" === this.layer.getJSONType(), i = this.layer instanceof e.TileLayer;
|
|
12753
12757
|
return !!!(t && t.isRenderingTerrain && this.isTerrainSkin()) && (n || i && this.isOnly2D());
|
|
12754
12758
|
}
|
|
12755
|
-
|
|
12756
|
-
const
|
|
12759
|
+
_getExtraCommandProps() {
|
|
12760
|
+
const e = this.regl, t = this.canvas, n = {
|
|
12757
12761
|
x: (e, t) => t.viewport ? t.viewport.x : 0,
|
|
12758
12762
|
y: (e, t) => t.viewport ? t.viewport.y : 0,
|
|
12759
|
-
width: (e,
|
|
12760
|
-
height: (e,
|
|
12763
|
+
width: (e, n) => n.viewport ? n.viewport.width : t ? t.width : 1,
|
|
12764
|
+
height: (e, n) => n.viewport ? n.viewport.height : t ? t.height : 1
|
|
12761
12765
|
};
|
|
12762
|
-
this.renderer = new o.Renderer(
|
|
12763
|
-
|
|
12764
|
-
viewport:
|
|
12766
|
+
this.renderer = new o.Renderer(e);
|
|
12767
|
+
return {
|
|
12768
|
+
viewport: n,
|
|
12765
12769
|
stencil: {
|
|
12766
12770
|
enable: (e, t) => t.geometryProperties.is2D && this.isEnableTileStencil(t.painterContext),
|
|
12767
12771
|
func: {
|
|
@@ -12799,8 +12803,11 @@ class Gn extends xn {
|
|
|
12799
12803
|
offset: this.getPolygonOffset()
|
|
12800
12804
|
}
|
|
12801
12805
|
};
|
|
12802
|
-
|
|
12803
|
-
|
|
12806
|
+
}
|
|
12807
|
+
init(t) {
|
|
12808
|
+
const n = this._getExtraCommandProps();
|
|
12809
|
+
if (this._createShader(t, n), this.pickingFBO) {
|
|
12810
|
+
const t = [], i = this.layer instanceof e.TileLayer;
|
|
12804
12811
|
this.picking = [ new o.FBORayPicking(this.renderer, {
|
|
12805
12812
|
name: "fill-picking",
|
|
12806
12813
|
vert: _n,
|
|
@@ -12815,8 +12822,8 @@ class Gn extends xn {
|
|
|
12815
12822
|
return a.multiply(t, n.projViewMatrix, n.modelMatrix), t;
|
|
12816
12823
|
}
|
|
12817
12824
|
} ],
|
|
12818
|
-
extraCommandProps:
|
|
12819
|
-
enableStencil: () =>
|
|
12825
|
+
extraCommandProps: n,
|
|
12826
|
+
enableStencil: () => i && this.isOnly2D()
|
|
12820
12827
|
}, this.pickingFBO, this.getMap()) ];
|
|
12821
12828
|
}
|
|
12822
12829
|
}
|
|
@@ -20764,5 +20771,5 @@ if (r.transcoders) {
|
|
|
20764
20771
|
|
|
20765
20772
|
export { ia as BillBoardPainter, Aa as BillBoardPlugin, ph as ExtrudePolygonLayer, Gn as FillPainter, aa as FillPlugin, _h as FilterUtil, ya as GLTFPhongPlugin, xa as GLTFStandardPlugin, wa as GeoJSONVectorTileLayer, _a as HeatmapPlugin, Gr as IconPainter, ca as IconPlugin, ha as LineGradientPlugin, $n as LinePainter, la as LinePlugin, tl as LineStringLayer, ga as LitPlugin, ba as MapboxVectorTileLayer, Bo as NativeLinePainter, fa as NativeLinePlugin, zo as NativePointPainter, xh as PackUtil, os as PhongPainter, da as PhongPlugin, Qa as PointLayer, rl as PolygonLayer, Ah as SYMBOLS_NEED_REBUILD_IN_VECTOR, vh as SYMBOLS_NEED_REBUILD_IN_VT, sa as TerrainFlatMaskPainter, Ta as TerrainFlatMaskPlugin, Eo as TextPainter, ua as TextPlugin, ma as TubePlugin, _t as Vector3DLayer, ft as VectorTileLayer, Qe as VectorTileLayerRenderer, va as WaterPlugin, as as WireframePainter, pa as WireframePlugin };
|
|
20766
20773
|
|
|
20767
|
-
"undefined" != typeof console && console.log("@maptalks/vt v0.108.
|
|
20774
|
+
"undefined" != typeof console && console.log("@maptalks/vt v0.108.5");
|
|
20768
20775
|
//# sourceMappingURL=maptalks.vt.es.js.map
|