Skip to content

Commit

Permalink
added flag to include ar-link code block (#5946)
Browse files Browse the repository at this point in the history
  • Loading branch information
kpal81xd committed Jan 17, 2024
1 parent 9668c0b commit d05ace6
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
4 changes: 2 additions & 2 deletions examples/scripts/generate-standalone-files.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -69,13 +69,13 @@ function generateExampleFile(category, example, exampleClass) {
<div id="app">
<div id="appInner">
<!--A link without href, which makes it invisible. Setting href in an example would trigger a download when clicked.-->
<div style="width:100%; position:absolute; top:10px">
${exampleClass.INCLUDE_AR_LINK ? `<div style="width:100%; position:absolute; top:10px">
<div style="text-align: center;">
<a id="ar-link" rel="ar" download="asset.usdz">
<img src="./arkit.png" id="button" width="200"/>
</a>
</div>
</div>
</div>` : ''}
${exampleClass.NO_CANVAS ? '' : '<canvas id="application-canvas"></canvas>'}
</div>
</div>
Expand Down
1 change: 1 addition & 0 deletions examples/src/examples/loaders/gltf-export.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,7 @@ async function example({ canvas, deviceType, assetPath, glslangPath, twgslPath,
export class GltfExportExample {
static CATEGORY = 'Loaders';
static WEBGPU_ENABLED = true;
static INCLUDE_AR_LINK = true;
static controls = controls;
static example = example;
}
1 change: 1 addition & 0 deletions examples/src/examples/loaders/usdz-export.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ async function example({ canvas, deviceType, assetPath, glslangPath, twgslPath,
export class UsdzExportExample {
static CATEGORY = 'Loaders';
static WEBGPU_ENABLED = true;
static INCLUDE_AR_LINK = true;
static controls = controls;
static example = example;
}

0 comments on commit d05ace6

Please sign in to comment.