gl-draw 0.17.5 → 0.17.6
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 +24 -5
- package/dist/index.js +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1458,6 +1458,7 @@ declare interface ConicLineOptions extends GetCoordinatesArrOptions {
|
|
|
1458
1458
|
projection?: any;
|
|
1459
1459
|
splitPolygons?: number;
|
|
1460
1460
|
line2?: boolean;
|
|
1461
|
+
useRTC?: boolean;
|
|
1461
1462
|
}
|
|
1462
1463
|
|
|
1463
1464
|
export declare class ConicPolygon extends BaseObject {
|
|
@@ -1477,7 +1478,6 @@ declare interface ConicPolygonOptions extends GetCoordinatesArrOptions {
|
|
|
1477
1478
|
projection?: ProjectionOptions | 'cesium' | 'sphere';
|
|
1478
1479
|
bbox?: number[];
|
|
1479
1480
|
splitPolygons?: number;
|
|
1480
|
-
rtc?: boolean;
|
|
1481
1481
|
}
|
|
1482
1482
|
|
|
1483
1483
|
declare class ControlsPages extends OrigonPages<CameraControls> {
|
|
@@ -1840,8 +1840,8 @@ export declare class Line extends BaseObject {
|
|
|
1840
1840
|
constructor(options?: Partial<Options_19>);
|
|
1841
1841
|
get material(): MeshLineMaterial;
|
|
1842
1842
|
create(): Promise<void>;
|
|
1843
|
-
setGeometry(nodes: PointsInput_2, setPointWidth?: (p: number) => any): void;
|
|
1844
|
-
createMaterial(materialOptions: Omit<MeshLineMaterialParameters, 'resolution'
|
|
1843
|
+
setGeometry(nodes: PointsInput_2, setPointWidth?: (p: number) => any, useRTC?: boolean, rtcCenter?: Vector3): void;
|
|
1844
|
+
createMaterial(materialOptions: Omit<MeshLineMaterialParameters, 'resolution'>, useRTC?: boolean): MeshLineMaterial;
|
|
1845
1845
|
addGeometries(geometries: BufferGeometry[]): void;
|
|
1846
1846
|
resize(w: number, h: number): void;
|
|
1847
1847
|
handleMaterialChange(mat: MeshLineMaterial | null): void;
|
|
@@ -1857,6 +1857,7 @@ export declare class Line extends BaseObject {
|
|
|
1857
1857
|
}): void;
|
|
1858
1858
|
stopAnimation(): void;
|
|
1859
1859
|
render(): void;
|
|
1860
|
+
update(): void;
|
|
1860
1861
|
}
|
|
1861
1862
|
|
|
1862
1863
|
export declare class Line2 extends BaseObject {
|
|
@@ -1953,16 +1954,26 @@ export declare class MeshLineGeometry extends BufferGeometry {
|
|
|
1953
1954
|
private shape;
|
|
1954
1955
|
private shapeFunction;
|
|
1955
1956
|
matrixWorld: Matrix4;
|
|
1956
|
-
|
|
1957
|
+
private useRTC;
|
|
1958
|
+
private rtcCenter;
|
|
1959
|
+
constructor(points?: PointsInput_2, shape?: 'none' | 'taper' | 'custom', shapeFunction?: WidthCallback, useRTC?: boolean, rtcCenter?: Vector3);
|
|
1957
1960
|
private convertToVector3Array;
|
|
1958
1961
|
setMatrixWorld(matrixWorld: Matrix4): void;
|
|
1959
|
-
setPoints(points: PointsInput_2, shapeFunction?: WidthCallback): void;
|
|
1962
|
+
setPoints(points: PointsInput_2, shapeFunction?: WidthCallback, useRTC?: boolean, rtcCenter?: Vector3): void;
|
|
1960
1963
|
private initializeGeometry;
|
|
1961
1964
|
private updateGeometry;
|
|
1965
|
+
/**
|
|
1966
|
+
* 获取相对于 RTC 中心的坐标
|
|
1967
|
+
*/
|
|
1968
|
+
private getRelativePosition;
|
|
1962
1969
|
get points(): Vector3[];
|
|
1963
1970
|
set points(value: PointsInput_2);
|
|
1964
1971
|
updatePoints(points: PointsInput_2, shapeFunction?: WidthCallback): void;
|
|
1965
1972
|
setShape(shape: 'none' | 'taper' | 'custom', shapeFunction?: WidthCallback): void;
|
|
1973
|
+
getRTCCenter(): Vector3;
|
|
1974
|
+
setUseRTC(useRTC: boolean): void;
|
|
1975
|
+
getUseRTC(): boolean;
|
|
1976
|
+
setRTCCenter(center: Vector3): void;
|
|
1966
1977
|
}
|
|
1967
1978
|
|
|
1968
1979
|
export declare class MeshLineMaterial extends ShaderMaterial {
|
|
@@ -1982,6 +1993,11 @@ export declare class MeshLineMaterial extends ShaderMaterial {
|
|
|
1982
1993
|
set lineWidth(value: number);
|
|
1983
1994
|
get sizeAttenuation(): boolean;
|
|
1984
1995
|
set sizeAttenuation(value: boolean);
|
|
1996
|
+
get rtcOffset(): Vector3;
|
|
1997
|
+
set rtcOffset(value: Vector3);
|
|
1998
|
+
get viewRotation(): Matrix4;
|
|
1999
|
+
set viewRotation(value: Matrix4);
|
|
2000
|
+
updateRTC(center: Vector3, cameraPosition: Vector3, cameraMatrixWorld: Matrix4): void;
|
|
1985
2001
|
}
|
|
1986
2002
|
|
|
1987
2003
|
declare interface MeshLineMaterialParameters extends ShaderMaterialParameters {
|
|
@@ -2266,6 +2282,8 @@ declare interface Options_19 {
|
|
|
2266
2282
|
setPointWidth?: (p: number) => any;
|
|
2267
2283
|
lineWidthArr?: number[];
|
|
2268
2284
|
materialParameters?: Omit<MeshLineMaterialParameters, 'resolution'>;
|
|
2285
|
+
useRTC?: boolean;
|
|
2286
|
+
rtcCenter?: Vector3;
|
|
2269
2287
|
}
|
|
2270
2288
|
|
|
2271
2289
|
declare interface Options_2 {
|
|
@@ -2402,6 +2420,7 @@ declare type Parameters_3 = {
|
|
|
2402
2420
|
curvatureResolution?: number;
|
|
2403
2421
|
projection?: any; // 'cesium' | 'sphere' | D3 projection function | null
|
|
2404
2422
|
bbox?: number[];
|
|
2423
|
+
resetCenter?: boolean;
|
|
2405
2424
|
};
|
|
2406
2425
|
|
|
2407
2426
|
declare class Pencil {
|