potree-core 2.0.7 → 2.0.9
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/LICENSE +83 -83
- package/README.md +98 -98
- package/dist/constants.d.ts +14 -14
- package/dist/dem-node.d.ts +17 -17
- package/dist/features.d.ts +6 -6
- package/dist/index.d.ts +11 -11
- package/dist/index.js +1 -1
- package/dist/loading/binary-loader.d.ts +35 -35
- package/dist/loading/index.d.ts +3 -3
- package/dist/loading/load-poc.d.ts +14 -14
- package/dist/loading/types.d.ts +2 -2
- package/dist/loading2/OctreeGeometry.d.ts +23 -23
- package/dist/loading2/OctreeGeometryNode.d.ts +40 -40
- package/dist/loading2/OctreeLoader.d.ts +109 -109
- package/dist/loading2/PointAttributes.d.ts +44 -44
- package/dist/loading2/WorkerPool.d.ts +9 -9
- package/dist/loading2/load-octree.d.ts +2 -2
- package/dist/materials/blur-material.d.ts +11 -11
- package/dist/materials/classification.d.ts +2 -2
- package/dist/materials/clipping.d.ts +12 -12
- package/dist/materials/color-encoding.d.ts +4 -4
- package/dist/materials/enums.d.ts +37 -37
- package/dist/materials/gradients/grayscale.d.ts +2 -2
- package/dist/materials/gradients/index.d.ts +7 -7
- package/dist/materials/gradients/inferno.d.ts +2 -2
- package/dist/materials/gradients/plasma.d.ts +2 -2
- package/dist/materials/gradients/rainbow.d.ts +2 -2
- package/dist/materials/gradients/spectral.d.ts +2 -2
- package/dist/materials/gradients/vidris.d.ts +2 -2
- package/dist/materials/gradients/yellow-green.d.ts +2 -2
- package/dist/materials/index.d.ts +7 -7
- package/dist/materials/point-cloud-material.d.ts +186 -180
- package/dist/materials/texture-generation.d.ts +19 -5
- package/dist/materials/types.d.ts +10 -10
- package/dist/point-attributes.d.ts +52 -52
- package/dist/point-cloud-octree-geometry-node.d.ts +70 -70
- package/dist/point-cloud-octree-geometry.d.ts +27 -27
- package/dist/point-cloud-octree-node.d.ts +26 -26
- package/dist/point-cloud-octree-picker.d.ts +45 -45
- package/dist/point-cloud-octree.d.ts +45 -45
- package/dist/point-cloud-tree.d.ts +6 -6
- package/dist/potree.d.ts +37 -37
- package/dist/type-predicates.d.ts +3 -3
- package/dist/types.d.ts +56 -56
- package/dist/utils/bounds.d.ts +6 -6
- package/dist/utils/box3-helper.d.ts +13 -13
- package/dist/utils/lru.d.ts +32 -32
- package/dist/utils/math.d.ts +1 -1
- package/dist/utils/utils.d.ts +20 -6
- package/dist/version.d.ts +9 -9
- package/dist/workers/binary-decoder-worker-internal.d.ts +5 -5
- package/dist/workers/custom-array-view.d.ts +11 -11
- package/package.json +59 -59
|
@@ -1,52 +1,52 @@
|
|
|
1
|
-
export declare enum PointAttributeName {
|
|
2
|
-
POSITION_CARTESIAN = 0,
|
|
3
|
-
COLOR_PACKED = 1,
|
|
4
|
-
COLOR_FLOATS_1 = 2,
|
|
5
|
-
COLOR_FLOATS_255 = 3,
|
|
6
|
-
NORMAL_FLOATS = 4,
|
|
7
|
-
FILLER = 5,
|
|
8
|
-
INTENSITY = 6,
|
|
9
|
-
CLASSIFICATION = 7,
|
|
10
|
-
NORMAL_SPHEREMAPPED = 8,
|
|
11
|
-
NORMAL_OCT16 = 9,
|
|
12
|
-
NORMAL = 10
|
|
13
|
-
}
|
|
14
|
-
export interface PointAttributeType {
|
|
15
|
-
ordinal: number;
|
|
16
|
-
size: number;
|
|
17
|
-
}
|
|
18
|
-
export declare const POINT_ATTRIBUTE_TYPES: Record<string, PointAttributeType>;
|
|
19
|
-
export interface IPointAttribute {
|
|
20
|
-
name: PointAttributeName;
|
|
21
|
-
type: PointAttributeType;
|
|
22
|
-
numElements: number;
|
|
23
|
-
byteSize: number;
|
|
24
|
-
}
|
|
25
|
-
export interface IPointAttributes {
|
|
26
|
-
attributes: IPointAttribute[];
|
|
27
|
-
byteSize: number;
|
|
28
|
-
size: number;
|
|
29
|
-
}
|
|
30
|
-
export declare const POINT_ATTRIBUTES: {
|
|
31
|
-
POSITION_CARTESIAN: IPointAttribute;
|
|
32
|
-
RGBA_PACKED: IPointAttribute;
|
|
33
|
-
COLOR_PACKED: IPointAttribute;
|
|
34
|
-
RGB_PACKED: IPointAttribute;
|
|
35
|
-
NORMAL_FLOATS: IPointAttribute;
|
|
36
|
-
FILLER_1B: IPointAttribute;
|
|
37
|
-
INTENSITY: IPointAttribute;
|
|
38
|
-
CLASSIFICATION: IPointAttribute;
|
|
39
|
-
NORMAL_SPHEREMAPPED: IPointAttribute;
|
|
40
|
-
NORMAL_OCT16: IPointAttribute;
|
|
41
|
-
NORMAL: IPointAttribute;
|
|
42
|
-
};
|
|
43
|
-
export type PointAttributeStringName = keyof typeof POINT_ATTRIBUTES;
|
|
44
|
-
export declare class PointAttributes implements IPointAttributes {
|
|
45
|
-
attributes: IPointAttribute[];
|
|
46
|
-
byteSize: number;
|
|
47
|
-
size: number;
|
|
48
|
-
constructor(pointAttributeNames?: PointAttributeStringName[]);
|
|
49
|
-
add(pointAttribute: IPointAttribute): void;
|
|
50
|
-
hasColors(): boolean;
|
|
51
|
-
hasNormals(): boolean;
|
|
52
|
-
}
|
|
1
|
+
export declare enum PointAttributeName {
|
|
2
|
+
POSITION_CARTESIAN = 0,// float x, y, z;
|
|
3
|
+
COLOR_PACKED = 1,// byte r, g, b, a; I = [0,1]
|
|
4
|
+
COLOR_FLOATS_1 = 2,// float r, g, b; I = [0,1]
|
|
5
|
+
COLOR_FLOATS_255 = 3,// float r, g, b; I = [0,255]
|
|
6
|
+
NORMAL_FLOATS = 4,// float x, y, z;
|
|
7
|
+
FILLER = 5,
|
|
8
|
+
INTENSITY = 6,
|
|
9
|
+
CLASSIFICATION = 7,
|
|
10
|
+
NORMAL_SPHEREMAPPED = 8,
|
|
11
|
+
NORMAL_OCT16 = 9,
|
|
12
|
+
NORMAL = 10
|
|
13
|
+
}
|
|
14
|
+
export interface PointAttributeType {
|
|
15
|
+
ordinal: number;
|
|
16
|
+
size: number;
|
|
17
|
+
}
|
|
18
|
+
export declare const POINT_ATTRIBUTE_TYPES: Record<string, PointAttributeType>;
|
|
19
|
+
export interface IPointAttribute {
|
|
20
|
+
name: PointAttributeName;
|
|
21
|
+
type: PointAttributeType;
|
|
22
|
+
numElements: number;
|
|
23
|
+
byteSize: number;
|
|
24
|
+
}
|
|
25
|
+
export interface IPointAttributes {
|
|
26
|
+
attributes: IPointAttribute[];
|
|
27
|
+
byteSize: number;
|
|
28
|
+
size: number;
|
|
29
|
+
}
|
|
30
|
+
export declare const POINT_ATTRIBUTES: {
|
|
31
|
+
POSITION_CARTESIAN: IPointAttribute;
|
|
32
|
+
RGBA_PACKED: IPointAttribute;
|
|
33
|
+
COLOR_PACKED: IPointAttribute;
|
|
34
|
+
RGB_PACKED: IPointAttribute;
|
|
35
|
+
NORMAL_FLOATS: IPointAttribute;
|
|
36
|
+
FILLER_1B: IPointAttribute;
|
|
37
|
+
INTENSITY: IPointAttribute;
|
|
38
|
+
CLASSIFICATION: IPointAttribute;
|
|
39
|
+
NORMAL_SPHEREMAPPED: IPointAttribute;
|
|
40
|
+
NORMAL_OCT16: IPointAttribute;
|
|
41
|
+
NORMAL: IPointAttribute;
|
|
42
|
+
};
|
|
43
|
+
export type PointAttributeStringName = keyof typeof POINT_ATTRIBUTES;
|
|
44
|
+
export declare class PointAttributes implements IPointAttributes {
|
|
45
|
+
attributes: IPointAttribute[];
|
|
46
|
+
byteSize: number;
|
|
47
|
+
size: number;
|
|
48
|
+
constructor(pointAttributeNames?: PointAttributeStringName[]);
|
|
49
|
+
add(pointAttribute: IPointAttribute): void;
|
|
50
|
+
hasColors(): boolean;
|
|
51
|
+
hasNormals(): boolean;
|
|
52
|
+
}
|
|
@@ -1,70 +1,70 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Adapted from Potree.js http://potree.org
|
|
3
|
-
* Potree License: https://github.com/potree/potree/blob/1.5/LICENSE
|
|
4
|
-
*/
|
|
5
|
-
import { Box3, BufferGeometry, EventDispatcher, Sphere, Vector3 } from 'three';
|
|
6
|
-
import { PointCloudOctreeGeometry } from './point-cloud-octree-geometry';
|
|
7
|
-
import { IPointCloudTreeNode } from './types';
|
|
8
|
-
export interface NodeData {
|
|
9
|
-
children: number;
|
|
10
|
-
numPoints: number;
|
|
11
|
-
name: string;
|
|
12
|
-
}
|
|
13
|
-
export declare class PointCloudOctreeGeometryNode extends EventDispatcher implements IPointCloudTreeNode {
|
|
14
|
-
id: number;
|
|
15
|
-
name: string;
|
|
16
|
-
pcoGeometry: PointCloudOctreeGeometry;
|
|
17
|
-
index: number;
|
|
18
|
-
level: number;
|
|
19
|
-
spacing: number;
|
|
20
|
-
hasChildren: boolean;
|
|
21
|
-
readonly children: ReadonlyArray<PointCloudOctreeGeometryNode | null>;
|
|
22
|
-
boundingBox: Box3;
|
|
23
|
-
tightBoundingBox: Box3;
|
|
24
|
-
boundingSphere: Sphere;
|
|
25
|
-
mean: Vector3;
|
|
26
|
-
numPoints: number;
|
|
27
|
-
geometry: BufferGeometry | undefined;
|
|
28
|
-
loaded: boolean;
|
|
29
|
-
loading: boolean;
|
|
30
|
-
failed: boolean;
|
|
31
|
-
parent: PointCloudOctreeGeometryNode | null;
|
|
32
|
-
oneTimeDisposeHandlers: (() => void)[];
|
|
33
|
-
isLeafNode: boolean;
|
|
34
|
-
readonly isTreeNode: boolean;
|
|
35
|
-
readonly isGeometryNode: boolean;
|
|
36
|
-
private static idCount;
|
|
37
|
-
constructor(name: string, pcoGeometry: PointCloudOctreeGeometry, boundingBox: Box3);
|
|
38
|
-
dispose(): void;
|
|
39
|
-
/**
|
|
40
|
-
* Gets the url of the binary file for this node.
|
|
41
|
-
*/
|
|
42
|
-
getUrl(): string;
|
|
43
|
-
/**
|
|
44
|
-
* Gets the url of the hierarchy file for this node.
|
|
45
|
-
*/
|
|
46
|
-
getHierarchyUrl(): string;
|
|
47
|
-
/**
|
|
48
|
-
* Adds the specified node as a child of the current node.
|
|
49
|
-
*
|
|
50
|
-
* @param child - The node which is to be added as a child.
|
|
51
|
-
*/
|
|
52
|
-
addChild(child: PointCloudOctreeGeometryNode): void;
|
|
53
|
-
/**
|
|
54
|
-
* Calls the specified callback for the current node (if includeSelf is set to true) and all its children.
|
|
55
|
-
*
|
|
56
|
-
* @param cb - The function which is to be called for each node.
|
|
57
|
-
*/
|
|
58
|
-
traverse(cb: (node: PointCloudOctreeGeometryNode) => void, includeSelf?: boolean): void;
|
|
59
|
-
load(): Promise<void>;
|
|
60
|
-
private canLoad;
|
|
61
|
-
private loadPoints;
|
|
62
|
-
private loadHierachyThenPoints;
|
|
63
|
-
/**
|
|
64
|
-
* Gets the url of the folder where the hierarchy is, relative to the octreeDir.
|
|
65
|
-
*/
|
|
66
|
-
private getHierarchyBaseUrl;
|
|
67
|
-
private loadHierarchy;
|
|
68
|
-
private getNodeData;
|
|
69
|
-
addNode({ name, numPoints, children }: NodeData, pco: PointCloudOctreeGeometry, nodes: Map<string, PointCloudOctreeGeometryNode>): void;
|
|
70
|
-
}
|
|
1
|
+
/**
|
|
2
|
+
* Adapted from Potree.js http://potree.org
|
|
3
|
+
* Potree License: https://github.com/potree/potree/blob/1.5/LICENSE
|
|
4
|
+
*/
|
|
5
|
+
import { Box3, BufferGeometry, EventDispatcher, Sphere, Vector3 } from 'three';
|
|
6
|
+
import { PointCloudOctreeGeometry } from './point-cloud-octree-geometry';
|
|
7
|
+
import { IPointCloudTreeNode } from './types';
|
|
8
|
+
export interface NodeData {
|
|
9
|
+
children: number;
|
|
10
|
+
numPoints: number;
|
|
11
|
+
name: string;
|
|
12
|
+
}
|
|
13
|
+
export declare class PointCloudOctreeGeometryNode extends EventDispatcher implements IPointCloudTreeNode {
|
|
14
|
+
id: number;
|
|
15
|
+
name: string;
|
|
16
|
+
pcoGeometry: PointCloudOctreeGeometry;
|
|
17
|
+
index: number;
|
|
18
|
+
level: number;
|
|
19
|
+
spacing: number;
|
|
20
|
+
hasChildren: boolean;
|
|
21
|
+
readonly children: ReadonlyArray<PointCloudOctreeGeometryNode | null>;
|
|
22
|
+
boundingBox: Box3;
|
|
23
|
+
tightBoundingBox: Box3;
|
|
24
|
+
boundingSphere: Sphere;
|
|
25
|
+
mean: Vector3;
|
|
26
|
+
numPoints: number;
|
|
27
|
+
geometry: BufferGeometry | undefined;
|
|
28
|
+
loaded: boolean;
|
|
29
|
+
loading: boolean;
|
|
30
|
+
failed: boolean;
|
|
31
|
+
parent: PointCloudOctreeGeometryNode | null;
|
|
32
|
+
oneTimeDisposeHandlers: (() => void)[];
|
|
33
|
+
isLeafNode: boolean;
|
|
34
|
+
readonly isTreeNode: boolean;
|
|
35
|
+
readonly isGeometryNode: boolean;
|
|
36
|
+
private static idCount;
|
|
37
|
+
constructor(name: string, pcoGeometry: PointCloudOctreeGeometry, boundingBox: Box3);
|
|
38
|
+
dispose(): void;
|
|
39
|
+
/**
|
|
40
|
+
* Gets the url of the binary file for this node.
|
|
41
|
+
*/
|
|
42
|
+
getUrl(): string;
|
|
43
|
+
/**
|
|
44
|
+
* Gets the url of the hierarchy file for this node.
|
|
45
|
+
*/
|
|
46
|
+
getHierarchyUrl(): string;
|
|
47
|
+
/**
|
|
48
|
+
* Adds the specified node as a child of the current node.
|
|
49
|
+
*
|
|
50
|
+
* @param child - The node which is to be added as a child.
|
|
51
|
+
*/
|
|
52
|
+
addChild(child: PointCloudOctreeGeometryNode): void;
|
|
53
|
+
/**
|
|
54
|
+
* Calls the specified callback for the current node (if includeSelf is set to true) and all its children.
|
|
55
|
+
*
|
|
56
|
+
* @param cb - The function which is to be called for each node.
|
|
57
|
+
*/
|
|
58
|
+
traverse(cb: (node: PointCloudOctreeGeometryNode) => void, includeSelf?: boolean): void;
|
|
59
|
+
load(): Promise<void>;
|
|
60
|
+
private canLoad;
|
|
61
|
+
private loadPoints;
|
|
62
|
+
private loadHierachyThenPoints;
|
|
63
|
+
/**
|
|
64
|
+
* Gets the url of the folder where the hierarchy is, relative to the octreeDir.
|
|
65
|
+
*/
|
|
66
|
+
private getHierarchyBaseUrl;
|
|
67
|
+
private loadHierarchy;
|
|
68
|
+
private getNodeData;
|
|
69
|
+
addNode({ name, numPoints, children }: NodeData, pco: PointCloudOctreeGeometry, nodes: Map<string, PointCloudOctreeGeometryNode>): void;
|
|
70
|
+
}
|
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
import { Box3, Vector3 } from 'three';
|
|
2
|
-
import { BinaryLoader, XhrRequest } from './loading';
|
|
3
|
-
import { PointAttributes } from './point-attributes';
|
|
4
|
-
import { PointCloudOctreeGeometryNode } from './point-cloud-octree-geometry-node';
|
|
5
|
-
export declare class PointCloudOctreeGeometry {
|
|
6
|
-
loader: BinaryLoader;
|
|
7
|
-
boundingBox: Box3;
|
|
8
|
-
tightBoundingBox: Box3;
|
|
9
|
-
offset: Vector3;
|
|
10
|
-
xhrRequest: XhrRequest;
|
|
11
|
-
disposed: boolean;
|
|
12
|
-
needsUpdate: boolean;
|
|
13
|
-
root: PointCloudOctreeGeometryNode;
|
|
14
|
-
octreeDir: string;
|
|
15
|
-
hierarchyStepSize: number;
|
|
16
|
-
nodes: Record<string, PointCloudOctreeGeometryNode>;
|
|
17
|
-
numNodesLoading: number;
|
|
18
|
-
maxNumNodesLoading: number;
|
|
19
|
-
spacing: number;
|
|
20
|
-
pointAttributes: PointAttributes;
|
|
21
|
-
projection: any;
|
|
22
|
-
url: string | null;
|
|
23
|
-
constructor(loader: BinaryLoader, boundingBox: Box3, tightBoundingBox: Box3, offset: Vector3, xhrRequest: XhrRequest);
|
|
24
|
-
dispose(): void;
|
|
25
|
-
addNodeLoadedCallback(callback: (node: PointCloudOctreeGeometryNode) => void): void;
|
|
26
|
-
clearNodeLoadedCallbacks(): void;
|
|
27
|
-
}
|
|
1
|
+
import { Box3, Vector3 } from 'three';
|
|
2
|
+
import { BinaryLoader, XhrRequest } from './loading';
|
|
3
|
+
import { PointAttributes } from './point-attributes';
|
|
4
|
+
import { PointCloudOctreeGeometryNode } from './point-cloud-octree-geometry-node';
|
|
5
|
+
export declare class PointCloudOctreeGeometry {
|
|
6
|
+
loader: BinaryLoader;
|
|
7
|
+
boundingBox: Box3;
|
|
8
|
+
tightBoundingBox: Box3;
|
|
9
|
+
offset: Vector3;
|
|
10
|
+
xhrRequest: XhrRequest;
|
|
11
|
+
disposed: boolean;
|
|
12
|
+
needsUpdate: boolean;
|
|
13
|
+
root: PointCloudOctreeGeometryNode;
|
|
14
|
+
octreeDir: string;
|
|
15
|
+
hierarchyStepSize: number;
|
|
16
|
+
nodes: Record<string, PointCloudOctreeGeometryNode>;
|
|
17
|
+
numNodesLoading: number;
|
|
18
|
+
maxNumNodesLoading: number;
|
|
19
|
+
spacing: number;
|
|
20
|
+
pointAttributes: PointAttributes;
|
|
21
|
+
projection: any;
|
|
22
|
+
url: string | null;
|
|
23
|
+
constructor(loader: BinaryLoader, boundingBox: Box3, tightBoundingBox: Box3, offset: Vector3, xhrRequest: XhrRequest);
|
|
24
|
+
dispose(): void;
|
|
25
|
+
addNodeLoadedCallback(callback: (node: PointCloudOctreeGeometryNode) => void): void;
|
|
26
|
+
clearNodeLoadedCallbacks(): void;
|
|
27
|
+
}
|
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
import { Box3, EventDispatcher, Object3D, Points, Sphere } from 'three';
|
|
2
|
-
import { PointCloudOctreeGeometryNode } from './point-cloud-octree-geometry-node';
|
|
3
|
-
import { IPointCloudTreeNode } from './types';
|
|
4
|
-
export declare class PointCloudOctreeNode extends EventDispatcher implements IPointCloudTreeNode {
|
|
5
|
-
geometryNode: PointCloudOctreeGeometryNode;
|
|
6
|
-
sceneNode: Points;
|
|
7
|
-
pcIndex: number | undefined;
|
|
8
|
-
boundingBoxNode: Object3D | null;
|
|
9
|
-
readonly children: (IPointCloudTreeNode | null)[];
|
|
10
|
-
readonly loaded = true;
|
|
11
|
-
readonly isTreeNode: boolean;
|
|
12
|
-
readonly isGeometryNode: boolean;
|
|
13
|
-
constructor(geometryNode: PointCloudOctreeGeometryNode, sceneNode: Points);
|
|
14
|
-
dispose(): void;
|
|
15
|
-
disposeSceneNode(): void;
|
|
16
|
-
traverse(cb: (node: IPointCloudTreeNode) => void, includeSelf?: boolean): void;
|
|
17
|
-
get id(): number;
|
|
18
|
-
get name(): string;
|
|
19
|
-
get level(): number;
|
|
20
|
-
get isLeafNode(): boolean;
|
|
21
|
-
get numPoints(): number;
|
|
22
|
-
get index(): number;
|
|
23
|
-
get boundingSphere(): Sphere;
|
|
24
|
-
get boundingBox(): Box3;
|
|
25
|
-
get spacing(): number;
|
|
26
|
-
}
|
|
1
|
+
import { Box3, EventDispatcher, Object3D, Points, Sphere } from 'three';
|
|
2
|
+
import { PointCloudOctreeGeometryNode } from './point-cloud-octree-geometry-node';
|
|
3
|
+
import { IPointCloudTreeNode } from './types';
|
|
4
|
+
export declare class PointCloudOctreeNode extends EventDispatcher implements IPointCloudTreeNode {
|
|
5
|
+
geometryNode: PointCloudOctreeGeometryNode;
|
|
6
|
+
sceneNode: Points;
|
|
7
|
+
pcIndex: number | undefined;
|
|
8
|
+
boundingBoxNode: Object3D | null;
|
|
9
|
+
readonly children: (IPointCloudTreeNode | null)[];
|
|
10
|
+
readonly loaded = true;
|
|
11
|
+
readonly isTreeNode: boolean;
|
|
12
|
+
readonly isGeometryNode: boolean;
|
|
13
|
+
constructor(geometryNode: PointCloudOctreeGeometryNode, sceneNode: Points);
|
|
14
|
+
dispose(): void;
|
|
15
|
+
disposeSceneNode(): void;
|
|
16
|
+
traverse(cb: (node: IPointCloudTreeNode) => void, includeSelf?: boolean): void;
|
|
17
|
+
get id(): number;
|
|
18
|
+
get name(): string;
|
|
19
|
+
get level(): number;
|
|
20
|
+
get isLeafNode(): boolean;
|
|
21
|
+
get numPoints(): number;
|
|
22
|
+
get index(): number;
|
|
23
|
+
get boundingSphere(): Sphere;
|
|
24
|
+
get boundingBox(): Box3;
|
|
25
|
+
get spacing(): number;
|
|
26
|
+
}
|
|
@@ -1,45 +1,45 @@
|
|
|
1
|
-
import { Camera, Ray, Vector3, WebGLRenderer, WebGLRenderTarget } from 'three';
|
|
2
|
-
import { PointCloudMaterial } from './materials';
|
|
3
|
-
import { PointCloudOctree } from './point-cloud-octree';
|
|
4
|
-
import { PickPoint } from './types';
|
|
5
|
-
export interface PickParams {
|
|
6
|
-
pickWindowSize: number;
|
|
7
|
-
pickOutsideClipRegion: boolean;
|
|
8
|
-
/**
|
|
9
|
-
* If provided, the picking will use this pixel position instead of the `Ray` passed to the `pick`
|
|
10
|
-
* method.
|
|
11
|
-
*/
|
|
12
|
-
pixelPosition: Vector3;
|
|
13
|
-
/**
|
|
14
|
-
* Function which gets called after a picking material has been created and setup and before the
|
|
15
|
-
* point cloud is rendered into the picking render target. This gives applications a chance to
|
|
16
|
-
* customize the renderTarget and the material.
|
|
17
|
-
*
|
|
18
|
-
* @param material
|
|
19
|
-
* The pick material.
|
|
20
|
-
* @param renterTarget
|
|
21
|
-
* The render target used for picking.
|
|
22
|
-
*/
|
|
23
|
-
onBeforePickRender: (material: PointCloudMaterial, renterTarget: WebGLRenderTarget) => void;
|
|
24
|
-
}
|
|
25
|
-
export declare class PointCloudOctreePicker {
|
|
26
|
-
private static readonly helperVec3;
|
|
27
|
-
private static readonly helperSphere;
|
|
28
|
-
private static readonly clearColor;
|
|
29
|
-
private pickState;
|
|
30
|
-
dispose(): void;
|
|
31
|
-
pick(renderer: WebGLRenderer, camera: Camera, ray: Ray, octrees: PointCloudOctree[], params?: Partial<PickParams>): PickPoint | null;
|
|
32
|
-
private static prepareRender;
|
|
33
|
-
private static render;
|
|
34
|
-
private static nodesOnRay;
|
|
35
|
-
private static readPixels;
|
|
36
|
-
private static createTempNodes;
|
|
37
|
-
private static updatePickMaterial;
|
|
38
|
-
private static updatePickRenderTarget;
|
|
39
|
-
private static makePickRenderTarget;
|
|
40
|
-
private static findHit;
|
|
41
|
-
private static getPickPoint;
|
|
42
|
-
private static addPositionToPickPoint;
|
|
43
|
-
private static addNormalToPickPoint;
|
|
44
|
-
private static getPickState;
|
|
45
|
-
}
|
|
1
|
+
import { Camera, Ray, Vector3, WebGLRenderer, WebGLRenderTarget } from 'three';
|
|
2
|
+
import { PointCloudMaterial } from './materials';
|
|
3
|
+
import { PointCloudOctree } from './point-cloud-octree';
|
|
4
|
+
import { PickPoint } from './types';
|
|
5
|
+
export interface PickParams {
|
|
6
|
+
pickWindowSize: number;
|
|
7
|
+
pickOutsideClipRegion: boolean;
|
|
8
|
+
/**
|
|
9
|
+
* If provided, the picking will use this pixel position instead of the `Ray` passed to the `pick`
|
|
10
|
+
* method.
|
|
11
|
+
*/
|
|
12
|
+
pixelPosition: Vector3;
|
|
13
|
+
/**
|
|
14
|
+
* Function which gets called after a picking material has been created and setup and before the
|
|
15
|
+
* point cloud is rendered into the picking render target. This gives applications a chance to
|
|
16
|
+
* customize the renderTarget and the material.
|
|
17
|
+
*
|
|
18
|
+
* @param material
|
|
19
|
+
* The pick material.
|
|
20
|
+
* @param renterTarget
|
|
21
|
+
* The render target used for picking.
|
|
22
|
+
*/
|
|
23
|
+
onBeforePickRender: (material: PointCloudMaterial, renterTarget: WebGLRenderTarget) => void;
|
|
24
|
+
}
|
|
25
|
+
export declare class PointCloudOctreePicker {
|
|
26
|
+
private static readonly helperVec3;
|
|
27
|
+
private static readonly helperSphere;
|
|
28
|
+
private static readonly clearColor;
|
|
29
|
+
private pickState;
|
|
30
|
+
dispose(): void;
|
|
31
|
+
pick(renderer: WebGLRenderer, camera: Camera, ray: Ray, octrees: PointCloudOctree[], params?: Partial<PickParams>): PickPoint | null;
|
|
32
|
+
private static prepareRender;
|
|
33
|
+
private static render;
|
|
34
|
+
private static nodesOnRay;
|
|
35
|
+
private static readPixels;
|
|
36
|
+
private static createTempNodes;
|
|
37
|
+
private static updatePickMaterial;
|
|
38
|
+
private static updatePickRenderTarget;
|
|
39
|
+
private static makePickRenderTarget;
|
|
40
|
+
private static findHit;
|
|
41
|
+
private static getPickPoint;
|
|
42
|
+
private static addPositionToPickPoint;
|
|
43
|
+
private static addNormalToPickPoint;
|
|
44
|
+
private static getPickState;
|
|
45
|
+
}
|
|
@@ -1,45 +1,45 @@
|
|
|
1
|
-
import { Box3, Camera, Object3D, Ray, Sphere, WebGLRenderer } from 'three';
|
|
2
|
-
import { PointCloudMaterial, PointSizeType } from './materials';
|
|
3
|
-
import { PointCloudOctreeGeometryNode } from './point-cloud-octree-geometry-node';
|
|
4
|
-
import { PointCloudOctreeNode } from './point-cloud-octree-node';
|
|
5
|
-
import { PickParams } from './point-cloud-octree-picker';
|
|
6
|
-
import { PointCloudTree } from './point-cloud-tree';
|
|
7
|
-
import { IPointCloudTreeNode, IPotree, PickPoint, PCOGeometry } from './types';
|
|
8
|
-
export declare class PointCloudOctree extends PointCloudTree {
|
|
9
|
-
potree: IPotree;
|
|
10
|
-
disposed: boolean;
|
|
11
|
-
pcoGeometry: PCOGeometry;
|
|
12
|
-
boundingBox: Box3;
|
|
13
|
-
boundingSphere: Sphere;
|
|
14
|
-
material: PointCloudMaterial;
|
|
15
|
-
level: number;
|
|
16
|
-
maxLevel: number;
|
|
17
|
-
/**
|
|
18
|
-
* The minimum radius of a node's bounding sphere on the screen in order to be displayed.
|
|
19
|
-
*/
|
|
20
|
-
minNodePixelSize: number;
|
|
21
|
-
root: IPointCloudTreeNode | null;
|
|
22
|
-
boundingBoxNodes: Object3D[];
|
|
23
|
-
visibleNodes: PointCloudOctreeNode[];
|
|
24
|
-
visibleGeometry: PointCloudOctreeGeometryNode[];
|
|
25
|
-
numVisiblePoints: number;
|
|
26
|
-
showBoundingBox: boolean;
|
|
27
|
-
private visibleBounds;
|
|
28
|
-
private picker;
|
|
29
|
-
constructor(potree: IPotree, pcoGeometry: PCOGeometry, material?: PointCloudMaterial);
|
|
30
|
-
private initMaterial;
|
|
31
|
-
dispose(): void;
|
|
32
|
-
get pointSizeType(): PointSizeType;
|
|
33
|
-
set pointSizeType(value: PointSizeType);
|
|
34
|
-
toTreeNode(geometryNode: PointCloudOctreeGeometryNode, parent?: PointCloudOctreeNode | null): PointCloudOctreeNode;
|
|
35
|
-
updateVisibleBounds(): void;
|
|
36
|
-
updateBoundingBoxes(): void;
|
|
37
|
-
updateMatrixWorld(force: boolean): void;
|
|
38
|
-
hideDescendants(object: Object3D): void;
|
|
39
|
-
moveToOrigin(): void;
|
|
40
|
-
moveToGroundPlane(): void;
|
|
41
|
-
getBoundingBoxWorld(): Box3;
|
|
42
|
-
getVisibleExtent(): Box3;
|
|
43
|
-
pick(renderer: WebGLRenderer, camera: Camera, ray: Ray, params?: Partial<PickParams>): PickPoint | null;
|
|
44
|
-
get progress(): number;
|
|
45
|
-
}
|
|
1
|
+
import { Box3, Camera, Object3D, Ray, Sphere, WebGLRenderer } from 'three';
|
|
2
|
+
import { PointCloudMaterial, PointSizeType } from './materials';
|
|
3
|
+
import { PointCloudOctreeGeometryNode } from './point-cloud-octree-geometry-node';
|
|
4
|
+
import { PointCloudOctreeNode } from './point-cloud-octree-node';
|
|
5
|
+
import { PickParams } from './point-cloud-octree-picker';
|
|
6
|
+
import { PointCloudTree } from './point-cloud-tree';
|
|
7
|
+
import { IPointCloudTreeNode, IPotree, PickPoint, PCOGeometry } from './types';
|
|
8
|
+
export declare class PointCloudOctree extends PointCloudTree {
|
|
9
|
+
potree: IPotree;
|
|
10
|
+
disposed: boolean;
|
|
11
|
+
pcoGeometry: PCOGeometry;
|
|
12
|
+
boundingBox: Box3;
|
|
13
|
+
boundingSphere: Sphere;
|
|
14
|
+
material: PointCloudMaterial;
|
|
15
|
+
level: number;
|
|
16
|
+
maxLevel: number;
|
|
17
|
+
/**
|
|
18
|
+
* The minimum radius of a node's bounding sphere on the screen in order to be displayed.
|
|
19
|
+
*/
|
|
20
|
+
minNodePixelSize: number;
|
|
21
|
+
root: IPointCloudTreeNode | null;
|
|
22
|
+
boundingBoxNodes: Object3D[];
|
|
23
|
+
visibleNodes: PointCloudOctreeNode[];
|
|
24
|
+
visibleGeometry: PointCloudOctreeGeometryNode[];
|
|
25
|
+
numVisiblePoints: number;
|
|
26
|
+
showBoundingBox: boolean;
|
|
27
|
+
private visibleBounds;
|
|
28
|
+
private picker;
|
|
29
|
+
constructor(potree: IPotree, pcoGeometry: PCOGeometry, material?: PointCloudMaterial);
|
|
30
|
+
private initMaterial;
|
|
31
|
+
dispose(): void;
|
|
32
|
+
get pointSizeType(): PointSizeType;
|
|
33
|
+
set pointSizeType(value: PointSizeType);
|
|
34
|
+
toTreeNode(geometryNode: PointCloudOctreeGeometryNode, parent?: PointCloudOctreeNode | null): PointCloudOctreeNode;
|
|
35
|
+
updateVisibleBounds(): void;
|
|
36
|
+
updateBoundingBoxes(): void;
|
|
37
|
+
updateMatrixWorld(force: boolean): void;
|
|
38
|
+
hideDescendants(object: Object3D): void;
|
|
39
|
+
moveToOrigin(): void;
|
|
40
|
+
moveToGroundPlane(): void;
|
|
41
|
+
getBoundingBoxWorld(): Box3;
|
|
42
|
+
getVisibleExtent(): Box3;
|
|
43
|
+
pick(renderer: WebGLRenderer, camera: Camera, ray: Ray, params?: Partial<PickParams>): PickPoint | null;
|
|
44
|
+
get progress(): number;
|
|
45
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Object3D } from 'three';
|
|
2
|
-
import { IPointCloudTreeNode } from './types';
|
|
3
|
-
export declare class PointCloudTree extends Object3D {
|
|
4
|
-
root: IPointCloudTreeNode | null;
|
|
5
|
-
initialized(): boolean;
|
|
6
|
-
}
|
|
1
|
+
import { Object3D } from 'three';
|
|
2
|
+
import { IPointCloudTreeNode } from './types';
|
|
3
|
+
export declare class PointCloudTree extends Object3D {
|
|
4
|
+
root: IPointCloudTreeNode | null;
|
|
5
|
+
initialized(): boolean;
|
|
6
|
+
}
|
package/dist/potree.d.ts
CHANGED
|
@@ -1,37 +1,37 @@
|
|
|
1
|
-
import { Camera, Ray, WebGLRenderer } from 'three';
|
|
2
|
-
import { GetUrlFn } from './loading';
|
|
3
|
-
import { PointCloudOctree } from './point-cloud-octree';
|
|
4
|
-
import { PickParams } from './point-cloud-octree-picker';
|
|
5
|
-
import { IPointCloudTreeNode, IPotree, IVisibilityUpdateResult, PickPoint } from './types';
|
|
6
|
-
import { LRU } from './utils/lru';
|
|
7
|
-
export declare class QueueItem {
|
|
8
|
-
pointCloudIndex: number;
|
|
9
|
-
weight: number;
|
|
10
|
-
node: IPointCloudTreeNode;
|
|
11
|
-
parent?: IPointCloudTreeNode | null;
|
|
12
|
-
constructor(pointCloudIndex: number, weight: number, node: IPointCloudTreeNode, parent?: IPointCloudTreeNode | null);
|
|
13
|
-
}
|
|
14
|
-
export declare class Potree implements IPotree {
|
|
15
|
-
private static picker;
|
|
16
|
-
private _pointBudget;
|
|
17
|
-
private _rendererSize;
|
|
18
|
-
maxNumNodesLoading: number;
|
|
19
|
-
features: {
|
|
20
|
-
SHADER_INTERPOLATION: boolean;
|
|
21
|
-
SHADER_SPLATS: boolean;
|
|
22
|
-
SHADER_EDL: boolean;
|
|
23
|
-
precision: string;
|
|
24
|
-
};
|
|
25
|
-
lru: LRU;
|
|
26
|
-
loadPointCloud(url: string, getUrl: GetUrlFn, xhrRequest?: (input: RequestInfo, init?: RequestInit) => Promise<Response>): Promise<PointCloudOctree>;
|
|
27
|
-
updatePointClouds(pointClouds: PointCloudOctree[], camera: Camera, renderer: WebGLRenderer): IVisibilityUpdateResult;
|
|
28
|
-
static pick(pointClouds: PointCloudOctree[], renderer: WebGLRenderer, camera: Camera, ray: Ray, params?: Partial<PickParams>): PickPoint | null;
|
|
29
|
-
get pointBudget(): number;
|
|
30
|
-
set pointBudget(value: number);
|
|
31
|
-
private updateVisibility;
|
|
32
|
-
private updateTreeNodeVisibility;
|
|
33
|
-
private updateChildVisibility;
|
|
34
|
-
private updateBoundingBoxVisibility;
|
|
35
|
-
private shouldClip;
|
|
36
|
-
private updateVisibilityStructures;
|
|
37
|
-
}
|
|
1
|
+
import { Camera, Ray, WebGLRenderer } from 'three';
|
|
2
|
+
import { GetUrlFn } from './loading';
|
|
3
|
+
import { PointCloudOctree } from './point-cloud-octree';
|
|
4
|
+
import { PickParams } from './point-cloud-octree-picker';
|
|
5
|
+
import { IPointCloudTreeNode, IPotree, IVisibilityUpdateResult, PickPoint } from './types';
|
|
6
|
+
import { LRU } from './utils/lru';
|
|
7
|
+
export declare class QueueItem {
|
|
8
|
+
pointCloudIndex: number;
|
|
9
|
+
weight: number;
|
|
10
|
+
node: IPointCloudTreeNode;
|
|
11
|
+
parent?: IPointCloudTreeNode | null;
|
|
12
|
+
constructor(pointCloudIndex: number, weight: number, node: IPointCloudTreeNode, parent?: IPointCloudTreeNode | null);
|
|
13
|
+
}
|
|
14
|
+
export declare class Potree implements IPotree {
|
|
15
|
+
private static picker;
|
|
16
|
+
private _pointBudget;
|
|
17
|
+
private _rendererSize;
|
|
18
|
+
maxNumNodesLoading: number;
|
|
19
|
+
get features(): {
|
|
20
|
+
SHADER_INTERPOLATION: boolean;
|
|
21
|
+
SHADER_SPLATS: boolean;
|
|
22
|
+
SHADER_EDL: boolean;
|
|
23
|
+
precision: string;
|
|
24
|
+
};
|
|
25
|
+
lru: LRU;
|
|
26
|
+
loadPointCloud(url: string, getUrl: GetUrlFn, xhrRequest?: (input: RequestInfo, init?: RequestInit) => Promise<Response>): Promise<PointCloudOctree>;
|
|
27
|
+
updatePointClouds(pointClouds: PointCloudOctree[], camera: Camera, renderer: WebGLRenderer): IVisibilityUpdateResult;
|
|
28
|
+
static pick(pointClouds: PointCloudOctree[], renderer: WebGLRenderer, camera: Camera, ray: Ray, params?: Partial<PickParams>): PickPoint | null;
|
|
29
|
+
get pointBudget(): number;
|
|
30
|
+
set pointBudget(value: number);
|
|
31
|
+
private updateVisibility;
|
|
32
|
+
private updateTreeNodeVisibility;
|
|
33
|
+
private updateChildVisibility;
|
|
34
|
+
private updateBoundingBoxVisibility;
|
|
35
|
+
private shouldClip;
|
|
36
|
+
private updateVisibilityStructures;
|
|
37
|
+
}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { PointCloudOctreeGeometryNode } from './point-cloud-octree-geometry-node';
|
|
2
|
-
export declare function isGeometryNode(node?: any): node is PointCloudOctreeGeometryNode;
|
|
3
|
-
export declare function isTreeNode(node?: any): any;
|
|
1
|
+
import { PointCloudOctreeGeometryNode } from './point-cloud-octree-geometry-node';
|
|
2
|
+
export declare function isGeometryNode(node?: any): node is PointCloudOctreeGeometryNode;
|
|
3
|
+
export declare function isTreeNode(node?: any): any;
|