The API will be in the form of JavaScript library you include in your own code.
<script src="https://apps.alpha-vision.com/api/AlphaVRApiv1.2.3.min.js"></script>Declare an API variable. This will Initialize the scene, the variable will be used later for all other function calls.
Those marked with* are mandatory.
vr = new AlphaVRApi({PLAN_GUID},{HTML_ELEMENT},{PRESET_GUID},{CALLBACK_FUNCTION});Basic
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title>Alpha VR360+ API Demo</title>
<script src="https://apps.alpha-vision.com/api/AlphaVRApiv1.2.3.min.js"></script>
<script>
var vr = undefined;
function init()
{
vr = new AlphaVRApi("b49b9ca7-42c6-4e07-be5b-7ef679638fea",document.getElementById("vrContainer"));
}
</script>
</head>
<body onload="init()">
<div id="vrContainer"></div>
</body>
</html>With all Available Panels and Listeners
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title>Alpha VR360+ API Demo</title>
<script src="https://apps.alpha-vision.com/api/AlphaVRApiv1.2.3.min.js"></script>
<script>
var vr = undefined;
function init()
{
vr = new AlphaVRApi("b49b9ca7-42c6-4e07-be5b-7ef679638fea",document.getElementById("vrContainer"),"",() =>
{
vr.showPanel(ALPHA_VR_PANEL.CAMERAS);
vr.showPanel(ALPHA_VR_PANEL.FLOORPLAN_2D);
vr.showPanel(ALPHA_VR_PANEL.FLOORS);
vr.showPanel(ALPHA_VR_PANEL.LOGS);
vr.showPanel(ALPHA_VR_PANEL.MENU);
vr.showPanel(ALPHA_VR_PANEL.OPTIONS);
vr.showPanel(ALPHA_VR_PANEL.ROOMS);
vr.showPanel(ALPHA_VR_PANEL.ADVANCE_SETTINGS);
vr.addEventListener(ALPHA_VR_LISTENER.CAMERA,listener);
vr.addEventListener(ALPHA_VR_LISTENER.FLOOR,listener);
vr.addEventListener(ALPHA_VR_LISTENER.FINISH,listener);
vr.addEventListener(ALPHA_VR_LISTENER.OPTION,listener);
vr.addEventListener(ALPHA_VR_LISTENER.PACKAGE,listener);
vr.addEventListener(ALPHA_VR_LISTENER.ROOM,listener);
});
}
function listener(event)
{
console.log(event.target.label + " loaded");
}
</script>
</head>
<body onload="init()">
<div id="vrContainer"></div>
</body>
</html>
Review the Plan GUID parameter.

The VR Container is undefined.

The plan GUID or the preset GUID is not valid.
vr.cameras[0];
vr.cameras.search("id","c0");
vr.cameras.search("label","Camera 1");vr.currentView;Functions
vr.items[0].finishes[0];
vr.items.search("id","i0").finishes.search("id","ccaetclaiite_o1o4o7");
vr.items.search("label","Cabinets").finishes.search("label","Stone Gray");vr.floors[0];
vr.floors.search("id","f0");
vr.floors.search("label","Floor 1");vr.items[0];
vr.items.search("id","i0");
vr.items.search("label","Cabinets");vr.options[0];
vr.options.search("id","o0");
vr.options.search("label","Opt. Pendant Light at Kitchen");vr.packages[0];
vr.packages.search("id","p0");
vr.packages.search("label","Base");vr.rooms[0];
vr.rooms.search("id","r0");
vr.rooms.search("label","Balcony");vr.cameras;
vr.currentView;
vr.floors;
vr.items;
vr.options;
vr.packages;
vr.rooms;

vr.getImage(img => console.log(img));
vr.getImage(img => document.body.appendChild(document.createElement("img")).src = img);.AVPanel
{
font-family: Arial, "Helvetica Neue", Helvetica, sans-serif;
font-size: 12px;
background-color: #FFFFFFAA;
color: black;
}
.AVPanel h1,
.AVPanel summary
{
font-size: 14px;
font-weight: bold;
}
vr.showPanel(ALPHA_VR_PANEL.FLOORPLAN_2D);
vr.showPanel(ALPHA_VR_PANEL.FLOORPLAN,document.getElementById("divFloorplan"));//if container doesn't exist, the panel will display in the VR Container#divFloorplan2D
{
width: 250px;
top: 20px;
right: 10px;
}
vr.showPanel(ALPHA_VR_PANEL.MENU);
vr.showPanel(ALPHA_VR_PANEL.MENU,document.getElementById("divMenu"));//if container doesn't exist, the panel will display in the VR Container#divMenu
{
width: auto;
bottom: 10px;
left: initial;
right: 10px;
top: initial;
}
#divMenu input[type=radio] + img.current
{
outline: 2px solid #0075ff;
}
#divMenu img
{
width:80px;
}
#divFinishes
{
padding-left: 20px;
padding-top: 10px;
}

vr.showPanel(ALPHA_VR_PANEL.CAMERAS);
vr.showPanel(ALPHA_VR_PANEL.CAMERAS,document.getElementById("divCamera"));//if container doesn't exist, the panel will display in the VR Container#divCameras
{
min-width: 100px;
top: 10px;
left: 200px;
}
vr.showPanel(ALPHA_VR_PANEL.OPTIONS);
vr.showPanel(ALPHA_VR_PANEL.OPTIONS,document.getElementById("divOptions"));//if container doesn't exist, the panel will display in the VR Container#divOptions
{
min-width: 100px;
top: 50px;
left: 200px;
}

vr.showPanel(ALPHA_VR_PANEL.FLOORS);
vr.showPanel(ALPHA_VR_PANEL.FLOORS,document.getElementById("divFloors"));//if container doesn't exist, the panel will display in the VR Container#divFloors
{
width: 100px;
top: 10px;
left: 10px;
}

vr.showPanel(ALPHA_VR_PANEL.ROOMS);
vr.showPanel(ALPHA_VR_PANEL.ROOMS,document.getElementById("divRooms"));//if container doesn't exist, the panel will display in the VR Container#divRooms
{
min-width: 100px;
top: 60px;
left: 10px;
}

vr.showPanel(ALPHA_VR_PANEL.LOGS);
vr.showPanel(ALPHA_VR_PANEL.LOGS,document.getElementById("divLogs"));//if container doesn't exist, the panel will display in the VR Container#divlogs
{
max-width: 400px;
min-width: 200px;
bottom: 10px;
left: 300px;
}
vr.addEventListener(ALPHA_VR_LISTENER.CAMERA,() => console.log(event.target.label + " loaded"));vr.addEventListener(ALPHA_VR_LISTENER.FLOOR,() => console.log(event.target.label + " loaded"));vr.addEventListener(ALPHA_VR_LISTENER.FINISH,() => console.log(event.target.label + " loaded"));vr.addEventListener(ALPHA_VR_LISTENER.OPTION,() => console.log(event.target.label + " loaded"));vr.addEventListener(ALPHA_VR_LISTENER.PACKAGE,() => console.log(event.target.label + " loaded"));vr.addEventListener(ALPHA_VR_LISTENER.ROOM,() => console.log(event.target.label + " loaded"));