Skip to content

Commit 2489285

Browse files
add load and save scene
1 parent da71d56 commit 2489285

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
@@ -666,7 +666,6 @@
666666
.then(res => res.json())
667667
.then(scenesJson => {
668668
return s => {
669-
console.log("scenes.json");
670669
const maxResults = 12;
671670
if (s) {
672671
const regexps = s.split(/\s/).filter(s => !!s).map(s => new RegExp(escapeRegExp(s), 'i'));
@@ -3690,6 +3689,15 @@
36903689
} else {
36913690
console.log('paste fail');
36923691
}
3692+
} else if (id === 'action-load-scene') {
3693+
window.parentPostMessage({
3694+
method: 'loadScene',
3695+
});
3696+
} else if (id === 'action-save-scene') {
3697+
window.parentPostMessage({
3698+
method: 'saveScene',
3699+
html: root.outerHTML,
3700+
});
36933701
} else if (href) {
36943702
const xrIframe = document.createElement('xr-iframe');
36953703
xrIframe.src = href;

0 commit comments

Comments
 (0)