diff --git a/README.md b/README.md index ee989f4..3632421 100644 --- a/README.md +++ b/README.md @@ -31,7 +31,7 @@ This library has dependencies to the following libs: npm i videx-3d ``` -You also need to install the peer-dependicies: +You also need to install the peer-dependencies: ``` // react npm i react@18 react-dom@18 @@ -100,7 +100,7 @@ const ExampleApp = () => ( ``` If instead you want to run the data store and/or registry on the main thread, simply create and pass an instance directly to the provider. -For more information see the API docs. +For more information see the documentation section below. ## Documentation - [Getting Started](https://github.com/equinor/videx-3d/blob/main/documents/getting-started.md) diff --git a/documents/architecture.png b/documents/architecture.png index 2a90dba..5ac95b1 100644 Binary files a/documents/architecture.png and b/documents/architecture.png differ diff --git a/documents/generators.md b/documents/generators.md index 02b7bd3..6ee6b32 100644 --- a/documents/generators.md +++ b/documents/generators.md @@ -41,6 +41,8 @@ export async function myGeneratorFunction(this: ReadonlyStore, id: string) { // return processed data } ``` +Have a look in the [source code](https://github.com/equinor/videx-3d/tree/main/src/generators) to see examples of how generator functions can be implemented. + Note that if the generators are run in a web worker context, you need to be aware of how data is moved from one thread to another (see [The structured clone algorithm](https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm)). As data is serialized and copied when passed across threads, you should take advantage of data types that are [_transferable_](https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Transferable_objects). This can be done using the [`transfer`](https://github.com/GoogleChromeLabs/comlink?tab=readme-ov-file#comlinktransfervalue-transferables-and-comlinkproxyvalue) function with `comlink` in the return statement: diff --git a/src/sdk/data/types/Casing.ts b/src/sdk/data/types/Casing.ts index 4dbdf1a..2bd8635 100644 --- a/src/sdk/data/types/Casing.ts +++ b/src/sdk/data/types/Casing.ts @@ -8,7 +8,3 @@ export type CasingItem = { } -export type CasingSection = CasingItem & { - shoe: CasingItem | null, -} - diff --git a/src/sdk/data/types/PositionLog.ts b/src/sdk/data/types/PositionLog.ts index 5097499..b8ceb0c 100644 --- a/src/sdk/data/types/PositionLog.ts +++ b/src/sdk/data/types/PositionLog.ts @@ -1,8 +1,17 @@ -// export type PositionlogEntry = { -// easting: number, -// northing: number, -// tvd: number, -// md: number, -// } - +/** + * Position log are expected to be a strided array of values including: + * - dx: UTM easting offset relative to the head position + * - dy: The TVD depth relative to mean sea level (Msl) + * - dz: UTM northing offset relative to the head position + * - md: Measured depth relative to mean sea level (Msl) + * + * The stride is then 4 values per log entry: + * [dx0, dy0, dz0, md0, dx1, dy1, dz1, md1, ..., dx(n - 1), dy(n-1), dz(n-1), md(n-1)] + * + * The measured top is then positionlog[3] + * The measured bottom is then positionlog[positionlog.length - 1] + * + * The position log is represented in this way for optimimalization reasons. + * + */ export type PositionLog = Float32Array \ No newline at end of file diff --git a/typedoc.json b/typedoc.json index 538f8fd..4ccf4a8 100644 --- a/typedoc.json +++ b/typedoc.json @@ -9,5 +9,6 @@ "excludeExternals": true, "exclude": ["node_modules"], "projectDocuments": ["documents/architecture.md", "documents/data.md", "documents/generators.md", "documents/index.md"], - "out": "./static/docs" + "out": "./static/docs", + "visibilityFilters": {} } \ No newline at end of file