fno-sdk
v1.0.82
Published
SDK for Find & Order map
Downloads
484
Readme
Find and order SDK
Installation
npm install fno-sdk
In your code, import Sdk class from npm package and create new instance of our SDK
import Sdk from 'fno-sdk';
// These data are available in our backoffice after your account creation
const token = "{token}";
const tenant = "{tenant}";
const mapId = "{mapId}";
// A HTML canvas id where to show 3d map
const canvasId= "{canvasId}"
// Create new sdk instance
const sdk = new Sdk(token, tenant);
// Load unity engine from our storage
sdk.initEngine(canvasId).then(() => {
// Once engine ready, load your 3d map
sdk.loadMap(mapId).then(() => {
// your map is ready and should appear in the canvas
// now you can send instructions to your map. For example:
// you can manage camera:
sdk.camera.zoomIn(0.2);
sdk.camera.resetZoom();
sdk.camera.zoomOut(0.2);
// you can switch floors:
sdk.floor.setFloors([2]),
sdk.floor.resetFloors()
// create itineraries
sdk.itinerary.setItineraryToAsset("123456")
sdk.itinerary.clearItinerary()
// Etc ...
});
});