Getting started
Instructions
Installation
Choose Krpano or A-frame as your panorama viewer and include its script (it should be placed before vrmaker-sdk.js
).
// purchase a KRPano license and use the paid version of the JS file in your project
<script type=text/javascript src="krpano.min.js"></script>
Then import vrmaker by es6 in your project.
import VRViewer from 'vrviewer'
Or use VR Maker SDK cdn include it in your project:
<script src="https://www.istaging.com/sdk/vrviewer.js"></script>
Finally, initialize the VRMaker
object (don't forget do create a div
with an id
):
<body>
<div id="vrviewer"></div>
</body>
<script>
var vrviewer = new VRViewer()
vrviewer.init({
el: '#vrviewer-sdk',
lang: 'zh-cn',
panoCollection: fakePanoCollection,
panoramas: fakePanoramas,
setting: {
autoRotateSetting: {
active: true,
revert: false,
rotateDuration: 200000,
restartTime: 20000
},
gyroSetting: {
active: false
},
krpanoSetting: {
mwheel: true,
focus: false
},
tripodSetting: {
image: 'https://www.istaging.com/sdk/logo-tripod.png',
size: 60
}
}
})
</script>
Result

Example
Clone https://github.com/istagingRD/vrmaker-sdk and check it in examples / src folder.
npm install
npm start
// You can also check webpack dev server
npm run dev
Live example
https://livetour.istaging.com/58217f61a22b9d0067e06d7c?ui=true
Last updated