@r2u/javascript-ar-sdk 6.22.0 → 6.22.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/dist/ar.bundle.js +1 -1
- package/dist/assets/icons.js +18 -0
- package/dist/assets/icons.js.map +1 -0
- package/dist/components/Modal/Canvas/index.js +11 -0
- package/dist/components/Modal/Canvas/index.js.map +1 -0
- package/dist/components/Modal/Canvas/styles.js +34 -0
- package/dist/components/Modal/Canvas/styles.js.map +1 -0
- package/dist/components/Modal/Context.js +27 -0
- package/dist/components/Modal/Context.js.map +1 -0
- package/dist/components/Modal/Feedback/Confirm.js +16 -0
- package/dist/components/Modal/Feedback/Confirm.js.map +1 -0
- package/dist/components/Modal/Feedback/Main.js +16 -0
- package/dist/components/Modal/Feedback/Main.js.map +1 -0
- package/dist/components/Modal/Feedback/index.js +31 -0
- package/dist/components/Modal/Feedback/index.js.map +1 -0
- package/dist/components/Modal/Feedback/styles.js +100 -0
- package/dist/components/Modal/Feedback/styles.js.map +1 -0
- package/dist/components/Modal/Instructions/index.js +50 -0
- package/dist/components/Modal/Instructions/index.js.map +1 -0
- package/dist/components/Modal/Instructions/styles.js +137 -0
- package/dist/components/Modal/Instructions/styles.js.map +1 -0
- package/dist/components/Modal/InstructionsAmericanas/index.js +50 -0
- package/dist/components/Modal/InstructionsAmericanas/index.js.map +1 -0
- package/dist/components/Modal/InstructionsAmericanas/styles.js +116 -0
- package/dist/components/Modal/InstructionsAmericanas/styles.js.map +1 -0
- package/dist/components/Modal/InstructionsMolduraMinuto/index.js +103 -0
- package/dist/components/Modal/InstructionsMolduraMinuto/index.js.map +1 -0
- package/dist/components/Modal/InstructionsMolduraMinuto/styles.js +77 -0
- package/dist/components/Modal/InstructionsMolduraMinuto/styles.js.map +1 -0
- package/dist/components/Modal/InstructionsYDigital/index.js +50 -0
- package/dist/components/Modal/InstructionsYDigital/index.js.map +1 -0
- package/dist/components/Modal/InstructionsYDigital/styles.js +137 -0
- package/dist/components/Modal/InstructionsYDigital/styles.js.map +1 -0
- package/dist/components/Modal/InstructionsYDigitalVideo/index.js +44 -0
- package/dist/components/Modal/InstructionsYDigitalVideo/index.js.map +1 -0
- package/dist/components/Modal/InstructionsYDigitalVideo/styles.js +137 -0
- package/dist/components/Modal/InstructionsYDigitalVideo/styles.js.map +1 -0
- package/dist/components/Modal/Social/index.js +20 -0
- package/dist/components/Modal/Social/index.js.map +1 -0
- package/dist/components/Modal/Social/styles.js +85 -0
- package/dist/components/Modal/Social/styles.js.map +1 -0
- package/dist/components/Modal/Viewer/index.js +26 -0
- package/dist/components/Modal/Viewer/index.js.map +1 -0
- package/dist/components/Modal/Viewer/styles.js +56 -0
- package/dist/components/Modal/Viewer/styles.js.map +1 -0
- package/dist/components/Modal/ViewerFull/index.js +15 -0
- package/dist/components/Modal/ViewerFull/index.js.map +1 -0
- package/dist/components/Modal/ViewerFull/styles.js +12 -0
- package/dist/components/Modal/ViewerFull/styles.js.map +1 -0
- package/dist/components/R2UModelViewer/ProgressBar/index.js +9 -0
- package/dist/components/R2UModelViewer/ProgressBar/index.js.map +1 -0
- package/dist/components/R2UModelViewer/ProgressBar/styles.js +54 -0
- package/dist/components/R2UModelViewer/ProgressBar/styles.js.map +1 -0
- package/dist/components/R2UModelViewer/ProgressBar/types.js +1 -0
- package/dist/components/R2UModelViewer/ProgressBar/types.js.map +1 -0
- package/dist/components/R2UModelViewer/index.js +63 -0
- package/dist/components/R2UModelViewer/index.js.map +1 -0
- package/dist/components/R2UModelViewer/styles.js +128 -0
- package/dist/components/R2UModelViewer/styles.js.map +1 -0
- package/dist/components/WaterMark/index.js +9 -0
- package/dist/components/WaterMark/index.js.map +1 -0
- package/dist/components/WaterMark/styles.js +26 -0
- package/dist/components/WaterMark/styles.js.map +1 -0
- package/dist/config/i18n.js +69 -0
- package/dist/config/i18n.js.map +1 -0
- package/dist/error/ViewerError.js +7 -0
- package/dist/error/ViewerError.js.map +1 -0
- package/dist/fonts/index.js +9 -0
- package/dist/fonts/index.js.map +1 -0
- package/dist/{src/index.d.ts → index.d.ts} +1 -1
- package/dist/index.js +25 -1
- package/dist/index.js.map +1 -0
- package/dist/init.bundle.js +1 -1
- package/dist/locales/en/translation.json +36 -0
- package/dist/methods/analytics.js +17 -0
- package/dist/methods/analytics.js.map +1 -0
- package/dist/methods/ar.js +372 -0
- package/dist/methods/ar.js.map +1 -0
- package/dist/methods/config.js +40 -0
- package/dist/methods/config.js.map +1 -0
- package/dist/methods/init.js +51 -0
- package/dist/methods/init.js.map +1 -0
- package/dist/methods/qrCode.js +48 -0
- package/dist/methods/qrCode.js.map +1 -0
- package/dist/{src/methods → methods}/sku.d.ts +1 -1
- package/dist/methods/sku.js +47 -0
- package/dist/methods/sku.js.map +1 -0
- package/dist/methods/types.js +1 -0
- package/dist/methods/types.js.map +1 -0
- package/dist/methods/viewer.js +310 -0
- package/dist/methods/viewer.js.map +1 -0
- package/dist/screens/Fallback/index.js +22 -0
- package/dist/screens/Fallback/index.js.map +1 -0
- package/dist/{src/screens → screens}/Feedback/index.d.ts +1 -1
- package/dist/screens/Feedback/index.js +21 -0
- package/dist/screens/Feedback/index.js.map +1 -0
- package/dist/{src/screens → screens}/Instructions/index.d.ts +1 -1
- package/dist/screens/Instructions/index.js +48 -0
- package/dist/screens/Instructions/index.js.map +1 -0
- package/dist/screens/Social/index.js +9 -0
- package/dist/screens/Social/index.js.map +1 -0
- package/dist/services/analytics.js +219 -0
- package/dist/services/analytics.js.map +1 -0
- package/dist/services/constants.js +65 -0
- package/dist/services/constants.js.map +1 -0
- package/dist/services/cookies.js +19 -0
- package/dist/services/cookies.js.map +1 -0
- package/dist/services/customer.js +17 -0
- package/dist/services/customer.js.map +1 -0
- package/dist/services/customization.js +73 -0
- package/dist/services/customization.js.map +1 -0
- package/dist/services/product.js +49 -0
- package/dist/services/product.js.map +1 -0
- package/dist/services/requests.js +55 -0
- package/dist/services/requests.js.map +1 -0
- package/dist/sku.bundle.js +1 -1
- package/dist/{src/state.d.ts → state.d.ts} +1 -1
- package/dist/state.js +23 -0
- package/dist/state.js.map +1 -0
- package/dist/types/Viewer.js +1 -0
- package/dist/types/Viewer.js.map +1 -0
- package/dist/types/index.js +1 -0
- package/dist/types/index.js.map +1 -0
- package/dist/utils/sortCustomization.js +10 -0
- package/dist/utils/sortCustomization.js.map +1 -0
- package/dist/{vendors.fe050b32669a2a3c34a3.bundle.js → vendors.7d567adcf040d43f7345.bundle.js} +1 -1
- package/package.json +5 -3
- /package/dist/{src/assets → assets}/icons.d.ts +0 -0
- /package/dist/{src/components → components}/Modal/Canvas/index.d.ts +0 -0
- /package/dist/{src/components → components}/Modal/Canvas/styles.d.ts +0 -0
- /package/dist/{src/components → components}/Modal/Context.d.ts +0 -0
- /package/dist/{src/components → components}/Modal/Feedback/Confirm.d.ts +0 -0
- /package/dist/{src/components → components}/Modal/Feedback/Main.d.ts +0 -0
- /package/dist/{src/components → components}/Modal/Feedback/index.d.ts +0 -0
- /package/dist/{src/components → components}/Modal/Feedback/styles.d.ts +0 -0
- /package/dist/{src/components → components}/Modal/Instructions/index.d.ts +0 -0
- /package/dist/{src/components → components}/Modal/Instructions/styles.d.ts +0 -0
- /package/dist/{src/components → components}/Modal/InstructionsAmericanas/index.d.ts +0 -0
- /package/dist/{src/components → components}/Modal/InstructionsAmericanas/styles.d.ts +0 -0
- /package/dist/{src/components → components}/Modal/InstructionsMolduraMinuto/index.d.ts +0 -0
- /package/dist/{src/components → components}/Modal/InstructionsMolduraMinuto/styles.d.ts +0 -0
- /package/dist/{src/components → components}/Modal/InstructionsYDigital/index.d.ts +0 -0
- /package/dist/{src/components → components}/Modal/InstructionsYDigital/styles.d.ts +0 -0
- /package/dist/{src/components → components}/Modal/InstructionsYDigitalVideo/index.d.ts +0 -0
- /package/dist/{src/components → components}/Modal/InstructionsYDigitalVideo/styles.d.ts +0 -0
- /package/dist/{src/components → components}/Modal/Social/index.d.ts +0 -0
- /package/dist/{src/components → components}/Modal/Social/styles.d.ts +0 -0
- /package/dist/{src/components → components}/Modal/Viewer/index.d.ts +0 -0
- /package/dist/{src/components → components}/Modal/Viewer/styles.d.ts +0 -0
- /package/dist/{src/components → components}/Modal/ViewerFull/index.d.ts +0 -0
- /package/dist/{src/components → components}/Modal/ViewerFull/styles.d.ts +0 -0
- /package/dist/{src/components → components}/R2UModelViewer/ProgressBar/index.d.ts +0 -0
- /package/dist/{src/components → components}/R2UModelViewer/ProgressBar/styles.d.ts +0 -0
- /package/dist/{src/components → components}/R2UModelViewer/ProgressBar/types.d.ts +0 -0
- /package/dist/{src/components → components}/R2UModelViewer/index.d.ts +0 -0
- /package/dist/{src/components → components}/R2UModelViewer/styles.d.ts +0 -0
- /package/dist/{src/components → components}/WaterMark/index.d.ts +0 -0
- /package/dist/{src/components → components}/WaterMark/styles.d.ts +0 -0
- /package/dist/{src/config → config}/i18n.d.ts +0 -0
- /package/dist/{src/error → error}/ViewerError.d.ts +0 -0
- /package/dist/{src/fonts → fonts}/index.d.ts +0 -0
- /package/dist/{src/methods → methods}/analytics.d.ts +0 -0
- /package/dist/{src/methods → methods}/ar.d.ts +0 -0
- /package/dist/{src/methods → methods}/config.d.ts +0 -0
- /package/dist/{src/methods → methods}/init.d.ts +0 -0
- /package/dist/{src/methods → methods}/qrCode.d.ts +0 -0
- /package/dist/{src/methods → methods}/types.d.ts +0 -0
- /package/dist/{src/methods → methods}/viewer.d.ts +0 -0
- /package/dist/{src/screens → screens}/Fallback/index.d.ts +0 -0
- /package/dist/{src/screens → screens}/Social/index.d.ts +0 -0
- /package/dist/{src/services → services}/analytics.d.ts +0 -0
- /package/dist/{src/services → services}/constants.d.ts +0 -0
- /package/dist/{src/services → services}/cookies.d.ts +0 -0
- /package/dist/{src/services → services}/customer.d.ts +0 -0
- /package/dist/{src/services → services}/customization.d.ts +0 -0
- /package/dist/{src/services → services}/product.d.ts +0 -0
- /package/dist/{src/services → services}/requests.d.ts +0 -0
- /package/dist/{src/types → types}/Viewer.d.ts +0 -0
- /package/dist/{src/types → types}/index.d.ts +0 -0
- /package/dist/{src/utils → utils}/sortCustomization.d.ts +0 -0
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
import styled from 'styled-components';
|
|
2
|
+
export const Content = styled.div `
|
|
3
|
+
display: flex;
|
|
4
|
+
flex-direction: column;
|
|
5
|
+
align-items: center;
|
|
6
|
+
justify-content: space-evenly;
|
|
7
|
+
|
|
8
|
+
.powered {
|
|
9
|
+
display: flex;
|
|
10
|
+
text-decoration: unset;
|
|
11
|
+
flex-direction: row;
|
|
12
|
+
align-items: center;
|
|
13
|
+
margin-top: 2%;
|
|
14
|
+
|
|
15
|
+
img {
|
|
16
|
+
width: 32.9px;
|
|
17
|
+
height: 17px;
|
|
18
|
+
object-fit: contain;
|
|
19
|
+
margin: 5px;
|
|
20
|
+
filter: brightness(85%);
|
|
21
|
+
}
|
|
22
|
+
h1 {
|
|
23
|
+
width: 90px;
|
|
24
|
+
height: 20px;
|
|
25
|
+
font-family: proxima-Nova, sans-serif;
|
|
26
|
+
font-size: 16px;
|
|
27
|
+
font-weight: bold;
|
|
28
|
+
font-stretch: normal;
|
|
29
|
+
font-style: normal;
|
|
30
|
+
line-height: 1.25;
|
|
31
|
+
letter-spacing: normal;
|
|
32
|
+
text-align: center;
|
|
33
|
+
color: #d8d8d8;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.instructions {
|
|
38
|
+
width: min(90vw, 50vh);
|
|
39
|
+
height: min(90vw, 50vh);
|
|
40
|
+
border: solid 20px #f2f2f2;
|
|
41
|
+
margin: 12px;
|
|
42
|
+
|
|
43
|
+
.border {
|
|
44
|
+
border-radius: 20px;
|
|
45
|
+
box-shadow: 0 0 0 20px #f2f2f2;
|
|
46
|
+
width: 100%;
|
|
47
|
+
height: 100%;
|
|
48
|
+
display: flex;
|
|
49
|
+
flex-direction: row;
|
|
50
|
+
justify-content: space-between;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.example {
|
|
54
|
+
height: 100%;
|
|
55
|
+
object-fit: contain;
|
|
56
|
+
border-radius: 20px;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.instructionsColumn {
|
|
60
|
+
display: flex;
|
|
61
|
+
flex-direction: column;
|
|
62
|
+
justify-content: space-evenly;
|
|
63
|
+
align-items: center;
|
|
64
|
+
width: 50%;
|
|
65
|
+
span {
|
|
66
|
+
font-family: proxima-Nova, sans-serif;
|
|
67
|
+
font-size: 14px;
|
|
68
|
+
font-weight: bold;
|
|
69
|
+
font-stretch: normal;
|
|
70
|
+
font-style: normal;
|
|
71
|
+
line-height: 1.22;
|
|
72
|
+
letter-spacing: normal;
|
|
73
|
+
text-align: center;
|
|
74
|
+
color: #000000;
|
|
75
|
+
}
|
|
76
|
+
.icon {
|
|
77
|
+
width: 50%;
|
|
78
|
+
object-fit: contain;
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
.no-watermark {
|
|
84
|
+
margin-top: 60px;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
.text {
|
|
88
|
+
h1 {
|
|
89
|
+
font-family: proxima-Nova, sans-serif;
|
|
90
|
+
font-size: 26px;
|
|
91
|
+
font-weight: bold;
|
|
92
|
+
font-stretch: normal;
|
|
93
|
+
font-style: normal;
|
|
94
|
+
line-height: 1.23;
|
|
95
|
+
letter-spacing: normal;
|
|
96
|
+
text-align: center;
|
|
97
|
+
color: #000000;
|
|
98
|
+
}
|
|
99
|
+
h3 {
|
|
100
|
+
font-family: proxima-Nova, sans-serif;
|
|
101
|
+
font-size: 18px;
|
|
102
|
+
font-weight: 300;
|
|
103
|
+
font-stretch: normal;
|
|
104
|
+
font-style: normal;
|
|
105
|
+
line-height: 1.22;
|
|
106
|
+
letter-spacing: normal;
|
|
107
|
+
text-align: center;
|
|
108
|
+
color: #707070;
|
|
109
|
+
margin: 5px 20px 30px 20px;
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
.ar-button {
|
|
114
|
+
width: calc(100vw - 40px);
|
|
115
|
+
height: 50px;
|
|
116
|
+
border: none;
|
|
117
|
+
margin: auto;
|
|
118
|
+
border-radius: 23px;
|
|
119
|
+
background-color: #000000;
|
|
120
|
+
&:disabled {
|
|
121
|
+
background-color: gray;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
span {
|
|
125
|
+
font-family: proxima-Nova, sans-serif;
|
|
126
|
+
font-size: 18px;
|
|
127
|
+
font-weight: bold;
|
|
128
|
+
font-stretch: normal;
|
|
129
|
+
font-style: normal;
|
|
130
|
+
line-height: 1.22;
|
|
131
|
+
letter-spacing: normal;
|
|
132
|
+
text-align: center;
|
|
133
|
+
color: #ffffff;
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
`;
|
|
137
|
+
//# sourceMappingURL=styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"styles.js","sourceRoot":"","sources":["../../../../src/components/Modal/InstructionsYDigitalVideo/styles.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,mBAAmB,CAAA;AAEtC,MAAM,CAAC,MAAM,OAAO,GAAG,MAAM,CAAC,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAsIhC,CAAA"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/* eslint-disable react/jsx-one-expression-per-line */
|
|
2
|
+
import React, { useContext } from 'react';
|
|
3
|
+
import { Content } from './styles';
|
|
4
|
+
import Canvas from '../Canvas';
|
|
5
|
+
import { ModalContext } from '../Context';
|
|
6
|
+
import { useTranslation } from 'react-i18next';
|
|
7
|
+
const SocialModal = () => {
|
|
8
|
+
const { closeModal } = useContext(ModalContext);
|
|
9
|
+
const { t } = useTranslation();
|
|
10
|
+
return (React.createElement(Canvas, { color: "rgba(0, 0, 0, 0.3)" },
|
|
11
|
+
React.createElement(Content, null,
|
|
12
|
+
React.createElement("div", { className: "balloon" },
|
|
13
|
+
React.createElement("div", { className: "info" },
|
|
14
|
+
React.createElement("h2", null, t('fallback.social.title')),
|
|
15
|
+
React.createElement("p", null, t('fallback.social.text')),
|
|
16
|
+
React.createElement("img", { src: "https://sdk.r2u.io/assets/instruction-open-safari.png", alt: "" })),
|
|
17
|
+
React.createElement("button", { type: "button", onClick: closeModal }, t('fallback.social.button'))))));
|
|
18
|
+
};
|
|
19
|
+
export default SocialModal;
|
|
20
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/Modal/Social/index.tsx"],"names":[],"mappings":"AAAA,sDAAsD;AACtD,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;AAEzC,OAAO,EAAE,OAAO,EAAE,MAAM,UAAU,CAAA;AAClC,OAAO,MAAM,MAAM,WAAW,CAAA;AAC9B,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAA;AACzC,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAA;AAE9C,MAAM,WAAW,GAAa,GAAG,EAAE;IACjC,MAAM,EAAE,UAAU,EAAE,GAAG,UAAU,CAAC,YAAY,CAAC,CAAA;IAC/C,MAAM,EAAE,CAAC,EAAE,GAAG,cAAc,EAAE,CAAA;IAE9B,OAAO,CACL,oBAAC,MAAM,IAAC,KAAK,EAAC,oBAAoB;QAChC,oBAAC,OAAO;YACN,6BAAK,SAAS,EAAC,SAAS;gBACtB,6BAAK,SAAS,EAAC,MAAM;oBACnB,gCAAK,CAAC,CAAC,uBAAuB,CAAC,CAAM;oBACrC,+BAAI,CAAC,CAAC,sBAAsB,CAAC,CAAK;oBAClC,6BACE,GAAG,EAAC,uDAAuD,EAC3D,GAAG,EAAC,EAAE,GACN,CACE;gBACN,gCAAQ,IAAI,EAAC,QAAQ,EAAC,OAAO,EAAE,UAAU,IACtC,CAAC,CAAC,wBAAwB,CAAC,CACrB,CACL,CACE,CACH,CACV,CAAA;AACH,CAAC,CAAA;AAED,eAAe,WAAW,CAAA"}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import styled from 'styled-components';
|
|
2
|
+
export const Content = styled.div `
|
|
3
|
+
display: flex;
|
|
4
|
+
width: 100%;
|
|
5
|
+
height: 100%;
|
|
6
|
+
justify-content: center;
|
|
7
|
+
align-items: center;
|
|
8
|
+
|
|
9
|
+
.balloon {
|
|
10
|
+
height: max-content;
|
|
11
|
+
width: 90%;
|
|
12
|
+
height: 50%;
|
|
13
|
+
background-color: white;
|
|
14
|
+
border-radius: 10px;
|
|
15
|
+
|
|
16
|
+
position: relative;
|
|
17
|
+
|
|
18
|
+
display: flex;
|
|
19
|
+
flex-direction: column;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.info {
|
|
23
|
+
padding: 25px;
|
|
24
|
+
display: flex;
|
|
25
|
+
justify-content: center;
|
|
26
|
+
align-items: center;
|
|
27
|
+
flex-direction: column;
|
|
28
|
+
|
|
29
|
+
img {
|
|
30
|
+
max-width: 100%;
|
|
31
|
+
margin: 0;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
h2 {
|
|
35
|
+
margin: 5px 10px 5px 10px;
|
|
36
|
+
font-family: Proxima-Nova, sans-serif;
|
|
37
|
+
font-size: 18px;
|
|
38
|
+
font-weight: bold;
|
|
39
|
+
font-stretch: normal;
|
|
40
|
+
font-style: normal;
|
|
41
|
+
line-height: 1.22;
|
|
42
|
+
letter-spacing: normal;
|
|
43
|
+
text-align: center;
|
|
44
|
+
color: #222222;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
p {
|
|
48
|
+
margin: 5px 3px 15px 3px;
|
|
49
|
+
font-family: Proxima-Nova, sans-serif;
|
|
50
|
+
font-size: 14px;
|
|
51
|
+
font-weight: normal;
|
|
52
|
+
font-stretch: normal;
|
|
53
|
+
font-style: normal;
|
|
54
|
+
line-height: 1.21;
|
|
55
|
+
letter-spacing: normal;
|
|
56
|
+
text-align: center;
|
|
57
|
+
color: #222222;
|
|
58
|
+
|
|
59
|
+
u {
|
|
60
|
+
font-weight: bold;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
button {
|
|
66
|
+
padding: 20px;
|
|
67
|
+
border: none;
|
|
68
|
+
border-top: solid 0.1px rgba(0, 0, 0, 0.2);
|
|
69
|
+
margin-top: auto;
|
|
70
|
+
height: 20%;
|
|
71
|
+
outline: none;
|
|
72
|
+
background: none;
|
|
73
|
+
|
|
74
|
+
font-family: Proxima-Nova, sans-serif;
|
|
75
|
+
font-size: 16px;
|
|
76
|
+
font-weight: normal;
|
|
77
|
+
font-stretch: normal;
|
|
78
|
+
font-style: normal;
|
|
79
|
+
line-height: 1.19;
|
|
80
|
+
letter-spacing: normal;
|
|
81
|
+
text-align: center;
|
|
82
|
+
color: #3d71ba;
|
|
83
|
+
}
|
|
84
|
+
`;
|
|
85
|
+
//# sourceMappingURL=styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"styles.js","sourceRoot":"","sources":["../../../../src/components/Modal/Social/styles.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,mBAAmB,CAAA;AAEtC,MAAM,CAAC,MAAM,OAAO,GAAG,MAAM,CAAC,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkFhC,CAAA"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import React, { useContext } from 'react';
|
|
2
|
+
import { useTranslation } from 'react-i18next';
|
|
3
|
+
import Viewer from '@r2u/viewer';
|
|
4
|
+
import { Content } from './styles';
|
|
5
|
+
import WaterMark from '../../WaterMark';
|
|
6
|
+
import { FiArrowLeft } from '../../../assets/icons';
|
|
7
|
+
import { ModalContext } from '../Context';
|
|
8
|
+
import Canvas from '../Canvas';
|
|
9
|
+
const ModalViewer = ({ glb }) => {
|
|
10
|
+
const { closeModal } = useContext(ModalContext);
|
|
11
|
+
const { t } = useTranslation();
|
|
12
|
+
return (React.createElement(Canvas, null,
|
|
13
|
+
React.createElement(Content, null,
|
|
14
|
+
React.createElement(FiArrowLeft, { width: 30, height: 30, color: "#707070", cursor: "pointer", className: "exit", onClick: () => {
|
|
15
|
+
closeModal();
|
|
16
|
+
} }),
|
|
17
|
+
React.createElement("div", { className: "text error" }, t('fallback.viewer.title')),
|
|
18
|
+
React.createElement("div", { className: "text top" }, t('fallback.viewer.topText')),
|
|
19
|
+
React.createElement("div", { className: "fallback-viewer-container" },
|
|
20
|
+
React.createElement(Viewer, { glbSrc: glb })),
|
|
21
|
+
React.createElement("div", { className: "text bottom" }, t('fallback.viewer.bottomText')),
|
|
22
|
+
React.createElement("div", { className: "watermark" },
|
|
23
|
+
React.createElement(WaterMark, { position: "centerAbsolute" })))));
|
|
24
|
+
};
|
|
25
|
+
export default ModalViewer;
|
|
26
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/Modal/Viewer/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;AACzC,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAA;AAC9C,OAAO,MAAM,MAAM,aAAa,CAAA;AAEhC,OAAO,EAAE,OAAO,EAAE,MAAM,UAAU,CAAA;AAElC,OAAO,SAAS,MAAM,uBAAuB,CAAA;AAC7C,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA;AAC3C,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAA;AACzC,OAAO,MAAM,MAAM,WAAW,CAAA;AAM9B,MAAM,WAAW,GAAoB,CAAC,EAAE,GAAG,EAAS,EAAE,EAAE;IACtD,MAAM,EAAE,UAAU,EAAE,GAAG,UAAU,CAAC,YAAY,CAAC,CAAA;IAC/C,MAAM,EAAE,CAAC,EAAE,GAAG,cAAc,EAAE,CAAA;IAE9B,OAAO,CACL,oBAAC,MAAM;QACL,oBAAC,OAAO;YACN,oBAAC,WAAW,IACV,KAAK,EAAE,EAAE,EACT,MAAM,EAAE,EAAE,EACV,KAAK,EAAC,SAAS,EACf,MAAM,EAAC,SAAS,EAChB,SAAS,EAAC,MAAM,EAChB,OAAO,EAAE,GAAS,EAAE;oBAClB,UAAU,EAAE,CAAA;gBACd,CAAC,GACD;YACF,6BAAK,SAAS,EAAC,YAAY,IAAE,CAAC,CAAC,uBAAuB,CAAC,CAAO;YAC9D,6BAAK,SAAS,EAAC,UAAU,IAAE,CAAC,CAAC,yBAAyB,CAAC,CAAO;YAC9D,6BAAK,SAAS,EAAC,2BAA2B;gBACxC,oBAAC,MAAM,IAAC,MAAM,EAAE,GAAG,GAAI,CACnB;YACN,6BAAK,SAAS,EAAC,aAAa,IAAE,CAAC,CAAC,4BAA4B,CAAC,CAAO;YACpE,6BAAK,SAAS,EAAC,WAAW;gBACxB,oBAAC,SAAS,IAAC,QAAQ,EAAC,gBAAgB,GAAG,CACnC,CACE,CACH,CACV,CAAA;AACH,CAAC,CAAA;AAED,eAAe,WAAW,CAAA"}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import styled from 'styled-components';
|
|
2
|
+
export const Content = styled.div `
|
|
3
|
+
.text {
|
|
4
|
+
margin: auto;
|
|
5
|
+
padding: 10px;
|
|
6
|
+
font-family: proxima-nova, sans-serif;
|
|
7
|
+
font-size: 16px;
|
|
8
|
+
font-weight: 300;
|
|
9
|
+
font-stretch: normal;
|
|
10
|
+
font-style: normal;
|
|
11
|
+
line-height: 1.25;
|
|
12
|
+
letter-spacing: normal;
|
|
13
|
+
text-align: center;
|
|
14
|
+
color: #222222;
|
|
15
|
+
b {
|
|
16
|
+
font-weight: bold;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.error {
|
|
21
|
+
margin-top: 100px;
|
|
22
|
+
font-size: 24px;
|
|
23
|
+
font-weight: bold;
|
|
24
|
+
line-height: 1.21;
|
|
25
|
+
color: #d45b5b;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.top {
|
|
29
|
+
width: 250px;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.bottom {
|
|
33
|
+
width: 250px;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.fallback-viewer-container {
|
|
37
|
+
width: 324px;
|
|
38
|
+
height: 324px;
|
|
39
|
+
margin: auto;
|
|
40
|
+
margin-top: 10px;
|
|
41
|
+
margin-bottom: 10px;
|
|
42
|
+
background-image: linear-gradient(to bottom, #e9eaeb, #e4e5e7);
|
|
43
|
+
|
|
44
|
+
model-viewer {
|
|
45
|
+
width: 100%;
|
|
46
|
+
height: 100%;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.watermark {
|
|
51
|
+
margin-top: 40px;
|
|
52
|
+
margin-bottom: 20px;
|
|
53
|
+
padding-bottom: 22px;
|
|
54
|
+
}
|
|
55
|
+
`;
|
|
56
|
+
//# sourceMappingURL=styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"styles.js","sourceRoot":"","sources":["../../../../src/components/Modal/Viewer/styles.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,mBAAmB,CAAA;AAEtC,MAAM,CAAC,MAAM,OAAO,GAAG,MAAM,CAAC,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAqDhC,CAAA"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import React, { useContext } from 'react';
|
|
2
|
+
import { ViewerDiv } from './styles';
|
|
3
|
+
import Viewer from '@r2u/viewer';
|
|
4
|
+
import Canvas from '../Canvas';
|
|
5
|
+
import { FiArrowLeft } from '../../../assets/icons';
|
|
6
|
+
import { ModalContext } from '../Context';
|
|
7
|
+
const ModalViewerFull = ({ glb }) => {
|
|
8
|
+
const { closeModal } = useContext(ModalContext);
|
|
9
|
+
return (React.createElement(Canvas, null,
|
|
10
|
+
React.createElement(FiArrowLeft, { width: 30, height: 30, color: "#707070", cursor: "pointer", className: "exit", onClick: closeModal }),
|
|
11
|
+
React.createElement(ViewerDiv, null,
|
|
12
|
+
React.createElement(Viewer, { glbSrc: glb }))));
|
|
13
|
+
};
|
|
14
|
+
export default ModalViewerFull;
|
|
15
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/Modal/ViewerFull/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;AAEzC,OAAO,EAAE,SAAS,EAAE,MAAM,UAAU,CAAA;AAEpC,OAAO,MAAM,MAAM,aAAa,CAAA;AAChC,OAAO,MAAM,MAAM,WAAW,CAAA;AAC9B,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA;AAC3C,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAA;AAMzC,MAAM,eAAe,GAAoB,CAAC,EAAE,GAAG,EAAS,EAAE,EAAE;IAC1D,MAAM,EAAE,UAAU,EAAE,GAAG,UAAU,CAAC,YAAY,CAAC,CAAA;IAE/C,OAAO,CACL,oBAAC,MAAM;QACL,oBAAC,WAAW,IACV,KAAK,EAAE,EAAE,EACT,MAAM,EAAE,EAAE,EACV,KAAK,EAAC,SAAS,EACf,MAAM,EAAC,SAAS,EAChB,SAAS,EAAC,MAAM,EAChB,OAAO,EAAE,UAAU,GACnB;QACF,oBAAC,SAAS;YACR,oBAAC,MAAM,IAAC,MAAM,EAAE,GAAG,GAAI,CACb,CACL,CACV,CAAA;AACH,CAAC,CAAA;AAED,eAAe,eAAe,CAAA"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import styled from 'styled-components';
|
|
2
|
+
export const ViewerDiv = styled.div `
|
|
3
|
+
width: 100%;
|
|
4
|
+
height: 100%;
|
|
5
|
+
background-image: linear-gradient(to bottom, #e9eaeb, #e4e5e7);
|
|
6
|
+
|
|
7
|
+
model-viewer {
|
|
8
|
+
width: 100%;
|
|
9
|
+
height: 100%;
|
|
10
|
+
}
|
|
11
|
+
`;
|
|
12
|
+
//# sourceMappingURL=styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"styles.js","sourceRoot":"","sources":["../../../../src/components/Modal/ViewerFull/styles.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,mBAAmB,CAAA;AAEtC,MAAM,CAAC,MAAM,SAAS,GAAG,MAAM,CAAC,GAAG,CAAA;;;;;;;;;CASlC,CAAA"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Bar, Progress } from './styles';
|
|
3
|
+
const ProgressBar = (props) => {
|
|
4
|
+
const { progressBarColor, progressBarPosition, showProgress, scaleBar } = props;
|
|
5
|
+
return (React.createElement(Progress, { show: showProgress, color: progressBarColor, position: progressBarPosition, slot: "progress-bar" },
|
|
6
|
+
React.createElement(Bar, { scale: scaleBar })));
|
|
7
|
+
};
|
|
8
|
+
export default ProgressBar;
|
|
9
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/R2UModelViewer/ProgressBar/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,EAAE,GAAG,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAA;AAGxC,MAAM,WAAW,GAAoB,CAAC,KAAY,EAAE,EAAE;IACpD,MAAM,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,YAAY,EAAE,QAAQ,EAAE,GACrE,KAAK,CAAA;IAEP,OAAO,CACL,oBAAC,QAAQ,IACP,IAAI,EAAE,YAAY,EAClB,KAAK,EAAE,gBAAgB,EACvB,QAAQ,EAAE,mBAAmB,EAC7B,IAAI,EAAC,cAAc;QAEnB,oBAAC,GAAG,IAAC,KAAK,EAAE,QAAQ,GAAI,CACf,CACZ,CAAA;AACH,CAAC,CAAA;AAED,eAAe,WAAW,CAAA"}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
/* eslint-disable @typescript-eslint/explicit-function-return-type */
|
|
2
|
+
import styled, { css } from 'styled-components';
|
|
3
|
+
export const Progress = styled.div `
|
|
4
|
+
position: absolute;
|
|
5
|
+
width: 100%;
|
|
6
|
+
height: 6px;
|
|
7
|
+
color: #d3d3d3c7;
|
|
8
|
+
box-shadow: 0px 0px 2px 1px currentColor;
|
|
9
|
+
border-radius: 10px;
|
|
10
|
+
opacity: 0;
|
|
11
|
+
transition: opacity 0.3s 0.3s;
|
|
12
|
+
${({ color }) => color &&
|
|
13
|
+
css `
|
|
14
|
+
color: ${color};
|
|
15
|
+
`};
|
|
16
|
+
|
|
17
|
+
${({ position }) => position &&
|
|
18
|
+
((position === 'top' &&
|
|
19
|
+
css `
|
|
20
|
+
width: 100%;
|
|
21
|
+
box-shadow: none;
|
|
22
|
+
top: 0 !important;
|
|
23
|
+
border-radius: 0;
|
|
24
|
+
border: none;
|
|
25
|
+
`) ||
|
|
26
|
+
(position === 'middle' &&
|
|
27
|
+
css `
|
|
28
|
+
width: calc(100% / 3);
|
|
29
|
+
top: calc(50% - 5px);
|
|
30
|
+
left: calc(50% - 100% / 6);
|
|
31
|
+
`) ||
|
|
32
|
+
(position === 'bottom' &&
|
|
33
|
+
css `
|
|
34
|
+
width: 100%;
|
|
35
|
+
box-shadow: none;
|
|
36
|
+
bottom: 0 !important;
|
|
37
|
+
border-radius: 0;
|
|
38
|
+
border: none;
|
|
39
|
+
`))};
|
|
40
|
+
|
|
41
|
+
${({ show }) => show &&
|
|
42
|
+
css `
|
|
43
|
+
transition-delay: 0s;
|
|
44
|
+
opacity: 1;
|
|
45
|
+
`}
|
|
46
|
+
`;
|
|
47
|
+
export const Bar = styled.div `
|
|
48
|
+
width: 100%;
|
|
49
|
+
height: 100%;
|
|
50
|
+
background-color: currentColor;
|
|
51
|
+
transform-origin: top left;
|
|
52
|
+
transform: scaleX(${({ scale }) => scale});
|
|
53
|
+
`;
|
|
54
|
+
//# sourceMappingURL=styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"styles.js","sourceRoot":"","sources":["../../../../src/components/R2UModelViewer/ProgressBar/styles.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,OAAO,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAA;AAY/C,MAAM,CAAC,MAAM,QAAQ,GAAG,MAAM,CAAC,GAAG,CAAe;;;;;;;;;IAS7C,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,CACd,KAAK;IACL,GAAG,CAAA;eACQ,KAAK;KACf;;IAED,CAAC,EAAE,QAAQ,EAAE,EAAE,EAAE,CACjB,QAAQ;IACR,CAAC,CAAC,QAAQ,KAAK,KAAK;QAClB,GAAG,CAAA;;;;;;OAMF,CAAC;QACF,CAAC,QAAQ,KAAK,QAAQ;YACpB,GAAG,CAAA;;;;SAIF,CAAC;QACJ,CAAC,QAAQ,KAAK,QAAQ;YACpB,GAAG,CAAA;;;;;;SAMF,CAAC,CAAC;;IAEP,CAAC,EAAE,IAAI,EAAE,EAAE,EAAE,CACb,IAAI;IACJ,GAAG,CAAA;;;KAGF;CACJ,CAAA;AACD,MAAM,CAAC,MAAM,GAAG,GAAG,MAAM,CAAC,GAAG,CAAU;;;;;sBAKjB,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,KAAK;CACzC,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/components/R2UModelViewer/ProgressBar/types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
2
|
+
var t = {};
|
|
3
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
4
|
+
t[p] = s[p];
|
|
5
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
6
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
7
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
8
|
+
t[p[i]] = s[p[i]];
|
|
9
|
+
}
|
|
10
|
+
return t;
|
|
11
|
+
};
|
|
12
|
+
import React, { useEffect, useState, useRef, useImperativeHandle, forwardRef, } from 'react';
|
|
13
|
+
import WaterMark from '../WaterMark';
|
|
14
|
+
import { LightOff, LightOn } from '../../assets/icons';
|
|
15
|
+
import { Content } from './styles';
|
|
16
|
+
const R2UModelViewer = forwardRef((props, ref) => {
|
|
17
|
+
const { exitImgSrc = 'https://sdk.r2u.io/assets/exit-icon.png', expandImgSrc = 'https://sdk.r2u.io/assets/expand-icon.png', popup = true, children = null, waterMarkPosition, refViewerPopup, ModelViewerElement, refViewerFunctions } = props, viewerProps = __rest(props, ["exitImgSrc", "expandImgSrc", "popup", "children", "waterMarkPosition", "refViewerPopup", "ModelViewerElement", "refViewerFunctions"]);
|
|
18
|
+
const [expanded, setExpanded] = useState(false);
|
|
19
|
+
const expand = () => {
|
|
20
|
+
setExpanded(true);
|
|
21
|
+
};
|
|
22
|
+
const close = () => {
|
|
23
|
+
setExpanded(false);
|
|
24
|
+
};
|
|
25
|
+
useEffect(() => {
|
|
26
|
+
if (refViewerPopup && refViewerPopup.current) {
|
|
27
|
+
refViewerPopup.current.addEventListener('mousedown', ((event) => {
|
|
28
|
+
event.preventDefault();
|
|
29
|
+
event.stopPropagation();
|
|
30
|
+
event.stopImmediatePropagation();
|
|
31
|
+
return false;
|
|
32
|
+
}));
|
|
33
|
+
}
|
|
34
|
+
}, [refViewerPopup]);
|
|
35
|
+
const bloomRef = useRef(null);
|
|
36
|
+
const [bloomIsOn, setBloomIsOn] = useState(false);
|
|
37
|
+
const [glb, setGlb] = useState(viewerProps.glbSrc);
|
|
38
|
+
useImperativeHandle(ref, () => ({
|
|
39
|
+
updateGlb: (newGlb) => {
|
|
40
|
+
setGlb(newGlb);
|
|
41
|
+
},
|
|
42
|
+
}), []);
|
|
43
|
+
return (React.createElement(Content, { expanded: expanded, bloom: bloomIsOn },
|
|
44
|
+
React.createElement("div", { className: "viewer-container" }, glb && (React.createElement(ModelViewerElement, Object.assign({ ref: refViewerFunctions, componentDidMount: viewerProps.componentDidMount, onClick: viewerProps.onClick, onSessionTimeCollect: viewerProps.onSessionTimeCollect }, viewerProps, { glbSrc: glb }),
|
|
45
|
+
children,
|
|
46
|
+
popup && (React.createElement("button", { className: "expand-button", type: "button", onClick: expand },
|
|
47
|
+
React.createElement("img", { className: "expand-image", alt: "", src: expandImgSrc }))),
|
|
48
|
+
waterMarkPosition && React.createElement(WaterMark, { position: waterMarkPosition })))),
|
|
49
|
+
popup && expanded && (React.createElement("div", { className: "background", onMouseDown: close },
|
|
50
|
+
React.createElement("div", { className: "viewer-container popup" }, glb && (React.createElement(ModelViewerElement, Object.assign({ ref: bloomRef, componentDidMount: viewerProps.componentDidMount, onClick: viewerProps.onClick, onSessionTimeCollect: viewerProps.onSessionTimeCollect }, viewerProps, { enableBloomButton: false, glbSrc: glb }),
|
|
51
|
+
children,
|
|
52
|
+
viewerProps.bloom && (React.createElement("button", { className: "bloomButton", type: "button", onMouseDown: (e) => e.stopPropagation(), onClick: () => {
|
|
53
|
+
setBloomIsOn(!bloomIsOn);
|
|
54
|
+
if (bloomRef.current)
|
|
55
|
+
bloomRef.current.updateBloom(!bloomIsOn);
|
|
56
|
+
} }, bloomIsOn ? (React.createElement(LightOn, { className: "lamp" })) : (React.createElement(LightOff, { className: "lamp" })))),
|
|
57
|
+
React.createElement("button", { className: "exit-button", type: "button", onClick: close },
|
|
58
|
+
React.createElement("img", { alt: "", src: exitImgSrc })),
|
|
59
|
+
waterMarkPosition && (React.createElement(WaterMark, { position: waterMarkPosition })))))))));
|
|
60
|
+
});
|
|
61
|
+
R2UModelViewer.displayName = 'R2UModelViewer';
|
|
62
|
+
export default R2UModelViewer;
|
|
63
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/R2UModelViewer/index.tsx"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
/* eslint-disable @typescript-eslint/explicit-function-return-type */
|
|
2
|
+
import styled, { css } from 'styled-components';
|
|
3
|
+
export const Content = styled.div `
|
|
4
|
+
width: 100%;
|
|
5
|
+
height: 100%;
|
|
6
|
+
|
|
7
|
+
--r2u-viewer-background-color: transparent;
|
|
8
|
+
--r2u-viewer-box-shadow: 0px 2px 12px #f2f2f2;
|
|
9
|
+
|
|
10
|
+
.viewer-container {
|
|
11
|
+
width: 100%;
|
|
12
|
+
height: 100%;
|
|
13
|
+
|
|
14
|
+
background-color: var(--r2u-viewer-background-color);
|
|
15
|
+
/* box-shadow: var(--r2u-viewer-box-shadow); */
|
|
16
|
+
|
|
17
|
+
& > div {
|
|
18
|
+
opacity: 1 !important;
|
|
19
|
+
width: 100%;
|
|
20
|
+
height: 100%;
|
|
21
|
+
|
|
22
|
+
.expand-button {
|
|
23
|
+
padding: 12px;
|
|
24
|
+
position: absolute;
|
|
25
|
+
bottom: 5px;
|
|
26
|
+
right: 5px;
|
|
27
|
+
width: 24px;
|
|
28
|
+
z-index: 999999;
|
|
29
|
+
cursor: pointer;
|
|
30
|
+
background: none !important;
|
|
31
|
+
border: none !important;
|
|
32
|
+
outline: none;
|
|
33
|
+
transition: opacity 2s;
|
|
34
|
+
img {
|
|
35
|
+
transition: 0.5s ease;
|
|
36
|
+
width: 24px;
|
|
37
|
+
height: 24px;
|
|
38
|
+
backface-visibility: hidden;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.expand-image {
|
|
43
|
+
position: absolute;
|
|
44
|
+
right: 0px;
|
|
45
|
+
bottom: 0px;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.bloomButton {
|
|
49
|
+
padding: 8px;
|
|
50
|
+
position: absolute;
|
|
51
|
+
left: 16px;
|
|
52
|
+
right: auto !important;
|
|
53
|
+
top: 4px;
|
|
54
|
+
z-index: 9999999;
|
|
55
|
+
background: #f9f9f9;
|
|
56
|
+
${({ bloom }) => bloom
|
|
57
|
+
? css `
|
|
58
|
+
box-shadow: inset -2px -2px 4px #ffffff,
|
|
59
|
+
inset 2px 2px 4px rgba(86, 86, 86, 0.25);
|
|
60
|
+
`
|
|
61
|
+
: css `
|
|
62
|
+
box-shadow: -2px -2px 4px #ffffff,
|
|
63
|
+
2px 2px 4px rgba(86, 86, 86, 0.25);
|
|
64
|
+
`}
|
|
65
|
+
border-radius: 20px;
|
|
66
|
+
margin: 0px 10px;
|
|
67
|
+
outline: none;
|
|
68
|
+
border: none;
|
|
69
|
+
cursor: pointer;
|
|
70
|
+
|
|
71
|
+
:hover {
|
|
72
|
+
box-shadow: inset -2px -2px 4px #ffffff,
|
|
73
|
+
inset 2px 2px 4px rgba(86, 86, 86, 0.25);
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
.lamp {
|
|
77
|
+
width: 30px;
|
|
78
|
+
height: 30px;
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
.exit-button {
|
|
83
|
+
width: 26px;
|
|
84
|
+
height: auto;
|
|
85
|
+
position: absolute;
|
|
86
|
+
top: 0;
|
|
87
|
+
right: 0;
|
|
88
|
+
z-index: 99;
|
|
89
|
+
margin: 12px;
|
|
90
|
+
padding: 3px;
|
|
91
|
+
|
|
92
|
+
cursor: pointer;
|
|
93
|
+
background: none !important;
|
|
94
|
+
border: none !important;
|
|
95
|
+
outline: none;
|
|
96
|
+
img {
|
|
97
|
+
width: 100%;
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
canvas {
|
|
103
|
+
min-height: 220px;
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
.background {
|
|
108
|
+
position: fixed;
|
|
109
|
+
top: 0;
|
|
110
|
+
left: 0;
|
|
111
|
+
right: 0;
|
|
112
|
+
bottom: 0;
|
|
113
|
+
z-index: 9999999;
|
|
114
|
+
background-color: rgba(0, 0, 0, 0.4);
|
|
115
|
+
|
|
116
|
+
display: ${({ expanded }) => (expanded ? 'flex' : 'none')};
|
|
117
|
+
justify-content: center;
|
|
118
|
+
align-items: center;
|
|
119
|
+
|
|
120
|
+
.popup {
|
|
121
|
+
background-color: #fff;
|
|
122
|
+
width: 60vw;
|
|
123
|
+
height: 60vh;
|
|
124
|
+
box-shadow: none;
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
`;
|
|
128
|
+
//# sourceMappingURL=styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"styles.js","sourceRoot":"","sources":["../../../src/components/R2UModelViewer/styles.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,OAAO,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAA;AAO/C,MAAM,CAAC,MAAM,OAAO,GAAG,MAAM,CAAC,GAAG,CAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;UAqD9B,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,CACd,KAAK;IACH,CAAC,CAAC,GAAG,CAAA;;;eAGF;IACH,CAAC,CAAC,GAAG,CAAA;;;eAGF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;eAoDA,CAAC,EAAE,QAAQ,EAAE,EAAE,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC;;;;;;;;;;;CAW5D,CAAA"}
|