gl-draw 0.17.4 → 0.17.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/index.d.ts CHANGED
@@ -3,7 +3,6 @@ import { BufferGeometry } from 'three';
3
3
  import { BufferGeometryEventMap } from 'three';
4
4
  import { BufferGeometryLoader } from 'three';
5
5
  import { Camera } from 'three';
6
- import { CanvasTexture } from 'three';
7
6
  import { Color } from 'three';
8
7
  import { ColorRepresentation } from 'three';
9
8
  import { CSS2DObject } from 'three/examples/jsm/renderers/CSS2DRenderer.js';
@@ -1458,7 +1457,7 @@ declare interface ConicLineOptions extends GetCoordinatesArrOptions {
1458
1457
  useGroups?: 0 | 1 | 2;
1459
1458
  projection?: any;
1460
1459
  splitPolygons?: number;
1461
- rtc?: boolean;
1460
+ line2?: boolean;
1462
1461
  }
1463
1462
 
1464
1463
  export declare class ConicPolygon extends BaseObject {
@@ -1593,12 +1592,6 @@ declare interface EllipsoidOptions {
1593
1592
  material?: Material;
1594
1593
  }
1595
1594
 
1596
- declare function enableMultiLevelRTC<T extends Material>(material: T, globalCenter: {
1597
- x: number;
1598
- y: number;
1599
- z: number;
1600
- }): T;
1601
-
1602
1595
  declare class EventDispatcher {
1603
1596
  private _listeners;
1604
1597
  /**
@@ -1678,7 +1671,6 @@ export declare class ExtrudePolygon extends BaseObject {
1678
1671
 
1679
1672
  declare interface ExtrudePolygonOptions extends GetCoordinatesArrOptions {
1680
1673
  meta?: number[][];
1681
- split?: number;
1682
1674
  bbox?: number[];
1683
1675
  projection?: ProjectionOptions;
1684
1676
  useGroups?: 0 | 1 | 2;
@@ -1715,8 +1707,6 @@ declare interface GetCoordinatesArrOptions {
1715
1707
  metaLength?: number;
1716
1708
  }
1717
1709
 
1718
- export declare const getSplitTexture: (splitTextureOptions: SplitTextureOptions) => Promise<CanvasTexture>;
1719
-
1720
1710
  export declare class Group extends BaseObject {
1721
1711
  create(): void;
1722
1712
  render(): void;
@@ -1850,8 +1840,8 @@ export declare class Line extends BaseObject {
1850
1840
  constructor(options?: Partial<Options_19>);
1851
1841
  get material(): MeshLineMaterial;
1852
1842
  create(): Promise<void>;
1853
- setGeometry(nodes: PointsInput, setPointWidth?: (p: number) => any): void;
1854
- getMaterial(materialOptions: Omit<MeshLineMaterialParameters, 'resolution'>): MeshLineMaterial;
1843
+ setGeometry(nodes: PointsInput_2, setPointWidth?: (p: number) => any): void;
1844
+ createMaterial(materialOptions: Omit<MeshLineMaterialParameters, 'resolution'>): MeshLineMaterial;
1855
1845
  addGeometries(geometries: BufferGeometry[]): void;
1856
1846
  resize(w: number, h: number): void;
1857
1847
  handleMaterialChange(mat: MeshLineMaterial | null): void;
@@ -1874,7 +1864,7 @@ export declare class Line2 extends BaseObject {
1874
1864
  constructor(options?: Partial<Options_20>);
1875
1865
  get material(): Line2Material;
1876
1866
  create(): Promise<void>;
1877
- getMaterial(materialOptions: LineMaterialParameters): Line2Material;
1867
+ createMaterial(materialOptions: LineMaterialParameters): Line2Material;
1878
1868
  }
1879
1869
 
1880
1870
  export { Line2Material }
@@ -1884,13 +1874,7 @@ declare interface LineOptions extends GetCoordinatesArrOptions {
1884
1874
  projection?: ProjectionOptions;
1885
1875
  useGroups?: 0 | 1 | 2;
1886
1876
  splitPolygons?: number;
1887
- }
1888
-
1889
- declare interface LineOptions_2 extends GetCoordinatesArrOptions {
1890
- meta?: number[][];
1891
- projection?: ProjectionOptions;
1892
- useGroups?: 0 | 1 | 2;
1893
- splitPolygons?: number;
1877
+ line2?: boolean;
1894
1878
  }
1895
1879
 
1896
1880
  export { LineSegmentsGeometry }
@@ -1969,15 +1953,15 @@ export declare class MeshLineGeometry extends BufferGeometry {
1969
1953
  private shape;
1970
1954
  private shapeFunction;
1971
1955
  matrixWorld: Matrix4;
1972
- constructor(points?: PointsInput, shape?: 'none' | 'taper' | 'custom', shapeFunction?: WidthCallback);
1956
+ constructor(points?: PointsInput_2, shape?: 'none' | 'taper' | 'custom', shapeFunction?: WidthCallback);
1973
1957
  private convertToVector3Array;
1974
1958
  setMatrixWorld(matrixWorld: Matrix4): void;
1975
- setPoints(points: PointsInput, shapeFunction?: WidthCallback, resetCenter?: boolean): void;
1959
+ setPoints(points: PointsInput_2, shapeFunction?: WidthCallback): void;
1976
1960
  private initializeGeometry;
1977
1961
  private updateGeometry;
1978
1962
  get points(): Vector3[];
1979
- set points(value: PointsInput);
1980
- updatePoints(points: PointsInput, shapeFunction?: WidthCallback): void;
1963
+ set points(value: PointsInput_2);
1964
+ updatePoints(points: PointsInput_2, shapeFunction?: WidthCallback): void;
1981
1965
  setShape(shape: 'none' | 'taper' | 'custom', shapeFunction?: WidthCallback): void;
1982
1966
  }
1983
1967
 
@@ -2272,8 +2256,8 @@ declare interface Options_18 {
2272
2256
  }
2273
2257
 
2274
2258
  declare interface Options_19 {
2275
- nodes?: PointsInput;
2276
- nodesArr?: PointsInput[];
2259
+ nodes?: PointsInput_2;
2260
+ nodesArr?: PointsInput_2[];
2277
2261
  geometry?: BufferGeometry;
2278
2262
  geometryArr?: BufferGeometry[];
2279
2263
  material?: MeshLineMaterial;
@@ -2309,8 +2293,8 @@ declare interface Options_2 {
2309
2293
  }
2310
2294
 
2311
2295
  declare interface Options_20 {
2312
- points?: Vector3[];
2313
- pointsArr?: Vector3[][];
2296
+ nodes?: PointsInput_2;
2297
+ nodesArr?: PointsInput_2[];
2314
2298
  geometry?: BufferGeometry;
2315
2299
  geometryArr?: BufferGeometry[];
2316
2300
  material?: Line2Material;
@@ -2318,7 +2302,6 @@ declare interface Options_20 {
2318
2302
  useGroups?: 0 | 1 | 2;
2319
2303
  setPointWidth?: (p: number) => any;
2320
2304
  lineWidthArr?: number[];
2321
- instanceCount?: number;
2322
2305
  materialParameters?: LineMaterialParameters;
2323
2306
  }
2324
2307
 
@@ -2419,7 +2402,6 @@ declare type Parameters_3 = {
2419
2402
  curvatureResolution?: number;
2420
2403
  projection?: any; // 'cesium' | 'sphere' | D3 projection function | null
2421
2404
  bbox?: number[];
2422
- resetCenter?: boolean;
2423
2405
  };
2424
2406
 
2425
2407
  declare class Pencil {
@@ -2678,6 +2660,8 @@ declare interface PointerInput {
2678
2660
 
2679
2661
  declare type PointsInput = Vector3[] | Vector2[] | number[][] | number[];
2680
2662
 
2663
+ declare type PointsInput_2 = Vector3[] | Vector2[] | number[][] | number[];
2664
+
2681
2665
  declare type PolygonCoords = number[][][];
2682
2666
 
2683
2667
  declare const projectionObj: {
@@ -2793,16 +2777,6 @@ declare type singleTouchAction =
2793
2777
  | typeof ACTION.ZOOM
2794
2778
  | typeof ACTION.NONE;
2795
2779
 
2796
- declare interface SplitTextureOptions {
2797
- topColor?: string;
2798
- sideColor?: string;
2799
- sideMap?: string;
2800
- split?: number;
2801
- createCanvasObjectURL?: boolean;
2802
- maxAnisotropy?: number;
2803
- cacheKey?: string;
2804
- }
2805
-
2806
2780
  declare interface SSAOParams {
2807
2781
  kernelRadius: number;
2808
2782
  minDistance: number;
@@ -2881,17 +2855,15 @@ export declare const utils: {
2881
2855
  getProjection: (options: ProjectionOptions) => GeoProjection;
2882
2856
  isPlainObject: typeof isPlainObject;
2883
2857
  parseVector2: (v: Vector2 | number[]) => Vector2;
2884
- parseVector3: (v: Vector3 | number[]) => Vector3;
2858
+ parseVector3: (v: PointsInput[0]) => Vector3;
2885
2859
  claerUVGenerator: () => void;
2886
2860
  getUVGenerator: (options?: {
2887
2861
  box3?: Box3;
2888
- split?: number;
2889
2862
  sideRepeat?: number;
2890
2863
  }) => {
2891
2864
  generateTopUV(geometry: any, vertices: number[], indexA: number, indexB: number, indexC: number): Vector2[];
2892
2865
  generateSideWallUV(geometry: any, vertices: number[], indexA: number, indexB: number, indexC: number, indexD: number): Vector2[];
2893
2866
  };
2894
- enableMultiLevelRTC: typeof enableMultiLevelRTC;
2895
2867
  };
2896
2868
 
2897
2869
  declare type ValuesOf<T extends readonly any[]> = T[number];
@@ -2923,9 +2895,6 @@ export declare class Wk {
2923
2895
  geoGeometry(type: 'line', options: GeoGeometryOptions & {
2924
2896
  mesaage: LineOptions;
2925
2897
  }): Promise<BufferGeometry>;
2926
- geoGeometry(type: 'line2', options: GeoGeometryOptions & {
2927
- mesaage: LineOptions_2;
2928
- }): Promise<BufferGeometry>;
2929
2898
  getCachedGeometry(options: Pick<GeoGeometryOptions, 'cacheKey' | 'cacheVersion'>): Promise<ReturnType<typeof _default_2>[]>;
2930
2899
  saveCache(): Promise<void>;
2931
2900
  /**