From 968324d450404afd05ba9d5e9420b4b51cdd3f37 Mon Sep 17 00:00:00 2001 From: Tim Bernhard Date: Fri, 13 Dec 2024 16:31:20 +0100 Subject: [PATCH 1/2] Declare the packaged entries without model-viewer as the main ones Whoever uses this package via npm can also run `npm i model-viewer`. --- package.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index e09c432..0a717ae 100644 --- a/package.json +++ b/package.json @@ -2,13 +2,13 @@ "name": "@ulb-darmstadt/photogrammetry-viewer", "version": "0.0.10", "type": "module", - "main": "dist/photogrammetry-viewer.js", - "module": "dist/photogrammetry-viewer.js", + "main": "dist/photogrammetry-without-modelviewer.js", + "module": "dist/photogrammetry-without-modelviewer.js", "types": "dist/index.d.ts", "exports": { ".": { - "import": "./dist/photogrammetry-viewer.js", - "require": "./dist/photogrammetry-viewer.js" + "import": "./dist/photogrammetry-viewer-without-modelviewer.js", + "require": "./dist/photogrammetry-without-modelviewer.js" } }, "files": [ From 8e5afb928160a826b7d0c8d76266ddade799cf7a Mon Sep 17 00:00:00 2001 From: Tim Bernhard Date: Fri, 13 Dec 2024 16:32:03 +0100 Subject: [PATCH 2/2] Add short documentation of view settings --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index ea5c9ed..e00b298 100644 --- a/README.md +++ b/README.md @@ -31,7 +31,8 @@ srcScanInformation | Exported cameras in xml file from Agisoft src3D | 3D model in gltf file format src2D | Path where all 2D images are located. Currently these must be in png format. loadMeasurement | If this attribute is set, the viewer will try to load measurement data from the file `measurement.json` located in the same path as the GLTF file. See section [Measurements](#Measurements) +viewSettings | An object with additional settings to adjust the viewer. Currently, it may have a property `skyBoxImage` with an URL to the image to be used for the sky-box in the 3D viewer, and a method `async resolve2dFileURL(key: string)`, that resolves the identifier from the XML file to an URL of the 2D image. ## Measurements -Measurements can be downloaded as CSV or JSON from within the measurement tool. In conjunction with the attribute `loadMeasurement`, the JSON file can be used to annotate the 3D model. \ No newline at end of file +Measurements can be downloaded as CSV or JSON from within the measurement tool. In conjunction with the attribute `loadMeasurement`, the JSON file can be used to annotate the 3D model.