Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions documents/architecture.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ interface Store {
get: <T>(dataType: string, key: KeyType) => Promise<T | null>
set: <T>(dataType: string, key: KeyType, value: T) => Promise<boolean>
all: <T>(dataType: string) => Promise<T[] | null>
query: <T>(dataType: string, queryString: string) => Promise<T[]>
query: <T>(dataType: string, query: Partial<T>) => Promise<T[]>
}
```

Expand Down Expand Up @@ -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:

Expand Down
2 changes: 1 addition & 1 deletion documents/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`:

Expand Down