gl-draw 0.17.0-beta.3 → 0.17.0-beta.31
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/constants.d.ts +0 -1
- package/dist/core/BaseObject/PointerEvent.d.ts +1 -0
- package/dist/core/BaseObject/index.d.ts +4 -4
- package/dist/core/Composer.d.ts +5 -5
- package/dist/core/Helper.d.ts +4 -4
- package/dist/core/Lead/Pick.d.ts +35 -3
- package/dist/core/Lead/index.d.ts +5 -6
- package/dist/core/Pages/Pages.d.ts +1 -0
- package/dist/core/Pencil.d.ts +3 -3
- package/dist/core/pass/OutputPass.d.ts +1 -2
- package/dist/index.js +2 -2
- package/dist/index.module.js +501 -408
- package/dist/index.module2.js +1097 -0
- package/dist/index2.js +140 -0
- package/dist/objects/extrudePolygon/createGeometry.d.ts +2 -1
- package/dist/objects/group/index.d.ts +1 -0
- package/dist/objects/index.js +1 -1
- package/dist/objects/index.module.js +339 -379
- package/dist/objects/node/index.d.ts +4 -2
- package/dist/objects/pie/index.d.ts +2 -1
- package/dist/plugins/Worker/getAttributes/conicLine.d.ts +2 -3
- package/dist/plugins/Worker/getAttributes/conicPolygon.d.ts +2 -3
- package/dist/plugins/Worker/getAttributes/extrudePolygon.d.ts +2 -4
- package/dist/plugins/Worker/getAttributes/getCoordinatesArr.d.ts +5 -1
- package/dist/plugins/Worker/getAttributes/getMessage.d.ts +1 -1
- package/dist/plugins/Worker/getAttributes/line.d.ts +2 -2
- package/dist/plugins/Worker/getAttributes/line2.d.ts +2 -2
- package/dist/plugins/Worker/getAttributes/splitPolygonsByLongitudeDifference.d.ts +5 -2
- package/dist/plugins/Worker/index.d.ts +3 -3
- package/dist/plugins/index.js +1 -1
- package/dist/plugins/index.module.js +77 -57
- package/package.json +1 -1
- package/dist/WebGPULineSegments2.js +0 -140
- package/dist/WebGPULineSegments2.module.js +0 -1031
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Sprite, Vector3 } from 'three';
|
|
2
|
-
import { CSS2DObject } from 'three/examples/jsm/renderers/CSS2DRenderer';
|
|
1
|
+
import type { Sprite, Vector3 } from 'three';
|
|
2
|
+
import type { CSS2DObject } from 'three/examples/jsm/renderers/CSS2DRenderer';
|
|
3
3
|
import BaseObject from "../../core/BaseObject";
|
|
4
4
|
import type { PickFunctionsItem } from "../../core/Lead/Pick";
|
|
5
5
|
interface Options {
|
|
@@ -13,6 +13,8 @@ export declare class Node extends BaseObject {
|
|
|
13
13
|
pickObject?: Sprite;
|
|
14
14
|
object3d: CSS2DObject;
|
|
15
15
|
element: HTMLDivElement;
|
|
16
|
+
private static sharedObserver?;
|
|
17
|
+
private static observerMap;
|
|
16
18
|
constructor(options: Options);
|
|
17
19
|
create(): void;
|
|
18
20
|
setChildren(children: HTMLElement): void;
|
|
@@ -26,6 +26,7 @@ export default class extends BaseObject {
|
|
|
26
26
|
name: string;
|
|
27
27
|
index: import("three").BufferAttribute | null;
|
|
28
28
|
indirect: import("three/src/renderers/common/IndirectStorageBufferAttribute").default | null;
|
|
29
|
+
indirectOffset: number | number[];
|
|
29
30
|
attributes: import("three").NormalBufferAttributes;
|
|
30
31
|
morphAttributes: {
|
|
31
32
|
position?: Array<import("three").BufferAttribute | import("three").InterleavedBufferAttribute> | undefined;
|
|
@@ -44,7 +45,7 @@ export default class extends BaseObject {
|
|
|
44
45
|
readonly isBufferGeometry: true;
|
|
45
46
|
getIndex(): import("three").BufferAttribute | null;
|
|
46
47
|
setIndex(index: import("three").BufferAttribute | number[] | null): any;
|
|
47
|
-
setIndirect(indirect: import("three/src/renderers/common/IndirectStorageBufferAttribute").default | null): any;
|
|
48
|
+
setIndirect(indirect: import("three/src/renderers/common/IndirectStorageBufferAttribute").default | null, indirectOffset?: number | number[]): any;
|
|
48
49
|
getIndirect(): import("three/src/renderers/common/IndirectStorageBufferAttribute").default | null;
|
|
49
50
|
setAttribute<K extends string>(name: K, attribute: import("three").BufferAttribute | import("three").InterleavedBufferAttribute): any;
|
|
50
51
|
getAttribute<K extends string>(name: K): import("three").BufferAttribute | import("three").InterleavedBufferAttribute;
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import { type GetCoordinatesArrOptions } from './getCoordinatesArr';
|
|
2
2
|
export interface ConicLineOptions extends GetCoordinatesArrOptions {
|
|
3
|
-
|
|
4
|
-
start: number[];
|
|
3
|
+
meta?: number[][];
|
|
5
4
|
useGroups?: 0 | 1 | 2;
|
|
6
5
|
projection?: any;
|
|
7
6
|
splitPolygons?: number;
|
|
8
7
|
}
|
|
9
|
-
declare const getAttributes: ({ coordinates, lengths,
|
|
8
|
+
declare const getAttributes: ({ coordinates, lengths, metaLength, useGroups, }: ConicLineOptions) => {
|
|
10
9
|
message: Record<string, import("three").GeometryGroup[] | {
|
|
11
10
|
array: ArrayLike<number>;
|
|
12
11
|
itemSize: number;
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { type ProjectionOptions } from "../../../utils";
|
|
2
2
|
import { type GetCoordinatesArrOptions } from './getCoordinatesArr';
|
|
3
3
|
export interface ConicPolygonOptions extends GetCoordinatesArrOptions {
|
|
4
|
-
|
|
5
|
-
depth: number[];
|
|
4
|
+
meta?: number[][];
|
|
6
5
|
useGroups?: 0 | 1 | 2;
|
|
7
6
|
hasTop?: boolean;
|
|
8
7
|
topFirst?: boolean;
|
|
@@ -14,7 +13,7 @@ export interface ConicPolygonOptions extends GetCoordinatesArrOptions {
|
|
|
14
13
|
bbox?: number[];
|
|
15
14
|
splitPolygons?: number;
|
|
16
15
|
}
|
|
17
|
-
declare const getAttributes: ({ coordinates, lengths,
|
|
16
|
+
declare const getAttributes: ({ coordinates, lengths, metaLength, useGroups, hasTop, topFirst, hasBottom, hasSide, cartesian, projection: projectionOptions, curvatureResolution, bbox, }: ConicPolygonOptions) => {
|
|
18
17
|
message: Record<string, import("three").GeometryGroup[] | {
|
|
19
18
|
array: ArrayLike<number>;
|
|
20
19
|
itemSize: number;
|
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
import { type ProjectionOptions } from "../../../utils";
|
|
2
2
|
import { type GetCoordinatesArrOptions } from './getCoordinatesArr';
|
|
3
3
|
export interface ExtrudePolygonOptions extends GetCoordinatesArrOptions {
|
|
4
|
+
meta?: number[][];
|
|
4
5
|
split?: number;
|
|
5
|
-
sideRepeat?: number[];
|
|
6
6
|
bbox?: number[];
|
|
7
|
-
depth: number[];
|
|
8
|
-
z?: number[];
|
|
9
7
|
projection?: ProjectionOptions;
|
|
10
8
|
useGroups?: 0 | 1 | 2;
|
|
11
9
|
hasTop?: boolean;
|
|
@@ -14,7 +12,7 @@ export interface ExtrudePolygonOptions extends GetCoordinatesArrOptions {
|
|
|
14
12
|
splitPolygons?: number;
|
|
15
13
|
topSegments?: number;
|
|
16
14
|
}
|
|
17
|
-
declare const getAttributes: ({ coordinates, lengths,
|
|
15
|
+
declare const getAttributes: ({ coordinates, lengths, metaLength, split, bbox, projection: projectionOptions, useGroups, hasTop, hasBottom, hasSide, splitPolygons, topSegments, }: ExtrudePolygonOptions) => {
|
|
18
16
|
message: Record<string, import("three").GeometryGroup[] | {
|
|
19
17
|
array: ArrayLike<number>;
|
|
20
18
|
itemSize: number;
|
|
@@ -3,6 +3,10 @@ export interface GetCoordinatesArrOptions {
|
|
|
3
3
|
coordinates?: Float32Array;
|
|
4
4
|
lengths?: number[];
|
|
5
5
|
dimension?: number;
|
|
6
|
+
metaLength?: number;
|
|
6
7
|
}
|
|
7
|
-
export declare const
|
|
8
|
+
export declare const getCoordinatesAndMetaArr: ({ coordinates, lengths, metaLength, dimension, }: GetCoordinatesArrOptions) => {
|
|
9
|
+
coordinatesArr: Coordinate[][];
|
|
10
|
+
metaArray: number[][];
|
|
11
|
+
};
|
|
8
12
|
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BufferGeometry, NormalBufferAttributes } from 'three';
|
|
1
|
+
import type { BufferGeometry, NormalBufferAttributes } from 'three';
|
|
2
2
|
declare const _default: (geometries: BufferGeometry<NormalBufferAttributes>[], useGroups?: number) => {
|
|
3
3
|
message: Record<string, import("three").GeometryGroup[] | {
|
|
4
4
|
array: ArrayLike<number>;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { type ProjectionOptions } from "../../../utils";
|
|
2
2
|
import { type GetCoordinatesArrOptions } from './getCoordinatesArr';
|
|
3
3
|
export interface LineOptions extends GetCoordinatesArrOptions {
|
|
4
|
-
|
|
4
|
+
meta?: number[][];
|
|
5
5
|
projection?: ProjectionOptions;
|
|
6
6
|
useGroups?: 0 | 1 | 2;
|
|
7
7
|
splitPolygons?: number;
|
|
8
8
|
}
|
|
9
|
-
declare const getAttributes: ({ coordinates, lengths, projection: projectionOptions,
|
|
9
|
+
declare const getAttributes: ({ coordinates, lengths, metaLength, projection: projectionOptions, useGroups, splitPolygons, }: LineOptions) => {
|
|
10
10
|
message: Record<string, import("three").GeometryGroup[] | {
|
|
11
11
|
array: ArrayLike<number>;
|
|
12
12
|
itemSize: number;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { type ProjectionOptions } from "../../../utils";
|
|
2
2
|
import { type GetCoordinatesArrOptions } from './getCoordinatesArr';
|
|
3
3
|
export interface LineOptions extends GetCoordinatesArrOptions {
|
|
4
|
-
|
|
4
|
+
meta?: number[][];
|
|
5
5
|
projection?: ProjectionOptions;
|
|
6
6
|
useGroups?: 0 | 1 | 2;
|
|
7
7
|
splitPolygons?: number;
|
|
8
8
|
}
|
|
9
|
-
declare const getAttributes: ({ coordinates, lengths, projection: projectionOptions,
|
|
9
|
+
declare const getAttributes: ({ coordinates, lengths, metaLength, projection: projectionOptions, useGroups, splitPolygons, }: LineOptions) => {
|
|
10
10
|
message: Record<string, import("three").GeometryGroup[] | {
|
|
11
11
|
array: ArrayLike<number>;
|
|
12
12
|
itemSize: number;
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
-
import { Vector2 } from 'three';
|
|
2
|
-
declare const _default: (polygons: Vector2[][], diff?: number
|
|
1
|
+
import type { Vector2 } from 'three';
|
|
2
|
+
declare const _default: (polygons: Vector2[][], diff?: number, meta?: number[][]) => {
|
|
3
|
+
splitPolygons: Vector2[][];
|
|
4
|
+
splitMeta: number[][];
|
|
5
|
+
};
|
|
3
6
|
export default _default;
|
|
@@ -15,6 +15,7 @@ interface Options {
|
|
|
15
15
|
}
|
|
16
16
|
interface GeoGeometryOptions extends Options {
|
|
17
17
|
coordinatesArr: number[][][];
|
|
18
|
+
metaArray?: number[][];
|
|
18
19
|
cacheKey?: string;
|
|
19
20
|
userData?: Record<string, any>;
|
|
20
21
|
cb?: (geometry: BufferGeometry) => void;
|
|
@@ -49,11 +50,10 @@ export default class {
|
|
|
49
50
|
}): Promise<BufferGeometry>;
|
|
50
51
|
getCachedGeometry(options: Pick<GeoGeometryOptions, 'cacheKey' | 'cacheVersion'>): Promise<ReturnType<typeof createGeometry>[]>;
|
|
51
52
|
saveCache(): void;
|
|
52
|
-
flattenCoordinates(coordinatesArr: number[][][],
|
|
53
|
-
|
|
53
|
+
flattenCoordinates(coordinatesArr: number[][][], metaArray?: number[][]): {
|
|
54
|
+
flat: Float32Array;
|
|
54
55
|
lengths: number[];
|
|
55
56
|
};
|
|
56
|
-
_dispose: boolean;
|
|
57
57
|
dispose(): void;
|
|
58
58
|
}
|
|
59
59
|
export {};
|