shopar-plugin 0.8.8 → 0.8.9
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 +17 -2
- package/dist/shopar-plugin.d.ts +23 -0
- package/dist/shopar-plugin.esm.js +2 -2
- package/dist/shopar-plugin.js +2 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -32,7 +32,7 @@ There are two distinct ways of integrating the plugin: via Script tag and via NP
|
|
|
32
32
|
Add the following script to your HTML.
|
|
33
33
|
|
|
34
34
|
```html
|
|
35
|
-
<script src="https://cdn.jsdelivr.net/npm/shopar-plugin@0.8.
|
|
35
|
+
<script src="https://cdn.jsdelivr.net/npm/shopar-plugin@0.8.9/dist/shopar-plugin.js"></script>
|
|
36
36
|
```
|
|
37
37
|
|
|
38
38
|
It is possible to use a different CDN instead of [jsDelivr](https://www.jsdelivr.com/) (e.g. [cdnjs](https://cdnjs.com/), [unpkg](https://www.unpkg.com/)), or even a relative path if the plugin is distributed as a static asset to your app. Just make sure to set the `baseUrl` parameter accordingly (see [setup options](#shoparpluginsetupoptions) for more details).
|
|
@@ -153,7 +153,7 @@ Options used for the plugin setup:
|
|
|
153
153
|
- `baseUrl` (optional)
|
|
154
154
|
- Type: `string`
|
|
155
155
|
- If provided, defines where the additional ShopAR plugin files are fetched from.
|
|
156
|
-
- Default value: `https://cdn.jsdelivr.net/npm/shopar-plugin@0.8.
|
|
156
|
+
- Default value: `https://cdn.jsdelivr.net/npm/shopar-plugin@0.8.9/dist`
|
|
157
157
|
- `defaultUI` (optional)
|
|
158
158
|
- Type: `boolean`
|
|
159
159
|
- If provided and set to `false`, disables the default UI such as buttons, loading and error views.
|
|
@@ -162,10 +162,25 @@ Options used for the plugin setup:
|
|
|
162
162
|
- Type: `boolean`
|
|
163
163
|
- If provided and set to `false`, disables user interactivity by ignoring input events.
|
|
164
164
|
- Default value: `true`
|
|
165
|
+
- `touchAction` (optional)
|
|
166
|
+
- Type: `string`
|
|
167
|
+
- If provided, the corresponding touch scroll behavior will be used in 3D.
|
|
168
|
+
- `'none'`: Touch gestures are never interpreted as scrolling. This might be useful if 3D occupies the whole viewport.
|
|
169
|
+
- `'pan-x'`: Touch gestures that start horizontally are interpreted as scrolling.
|
|
170
|
+
- `'pan-y'`: Touch gestures that start vertically are interpreted as scrolling.
|
|
171
|
+
- Default value: `'pan-y'`
|
|
165
172
|
- `zoomEnabled` (optional)
|
|
166
173
|
- Type: `boolean`
|
|
167
174
|
- If provided and set to `false`, disables zoom in 3D by ignoring mouse scroll or pinch touch events.
|
|
168
175
|
- Default value: `true`
|
|
176
|
+
- `minZoom` (optional)
|
|
177
|
+
- Type: `number`
|
|
178
|
+
- If provided, it will be used as the minimum zoom level in 3D.
|
|
179
|
+
- Default value: `0.625`
|
|
180
|
+
- `maxZoom` (optional)
|
|
181
|
+
- Type: `number`
|
|
182
|
+
- If provided, it will be used as the maximum zoom level in 3D.
|
|
183
|
+
- Default value: `5`
|
|
169
184
|
- `alwaysTransparentBackground` (optional)
|
|
170
185
|
- Type: `boolean`
|
|
171
186
|
- If provided and set to `true`, transparent background will always be used in 3D.
|
package/dist/shopar-plugin.d.ts
CHANGED
|
@@ -84,12 +84,35 @@ type SetupOptions = {
|
|
|
84
84
|
* @default true
|
|
85
85
|
*/
|
|
86
86
|
interactive?: boolean;
|
|
87
|
+
/**
|
|
88
|
+
* If provided, the corresponding touch scroll behavior will be used in 3D.
|
|
89
|
+
*
|
|
90
|
+
* Supported values are:
|
|
91
|
+
* - `none`: Touch gestures are never interpreted as scrolling. This might be useful if 3D occupies the whole viewport.
|
|
92
|
+
* - `pan-x`: Touch gestures that start horizontally are interpreted as scrolling.
|
|
93
|
+
* - `pan-y`: Touch gestures that start vertically are interpreted as scrolling.
|
|
94
|
+
*
|
|
95
|
+
* @default 'pan-y'
|
|
96
|
+
*/
|
|
97
|
+
touchAction?: 'none' | 'pan-x' | 'pan-y';
|
|
87
98
|
/**
|
|
88
99
|
* If provided and set to `false`, disables zoom in 3D by ignoring mouse scroll or pinch touch events.
|
|
89
100
|
*
|
|
90
101
|
* @default true
|
|
91
102
|
*/
|
|
92
103
|
zoomEnabled?: boolean;
|
|
104
|
+
/**
|
|
105
|
+
* If provided, it will be used as the minimum zoom level in 3D.
|
|
106
|
+
*
|
|
107
|
+
* @default 0.625
|
|
108
|
+
*/
|
|
109
|
+
minZoom?: number;
|
|
110
|
+
/**
|
|
111
|
+
* If provided, it will be used as the maximum zoom level in 3D.
|
|
112
|
+
*
|
|
113
|
+
* @default 5
|
|
114
|
+
*/
|
|
115
|
+
maxZoom?: number;
|
|
93
116
|
/**
|
|
94
117
|
* If provided and set to `true`, transparent background will always be used in 3D.
|
|
95
118
|
*
|