-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
13 changed files
with
340 additions
and
348 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,32 @@ | ||
## Marker applications | ||
## Marker pattern | ||
|
||
**MarkerModule.generatePattern3dHtml(pattSrc, modelSrc)** | ||
**MarkerModule.generatePatternHtml(assetType, pattSrc, assetSrc)** | ||
|
||
Generates the `index.html` contents for an AR.js application using a marker pattern and 3d model as AR asset. | ||
Parameters are the relative paths for `.patt` and `.gltf` files. | ||
Generate the `index.html` contents for AR.js applications using marker pattern. | ||
Accepts an asset type (see exported `ASSET_*` constants) and relative paths for `.patt` and asset files. | ||
|
||
**MarkerModule.generatePatternImageHtml(pattSrc, imageSrc)** | ||
**Example** | ||
|
||
Generates the `index.html` contents for an AR.js application using a marker pattern and an image as AR asset. | ||
Parameters are the relative paths for `.patt` file and the image. | ||
```js | ||
const { MarkerModule, ASSET_AUDIO } = ARjsStudioBackend; | ||
|
||
**MarkerModule.generatePatternAudioHtml(pattSrc, audioSrc)** | ||
// generate the index.html for an AR application that uses marker pattern and an audio file as AR asset | ||
const content = MarkerModule.generatePatternHtml(ASSET_AUDIO, '/marker.patt', '/assets/audio.mp3'); | ||
``` | ||
|
||
Generates the `index.html` contents for an AR.js application using a marker pattern and an audio file as AR asset. | ||
Parameters are the relative paths for `.patt` file and the audio. | ||
## Marker barcode | ||
|
||
**MarkerModule.generatePatternVideoHtml(pattSrc, videoSrc)** | ||
**MarkerModule.generateBarcodeHtml(matrixType, markerValue, assetSrc)** | ||
|
||
Generates the `index.html` contents for an AR.js application using a marker pattern and a video file as AR asset. | ||
Parameters are the relative paths for `.patt` file and the video. | ||
Generate the `index.html` contents for AR.js applications using marker barcode. | ||
Accepts a matrix type (see exported `MATRIX_*` constants), the barcode value represented by the marker and | ||
asset file. | ||
|
||
**Example** | ||
|
||
```js | ||
const { MarkerModule } = ARjsStudioBackend; | ||
const { MarkerModule, MATRIX_3X3_HAMMING_63 } = ARjsStudioBackend; | ||
|
||
// generate the index.html for an AR application that uses marker pattern and an audio file as AR asset | ||
const content = MarkerModule.generatePatternAudioTemplate('/marker.patt', '/assets/audio.mp3'); | ||
// generate the index.html for an AR application that uses marker barcode and a 3d model file as AR asset | ||
const content = MarkerModule.generateBarcodeHtml(MATRIX_3X3_HAMMING_63, 7, '/assets/model.gltf'); | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters