() => { return { modules: ["https://cdnjs.cloudflare.com/ajax/libs/three.js/105/three.js", "https://cdn.jsdelivr.net/npm/panolens@0.11.0/build/panolens.min.js" ], body: "
", console: true, script: () => { var panorama, newPanorama, viewer, container, infospot, infospot2; container = document.querySelector('#container'); panorama = new PANOLENS.ImagePanorama('https://i.imgur.com/wTCPouq.jpg'); newPanorama = new PANOLENS.ImagePanorama('https://i.imgur.com/i2eW0E4.jpeg') viewer = new PANOLENS.Viewer({ container: container }); infospot = new PANOLENS.Infospot(); infospot.position.set(1000, 100, -2000); infospot.addHoverText('go elsewhere'); infospot.addEventListener('click', ()=> { viewer.setPanorama(newPanorama) }) infospot2 = new PANOLENS.Infospot(); infospot2.position.set(1000, 100, 2000); infospot2.addHoverText('err'); panorama.add(infospot, infospot2); viewer.add(panorama); } } }