js-cloudimage-360-view 4.1.4 → 4.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +25 -8
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -842,14 +842,31 @@ viewer.updateView('my-viewer', { speed: 50, autoplay: true });
|
|
|
842
842
|
```javascript
|
|
843
843
|
const view = viewer.getViewById('my-viewer');
|
|
844
844
|
|
|
845
|
-
//
|
|
846
|
-
view.
|
|
847
|
-
view.
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
//
|
|
852
|
-
view.
|
|
845
|
+
// Playback control
|
|
846
|
+
view.play(); // Start autoplay
|
|
847
|
+
view.stopAutoplay(); // Stop autoplay
|
|
848
|
+
|
|
849
|
+
// Rotation (stopAtEdges: boolean, steps: number)
|
|
850
|
+
view.moveLeft(false, 5); // Rotate left by 5 frames
|
|
851
|
+
view.moveRight(false, 5); // Rotate right by 5 frames
|
|
852
|
+
view.moveTop(false, 1); // Rotate up by 1 frame (Y-axis)
|
|
853
|
+
view.moveBottom(false, 1); // Rotate down by 1 frame (Y-axis)
|
|
854
|
+
|
|
855
|
+
// Navigation
|
|
856
|
+
view.animateToFrame(36); // Animate to frame 36
|
|
857
|
+
view.animateToFrame(10, 'hotspot-1'); // Go to frame and show hotspot
|
|
858
|
+
|
|
859
|
+
// UI control
|
|
860
|
+
view.hideAllIcons(); // Hide all overlay icons
|
|
861
|
+
|
|
862
|
+
// State
|
|
863
|
+
view.activeImageX; // Current X-axis frame (0-indexed)
|
|
864
|
+
view.activeImageY; // Current Y-axis frame (0-indexed)
|
|
865
|
+
view.amountX; // Total X-axis frames
|
|
866
|
+
view.amountY; // Total Y-axis frames
|
|
867
|
+
|
|
868
|
+
// Cleanup
|
|
869
|
+
view.destroy(); // Destroy the viewer
|
|
853
870
|
```
|
|
854
871
|
|
|
855
872
|
---
|