@avs/go-react 0.13.71740 → 0.13.71745
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/demo/node_modules/.vite/deps/@polymer_iron-resizable-behavior_iron-resizable-behavior__js.js
CHANGED
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
PolymerElement
|
|
3
|
-
} from "./chunk-BSA4YZO6.js";
|
|
4
1
|
import {
|
|
5
2
|
Class,
|
|
6
3
|
CustomStyleInterface,
|
|
@@ -19,6 +16,9 @@ import {
|
|
|
19
16
|
updateNativeProperties
|
|
20
17
|
} from "./chunk-BHAOVVTR.js";
|
|
21
18
|
import "./chunk-QQPVW2K2.js";
|
|
19
|
+
import {
|
|
20
|
+
PolymerElement
|
|
21
|
+
} from "./chunk-BSA4YZO6.js";
|
|
22
22
|
import {
|
|
23
23
|
ElementMixin,
|
|
24
24
|
PropertyEffects,
|
|
@@ -1,86 +1,86 @@
|
|
|
1
1
|
{
|
|
2
|
-
"hash": "
|
|
2
|
+
"hash": "9655bdd0",
|
|
3
3
|
"configHash": "f1217b0f",
|
|
4
|
-
"lockfileHash": "
|
|
5
|
-
"browserHash": "
|
|
4
|
+
"lockfileHash": "2e777a7e",
|
|
5
|
+
"browserHash": "a93d0bfe",
|
|
6
6
|
"optimized": {
|
|
7
7
|
"react": {
|
|
8
8
|
"src": "../../../../../../node_modules/react/index.js",
|
|
9
9
|
"file": "react.js",
|
|
10
|
-
"fileHash": "
|
|
10
|
+
"fileHash": "cbda1220",
|
|
11
11
|
"needsInterop": true
|
|
12
12
|
},
|
|
13
13
|
"react-dom": {
|
|
14
14
|
"src": "../../../../../../node_modules/react-dom/index.js",
|
|
15
15
|
"file": "react-dom.js",
|
|
16
|
-
"fileHash": "
|
|
16
|
+
"fileHash": "131e2108",
|
|
17
17
|
"needsInterop": true
|
|
18
18
|
},
|
|
19
19
|
"react/jsx-dev-runtime": {
|
|
20
20
|
"src": "../../../../../../node_modules/react/jsx-dev-runtime.js",
|
|
21
21
|
"file": "react_jsx-dev-runtime.js",
|
|
22
|
-
"fileHash": "
|
|
22
|
+
"fileHash": "75d33b4c",
|
|
23
23
|
"needsInterop": true
|
|
24
24
|
},
|
|
25
25
|
"react/jsx-runtime": {
|
|
26
26
|
"src": "../../../../../../node_modules/react/jsx-runtime.js",
|
|
27
27
|
"file": "react_jsx-runtime.js",
|
|
28
|
-
"fileHash": "
|
|
28
|
+
"fileHash": "06888346",
|
|
29
29
|
"needsInterop": true
|
|
30
30
|
},
|
|
31
31
|
"@polymer/iron-resizable-behavior/iron-resizable-behavior.js": {
|
|
32
32
|
"src": "../../../../../../node_modules/@polymer/iron-resizable-behavior/iron-resizable-behavior.js",
|
|
33
33
|
"file": "@polymer_iron-resizable-behavior_iron-resizable-behavior__js.js",
|
|
34
|
-
"fileHash": "
|
|
34
|
+
"fileHash": "7e01d931",
|
|
35
35
|
"needsInterop": false
|
|
36
36
|
},
|
|
37
37
|
"@polymer/polymer/lib/legacy/class.js": {
|
|
38
38
|
"src": "../../../../../../node_modules/@polymer/polymer/lib/legacy/class.js",
|
|
39
39
|
"file": "@polymer_polymer_lib_legacy_class__js.js",
|
|
40
|
-
"fileHash": "
|
|
40
|
+
"fileHash": "95a26f3a",
|
|
41
41
|
"needsInterop": false
|
|
42
42
|
},
|
|
43
43
|
"@polymer/polymer/lib/utils/mixin.js": {
|
|
44
44
|
"src": "../../../../../../node_modules/@polymer/polymer/lib/utils/mixin.js",
|
|
45
45
|
"file": "@polymer_polymer_lib_utils_mixin__js.js",
|
|
46
|
-
"fileHash": "
|
|
46
|
+
"fileHash": "89943a4c",
|
|
47
47
|
"needsInterop": false
|
|
48
48
|
},
|
|
49
49
|
"@polymer/polymer/lib/utils/render-status.js": {
|
|
50
50
|
"src": "../../../../../../node_modules/@polymer/polymer/lib/utils/render-status.js",
|
|
51
51
|
"file": "@polymer_polymer_lib_utils_render-status__js.js",
|
|
52
|
-
"fileHash": "
|
|
52
|
+
"fileHash": "5d3b8dcd",
|
|
53
53
|
"needsInterop": false
|
|
54
54
|
},
|
|
55
55
|
"@polymer/polymer/polymer-element.js": {
|
|
56
56
|
"src": "../../../../../../node_modules/@polymer/polymer/polymer-element.js",
|
|
57
57
|
"file": "@polymer_polymer_polymer-element__js.js",
|
|
58
|
-
"fileHash": "
|
|
58
|
+
"fileHash": "34ad9e7a",
|
|
59
59
|
"needsInterop": false
|
|
60
60
|
},
|
|
61
61
|
"react-dom/client": {
|
|
62
62
|
"src": "../../../../../../node_modules/react-dom/client.js",
|
|
63
63
|
"file": "react-dom_client.js",
|
|
64
|
-
"fileHash": "
|
|
64
|
+
"fileHash": "77621582",
|
|
65
65
|
"needsInterop": true
|
|
66
66
|
},
|
|
67
67
|
"three": {
|
|
68
68
|
"src": "../../../../../../node_modules/three/build/three.module.js",
|
|
69
69
|
"file": "three.js",
|
|
70
|
-
"fileHash": "
|
|
70
|
+
"fileHash": "484cc2aa",
|
|
71
71
|
"needsInterop": false
|
|
72
72
|
}
|
|
73
73
|
},
|
|
74
74
|
"chunks": {
|
|
75
|
-
"chunk-BSA4YZO6": {
|
|
76
|
-
"file": "chunk-BSA4YZO6.js"
|
|
77
|
-
},
|
|
78
75
|
"chunk-BHAOVVTR": {
|
|
79
76
|
"file": "chunk-BHAOVVTR.js"
|
|
80
77
|
},
|
|
81
78
|
"chunk-QQPVW2K2": {
|
|
82
79
|
"file": "chunk-QQPVW2K2.js"
|
|
83
80
|
},
|
|
81
|
+
"chunk-BSA4YZO6": {
|
|
82
|
+
"file": "chunk-BSA4YZO6.js"
|
|
83
|
+
},
|
|
84
84
|
"chunk-PRUGAEYJ": {
|
|
85
85
|
"file": "chunk-PRUGAEYJ.js"
|
|
86
86
|
},
|
package/demo/src/App.tsx
CHANGED
|
@@ -1,15 +1,46 @@
|
|
|
1
1
|
import './App.css'
|
|
2
2
|
import { AvsGoDataViz } from '@avs/go-react/src/AvsGoDataViz';
|
|
3
|
+
import { useRef } from 'react';
|
|
4
|
+
|
|
5
|
+
const startupAnimation = null; // btoa('[{"time":0,"rotation":[-75,0,0,"XYZ"],"position":[0,0,0],"scale":100},{"time":2000,"rotation":[-75,0,-90,"XYZ"],"position":[0,0,0],"scale":100},{"time":4000,"rotation":[-75,0,-90,"XYZ"],"position":[0,0,0],"scale":200},{"time":6000,"rotation":[0,0,-90,"XYZ"],"position":[0,0,0],"scale":200}]');
|
|
6
|
+
const params = new URLSearchParams(window.location.search);
|
|
7
|
+
const param = params.get('animation');
|
|
3
8
|
|
|
4
9
|
function App() {
|
|
10
|
+
const dataVizRef = useRef(null);
|
|
11
|
+
|
|
12
|
+
function handleLoadComplete() {
|
|
13
|
+
if (dataVizRef.current) {
|
|
14
|
+
dataVizRef.current.runAnimation();
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
function handleTransformAnimationShare(animation: string) {
|
|
19
|
+
const url = window.location.origin + window.location.pathname + "?animation=" + animation;
|
|
20
|
+
navigator.clipboard.writeText(url);
|
|
21
|
+
|
|
22
|
+
const dialog = document.createElement("dialog");
|
|
23
|
+
document.body.appendChild(dialog);
|
|
24
|
+
dialog.innerText = "URL copied to clipboard";
|
|
25
|
+
dialog.show();
|
|
26
|
+
setTimeout(function () {
|
|
27
|
+
dialog.close();
|
|
28
|
+
}, 1000);
|
|
29
|
+
}
|
|
30
|
+
|
|
5
31
|
return (
|
|
6
|
-
<div style={{width: '100vw', height: '100vh'}}>
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
32
|
+
<div style={{width: '100vw', height: '100vh', backgroundColor: 'white'}}>
|
|
33
|
+
<AvsGoDataViz
|
|
34
|
+
url='hydrogen.json'
|
|
35
|
+
ref={dataVizRef}
|
|
36
|
+
urlLoadJsonFile
|
|
37
|
+
renderer='THREEJS'
|
|
38
|
+
transformEnable
|
|
39
|
+
transformAnimation={param ?? startupAnimation}
|
|
40
|
+
animationControlsEnable
|
|
41
|
+
onLoadComplete={handleLoadComplete}
|
|
42
|
+
onTransformAnimationShare={handleTransformAnimationShare}
|
|
43
|
+
/>
|
|
13
44
|
</div>
|
|
14
45
|
)
|
|
15
46
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@avs/go-react",
|
|
3
|
-
"version": "0.13.
|
|
3
|
+
"version": "0.13.71745",
|
|
4
4
|
"description": "React wrapper for AVS/Go web components",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"visualization",
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"author": "Advanced Visual Systems Inc.",
|
|
12
12
|
"license": "Apache-2.0",
|
|
13
13
|
"dependencies": {
|
|
14
|
-
"@avs/go": "0.13.
|
|
14
|
+
"@avs/go": "0.13.71745",
|
|
15
15
|
"react": "^19.2.0",
|
|
16
16
|
"react-dom": "^19.2.0"
|
|
17
17
|
},
|
package/src/AvsGoDataViz.jsx
CHANGED
|
@@ -73,6 +73,7 @@ export const AvsGoDataViz = forwardRef(({
|
|
|
73
73
|
transformTwistAngle,
|
|
74
74
|
transformTiltAngle,
|
|
75
75
|
transformScale,
|
|
76
|
+
transformAnimation,
|
|
76
77
|
zoomRectangleEnable,
|
|
77
78
|
panEnable,
|
|
78
79
|
panZoomEnable,
|
|
@@ -81,9 +82,11 @@ export const AvsGoDataViz = forwardRef(({
|
|
|
81
82
|
panMaximumZoomLevel,
|
|
82
83
|
animatedGlyphsVisible,
|
|
83
84
|
animatedGlyphsEnable,
|
|
85
|
+
animationControlsEnable,
|
|
84
86
|
onSceneInfo,
|
|
85
87
|
onLoadComplete,
|
|
86
88
|
onPanInfo,
|
|
89
|
+
onTransformAnimationShare,
|
|
87
90
|
onError
|
|
88
91
|
}, ref) => {
|
|
89
92
|
|
|
@@ -130,6 +133,12 @@ export const AvsGoDataViz = forwardRef(({
|
|
|
130
133
|
}
|
|
131
134
|
}
|
|
132
135
|
|
|
136
|
+
function handleTransformAnimationShare(e) {
|
|
137
|
+
if (onTransformAnimationShare) {
|
|
138
|
+
onTransformAnimationShare(e.detail);
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
|
|
133
142
|
function handleError(e) {
|
|
134
143
|
if (onError) {
|
|
135
144
|
onError(e.detail);
|
|
@@ -142,6 +151,7 @@ export const AvsGoDataViz = forwardRef(({
|
|
|
142
151
|
dataVizRef.current.addEventListener('avs-scene-info', handleSceneInfo);
|
|
143
152
|
dataVizRef.current.addEventListener('avs-load-complete', handleLoadComplete);
|
|
144
153
|
dataVizRef.current.addEventListener('avs-pan-info', handlePanInfo);
|
|
154
|
+
dataVizRef.current.addEventListener('avs-transform-animation-share', handleTransformAnimationShare);
|
|
145
155
|
dataVizRef.current.addEventListener('avs-error', handleError);
|
|
146
156
|
|
|
147
157
|
return () => {
|
|
@@ -152,6 +162,7 @@ export const AvsGoDataViz = forwardRef(({
|
|
|
152
162
|
dataVizRef.current.removeEventListener('avs-scene-info', handleSceneInfo);
|
|
153
163
|
dataVizRef.current.removeEventListener('avs-load-complete', handleLoadComplete);
|
|
154
164
|
dataVizRef.current.removeEventListener('avs-pan-info', handlePanInfo);
|
|
165
|
+
dataVizRef.current.removeEventListener('avs-transform-animation-share', handleTransformAnimationShare);
|
|
155
166
|
dataVizRef.current.removeEventListener('avs-error', handleError);
|
|
156
167
|
}
|
|
157
168
|
}
|
|
@@ -197,63 +208,65 @@ export const AvsGoDataViz = forwardRef(({
|
|
|
197
208
|
|
|
198
209
|
return (
|
|
199
210
|
<avs-go-dataviz
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
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
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
211
|
+
style={style}
|
|
212
|
+
ref={dataVizRef}
|
|
213
|
+
manual-update={manualUpdate}
|
|
214
|
+
display-canvas={displayCanvas}
|
|
215
|
+
url={url}
|
|
216
|
+
url-load-json-file={urlLoadJsonFile}
|
|
217
|
+
scene-name={sceneName}
|
|
218
|
+
scene-user-properties={sceneUserProperties}
|
|
219
|
+
data-source-name={dataSourceName}
|
|
220
|
+
data-source-user-properties={dataSourceUserProperties}
|
|
221
|
+
renderer-name={rendererName}
|
|
222
|
+
renderer-user-properties={rendererUserProperties}
|
|
223
|
+
renderer={renderer}
|
|
224
|
+
stream-enable={streamEnable}
|
|
225
|
+
stream-chunk-size-first={streamChunkSizeFirst}
|
|
226
|
+
stream-chunk-size={streamChunkSize}
|
|
227
|
+
theme-name={themeName}
|
|
228
|
+
hidden={hidden}
|
|
229
|
+
resize-threshold={resizeThreshold}
|
|
230
|
+
aspect-ratio={aspectRatio}
|
|
231
|
+
pointer-timeout={pointerTimeout}
|
|
232
|
+
tap-enable={tapEnable}
|
|
233
|
+
tap-level={tapLevel}
|
|
234
|
+
tap-depth={tapDepth}
|
|
235
|
+
tap-highlight-enable={tapHighlightEnable}
|
|
236
|
+
tap-highlight-color={tapHighlightColor}
|
|
237
|
+
tap-highlight-layer-enable={tapHighlightLayerEnable}
|
|
238
|
+
tap-process-event-on-client={tapProcessEventOnClient}
|
|
239
|
+
track-enable={trackEnable}
|
|
240
|
+
track-level={trackLevel}
|
|
241
|
+
track-depth={trackDepth}
|
|
242
|
+
track-highlight-enable={trackHighlightEnable}
|
|
243
|
+
track-highlight-color={trackHighlightColor}
|
|
244
|
+
track-highlight-layer-enable={trackHighlightLayerEnable}
|
|
245
|
+
track-process-event-on-client={trackProcessEventOnClient}
|
|
246
|
+
hover-enable={hoverEnable}
|
|
247
|
+
hover-level={hoverLevel}
|
|
248
|
+
horer-depth={hoverDepth}
|
|
249
|
+
hover-highlight-enable={hoverHighlightEnable}
|
|
250
|
+
hover-highlight-color={hoverHighlightColor}
|
|
251
|
+
hover-highlight-layer-enable={hoverHighlightLayerEnable}
|
|
252
|
+
transform-enable={transformEnable}
|
|
253
|
+
transform-client-only={transformClientOnly}
|
|
254
|
+
transform-rotate-disable={transformRotateDisable}
|
|
255
|
+
transform-zoom-disable={transformZoomDisable}
|
|
256
|
+
transform-pan-disable={transformPanDisable}
|
|
257
|
+
transform-twist-angle={transformTwistAngle}
|
|
258
|
+
transform-tilt-angle={transformTiltAngle}
|
|
259
|
+
transform-scale={transformScale}
|
|
260
|
+
transformAnimation={transformAnimation}
|
|
261
|
+
zoom-reactangle-enable={zoomRectangleEnable}
|
|
262
|
+
pan-enable={panEnable}
|
|
263
|
+
pan-zoom-enable={panZoomEnable}
|
|
264
|
+
pan-width-zoom-level={panWidthZoomLevel}
|
|
265
|
+
pan-height-zoom-level={panHeightZoomLevel}
|
|
266
|
+
pan-maximum-zoom-level={panMaximumZoomLevel}
|
|
267
|
+
animated-glyphs-visible={animatedGlyphsVisible}
|
|
268
|
+
animated-glyphs-enable={animatedGlyphsEnable}
|
|
269
|
+
animation-controls-enable={animationControlsEnable}
|
|
257
270
|
>
|
|
258
271
|
</avs-go-dataviz>
|
|
259
272
|
);
|