Files
speckle-server/packages/viewer/package.json
T
Alexandru Popovici 0ef0a13979 Pro Measurement Tools (#4452)
* feat(viewer-lib): WIP on area measurement

* feat(viewer-lib): WIP on area measurement. Basics are working. Needs more bling

* feat(viewer-lib): Implemented polygon triangulation for measured area

* chore(shared): Updated MeasurementType

* Add Area control to measure panel

* feat(viewer-lib): Real time updates of the fill polygon and area value

* feat(viewer-lib): Added pole of innacessibility as area label anchor using the polylabel libraryh

* feat(viewer-lib): Fixed fill polygon material

* feat(viewer-lib): Changed the surface normal indicator from the faulty disc to a outlined rectangle. Looks and works much better now

* fix(viewer-lib): Measurements get clipped by sections planes

* faet(viewer-lib): Measurements can now optionally define their own snapping method. Area measurement snaps to first point in screen space. Generic vertex snap still applies if enabled

* fix(viewer-lib): Forgot to project the measured point

* feat(viewer-lib): Double click auto-finishes the area measurmenet by instantly joining with the first point. Right clikc removes current area measurement point so you can 'undo'

* fix(viewer-lib: Fixed a stupid bug relatedto text because somebody thought that making it 'async' would be sooooo cool...

* fix(frontend): Prevent zoom on double click when using area measurement

* chore(viewer-lib): Refined and fomralized a bit now that the general idea of a measurement has got more complex

* chore(viewer-lib): Moved state switching a bit

* chore(viewer-lib): Replaced the old disc normal indicator with the new one and made it standard. Added an option to the gizmo's style that determines the pixels size of the normal indicator

* chore(viewer-lib): Documented the area measurement tool

* chore(viewer-lib): Some updates:
- Implemented proper bounds getter for area measurement
- Got rid of the static vector buffers in Measurement and replaced them with consts where needed
- Reduced the min click timing from 250ms to 150ms
- Other small adjustments

* feat(viewer-lib): Added the option to chain measurements

* chore(frontend-2): Added toggle for measurement chaining

* chore(viewer-lib): Perpendicular measurement chaining now align on the same line as requested

* feat(viewer-lib): Implemented point (coordinate) measurement:
- Added support for billboard offseting in NDC in the shader via vec2 offset uniform. Not a dream come true, but required mostly because of how troika works
- SpeckleText background now follows text anchoring
- Implemented new POINT measurement type

* chore(viewer-lib): Separated label position calculation. We now update only the label transform each frame, instead of updating the entire label redunantly

* chore(viewer-lib): Offsets are now constants. Removed redundant vector and matrix creation

* chore(frontend-2): Placeholder radio button for point measurement type. Fixed compile errors

* fix(viewer-lib): Fixes WEB-3105. Export all measurement types

* updated icons

* Update description

---------

Co-authored-by: andrewwallacespeckle <andrew@speckle.systems>
Co-authored-by: Mike Tasset <mike.tasset@gmail.com>
2025-05-26 12:10:19 +03:00

100 lines
2.6 KiB
JSON

{
"name": "@speckle/viewer",
"version": "2.20.0-alpha4",
"description": "A 3d viewer for Speckle, based on threejs.",
"homepage": "https://speckle.systems",
"repository": {
"type": "git",
"url": "https://github.com/specklesystems/speckle-server.git",
"directory": "packages/viewer"
},
"main": "dist/index.js",
"module": "dist/index.js",
"type": "module",
"sourceType": "module",
"exports": {
".": {
"import": {
"types": "./dist/index.d.ts",
"default": "./dist/index.js"
}
},
"./dist/assets/*": "./dist/assets/*",
"./assets/*": "./dist/assets/*"
},
"types": "./dist/index.d.ts",
"files": [
"dist"
],
"engines": {
"node": ">=18.0.0"
},
"scripts": {
"build": "NODE_ENV=production rollup --config",
"build:dev": "rollup --config",
"dev": "rollup --config --watch",
"prepack": "yarn build",
"lint:js": "eslint .",
"lint:tsc": "tsc --noEmit",
"lint": "yarn lint:js && yarn lint:tsc",
"lint:ci": "yarn lint:tsc",
"test": "vitest",
"test:ui": "vitest --ui",
"test:run": "vitest run"
},
"author": "AEC Systems",
"license": "Apache-2.0",
"keywords": [
"speckle",
"aec",
"3d",
"3d viewer",
"threejs"
],
"dependencies": {
"@speckle/objectloader2": "workspace:^",
"@speckle/shared": "workspace:^",
"@types/flat": "^5.0.2",
"earcut": "3.0.1",
"flat": "^5.0.2",
"js-logger": "1.6.1",
"lodash-es": "^4.17.21",
"polylabel": "2.0.1",
"string-to-color": "^2.2.2",
"three": "^0.140.0",
"three-mesh-bvh": "0.5.17",
"tree-model": "1.0.7",
"troika-three-text": "0.47.2",
"type-fest": "^4.15.0"
},
"devDependencies": {
"@babel/core": "^7.18.2",
"@babel/eslint-parser": "^7.18.2",
"@babel/preset-env": "^7.20.2",
"@rollup/plugin-babel": "^5.3.1",
"@rollup/plugin-image": "^3.0.2",
"@rollup/plugin-typescript": "^11.1.6",
"@types/babel__core": "^7.20.1",
"@types/earcut": "3.0.0",
"@types/lodash-es": "4.17.12",
"@types/polylabel": "1.1.3",
"@types/three": "^0.140.0",
"@typescript-eslint/eslint-plugin": "^7.12.0",
"@typescript-eslint/parser": "^7.12.0",
"@vitest/ui": "^1.4.0",
"core-js": "^3.21.1",
"eslint": "^9.4.0",
"eslint-config-prettier": "^9.1.0",
"jsdom": "^24.0.0",
"prettier": "^2.5.1",
"regenerator-runtime": "^0.13.7",
"rollup": "^2.70.1",
"rollup-plugin-delete": "^2.0.0",
"rollup-plugin-terser": "^7.0.2",
"rollup-plugin-typescript2": "^0.36.0",
"typescript": "^4.5.4",
"vitest": "^1.4.0"
},
"gitHead": "5627e490f9a3ecadf19cc4686ad15f344d9ad2d3"
}