fixed iframe in docs + updated notification/buttons

This commit is contained in:
Leon van Kammen 2023-05-23 12:05:00 +02:00
parent 58aa7ef857
commit 2e5a50466c
9 changed files with 2245 additions and 15 deletions

View file

@ -1,5 +1,6 @@
/* SPDX-License-Identifier: MPL-2.0 *
* Copyright (c) 2023 Leon van Kammen/NLNET */
// SPDX-License-Identifier: MPL-2.0
// Copyright (c) 2023 Leon van Kammen/NLNET
var $hx_exports = typeof exports != "undefined" ? exports : typeof window != "undefined" ? window : typeof self != "undefined" ? self : this;
(function ($global) { "use strict";
$hx_exports["xrfragment"] = $hx_exports["xrfragment"] || {};

View file

@ -1,5 +1,6 @@
/* SPDX-License-Identifier: MPL-2.0 *
* Copyright (c) 2023 Leon van Kammen/NLNET */
// SPDX-License-Identifier: MPL-2.0
// Copyright (c) 2023 Leon van Kammen/NLNET
var $hx_exports = typeof exports != "undefined" ? exports : typeof window != "undefined" ? window : typeof self != "undefined" ? self : this;
(function ($global) { "use strict";
$hx_exports["xrfragment"] = $hx_exports["xrfragment"] || {};

View file

@ -1,5 +1,6 @@
/* SPDX-License-Identifier: MPL-2.0 *
* Copyright (c) 2023 Leon van Kammen/NLNET */
// SPDX-License-Identifier: MPL-2.0
// Copyright (c) 2023 Leon van Kammen/NLNET
var $hx_exports = typeof exports != "undefined" ? exports : typeof window != "undefined" ? window : typeof self != "undefined" ? self : this;
(function ($global) { "use strict";
$hx_exports["xrfragment"] = $hx_exports["xrfragment"] || {};

View file

@ -0,0 +1 @@
../../assets

View file

@ -0,0 +1 @@
../../assets/href.gltf

View file

@ -14,6 +14,8 @@
<body>
<div id="overlay">
<img src="./../../assets/logo.png" class="logo"/>
<button id="navback" onclick="history.back()">&lt;</button>
<button id="navforward" onclick="history.forward()">&gt;</button>
<input type="submit" value="load 3D asset"></input>
<input type="text" id="uri" value="" onchange="AFRAME.XRF.navigator.to( $('#uri').value )"/>
</div>
@ -55,7 +57,7 @@
// add screenshot component with camera to capture proper equirects
$('a-scene').setAttribute("screenshot",{camera: "[camera]",width: 4096*2, height:2048*2})
setTimeout( () => window.notify("use arrow-keys and mouse-drag to move around",{timeout:4000}),2000 )
setTimeout( () => window.notify("use WASD-keys and mouse-drag to move around",{timeout:false}),2000 )
window.AFRAME.XRF.addEventListener('href', (data) => data.selected ? window.notify(`href: ${data.xrf.string}`) : false )

View file

@ -51,13 +51,26 @@ input[type="submit"] {
left: 93px;
}
#overlay > input[type="submit"]{
#overlay > input[type="submit"] {
height: 32px;
font-size: 14px;
position: absolute;
right: 9px;
top: 8px;
}
#overlay > button#navback,
#overlay > button#navforward {
height: 32px;
font-size: 14px;
position: absolute;
left: 9px;
padding: 2px 13px;
top: 8px;
color: var(--light-gray);
}
#overlay > button#navforward {
left:49px;
}
#overlay > #uri {
display:none;
@ -78,7 +91,7 @@ input[type="submit"] {
border-radius: 10px;
border: 5px solid #1c1c3299;
padding: 0px 6px;
bottom:19px;
bottom:67px;
position: absolute;
}
@ -88,12 +101,13 @@ a.btn-foot#source{
font-weight: bold;
font-family: sans-serif;
z-index:2000;
bottom: 114px;
}
a.btn-foot#model{
position: absolute;
right: 130px;
color: #888;
right: 10px;
color: #7c7c7c;
font-weight: bold;
font-family: sans-serif;
z-index:2000;
@ -101,7 +115,7 @@ a.btn-foot#model{
html.a-fullscreen a#model,
html.a-fullscreen a#source{
margin-right:200px;
margin-right:10px;
}
.render {

2209
example/assets/href.gltf Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long