diff --git a/panther.js b/panther.js index 8b05db303a00c5dce7d75f12ebedc8d323ae0603..6d6c020a1db80e7e63a41af1f12b8fcded2ba04a 100644 --- a/panther.js +++ b/panther.js @@ -251,8 +251,8 @@ import WebGPURenderer from 'three/addons/renderers/webgpu/WebGPURenderer.js'; } function initShortcut(lattice) { const index = []; - for (let l in lattice.conf.shortcut) { - const cmd = "document.location = document.location.pathname + '?"+lattice.conf.shortcut[l]+"';"; + for (let l in lattice.conf.shortcut['3d']) { + const cmd = "document.location = document.location.pathname + '?"+lattice.conf.shortcut['3d'][l]+"';"; index.push('<button onclick="'+cmd+'" id="'+l.toLowerCase().split(' ').join('')+'">'+l+'</button>'); } $('body').append('<div style="position: absolute; left: 5px; bottom: 5px;">'+index.join(' ')+'</div>'); @@ -334,7 +334,7 @@ import WebGPURenderer from 'three/addons/renderers/webgpu/WebGPURenderer.js'; setInterval(updateVlv, 1000); } if (document.location.search.indexOf('search=')>-1) findComponent(document.location.search.split('search=')[1].split('&')[0], false); - if (lattice.conf && lattice.conf.shortcut) initShortcut(lattice); + if (lattice.conf && lattice.conf.shortcut["3d"]) initShortcut(lattice); if (lattice.conf && lattice.conf.index) initIndex(lattice); console.log(lattice, facilities); if (ps) {