@labelbee/lb-annotation 1.13.0-alpha.7 → 1.13.0
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/package.json +3 -3
- package/dist/types/core/pointCloud/segmentation.d.ts +0 -0
- package/es/_virtual/_rollup-plugin-web-worker-loader__helper__auto__createBase64WorkerFactory.js +0 -12
- package/es/_virtual/_rollup-plugin-web-worker-loader__helper__auto__isNodeJS.js +0 -7
- package/es/_virtual/_rollup-plugin-web-worker-loader__helper__node__WorkerClass.js +0 -11
- package/es/_virtual/_rollup-plugin-web-worker-loader__helper__node__createBase64WorkerFactory.js +0 -18
- package/es/assets/attributeIcon/icon_cuboidFAB.svg.js +0 -3
- package/es/assets/attributeIcon/icon_cuboidLeft.svg.js +0 -3
- package/es/assets/attributeIcon/icon_cuboidMore.svg.js +0 -3
- package/es/assets/attributeIcon/icon_cuboidRight.svg.js +0 -3
- package/es/assets/attributeIcon/icon_cuboidTop.svg.js +0 -3
- package/es/core/pointCloud/segmentation.js +0 -50
- package/es/core/toolOperation/cuboidOperation.js +0 -733
- package/es/core/toolOperation/cuboidToggleButtonClass.js +0 -174
- package/es/core/toolOperation/scribbleTool2.js +0 -249
- package/es/utils/tool/CuboidUtils.js +0 -663
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@labelbee/lb-annotation",
|
|
3
|
-
"version": "1.13.0
|
|
3
|
+
"version": "1.13.0",
|
|
4
4
|
"description": "Annotation tool collection",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"annotation",
|
|
@@ -92,11 +92,11 @@
|
|
|
92
92
|
"typescript": "^4.2.3"
|
|
93
93
|
},
|
|
94
94
|
"dependencies": {
|
|
95
|
-
"@labelbee/lb-utils": "^1.6.0
|
|
95
|
+
"@labelbee/lb-utils": "^1.6.0",
|
|
96
96
|
"@turf/turf": "5.1.6",
|
|
97
97
|
"color-rgba": "^2.3.0",
|
|
98
98
|
"lodash": "^4.17.20",
|
|
99
99
|
"three": ">=0.141.0"
|
|
100
100
|
},
|
|
101
|
-
"gitHead": "
|
|
101
|
+
"gitHead": "9be3cbf1aa9560340678721703ab9c137b9d91f5"
|
|
102
102
|
}
|
|
File without changes
|
package/es/_virtual/_rollup-plugin-web-worker-loader__helper__auto__createBase64WorkerFactory.js
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { createBase64WorkerFactory as createBase64WorkerFactory$1 } from './_rollup-plugin-web-worker-loader__helper__node__createBase64WorkerFactory.js';
|
|
2
|
-
import { createBase64WorkerFactory as createBase64WorkerFactory$2 } from './_rollup-plugin-web-worker-loader__helper__browser__createBase64WorkerFactory.js';
|
|
3
|
-
import { isNodeJS } from './_rollup-plugin-web-worker-loader__helper__auto__isNodeJS.js';
|
|
4
|
-
|
|
5
|
-
function createBase64WorkerFactory(base64, sourcemapArg, enableUnicodeArg) {
|
|
6
|
-
if (isNodeJS()) {
|
|
7
|
-
return createBase64WorkerFactory$1(base64, sourcemapArg, enableUnicodeArg);
|
|
8
|
-
}
|
|
9
|
-
return createBase64WorkerFactory$2(base64, sourcemapArg, enableUnicodeArg);
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
export { createBase64WorkerFactory };
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
var WorkerClass = null;
|
|
2
|
-
|
|
3
|
-
try {
|
|
4
|
-
var WorkerThreads =
|
|
5
|
-
typeof module !== 'undefined' && typeof module.require === 'function' && module.require('worker_threads') ||
|
|
6
|
-
typeof __non_webpack_require__ === 'function' && __non_webpack_require__('worker_threads') ||
|
|
7
|
-
typeof require === 'function' && require('worker_threads');
|
|
8
|
-
WorkerClass = WorkerThreads.Worker;
|
|
9
|
-
} catch(e) {} // eslint-disable-line
|
|
10
|
-
|
|
11
|
-
export { WorkerClass };
|
package/es/_virtual/_rollup-plugin-web-worker-loader__helper__node__createBase64WorkerFactory.js
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { WorkerClass } from './_rollup-plugin-web-worker-loader__helper__node__WorkerClass.js';
|
|
2
|
-
|
|
3
|
-
function decodeBase64(base64, enableUnicode) {
|
|
4
|
-
return Buffer.from(base64, 'base64').toString(enableUnicode ? 'utf16' : 'utf8');
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
function createBase64WorkerFactory(base64, sourcemapArg, enableUnicodeArg) {
|
|
8
|
-
var sourcemap = sourcemapArg === undefined ? null : sourcemapArg;
|
|
9
|
-
var enableUnicode = enableUnicodeArg === undefined ? false : enableUnicodeArg;
|
|
10
|
-
var source = decodeBase64(base64, enableUnicode);
|
|
11
|
-
var start = source.indexOf('\n', 10) + 1;
|
|
12
|
-
var body = source.substring(start) + (sourcemap ? '\/\/# sourceMappingURL=' + sourcemap : '');
|
|
13
|
-
return function WorkerFactory(options) {
|
|
14
|
-
return new WorkerClass(body, Object.assign({}, options, { eval: true }));
|
|
15
|
-
};
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
export { createBase64WorkerFactory };
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
var cuboidFAB = "<svg width=\"27\" height=\"27\" viewBox=\"0 0 27 27\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path\n d=\"M13.5525 3.01367C7.75439 3.01367 3.03467 7.73076 3.03467 13.5289C3.0373 19.3297 7.75439 24.0468 13.5525 24.0468C19.3507 24.0468 24.0678 19.3297 24.0678 13.5315C24.0678 7.7334 19.3507 3.01367 13.5525 3.01367ZM19.3085 15.9072V15.9521C19.3085 15.9652 19.3059 15.9784 19.3059 15.9942C19.3059 16.0021 19.3059 16.0101 19.3032 16.018C19.3032 16.0312 19.3006 16.0443 19.2979 16.0575C19.2979 16.0654 19.2953 16.076 19.2953 16.0839C19.2927 16.0944 19.2927 16.105 19.29 16.1155C19.2874 16.1261 19.2848 16.1393 19.2848 16.1498C19.2821 16.1577 19.2821 16.1656 19.2795 16.1709C19.2769 16.1867 19.2716 16.2025 19.2689 16.2184C19.2689 16.221 19.2663 16.2236 19.2663 16.2263C19.2083 16.4504 19.0923 16.664 18.9156 16.8406L15.8386 19.9177C15.3112 20.445 14.449 20.445 13.9243 19.9177C13.397 19.3903 13.397 18.5281 13.9243 18.0034L14.6863 17.2414H9.14922C8.40303 17.2414 7.79394 16.6323 7.79394 15.8861C7.79394 15.1399 8.40303 14.5309 9.14922 14.5309H17.9559C18.3039 14.5309 18.652 14.6627 18.9156 14.9264C19.1793 15.19 19.3111 15.5381 19.3111 15.8861C19.3111 15.894 19.3085 15.902 19.3085 15.9072ZM19.3111 11.1743C19.3111 11.9205 18.7021 12.5296 17.9559 12.5296H9.14922C8.80117 12.5296 8.45312 12.3978 8.18945 12.1341C7.92578 11.8704 7.79394 11.5224 7.79394 11.1743V11.1532V11.111C7.79394 11.0979 7.79658 11.082 7.79658 11.0688C7.79658 11.0609 7.79658 11.053 7.79922 11.0451C7.79922 11.0319 7.80186 11.0187 7.80449 11.0056C7.80449 10.9977 7.80713 10.9871 7.80713 10.9792C7.80977 10.9687 7.80976 10.9581 7.8124 10.9476C7.81504 10.937 7.81768 10.9238 7.81768 10.9133C7.82031 10.9054 7.82031 10.8975 7.82295 10.8922C7.82559 10.8764 7.83086 10.8605 7.8335 10.8447C7.8335 10.8421 7.83613 10.8395 7.83613 10.8368C7.89414 10.6127 8.01016 10.3991 8.18682 10.2225L11.2612 7.14805C11.7886 6.6207 12.6508 6.6207 13.1755 7.14805C13.7028 7.67539 13.7028 8.5376 13.1755 9.0623L12.4187 9.82168H17.9559C18.6994 9.82168 19.3111 10.4308 19.3111 11.1743Z\"\n fill=\"#2C7EFF\" />\n</svg>";
|
|
2
|
-
|
|
3
|
-
export { cuboidFAB as default };
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
var cuboidLeft = "<svg width=\"18\" height=\"18\" viewBox=\"0 0 18 18\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path\n d=\"M16.425 5.04961C16.35 4.82461 16.2 4.67461 15.975 4.59961L9.525 1.14961C9.225 0.999609 8.85 0.999609 8.55 1.14961L2.025 4.59961C1.725 4.74961 1.5 5.12461 1.5 5.49961V12.2496C1.5 12.6246 1.725 12.9996 2.025 13.1496L8.475 16.5996C8.7 16.6746 8.925 16.7496 9.15 16.6746C9.225 16.6746 9.375 16.5996 9.45 16.5996L15.9 13.1496C16.275 12.9996 16.5 12.6246 16.5 12.2496V5.49961C16.5 5.34961 16.425 5.19961 16.425 5.04961ZM9.15 8.87461V15.2496L9 15.3996L2.85 12.0996V5.64961L9 2.34961L15.15 5.64961L9.15 8.87461Z\"\n fill=\"#2C7EFF\" />\n <path d=\"M9 8.5V2.5L8.5 2L2.5 5.5V12.5L9 8.5Z\" fill=\"#2C7EFF\" />\n <path d=\"M15.5 6L15 5.5L14.5 6L9 8.5V15.5H9.5L15.5 12.5V6Z\" fill=\"white\" />\n</svg>";
|
|
2
|
-
|
|
3
|
-
export { cuboidLeft as default };
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
var cuboidMore = "<svg width=\"16\" height=\"4\" viewBox=\"0 0 16 4\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <circle cx=\"2\" cy=\"2\" r=\"2\" fill=\"#2C7EFF\" />\n <circle cx=\"8\" cy=\"2\" r=\"2\" fill=\"#2C7EFF\" />\n <circle cx=\"14\" cy=\"2\" r=\"2\" fill=\"#2C7EFF\" />\n</svg>";
|
|
2
|
-
|
|
3
|
-
export { cuboidMore as default };
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
var cuboidRight = "<svg width=\"18\" height=\"18\" viewBox=\"0 0 18 18\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path\n d=\"M16.425 5.04961C16.35 4.82461 16.2 4.67461 15.975 4.59961L9.525 1.14961C9.225 0.999609 8.85 0.999609 8.55 1.14961L2.025 4.59961C1.725 4.74961 1.5 5.12461 1.5 5.49961V12.2496C1.5 12.6246 1.725 12.9996 2.025 13.1496L8.475 16.5996C8.7 16.6746 8.925 16.7496 9.15 16.6746C9.225 16.6746 9.375 16.5996 9.45 16.5996L15.9 13.1496C16.275 12.9996 16.5 12.6246 16.5 12.2496V5.49961C16.5 5.34961 16.425 5.19961 16.425 5.04961ZM9.15 8.87461V15.2496L9 15.3996L2.85 12.0996V5.64961L9 2.34961L15.15 5.64961L9.15 8.87461Z\"\n fill=\"#2C7EFF\" />\n</svg>";
|
|
2
|
-
|
|
3
|
-
export { cuboidRight as default };
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
var cuboidTop = "<svg width=\"25\" height=\"25\" viewBox=\"0 0 25 25\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <g clip-path=\"url(#clip0_2295_37199)\">\n <path\n d=\"M5.16087 7.8398C5.00351 8.01726 4.94861 8.22216 4.99615 8.45452L5.23337 15.7654C5.25346 16.1002 5.44096 16.4249 5.72087 16.6098L11.9712 20.5356C12.2511 20.7204 12.6883 20.7277 13.0131 20.5402L18.8587 17.1652C19.1835 16.9777 19.3958 16.5954 19.3757 16.2606L19.1385 8.94971C19.0909 8.71735 19.0434 8.485 18.8659 8.32764C18.8284 8.26269 18.6885 8.17029 18.651 8.10533L12.4382 4.24447C12.1208 3.99471 11.6835 3.98735 11.3587 4.17485L5.51308 7.54985C5.38317 7.62485 5.29077 7.7648 5.16087 7.8398ZM12.1109 12.2276L17.6318 9.04014L17.8367 9.09505L18.0538 16.0711L12.468 19.2961L6.5351 15.62L6.31798 8.64399L12.1109 12.2276Z\"\n fill=\"#2C7EFF\" />\n </g>\n <defs>\n <clipPath id=\"clip0_2295_37199\">\n <rect width=\"18\" height=\"18\" fill=\"white\" transform=\"translate(9 24.5898) rotate(-120)\" />\n </clipPath>\n </defs>\n</svg>";
|
|
2
|
-
|
|
3
|
-
export { cuboidTop as default };
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
import * as THREE from 'three';
|
|
2
|
-
|
|
3
|
-
class PointCloudSegmentOperation {
|
|
4
|
-
constructor(props) {
|
|
5
|
-
this.pointer = new THREE.Vector2();
|
|
6
|
-
this.onMouseMove = (e) => {
|
|
7
|
-
const coord = this.getCoordinate(e);
|
|
8
|
-
this.pointer.x = coord.x / this.dom.clientWidth * 2 - 1;
|
|
9
|
-
this.pointer.y = -(coord.y / this.dom.clientHeight) * 2 + 1;
|
|
10
|
-
this.emitRender();
|
|
11
|
-
};
|
|
12
|
-
this.dom = props.dom;
|
|
13
|
-
this.raycaster = new THREE.Raycaster();
|
|
14
|
-
this.dom.addEventListener("pointermove", this.onMouseMove);
|
|
15
|
-
const geometry = new THREE.BufferGeometry();
|
|
16
|
-
const pointsMaterial = new THREE.PointsMaterial({size: 10, color: "red"});
|
|
17
|
-
geometry.setAttribute("position", new THREE.BufferAttribute(new Float32Array([0, 0, 0]), 3));
|
|
18
|
-
this._highlight_Point = new THREE.Points(geometry, pointsMaterial);
|
|
19
|
-
this.emitRender = props.render;
|
|
20
|
-
const geometry2 = new THREE.BufferGeometry();
|
|
21
|
-
const pointsMaterial2 = new THREE.PointsMaterial({size: 5, color: "white"});
|
|
22
|
-
geometry2.setAttribute("position", new THREE.BufferAttribute(new Float32Array([0, 0, 0]), 3));
|
|
23
|
-
this._temp = new THREE.Points(geometry2, pointsMaterial2);
|
|
24
|
-
}
|
|
25
|
-
addMorePoint(scene) {
|
|
26
|
-
scene.add(this._highlight_Point);
|
|
27
|
-
scene.add(this._temp);
|
|
28
|
-
}
|
|
29
|
-
getCoordinate(e) {
|
|
30
|
-
const bounding = this.dom.getBoundingClientRect();
|
|
31
|
-
return {
|
|
32
|
-
x: e.clientX - bounding.left,
|
|
33
|
-
y: e.clientY - bounding.top
|
|
34
|
-
};
|
|
35
|
-
}
|
|
36
|
-
render({camera, scene}) {
|
|
37
|
-
this.raycaster.setFromCamera(this.pointer, camera);
|
|
38
|
-
const intersects = this.raycaster.intersectObjects(scene.children, false);
|
|
39
|
-
console.log("intersects", intersects[0]);
|
|
40
|
-
const default_Point = new THREE.Vector3(0, 0, 0);
|
|
41
|
-
if (intersects.length > 0) {
|
|
42
|
-
const intersect = intersects[0];
|
|
43
|
-
this._highlight_Point.position.copy(intersect.point);
|
|
44
|
-
} else {
|
|
45
|
-
this._highlight_Point.position.copy(default_Point);
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
export { PointCloudSegmentOperation };
|