potree-core 2.0.11 → 2.0.13
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/README.md +45 -1
- package/dist/constants.d.ts +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +1 -1
- package/dist/materials/clipping.d.ts +24 -0
- package/dist/materials/eye-dome-lighting-material.d.ts +28 -0
- package/dist/materials/index.d.ts +1 -0
- package/dist/materials/point-cloud-material.d.ts +9 -1
- package/dist/point-cloud-octree-picker.d.ts +3 -0
- package/dist/point-cloud-octree.d.ts +16 -1
- package/dist/rendering/edl-pass.d.ts +25 -0
- package/dist/rendering/potree-renderer.d.ts +83 -0
- package/dist/rendering/screen-pass.d.ts +11 -0
- package/dist/utils/binary-heap.d.ts +16 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -61,6 +61,51 @@ function loop()
|
|
|
61
61
|
loop();
|
|
62
62
|
```
|
|
63
63
|
|
|
64
|
+
## Clip Boxes
|
|
65
|
+
- Clip boxes restrict the rendered region of a point cloud to a box-shaped volume.
|
|
66
|
+
- Use the `createClipBox(size, position)` helper to build an `IClipBox` from a size and world-space position.
|
|
67
|
+
- Set the desired `ClipMode` on the material and pass the clip boxes to `setClipBoxes()`.
|
|
68
|
+
|
|
69
|
+
```javascript
|
|
70
|
+
import { ClipMode, createClipBox } from 'potree-core';
|
|
71
|
+
import { Vector3 } from 'three';
|
|
72
|
+
|
|
73
|
+
// Create a 5×5×5 clip box centered at world position (2, 0, 0)
|
|
74
|
+
const clipBox = createClipBox(new Vector3(5, 5, 5), new Vector3(2, 0, 0));
|
|
75
|
+
|
|
76
|
+
// Highlight points inside the box (other modes: CLIP_OUTSIDE, CLIP_INSIDE, DISABLED)
|
|
77
|
+
pco.material.clipMode = ClipMode.HIGHLIGHT_INSIDE;
|
|
78
|
+
pco.material.setClipBoxes([clipBox]);
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
- `ClipMode.DISABLED` – no clipping.
|
|
82
|
+
- `ClipMode.CLIP_OUTSIDE` – only points inside the box are rendered.
|
|
83
|
+
- `ClipMode.CLIP_INSIDE` – only points outside the box are rendered.
|
|
84
|
+
- `ClipMode.HIGHLIGHT_INSIDE` – all points rendered; points inside the box are highlighted.
|
|
85
|
+
|
|
86
|
+
## Clip Spheres
|
|
87
|
+
- Clip spheres restrict the rendered region of a point cloud to a sphere-shaped volume.
|
|
88
|
+
- Use the `createClipSphere(center, radius)` helper to build an `IClipSphere` from a center position and radius.
|
|
89
|
+
- Set the desired `ClipMode` on the material and pass the clip spheres to `setClipSpheres()`.
|
|
90
|
+
- Clip boxes and clip spheres can be used together; a point is considered "inside" if it falls inside any box or any sphere.
|
|
91
|
+
|
|
92
|
+
```javascript
|
|
93
|
+
import { ClipMode, createClipSphere } from 'potree-core';
|
|
94
|
+
import { Vector3 } from 'three';
|
|
95
|
+
|
|
96
|
+
// Create a sphere of radius 3 centered at world position (0, 1, 0)
|
|
97
|
+
const clipSphere = createClipSphere(new Vector3(0, 1, 0), 3);
|
|
98
|
+
|
|
99
|
+
// Highlight points inside the sphere (other modes: CLIP_OUTSIDE, CLIP_INSIDE, DISABLED)
|
|
100
|
+
pco.material.clipMode = ClipMode.HIGHLIGHT_INSIDE;
|
|
101
|
+
pco.material.setClipSpheres([clipSphere]);
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
- `ClipMode.DISABLED` – no clipping.
|
|
105
|
+
- `ClipMode.CLIP_OUTSIDE` – only points inside the sphere are rendered.
|
|
106
|
+
- `ClipMode.CLIP_INSIDE` – only points outside the sphere are rendered.
|
|
107
|
+
- `ClipMode.HIGHLIGHT_INSIDE` – all points rendered; points inside the sphere are highlighted.
|
|
108
|
+
|
|
64
109
|
## Custom Request Manager
|
|
65
110
|
- The potree core library uses a custom request manager to handle the loading of point cloud data.
|
|
66
111
|
- The request manager can be replaced by a custom implementation, for example to use a custom caching system or to handle requests in a different way.
|
|
@@ -81,7 +126,6 @@ loop();
|
|
|
81
126
|
## Notes
|
|
82
127
|
- Since potree-core is meant to be used as library and not as a full software as potree some features are not available.
|
|
83
128
|
- EDL shading is not supported by potree core.
|
|
84
|
-
- Removed classification and clipping functionality.
|
|
85
129
|
- Removed Arena 4D point cloud support.
|
|
86
130
|
- Removed Entwine Point Tile file support.
|
|
87
131
|
- GUI elements were removed from the library
|
package/dist/constants.d.ts
CHANGED
|
@@ -10,5 +10,6 @@ export declare const DEFAULT_POINT_BUDGET = 1000000;
|
|
|
10
10
|
export declare const MAX_LOADS_TO_GPU = 2;
|
|
11
11
|
export declare const MAX_NUM_NODES_LOADING = 4;
|
|
12
12
|
export declare const PERSPECTIVE_CAMERA = "PerspectiveCamera";
|
|
13
|
+
export declare const ORTHOGRAPHIC_CAMERA = "OrthographicCamera";
|
|
13
14
|
export declare const COLOR_BLACK: Color;
|
|
14
15
|
export declare const DEFAULT_HIGHLIGHT_COLOR: Vector4;
|
package/dist/index.d.ts
CHANGED
|
@@ -7,5 +7,7 @@ export * from './point-cloud-octree-picker';
|
|
|
7
7
|
export * from './point-cloud-octree';
|
|
8
8
|
export * from './point-cloud-tree';
|
|
9
9
|
export * from './potree';
|
|
10
|
+
export * from './rendering/edl-pass';
|
|
11
|
+
export * from './rendering/potree-renderer';
|
|
10
12
|
export * from './types';
|
|
11
13
|
export * from './version';
|