js-cloudimage-360-view 4.9.2 → 4.9.4
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 +81 -4
- package/dist/js-cloudimage-360-view.min.js +4 -4
- package/dist/react/{ci360-B2r9u7br.js → ci360-ChiRmGMU.js} +3 -3
- package/dist/react/{ci360-B2r9u7br.js.map → ci360-ChiRmGMU.js.map} +1 -1
- package/dist/react/{ci360-BFobl9uu.mjs → ci360-DwDP_e0s.mjs} +212 -209
- package/dist/react/{ci360-BFobl9uu.mjs.map → ci360-DwDP_e0s.mjs.map} +1 -1
- package/dist/react/index.cjs +1 -1
- package/dist/react/index.d.ts +2 -0
- package/dist/react/index.js +1 -1
- package/package.json +1 -1
- package/src/react/types.d.ts +8 -0
- package/src/types/ci360.d.ts +1 -1
package/README.md
CHANGED
|
@@ -101,7 +101,7 @@ Add the library via CDN and create your first 360 viewer in seconds:
|
|
|
101
101
|
|
|
102
102
|
```html
|
|
103
103
|
<!-- Add the library (CSS is auto-injected) -->
|
|
104
|
-
<script src="https://scaleflex.cloudimg.io/v7/plugins/js-cloudimage-360-view/4.9.
|
|
104
|
+
<script src="https://scaleflex.cloudimg.io/v7/plugins/js-cloudimage-360-view/4.9.4/js-cloudimage-360-view.min.js?vh=32f739&func=proxy"></script>
|
|
105
105
|
|
|
106
106
|
<!-- Create a container with data attributes -->
|
|
107
107
|
<div
|
|
@@ -125,7 +125,7 @@ Add the library via CDN and create your first 360 viewer in seconds:
|
|
|
125
125
|
### Option 1: CDN (Recommended for Quick Setup)
|
|
126
126
|
|
|
127
127
|
```html
|
|
128
|
-
<script src="https://scaleflex.cloudimg.io/v7/plugins/js-cloudimage-360-view/4.9.
|
|
128
|
+
<script src="https://scaleflex.cloudimg.io/v7/plugins/js-cloudimage-360-view/4.9.4/js-cloudimage-360-view.min.js?vh=32f739&func=proxy"></script>
|
|
129
129
|
```
|
|
130
130
|
|
|
131
131
|
> **Note:** CSS is automatically injected by the script - no separate stylesheet needed.
|
|
@@ -506,7 +506,7 @@ All options can be set via JavaScript config or HTML data attributes.
|
|
|
506
506
|
| `zoomControls` | `data-zoom-controls` | `true` | Show zoom control buttons (zoom in, zoom out, reset) |
|
|
507
507
|
| `zoomControlsPosition` | `data-zoom-controls-position` | `'bottom-right'` | Position of zoom controls toolbar. Values: `'top-left'`, `'top-center'`, `'top-right'`, `'bottom-left'`, `'bottom-center'`, `'bottom-right'` |
|
|
508
508
|
| `scrollHint` | `data-scroll-hint` | `true` | Show "Ctrl + scroll to zoom" hint on scroll |
|
|
509
|
-
| `bottomCircle` | `data-bottom-circle` | `
|
|
509
|
+
| `bottomCircle` | `data-bottom-circle` | `false` | Show 360° progress indicator |
|
|
510
510
|
| `bottomCircleOffset` | `data-bottom-circle-offset` | `5` | Progress indicator offset (px) |
|
|
511
511
|
| `initialIconShown` | `data-initial-icon` | `true` | Show 360° icon on load |
|
|
512
512
|
| `lazyload` | `data-lazyload` | `true` | Enable lazy loading |
|
|
@@ -514,6 +514,8 @@ All options can be set via JavaScript config or HTML data attributes.
|
|
|
514
514
|
| `theme` | `data-theme` | `null` | Color theme: `'light'` or `'dark'` |
|
|
515
515
|
| `hotspotTrigger` | `data-hotspot-trigger` | `'hover'` | Hotspot trigger mode: `'hover'` or `'click'` |
|
|
516
516
|
| `hotspotTimelineOnClick` | `data-hotspot-timeline-on-click` | `true` | Show hotspot popup when clicking timeline dot |
|
|
517
|
+
| `markerTheme` | `data-marker-theme` | `null` | Hotspot marker theme: `'default'`, `'inverted'`, or `'brand'` |
|
|
518
|
+
| `brandColor` | `data-brand-color` | `null` | Brand accent color for `'brand'` marker theme (e.g. `'#ff6600'`) |
|
|
517
519
|
|
|
518
520
|
### Cloudimage CDN Options
|
|
519
521
|
|
|
@@ -612,9 +614,14 @@ const config = {
|
|
|
612
614
|
| `orientation` | Yes | `'x'` or `'y'` axis |
|
|
613
615
|
| `containerSize` | Yes | `[width, height]` reference dimensions |
|
|
614
616
|
| `positions` | Yes | Object mapping frame index to `{ x, y }` coordinates |
|
|
615
|
-
| `content` |
|
|
617
|
+
| `content` | No | HTML content for the tooltip |
|
|
616
618
|
| `label` | No | Short label for the hotspot (used in timeline tooltips) |
|
|
617
619
|
| `onClick` | No | Click handler function |
|
|
620
|
+
| `keepOpen` | No | If `true`, the popover stays open until explicitly closed |
|
|
621
|
+
| `className` | No | Custom CSS class(es) to add to the hotspot element |
|
|
622
|
+
| `markerTheme` | No | Per-hotspot theme override: `'default'`, `'inverted'`, or `'brand'` |
|
|
623
|
+
| `navigateTo` | No | Scene ID to navigate to on click (turns hotspot into a navigation pin) |
|
|
624
|
+
| `arrowDirection` | No | Rotation angle (degrees) for the navigation arrow icon. Only applies when `navigateTo` is set |
|
|
618
625
|
|
|
619
626
|
### Hotspot Timeline
|
|
620
627
|
|
|
@@ -710,6 +717,76 @@ Customize the timeline appearance with CSS variables:
|
|
|
710
717
|
}
|
|
711
718
|
```
|
|
712
719
|
|
|
720
|
+
### Marker Themes
|
|
721
|
+
|
|
722
|
+
Control the visual appearance of hotspot markers at the viewer level or per-hotspot.
|
|
723
|
+
|
|
724
|
+
**Viewer-level theme** applies to all hotspots:
|
|
725
|
+
|
|
726
|
+
```javascript
|
|
727
|
+
const config = {
|
|
728
|
+
hotspots: [...],
|
|
729
|
+
markerTheme: 'inverted', // 'default', 'inverted', or 'brand'
|
|
730
|
+
brandColor: '#ff6600', // Used when markerTheme is 'brand'
|
|
731
|
+
};
|
|
732
|
+
```
|
|
733
|
+
|
|
734
|
+
**Per-hotspot theme** overrides the viewer-level theme for individual markers:
|
|
735
|
+
|
|
736
|
+
```javascript
|
|
737
|
+
const hotspots = [
|
|
738
|
+
{
|
|
739
|
+
id: 'highlight',
|
|
740
|
+
markerTheme: 'brand', // Override for this hotspot only
|
|
741
|
+
positions: { 0: { x: 500, y: 300 } },
|
|
742
|
+
content: '<div>Highlighted feature</div>',
|
|
743
|
+
// ...
|
|
744
|
+
},
|
|
745
|
+
{
|
|
746
|
+
id: 'subtle',
|
|
747
|
+
markerTheme: 'inverted', // Different override
|
|
748
|
+
positions: { 5: { x: 200, y: 150 } },
|
|
749
|
+
content: '<div>Subtle marker</div>',
|
|
750
|
+
// ...
|
|
751
|
+
},
|
|
752
|
+
];
|
|
753
|
+
```
|
|
754
|
+
|
|
755
|
+
| Theme | Description |
|
|
756
|
+
|-------|-------------|
|
|
757
|
+
| `'default'` | Light marker on light backgrounds (default) |
|
|
758
|
+
| `'inverted'` | Dark marker that blends with dark backgrounds |
|
|
759
|
+
| `'brand'` | Uses `brandColor` as the marker accent color |
|
|
760
|
+
|
|
761
|
+
All themes adapt automatically to the `theme: 'dark'` setting.
|
|
762
|
+
|
|
763
|
+
### Navigation Hotspots
|
|
764
|
+
|
|
765
|
+
Hotspots with a `navigateTo` property become navigation pins that link between scenes:
|
|
766
|
+
|
|
767
|
+
```javascript
|
|
768
|
+
const hotspots = [
|
|
769
|
+
{
|
|
770
|
+
id: 'go-to-interior',
|
|
771
|
+
navigateTo: 'interior-scene',
|
|
772
|
+
label: 'View Interior',
|
|
773
|
+
arrowDirection: 90, // Point downward (default is right)
|
|
774
|
+
positions: { 10: { x: 600, y: 400 } },
|
|
775
|
+
// ...
|
|
776
|
+
},
|
|
777
|
+
];
|
|
778
|
+
|
|
779
|
+
const config = {
|
|
780
|
+
hotspots,
|
|
781
|
+
onNavigate: (sceneId) => {
|
|
782
|
+
// Handle scene transition
|
|
783
|
+
console.log(`Navigate to: ${sceneId}`);
|
|
784
|
+
},
|
|
785
|
+
};
|
|
786
|
+
```
|
|
787
|
+
|
|
788
|
+
Navigation hotspots display a directional arrow icon. Use `arrowDirection` to rotate the arrow (in degrees, default `0` points right).
|
|
789
|
+
|
|
713
790
|
---
|
|
714
791
|
|
|
715
792
|
## Interaction Hints
|