PanoViewer

HotSpot

Drag and rotate the photo. An anchor will follow.

projection: CUBEMAP

source: bookcube1.jpg, bookcube2.jpg

function load(target, page) {
    // next image
    viewer.setImage("./img/bookcube2.jpg", {
        projectionType: eg.view360.PanoViewer.PROJECTION_TYPE.CUBEMAP,
        cubemapConfig: {
            tileConfig: { flipHorizontal: true, rotation: 0 },
        }
    });
}
var viewer = new eg.view360.PanoViewer(container, {
    image:  "./img/bookcube1.jpg",
    useZoom: false,
    projectionType: eg.view360.PanoViewer.PROJECTION_TYPE.CUBEMAP,
    cubemapConfig: {
        tileConfig: { flipHorizontal: true, rotation: 0 }
    }
}).on("ready", function (e) {
    setHotspotOffsets(viewer);
}).on("viewChange", function (e) {
    setHotspotOffsets(viewer);
});