Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Examples ar-link flag #5946

Merged
merged 1 commit into from
Jan 17, 2024
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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;
}