Integrate 360° photo capabilities into your app
npm install spinnysnap-sdk
Or include directly via CDN:
<script src="https://cdn.spinnysnap.com/sdk/v1.0.0/spinnysnap.min.js"></script>
const spinner = new SpinnySnap({
container: '#viewer-container',
apiKey: 'your-api-key-here'
});
spinner.init().then(() => {
console.log('SDK ready!');
});
.capture()Starts the 360° photo capture sequence.
spinner.capture({
frames: 36, // Number of frames to capture
onProgress: (current) => {
console.log(`Captured ${current} frames`);
}
}).then((result) => {
console.log('Capture complete!', result);
});
.loadFromURL()Loads a 360° image from a URL.
spinner.loadFromURL('https://example.com/360-photo.jpg')
.then(() => {
console.log('Image loaded successfully');
});