Skip to content

Commit d58d8ed

Browse files
add load and save scene
1 parent 77bc111 commit d58d8ed

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

app.html

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -673,7 +673,6 @@
673673
.then(res => res.json())
674674
.then(scenesJson => {
675675
return s => {
676-
console.log("scenes.json");
677676
const maxResults = 12;
678677
if (s) {
679678
const regexps = s.split(/\s/).filter(s => !!s).map(s => new RegExp(escapeRegExp(s), 'i'));
@@ -3730,6 +3729,15 @@
37303729
} else {
37313730
console.log('paste fail');
37323731
}
3732+
} else if (id === 'action-load-scene') {
3733+
window.parentPostMessage({
3734+
method: 'loadScene',
3735+
});
3736+
} else if (id === 'action-save-scene') {
3737+
window.parentPostMessage({
3738+
method: 'saveScene',
3739+
html: root.outerHTML,
3740+
});
37333741
} else if (href) {
37343742
const xrIframe = document.createElement('xr-iframe');
37353743
xrIframe.src = href;

0 commit comments

Comments
 (0)