Add configuration descriptions to ReadMe
This commit is contained in:
32
README.md
32
README.md
@@ -1,3 +1,33 @@
|
|||||||
# GlModelViewer
|
# GlModelViewer
|
||||||
|
|
||||||
MediaWiki extension for using model-viewer to display and annotate 3D models
|
MediaWiki extension for using model-viewer to display and annotate 3D models
|
||||||
|
|
||||||
|
## Metadata
|
||||||
|
|
||||||
|
Model-viewer configurations and annotations can be added as a json string in the file's description.
|
||||||
|
|
||||||
|
### Viewer Configuration
|
||||||
|
|
||||||
|
Configuration of the model-viewer instance is contained in the `viewerConfig` object.
|
||||||
|
This object can contain any number of child objects each of which describes a different possible configuration.
|
||||||
|
Each configuration can have properties matching the any of the attributes of the model-viewer element except for `src`, `class`, `interpolation-delay`, and `interaction-prompt`.
|
||||||
|
|
||||||
|
### Annotations
|
||||||
|
|
||||||
|
Annotations can be configured using the `annotations` object.
|
||||||
|
This object can contain any number of child objects each of which describes a different possible annotation.
|
||||||
|
The label for each annotation is the name of the child object. Each object has two required properties and two optional properties.
|
||||||
|
|
||||||
|
| Property | Required | Description | Example |
|
||||||
|
|----------|----------|-------------|---------|
|
||||||
|
| `data-position` | Yes | String containing the X, Y, and Z coordinates of the annotation. | "0.02297m -0.02544m 0.01780m" |
|
||||||
|
| `data-normal` | Yes | String containing the X, Y, and Z coordinates of the normal vector of the annotation. | "0.78966m -0.53116m 0.30709m" |
|
||||||
|
| `data-orbit` | No | String containing the orbit vector of the camera to view annotation. | "2.31rad 2.01rad 0.65m" |
|
||||||
|
| `data-target` | No | String containing the X, Y, and Z coordinates of the camera target to view annotation. | "-0.01029m 0.00071m 0.01138m" |
|
||||||
|
|
||||||
|
### Annotation sets
|
||||||
|
|
||||||
|
Annotations sets are specific subsets of the listed annotations that can be shown on the model.
|
||||||
|
They are configured using the `annotationSets` object.
|
||||||
|
This object can contain any number of child objects each of which contains an array of strings matching the names of the annotation to be included.
|
||||||
|
By default, all annotations are rendered on a model.
|
||||||
|
|||||||
Reference in New Issue
Block a user