3dvista Javascript
3DVista allows creators to inject their own custom JavaScript code into this environment. This is usually done through specific triggers, such as when a tour loads, when a hotspot is clicked, or when a specific scene is entered.
This article serves as a deep dive into the world of 3DVista JavaScript, exploring how it works, why you should use it, and how to harness its power effectively.
If you aren't a seasoned coder, several community-developed tools can bridge the gap: JavaScript API v2 - 3DVista Marketplace
reloadScene();
: Programmatically update labels, text fields, and images within the tour's UI skin based on user input or external data.
async function fetchMachineData(machineId) { try { const response = await fetch('https://api.yourfactory.com/v1/machines/' + machineId); const data = await response.json(); // Inject the live temperature into a hotspot text VS.setHotspotText("temp_display", data.temperature + "°C");
// Function to add points function addPoint(extinguisherId) { let currentScore = VD.getVar("score"); // Check if this specific extinguisher was already clicked if (VD.getVar(extinguisherId) === true) return; 3dvista javascript
setPanoImage("path/to/new_pano.jpg");
setZoom(50);
To understand the power of this feature, let’s look at specific scenarios where JavaScript becomes indispensable. 3DVista allows creators to inject their own custom
Here are three scenarios where becomes indispensable:
showPopup("popup_id");
When working with , 90% of your tasks will involve the following functions. Keep this list handy. If you aren't a seasoned coder, several community-developed