@shopware-ag/dive 1.16.1 → 1.16.2
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 +226 -32
- package/build/dive.cjs +14 -6
- package/build/dive.cjs.map +1 -1
- package/build/dive.d.cts +28 -2
- package/build/dive.d.ts +28 -2
- package/build/dive.js +14 -6
- package/build/dive.js.map +1 -1
- package/package.json +14 -6
- package/src/com/actions/camera/computeencompassingview.ts +1 -0
- package/src/com/actions/camera/getcameratransform.ts +1 -0
- package/src/com/actions/camera/movecamera.ts +1 -0
- package/src/com/actions/camera/resetcamera.ts +1 -0
- package/src/com/actions/camera/setcameralayer.ts +1 -0
- package/src/com/actions/camera/setcameratransform.ts +1 -0
- package/src/com/actions/camera/zoomcamera.ts +1 -0
- package/src/com/actions/index.ts +2 -2
- package/src/com/actions/media/generatemedia.ts +1 -0
- package/src/com/actions/object/addobject.ts +1 -0
- package/src/com/actions/object/deleteobject.ts +1 -0
- package/src/com/actions/object/deselectobject.ts +1 -0
- package/src/com/actions/object/getallobjects.ts +1 -0
- package/src/com/actions/object/getobjects.ts +1 -0
- package/src/com/actions/object/model/dropit.ts +1 -0
- package/src/com/actions/object/model/modelloaded.ts +1 -0
- package/src/com/actions/object/model/placeonfloor.ts +1 -0
- package/src/com/actions/object/selectobject.ts +1 -0
- package/src/com/actions/object/setparent.ts +1 -0
- package/src/com/actions/object/updateobject.ts +1 -0
- package/src/com/actions/scene/exportscene.ts +1 -0
- package/src/com/actions/scene/getallscenedata.ts +1 -0
- package/src/com/actions/scene/setbackground.ts +1 -0
- package/src/com/actions/scene/updatescene.ts +1 -0
- package/src/com/actions/toolbox/select/setgizmomode.ts +1 -0
- package/src/com/actions/toolbox/transform/setgizmovisible.ts +1 -0
- package/src/com/actions/toolbox/usetool.ts +1 -0
package/README.md
CHANGED
|
@@ -1,3 +1,11 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
This file is automatically generated
|
|
5
|
+
You can find the template in ci/readme/template/TEMPLATE_README.md
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
-->
|
|
1
9
|
|
|
2
10
|
<p align="center">
|
|
3
11
|
<img alt="DIVE logo" src="./assets/svg/dive.svg" style="width: 100%; height: auto; max-height: 500px;">
|
|
@@ -39,6 +47,10 @@ npm install @shopware-ag/dive
|
|
|
39
47
|
yarn add @shopware-ag/dive
|
|
40
48
|
```
|
|
41
49
|
|
|
50
|
+
# Formatter
|
|
51
|
+
|
|
52
|
+
DIVE uses Prettier as a preconfigured formatter.
|
|
53
|
+
|
|
42
54
|
#### Setup in Shopware
|
|
43
55
|
|
|
44
56
|
Don't forget to include DIVE in your webpack.config.js:
|
|
@@ -200,35 +212,217 @@ In the following you find a list of all available actions to perform on
|
|
|
200
212
|
DIVECommunication class via
|
|
201
213
|
[`com.PerformAction()`](https://github.com/shopware/dive/blob/2e193c58843939ce07a1d35bfbd5b3c9d26eeeca/src/com/Communication.ts#L85).
|
|
202
214
|
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
215
|
+
<table>
|
|
216
|
+
<tr>
|
|
217
|
+
<th>Actions</th>
|
|
218
|
+
<th>Description</th>
|
|
219
|
+
</tr>
|
|
220
|
+
<tr>
|
|
221
|
+
<td>
|
|
222
|
+
<a href=".undefined"> ADD_OBJECT </a>
|
|
223
|
+
</td>
|
|
224
|
+
<td>
|
|
225
|
+
Adds an object to the scene.
|
|
226
|
+
</td>
|
|
227
|
+
</tr>
|
|
228
|
+
<tr>
|
|
229
|
+
<td>
|
|
230
|
+
<a href=".undefined"> COMPUTE_ENCOMPASSING_VIEW </a>
|
|
231
|
+
</td>
|
|
232
|
+
<td>
|
|
233
|
+
Calculates the camera position and target to view the whole scene. (experimental)
|
|
234
|
+
</td>
|
|
235
|
+
</tr>
|
|
236
|
+
<tr>
|
|
237
|
+
<td>
|
|
238
|
+
<a href=".undefined"> DELETE_OBJECT </a>
|
|
239
|
+
</td>
|
|
240
|
+
<td>
|
|
241
|
+
Deletes an object from the scene.
|
|
242
|
+
</td>
|
|
243
|
+
</tr>
|
|
244
|
+
<tr>
|
|
245
|
+
<td>
|
|
246
|
+
<a href=".undefined"> DESELECT_OBJECT </a>
|
|
247
|
+
</td>
|
|
248
|
+
<td>
|
|
249
|
+
Deselects an existing object.
|
|
250
|
+
</td>
|
|
251
|
+
</tr>
|
|
252
|
+
<tr>
|
|
253
|
+
<td>
|
|
254
|
+
<a href=".undefined"> DROP_IT </a>
|
|
255
|
+
</td>
|
|
256
|
+
<td>
|
|
257
|
+
Places an object on top of an underlying object or the floor.
|
|
258
|
+
</td>
|
|
259
|
+
</tr>
|
|
260
|
+
<tr>
|
|
261
|
+
<td>
|
|
262
|
+
<a href=".undefined"> EXPORT_SCENE </a>
|
|
263
|
+
</td>
|
|
264
|
+
<td>
|
|
265
|
+
Exports the current scene to a blob and returns the URL.
|
|
266
|
+
</td>
|
|
267
|
+
</tr>
|
|
268
|
+
<tr>
|
|
269
|
+
<td>
|
|
270
|
+
<a href=".undefined"> GENERATE_MEDIA </a>
|
|
271
|
+
</td>
|
|
272
|
+
<td>
|
|
273
|
+
Generates a screenshot, stores it in a Blob and writes the URL into the payload.
|
|
274
|
+
</td>
|
|
275
|
+
</tr>
|
|
276
|
+
<tr>
|
|
277
|
+
<td>
|
|
278
|
+
<a href=".undefined"> GET_ALL_OBJECTS </a>
|
|
279
|
+
</td>
|
|
280
|
+
<td>
|
|
281
|
+
Retrieves all objects in the scene.
|
|
282
|
+
</td>
|
|
283
|
+
</tr>
|
|
284
|
+
<tr>
|
|
285
|
+
<td>
|
|
286
|
+
<a href=".undefined"> GET_ALL_SCENE_DATA </a>
|
|
287
|
+
</td>
|
|
288
|
+
<td>
|
|
289
|
+
Retrieves all current scene data.
|
|
290
|
+
</td>
|
|
291
|
+
</tr>
|
|
292
|
+
<tr>
|
|
293
|
+
<td>
|
|
294
|
+
<a href=".undefined"> GET_CAMERA_TRANSFORM </a>
|
|
295
|
+
</td>
|
|
296
|
+
<td>
|
|
297
|
+
Returns the current camera position and target.
|
|
298
|
+
</td>
|
|
299
|
+
</tr>
|
|
300
|
+
<tr>
|
|
301
|
+
<td>
|
|
302
|
+
<a href=".undefined"> GET_OBJECTS </a>
|
|
303
|
+
</td>
|
|
304
|
+
<td>
|
|
305
|
+
Returns a list of objects of given IDs.
|
|
306
|
+
</td>
|
|
307
|
+
</tr>
|
|
308
|
+
<tr>
|
|
309
|
+
<td>
|
|
310
|
+
<a href=".undefined"> MODEL_LOADED </a>
|
|
311
|
+
</td>
|
|
312
|
+
<td>
|
|
313
|
+
Is triggered when a model is loaded.
|
|
314
|
+
</td>
|
|
315
|
+
</tr>
|
|
316
|
+
<tr>
|
|
317
|
+
<td>
|
|
318
|
+
<a href=".undefined"> MOVE_CAMERA </a>
|
|
319
|
+
</td>
|
|
320
|
+
<td>
|
|
321
|
+
Moves the camera to a new position and target.
|
|
322
|
+
</td>
|
|
323
|
+
</tr>
|
|
324
|
+
<tr>
|
|
325
|
+
<td>
|
|
326
|
+
<a href=".undefined"> PLACE_ON_FLOOR </a>
|
|
327
|
+
</td>
|
|
328
|
+
<td>
|
|
329
|
+
Places an object on the floor.
|
|
330
|
+
</td>
|
|
331
|
+
</tr>
|
|
332
|
+
<tr>
|
|
333
|
+
<td>
|
|
334
|
+
<a href=".undefined"> RESET_CAMERA </a>
|
|
335
|
+
</td>
|
|
336
|
+
<td>
|
|
337
|
+
Reset the camera to its initial position and rotation.
|
|
338
|
+
</td>
|
|
339
|
+
</tr>
|
|
340
|
+
<tr>
|
|
341
|
+
<td>
|
|
342
|
+
<a href=".undefined"> SELECT_OBJECT </a>
|
|
343
|
+
</td>
|
|
344
|
+
<td>
|
|
345
|
+
Selects an existing object.
|
|
346
|
+
</td>
|
|
347
|
+
</tr>
|
|
348
|
+
<tr>
|
|
349
|
+
<td>
|
|
350
|
+
<a href=".undefined"> SET_BACKGROUND </a>
|
|
351
|
+
</td>
|
|
352
|
+
<td>
|
|
353
|
+
Set the background color of the scene.
|
|
354
|
+
</td>
|
|
355
|
+
</tr>
|
|
356
|
+
<tr>
|
|
357
|
+
<td>
|
|
358
|
+
<a href=".undefined"> SET_CAMERA_LAYER </a>
|
|
359
|
+
</td>
|
|
360
|
+
<td>
|
|
361
|
+
Sets the camera layer to a certain layer.
|
|
362
|
+
</td>
|
|
363
|
+
</tr>
|
|
364
|
+
<tr>
|
|
365
|
+
<td>
|
|
366
|
+
<a href=".undefined"> SET_CAMERA_TRANSFORM </a>
|
|
367
|
+
</td>
|
|
368
|
+
<td>
|
|
369
|
+
Sets the camera position and target.
|
|
370
|
+
</td>
|
|
371
|
+
</tr>
|
|
372
|
+
<tr>
|
|
373
|
+
<td>
|
|
374
|
+
<a href=".undefined"> SET_GIZMO_MODE </a>
|
|
375
|
+
</td>
|
|
376
|
+
<td>
|
|
377
|
+
Sets the gizmo's mode.
|
|
378
|
+
</td>
|
|
379
|
+
</tr>
|
|
380
|
+
<tr>
|
|
381
|
+
<td>
|
|
382
|
+
<a href=".undefined"> SET_GIZMO_VISIBILITY </a>
|
|
383
|
+
</td>
|
|
384
|
+
<td>
|
|
385
|
+
Sets the gizmo's visibility.
|
|
386
|
+
</td>
|
|
387
|
+
</tr>
|
|
388
|
+
<tr>
|
|
389
|
+
<td>
|
|
390
|
+
<a href=".undefined"> SET_PARENT </a>
|
|
391
|
+
</td>
|
|
392
|
+
<td>
|
|
393
|
+
Attach an object to another object.
|
|
394
|
+
</td>
|
|
395
|
+
</tr>
|
|
396
|
+
<tr>
|
|
397
|
+
<td>
|
|
398
|
+
<a href=".undefined"> UPDATE_OBJECT </a>
|
|
399
|
+
</td>
|
|
400
|
+
<td>
|
|
401
|
+
Updates an existing object.
|
|
402
|
+
</td>
|
|
403
|
+
</tr>
|
|
404
|
+
<tr>
|
|
405
|
+
<td>
|
|
406
|
+
<a href=".undefined"> UPDATE_SCENE </a>
|
|
407
|
+
</td>
|
|
408
|
+
<td>
|
|
409
|
+
Updates global scene data.
|
|
410
|
+
</td>
|
|
411
|
+
</tr>
|
|
412
|
+
<tr>
|
|
413
|
+
<td>
|
|
414
|
+
<a href=".undefined"> USE_TOOL </a>
|
|
415
|
+
</td>
|
|
416
|
+
<td>
|
|
417
|
+
Activates a specific tool from the toolbox.
|
|
418
|
+
</td>
|
|
419
|
+
</tr>
|
|
420
|
+
<tr>
|
|
421
|
+
<td>
|
|
422
|
+
<a href=".undefined"> ZOOM_CAMERA </a>
|
|
423
|
+
</td>
|
|
424
|
+
<td>
|
|
425
|
+
Zooms the camera in or out by a certain amount.
|
|
426
|
+
</td>
|
|
427
|
+
</tr>
|
|
428
|
+
</table>
|
package/build/dive.cjs
CHANGED
|
@@ -2851,7 +2851,7 @@ DIVEInfo._supportsWebXR = null;
|
|
|
2851
2851
|
// package.json
|
|
2852
2852
|
var package_default = {
|
|
2853
2853
|
name: "@shopware-ag/dive",
|
|
2854
|
-
version: "1.16.
|
|
2854
|
+
version: "1.16.2",
|
|
2855
2855
|
description: "Shopware Spatial Framework",
|
|
2856
2856
|
type: "module",
|
|
2857
2857
|
main: "./build/dive.cjs",
|
|
@@ -2900,19 +2900,27 @@ var package_default = {
|
|
|
2900
2900
|
"prettier-plugin-multiline-arrays": "^3.0.6",
|
|
2901
2901
|
"ts-jest": "^29.1.2",
|
|
2902
2902
|
"ts-node": "^10.9.2",
|
|
2903
|
+
tsc: "^2.0.4",
|
|
2903
2904
|
tsup: "^8.0.2",
|
|
2904
2905
|
typescript: "^5.4.5",
|
|
2905
2906
|
"typescript-eslint": "^7.7.1"
|
|
2906
2907
|
},
|
|
2907
2908
|
scripts: {
|
|
2908
|
-
build: "tsup
|
|
2909
|
-
|
|
2909
|
+
build: "tsup",
|
|
2910
|
+
dev: "tsup --watch",
|
|
2910
2911
|
lint: "eslint",
|
|
2911
|
-
"
|
|
2912
|
-
"
|
|
2912
|
+
"lint:actions": "yarn lint:actions:transpile && yarn lint:actions:check && yarn lint:actions:cleanup",
|
|
2913
|
+
"lint:actions:transpile": "yarn tsc --resolveJsonModule --esModuleInterop ci/lint/lint-actions.ts && mv ci/lint/lint-actions.js ci/lint/lint-actions.cjs",
|
|
2914
|
+
"lint:actions:check": "yarn node ci/lint/lint-actions.cjs",
|
|
2915
|
+
"lint:actions:cleanup": `node -e "require('fs').unlinkSync('ci/lint/lint-actions.cjs')"`,
|
|
2916
|
+
"prettier:check": "prettier --check .",
|
|
2917
|
+
"prettier:fix": "prettier --write .",
|
|
2913
2918
|
unit: "jest",
|
|
2914
2919
|
coverage: "jest --coverage",
|
|
2915
|
-
|
|
2920
|
+
"generate-readme": "yarn generate-readme:transpile && yarn generate-readme:write && yarn generate-readme:cleanup",
|
|
2921
|
+
"generate-readme:transpile": "yarn tsc --resolveJsonModule --esModuleInterop ci/readme/generate-readme.ts && mv ci/readme/generate-readme.js ci/readme/generate-readme.cjs",
|
|
2922
|
+
"generate-readme:write": "node ci/readme/generate-readme.cjs",
|
|
2923
|
+
"generate-readme:cleanup": `node -e "require('fs').unlinkSync('ci/readme/generate-readme.cjs')"`
|
|
2916
2924
|
}
|
|
2917
2925
|
};
|
|
2918
2926
|
|