diff --git a/documents/architecture.md b/documents/architecture.md index 934ae38..395fe49 100644 --- a/documents/architecture.md +++ b/documents/architecture.md @@ -21,7 +21,7 @@ interface Store { get: (dataType: string, key: KeyType) => Promise set: (dataType: string, key: KeyType, value: T) => Promise all: (dataType: string) => Promise - query: (dataType: string, queryString: string) => Promise + query: (dataType: string, query: Partial) => Promise } ``` @@ -52,7 +52,7 @@ Some examples: Provides a factory for processing/generating data required in the render loop. This is typically geometry data which it builds based on simple arguments passed by a component depeneding on the generator (such as an id, radius, scale and other option values). The generator code will typically access the store itself to retrieve the data it needs from the data provider. -The components available in this library already have generator functions created that expects certain data sets to be accessable from the store. These can be imported from `videx-3d/generators`. +The components available in this library already have generator functions created that expects certain data sets to be available from the store. These can be imported from `videx-3d/generators`. Generator functions are registered in the `GeneratorRegistry` by adding them to the instance along with a key: diff --git a/documents/getting-started.md b/documents/getting-started.md index fd23445..01093e1 100644 --- a/documents/getting-started.md +++ b/documents/getting-started.md @@ -266,7 +266,7 @@ Let's start by adding the package to our project: ### Example using the tube geometry We will start simple, and experiment with the `createTubeGeometry` function from the SDK. This is a very flexible procedure for generating tube shapes. It is based on the implementation of the `TubeGeometry` from Thee.js, but heavily adapted to the needs of this library as you will see. -A tube is basically a curve with dimensions, and to define a smooth curve from a set of points we need to interpolate. The SDK includes a function `getSplineCurve`, which takes a set of 3d coordinates and returns an interpolator as defined by the `Curve3D` interface. Our implementation is using the [curve-interpolator](https://github.com/kjerandp/curve-interpolator) library, which is set up to interpolate a chordal cubic Hermite spline curve. You can use your own interpolation implementation as long as it implements the `Curve3D` interface. +A tube is basically a curve with dimensions, and to define a smooth curve from a set of points we need to interpolate. The SDK (Software Developement Kit: `videx-3d/sdk`) includes a function `getSplineCurve`, which takes a set of 3d coordinates and returns an interpolator as defined by the `Curve3D` interface. Our implementation is using the [curve-interpolator](https://github.com/kjerandp/curve-interpolator) library, which is set up to interpolate a chordal cubic Hermite spline curve. You can use your own interpolation implementation as long as it implements the `Curve3D` interface. In this example we will create a new component, which will generate a tube geometry and render it using the standard material from Three.js. Let's create a new file and component `Tube.tsx`: