Spaces:
Running
Running
Download docs.html from Bkapps/spinnysnap-sdk-wizard: direct link, hf CLI and curl.
- Browser
- Download file 4.17 kB
-
https://huggingface.co/spaces/Bkapps/spinnysnap-sdk-wizard/resolve/main/docs.html
- Command line
-
hf download hf://spaces/Bkapps/spinnysnap-sdk-wizard/docs.html
-
curl -L -o docs.html https://huggingface.co/spaces/Bkapps/spinnysnap-sdk-wizard/resolve/main/docs.html
4.17 kB
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <title>SpinnySnap Documentation</title> | |
| <script src="https://cdn.tailwindcss.com"></script> | |
| <script src="https://unpkg.com/feather-icons"></script> | |
| </head> | |
| <body class="bg-gray-50 min-h-screen"> | |
| <div class="container mx-auto px-4 py-12"> | |
| <header class="text-center mb-12"> | |
| <h1 class="text-4xl font-bold text-indigo-700 mb-2">SpinnySnap SDK Documentation</h1> | |
| <p class="text-lg text-gray-600">Integrate 360° photo capabilities into your app</p> | |
| </header> | |
| <div class="max-w-4xl mx-auto"> | |
| <div class="bg-white rounded-xl shadow-md overflow-hidden mb-8"> | |
| <div class="p-6 border-b border-gray-200"> | |
| <h2 class="text-2xl font-bold text-gray-800">Getting Started</h2> | |
| </div> | |
| <div class="p-6"> | |
| <h3 class="text-xl font-semibold text-gray-700 mb-4">Installation</h3> | |
| <div class="bg-gray-800 rounded-lg p-4 mb-6"> | |
| <pre class="text-green-400 overflow-x-auto"><code>npm install spinnysnap-sdk</code></pre> | |
| </div> | |
| <p class="text-gray-600 mb-6">Or include directly via CDN:</p> | |
| <div class="bg-gray-800 rounded-lg p-4 mb-6"> | |
| <pre class="text-green-400 overflow-x-auto"><code><script src="https://cdn.spinnysnap.com/sdk/v1.0.0/spinnysnap.min.js"></script></code></pre> | |
| </div> | |
| <h3 class="text-xl font-semibold text-gray-700 mb-4 mt-8">Basic Usage</h3> | |
| <div class="bg-gray-800 rounded-lg p-4 mb-6"> | |
| <pre class="text-green-400 overflow-x-auto"><code>const spinner = new SpinnySnap({ | |
| container: '#viewer-container', | |
| apiKey: 'your-api-key-here' | |
| }); | |
| spinner.init().then(() => { | |
| console.log('SDK ready!'); | |
| });</code></pre> | |
| </div> | |
| </div> | |
| </div> | |
| <div class="bg-white rounded-xl shadow-md overflow-hidden mb-8"> | |
| <div class="p-6 border-b border-gray-200"> | |
| <h2 class="text-2xl font-bold text-gray-800">API Reference</h2> | |
| </div> | |
| <div class="p-6"> | |
| <div class="mb-8"> | |
| <h3 class="text-xl font-semibold text-gray-700 mb-3"><code class="bg-gray-100 px-2 py-1 rounded">.capture()</code></h3> | |
| <p class="text-gray-600 mb-4">Starts the 360° photo capture sequence.</p> | |
| <div class="bg-gray-800 rounded-lg p-4"> | |
| <pre class="text-green-400 overflow-x-auto"><code>spinner.capture({ | |
| frames: 36, // Number of frames to capture | |
| onProgress: (current) => { | |
| console.log(`Captured ${current} frames`); | |
| } | |
| }).then((result) => { | |
| console.log('Capture complete!', result); | |
| });</code></pre> | |
| </div> | |
| </div> | |
| <div class="mb-8"> | |
| <h3 class="text-xl font-semibold text-gray-700 mb-3"><code class="bg-gray-100 px-2 py-1 rounded">.loadFromURL()</code></h3> | |
| <p class="text-gray-600 mb-4">Loads a 360° image from a URL.</p> | |
| <div class="bg-gray-800 rounded-lg p-4"> | |
| <pre class="text-green-400 overflow-x-auto"><code>spinner.loadFromURL('https://example.com/360-photo.jpg') | |
| .then(() => { | |
| console.log('Image loaded successfully'); | |
| });</code></pre> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| <div class="text-center mt-8"> | |
| <a href="/index.html" class="text-indigo-600 hover:text-indigo-800 font-medium inline-flex items-center"> | |
| <i data-feather="arrow-left" class="mr-2"></i> Back to main app | |
| </a> | |
| </div> | |
| </div> | |
| </div> | |
| <script> | |
| feather.replace(); | |
| </script> | |
| </body> | |
| </html> |