Skip to content

Commit 84d413a

Browse files
committed
add load and save scene
1 parent 1036313 commit 84d413a

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

app.html

+9-1
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'));
@@ -3746,6 +3745,15 @@
37463745
} else {
37473746
console.log('paste fail');
37483747
}
3748+
} else if (id === 'action-load-scene') {
3749+
window.parentPostMessage({
3750+
method: 'loadScene',
3751+
});
3752+
} else if (id === 'action-save-scene') {
3753+
window.parentPostMessage({
3754+
method: 'saveScene',
3755+
html: root.outerHTML,
3756+
});
37493757
} else if (href) {
37503758
const xrIframe = document.createElement('xr-iframe');
37513759
xrIframe.src = href;

0 commit comments

Comments
 (0)