@wise/art 2.7.0 → 2.8.1-beta.1

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.
Files changed (119) hide show
  1. package/README.md +47 -0
  2. package/dist/CheckMark-6516e382.js +39 -0
  3. package/dist/CheckMark-6516e382.js.map +1 -0
  4. package/dist/CheckMark-7e2e6863.esm.js +37 -0
  5. package/dist/CheckMark-7e2e6863.esm.js.map +1 -0
  6. package/dist/Confetti-71f18588.js +36 -0
  7. package/dist/Confetti-71f18588.js.map +1 -0
  8. package/dist/Confetti-f1f0c4a5.esm.js +34 -0
  9. package/dist/Confetti-f1f0c4a5.esm.js.map +1 -0
  10. package/dist/Flower-2325e8ba.js +29 -0
  11. package/dist/Flower-2325e8ba.js.map +1 -0
  12. package/dist/Flower-8a17d7a6.esm.js +27 -0
  13. package/dist/Flower-8a17d7a6.esm.js.map +1 -0
  14. package/dist/Globe-601b1eb5.esm.js +43 -0
  15. package/dist/Globe-601b1eb5.esm.js.map +1 -0
  16. package/dist/Globe-93237bd2.js +45 -0
  17. package/dist/Globe-93237bd2.js.map +1 -0
  18. package/dist/Graph-536a6847.js +33 -0
  19. package/dist/Graph-536a6847.js.map +1 -0
  20. package/dist/Graph-e766a791.esm.js +31 -0
  21. package/dist/Graph-e766a791.esm.js.map +1 -0
  22. package/dist/Illustration.css +19 -0
  23. package/dist/Jars-9afb6e8b.esm.js +50 -0
  24. package/dist/Jars-9afb6e8b.esm.js.map +1 -0
  25. package/dist/Jars-fcb1e2b1.js +52 -0
  26. package/dist/Jars-fcb1e2b1.js.map +1 -0
  27. package/dist/Lock-2365c3f9.esm.js +41 -0
  28. package/dist/Lock-2365c3f9.esm.js.map +1 -0
  29. package/dist/Lock-e5c89aa2.js +43 -0
  30. package/dist/Lock-e5c89aa2.js.map +1 -0
  31. package/dist/MagnifyingGlass-92351fd6.js +32 -0
  32. package/dist/MagnifyingGlass-92351fd6.js.map +1 -0
  33. package/dist/MagnifyingGlass-92fbedda.esm.js +30 -0
  34. package/dist/MagnifyingGlass-92fbedda.esm.js.map +1 -0
  35. package/dist/Marble-0f2d6f38.js +44 -0
  36. package/dist/Marble-0f2d6f38.js.map +1 -0
  37. package/dist/Marble-91d300a3.esm.js +42 -0
  38. package/dist/Marble-91d300a3.esm.js.map +1 -0
  39. package/dist/MarbleCard-690b2b8e.esm.js +45 -0
  40. package/dist/MarbleCard-690b2b8e.esm.js.map +1 -0
  41. package/dist/MarbleCard-ed7536dc.js +47 -0
  42. package/dist/MarbleCard-ed7536dc.js.map +1 -0
  43. package/dist/MultiCurrency-0456db19.js +63 -0
  44. package/dist/MultiCurrency-0456db19.js.map +1 -0
  45. package/dist/MultiCurrency-1b491db5.esm.js +61 -0
  46. package/dist/MultiCurrency-1b491db5.esm.js.map +1 -0
  47. package/dist/Plane-b6340ff4.js +39 -0
  48. package/dist/Plane-b6340ff4.js.map +1 -0
  49. package/dist/Plane-d631e81c.esm.js +37 -0
  50. package/dist/Plane-d631e81c.esm.js.map +1 -0
  51. package/dist/Scene-45fbe252.js +48 -0
  52. package/dist/Scene-45fbe252.js.map +1 -0
  53. package/dist/Scene-783029f4.esm.js +46 -0
  54. package/dist/Scene-783029f4.esm.js.map +1 -0
  55. package/dist/common.d.ts +5 -0
  56. package/dist/common.d.ts.map +1 -1
  57. package/dist/illustrations3d/Illustration3D.d.ts +11 -0
  58. package/dist/illustrations3d/Illustration3D.d.ts.map +1 -0
  59. package/dist/illustrations3d/Scene.d.ts +10 -0
  60. package/dist/illustrations3d/Scene.d.ts.map +1 -0
  61. package/dist/illustrations3d/index.d.ts +5 -0
  62. package/dist/illustrations3d/index.d.ts.map +1 -0
  63. package/dist/illustrations3d/models/CheckMark.d.ts +4 -0
  64. package/dist/illustrations3d/models/CheckMark.d.ts.map +1 -0
  65. package/dist/illustrations3d/models/Confetti.d.ts +4 -0
  66. package/dist/illustrations3d/models/Confetti.d.ts.map +1 -0
  67. package/dist/illustrations3d/models/Flower.d.ts +4 -0
  68. package/dist/illustrations3d/models/Flower.d.ts.map +1 -0
  69. package/dist/illustrations3d/models/Globe.d.ts +4 -0
  70. package/dist/illustrations3d/models/Globe.d.ts.map +1 -0
  71. package/dist/illustrations3d/models/Graph.d.ts +4 -0
  72. package/dist/illustrations3d/models/Graph.d.ts.map +1 -0
  73. package/dist/illustrations3d/models/Jars.d.ts +4 -0
  74. package/dist/illustrations3d/models/Jars.d.ts.map +1 -0
  75. package/dist/illustrations3d/models/Lock.d.ts +4 -0
  76. package/dist/illustrations3d/models/Lock.d.ts.map +1 -0
  77. package/dist/illustrations3d/models/MagnifyingGlass.d.ts +4 -0
  78. package/dist/illustrations3d/models/MagnifyingGlass.d.ts.map +1 -0
  79. package/dist/illustrations3d/models/Marble.d.ts +4 -0
  80. package/dist/illustrations3d/models/Marble.d.ts.map +1 -0
  81. package/dist/illustrations3d/models/MarbleCard.d.ts +4 -0
  82. package/dist/illustrations3d/models/MarbleCard.d.ts.map +1 -0
  83. package/dist/illustrations3d/models/MultiCurrency.d.ts +4 -0
  84. package/dist/illustrations3d/models/MultiCurrency.d.ts.map +1 -0
  85. package/dist/illustrations3d/models/Plane.d.ts +4 -0
  86. package/dist/illustrations3d/models/Plane.d.ts.map +1 -0
  87. package/dist/illustrations3d/utils.d.ts +9 -0
  88. package/dist/illustrations3d/utils.d.ts.map +1 -0
  89. package/dist/index-3b6277fc.esm.js +325 -0
  90. package/dist/index-3b6277fc.esm.js.map +1 -0
  91. package/dist/index-c17944c0.js +332 -0
  92. package/dist/index-c17944c0.js.map +1 -0
  93. package/dist/index.d.ts +3 -0
  94. package/dist/index.d.ts.map +1 -1
  95. package/dist/index.esm.js +4 -158
  96. package/dist/index.esm.js.map +1 -1
  97. package/dist/index.js +15 -155
  98. package/dist/index.js.map +1 -1
  99. package/package.json +11 -5
  100. package/src/common.ts +6 -0
  101. package/src/illustrations/Illustration.css +19 -0
  102. package/src/illustrations3d/Illustration3D.stories.tsx +88 -0
  103. package/src/illustrations3d/Illustration3D.tsx +133 -0
  104. package/src/illustrations3d/Scene.tsx +54 -0
  105. package/src/illustrations3d/index.ts +6 -0
  106. package/src/illustrations3d/models/CheckMark.tsx +30 -0
  107. package/src/illustrations3d/models/Confetti.tsx +29 -0
  108. package/src/illustrations3d/models/Flower.tsx +24 -0
  109. package/src/illustrations3d/models/Globe.tsx +41 -0
  110. package/src/illustrations3d/models/Graph.tsx +26 -0
  111. package/src/illustrations3d/models/Jars.tsx +47 -0
  112. package/src/illustrations3d/models/Lock.tsx +38 -0
  113. package/src/illustrations3d/models/MagnifyingGlass.tsx +30 -0
  114. package/src/illustrations3d/models/Marble.tsx +47 -0
  115. package/src/illustrations3d/models/MarbleCard.tsx +50 -0
  116. package/src/illustrations3d/models/MultiCurrency.tsx +58 -0
  117. package/src/illustrations3d/models/Plane.tsx +33 -0
  118. package/src/illustrations3d/utils.ts +68 -0
  119. package/src/index.ts +5 -0
package/README.md CHANGED
@@ -76,6 +76,53 @@ in Angular HTML template file
76
76
  </wise-illustration>
77
77
  ```
78
78
 
79
+ ## 3D Illustrations
80
+
81
+ 3D illustrations work via `Illustration3D` React component. The component uses [three.js](https://threejs.org) framework to preview 3D models.
82
+
83
+ ### Usage
84
+
85
+ ```js
86
+ import { Illustration3D, Assets, Sizes } from '@wise/art';
87
+
88
+ <Illustration3D name={Assets.LOCK} size={Sizes.LARGE} />
89
+ ```
90
+
91
+ Note: this API requires React 18.
92
+
93
+ Note: if your tests fail because of `matchMedia` and `ResizeObserver` being undefined you need add polyfills or mocks for Jest's jsdom env.
94
+
95
+ <details>
96
+ <summary>Mocks</summary>
97
+
98
+ ```js
99
+ // in jest.setup.js
100
+
101
+ // mock matchMedia because it's not implemented in jsdoc lib
102
+ // https://jestjs.io/docs/manual-mocks#mocking-methods-which-are-not-implemented-in-jsdom
103
+ Object.defineProperty(window, 'matchMedia', {
104
+ writable: true,
105
+ value: jest.fn().mockImplementation((query) => ({
106
+ matches: false,
107
+ media: query,
108
+ onchange: null,
109
+ addEventListener: jest.fn(),
110
+ removeEventListener: jest.fn(),
111
+ dispatchEvent: jest.fn(),
112
+ })),
113
+ });
114
+
115
+ // mock ResizeObserver because it's not implemented in jsdoc lib
116
+ // https://github.com/jsdom/jsdom/issues/3368
117
+ window.ResizeObserver = class ResizeObserver {
118
+ observe = jest.fn();
119
+ unobserve = jest.fn();
120
+ disconnect = jest.fn();
121
+ };
122
+ ```
123
+
124
+ </details>
125
+
79
126
  ## Flags
80
127
 
81
128
  Flags generated from [wise-atoms SVGs](https://github.com/transferwise/wise-atoms/tree/main/flags) are accessible by either of these:
@@ -0,0 +1,39 @@
1
+ 'use strict';
2
+
3
+ var drei = require('@react-three/drei');
4
+ var fiber = require('@react-three/fiber');
5
+ var react = require('react');
6
+ var three = require('three');
7
+ var index = require('./index-c17944c0.js');
8
+ var jsxRuntime = require('react/jsx-runtime');
9
+ require('clsx');
10
+
11
+ const CheckMark = () => {
12
+ const modelRef = react.useRef();
13
+ const model = drei.useGLTF(index.defineSrc('check-mark.gltf'));
14
+ const {
15
+ animations,
16
+ scene
17
+ } = model;
18
+ const lights = fiber.useLoader(three.ObjectLoader, index.defineSrc('check-mark-light.json'));
19
+ const {
20
+ mixer,
21
+ clips
22
+ } = drei.useAnimations(animations, modelRef);
23
+ fiber.useFrame(() => {
24
+ model.materials['Standard'].map.offset.x += -0.0025;
25
+ mixer.clipAction(clips[0]).play().setLoop(three.LoopOnce, 1);
26
+ });
27
+ return /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
28
+ children: [/*#__PURE__*/jsxRuntime.jsx("primitive", {
29
+ ref: modelRef,
30
+ scale: 1.4,
31
+ object: scene
32
+ }), /*#__PURE__*/jsxRuntime.jsx("primitive", {
33
+ object: lights
34
+ })]
35
+ });
36
+ };
37
+
38
+ exports.default = CheckMark;
39
+ //# sourceMappingURL=CheckMark-6516e382.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CheckMark-6516e382.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -0,0 +1,37 @@
1
+ import { useGLTF, useAnimations } from '@react-three/drei';
2
+ import { useLoader, useFrame } from '@react-three/fiber';
3
+ import { useRef } from 'react';
4
+ import { ObjectLoader, LoopOnce } from 'three';
5
+ import { d as defineSrc } from './index-3b6277fc.esm.js';
6
+ import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
7
+ import 'clsx';
8
+
9
+ const CheckMark = () => {
10
+ const modelRef = useRef();
11
+ const model = useGLTF(defineSrc('check-mark.gltf'));
12
+ const {
13
+ animations,
14
+ scene
15
+ } = model;
16
+ const lights = useLoader(ObjectLoader, defineSrc('check-mark-light.json'));
17
+ const {
18
+ mixer,
19
+ clips
20
+ } = useAnimations(animations, modelRef);
21
+ useFrame(() => {
22
+ model.materials['Standard'].map.offset.x += -0.0025;
23
+ mixer.clipAction(clips[0]).play().setLoop(LoopOnce, 1);
24
+ });
25
+ return /*#__PURE__*/jsxs(Fragment, {
26
+ children: [/*#__PURE__*/jsx("primitive", {
27
+ ref: modelRef,
28
+ scale: 1.4,
29
+ object: scene
30
+ }), /*#__PURE__*/jsx("primitive", {
31
+ object: lights
32
+ })]
33
+ });
34
+ };
35
+
36
+ export { CheckMark as default };
37
+ //# sourceMappingURL=CheckMark-7e2e6863.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CheckMark-7e2e6863.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -0,0 +1,36 @@
1
+ 'use strict';
2
+
3
+ var drei = require('@react-three/drei');
4
+ var fiber = require('@react-three/fiber');
5
+ var react = require('react');
6
+ var three = require('three');
7
+ var index = require('./index-c17944c0.js');
8
+ var jsxRuntime = require('react/jsx-runtime');
9
+ require('clsx');
10
+
11
+ const Confetti = () => {
12
+ const ref = react.useRef();
13
+ const model = drei.useGLTF(index.defineSrc('confetti.gltf'));
14
+ const lights = fiber.useLoader(three.ObjectLoader, index.defineSrc('confetti-light.json'));
15
+ const {
16
+ mixer,
17
+ clips
18
+ } = drei.useAnimations(model.animations, ref);
19
+ fiber.useFrame(() => {
20
+ model.materials['Tapestry WebGL'].map.offset.x += -0.0015;
21
+ mixer.clipAction(clips[0]).play().setLoop(three.LoopOnce, 1);
22
+ });
23
+ return /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
24
+ children: [/*#__PURE__*/jsxRuntime.jsx("primitive", {
25
+ ref: ref,
26
+ scale: 1.5,
27
+ position: [0, 1.5, 0],
28
+ object: model.scene
29
+ }), /*#__PURE__*/jsxRuntime.jsx("primitive", {
30
+ object: lights
31
+ })]
32
+ });
33
+ };
34
+
35
+ exports.default = Confetti;
36
+ //# sourceMappingURL=Confetti-71f18588.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Confetti-71f18588.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -0,0 +1,34 @@
1
+ import { useGLTF, useAnimations } from '@react-three/drei';
2
+ import { useLoader, useFrame } from '@react-three/fiber';
3
+ import { useRef } from 'react';
4
+ import { ObjectLoader, LoopOnce } from 'three';
5
+ import { d as defineSrc } from './index-3b6277fc.esm.js';
6
+ import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
7
+ import 'clsx';
8
+
9
+ const Confetti = () => {
10
+ const ref = useRef();
11
+ const model = useGLTF(defineSrc('confetti.gltf'));
12
+ const lights = useLoader(ObjectLoader, defineSrc('confetti-light.json'));
13
+ const {
14
+ mixer,
15
+ clips
16
+ } = useAnimations(model.animations, ref);
17
+ useFrame(() => {
18
+ model.materials['Tapestry WebGL'].map.offset.x += -0.0015;
19
+ mixer.clipAction(clips[0]).play().setLoop(LoopOnce, 1);
20
+ });
21
+ return /*#__PURE__*/jsxs(Fragment, {
22
+ children: [/*#__PURE__*/jsx("primitive", {
23
+ ref: ref,
24
+ scale: 1.5,
25
+ position: [0, 1.5, 0],
26
+ object: model.scene
27
+ }), /*#__PURE__*/jsx("primitive", {
28
+ object: lights
29
+ })]
30
+ });
31
+ };
32
+
33
+ export { Confetti as default };
34
+ //# sourceMappingURL=Confetti-f1f0c4a5.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Confetti-f1f0c4a5.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -0,0 +1,29 @@
1
+ 'use strict';
2
+
3
+ var drei = require('@react-three/drei');
4
+ var fiber = require('@react-three/fiber');
5
+ var three = require('three');
6
+ var index = require('./index-c17944c0.js');
7
+ var jsxRuntime = require('react/jsx-runtime');
8
+ require('react');
9
+ require('clsx');
10
+
11
+ const Flower = () => {
12
+ const model = drei.useGLTF(index.defineSrc('flower.gltf'));
13
+ const lights = fiber.useLoader(three.ObjectLoader, index.defineSrc('flower-light.json'));
14
+ fiber.useFrame(() => {
15
+ model.materials['Tapestry WebGL'].map.offset.x += -0.001;
16
+ });
17
+ return /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
18
+ children: [/*#__PURE__*/jsxRuntime.jsx("primitive", {
19
+ scale: 1.3,
20
+ position: [0, -9, 0],
21
+ object: model.scene
22
+ }), /*#__PURE__*/jsxRuntime.jsx("primitive", {
23
+ object: lights
24
+ })]
25
+ });
26
+ };
27
+
28
+ exports.default = Flower;
29
+ //# sourceMappingURL=Flower-2325e8ba.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Flower-2325e8ba.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -0,0 +1,27 @@
1
+ import { useGLTF } from '@react-three/drei';
2
+ import { useLoader, useFrame } from '@react-three/fiber';
3
+ import { ObjectLoader } from 'three';
4
+ import { d as defineSrc } from './index-3b6277fc.esm.js';
5
+ import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
6
+ import 'react';
7
+ import 'clsx';
8
+
9
+ const Flower = () => {
10
+ const model = useGLTF(defineSrc('flower.gltf'));
11
+ const lights = useLoader(ObjectLoader, defineSrc('flower-light.json'));
12
+ useFrame(() => {
13
+ model.materials['Tapestry WebGL'].map.offset.x += -0.001;
14
+ });
15
+ return /*#__PURE__*/jsxs(Fragment, {
16
+ children: [/*#__PURE__*/jsx("primitive", {
17
+ scale: 1.3,
18
+ position: [0, -9, 0],
19
+ object: model.scene
20
+ }), /*#__PURE__*/jsx("primitive", {
21
+ object: lights
22
+ })]
23
+ });
24
+ };
25
+
26
+ export { Flower as default };
27
+ //# sourceMappingURL=Flower-8a17d7a6.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Flower-8a17d7a6.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -0,0 +1,43 @@
1
+ import { useGLTF } from '@react-three/drei';
2
+ import { useLoader, useFrame } from '@react-three/fiber';
3
+ import { ObjectLoader, TextureLoader } from 'three';
4
+ import { d as defineSrc } from './index-3b6277fc.esm.js';
5
+ import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
6
+ import 'react';
7
+ import 'clsx';
8
+
9
+ const Globe = () => {
10
+ const {
11
+ scene
12
+ } = useGLTF(defineSrc('globe.gltf'));
13
+ const lights = useLoader(ObjectLoader, defineSrc('globe-light.json'));
14
+ const wiseLogo = useLoader(TextureLoader, defineSrc('wise-flag-map-bump.jpg'));
15
+ const planet = scene.getObjectByName('Globe');
16
+ const orbit = scene.getObjectByName('Coins_Axis_Rotation_Animate');
17
+ scene.traverse(child => {
18
+ if (child.name.startsWith('Coin_')) {
19
+ const mesh = child;
20
+ const material = mesh.material;
21
+ material.bumpMap = wiseLogo;
22
+ material.bumpMap.flipY = false;
23
+ mesh.castShadow = false;
24
+ mesh.receiveShadow = false;
25
+ }
26
+ });
27
+ useFrame(() => {
28
+ orbit.rotation.y += 0.002;
29
+ planet.material.map.offset.x += -0.0002;
30
+ });
31
+ return /*#__PURE__*/jsxs(Fragment, {
32
+ children: [/*#__PURE__*/jsx("primitive", {
33
+ position: [0, -10, 0],
34
+ scale: 1.3,
35
+ object: scene
36
+ }), /*#__PURE__*/jsx("primitive", {
37
+ object: lights
38
+ })]
39
+ });
40
+ };
41
+
42
+ export { Globe as default };
43
+ //# sourceMappingURL=Globe-601b1eb5.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Globe-601b1eb5.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -0,0 +1,45 @@
1
+ 'use strict';
2
+
3
+ var drei = require('@react-three/drei');
4
+ var fiber = require('@react-three/fiber');
5
+ var three = require('three');
6
+ var index = require('./index-c17944c0.js');
7
+ var jsxRuntime = require('react/jsx-runtime');
8
+ require('react');
9
+ require('clsx');
10
+
11
+ const Globe = () => {
12
+ const {
13
+ scene
14
+ } = drei.useGLTF(index.defineSrc('globe.gltf'));
15
+ const lights = fiber.useLoader(three.ObjectLoader, index.defineSrc('globe-light.json'));
16
+ const wiseLogo = fiber.useLoader(three.TextureLoader, index.defineSrc('wise-flag-map-bump.jpg'));
17
+ const planet = scene.getObjectByName('Globe');
18
+ const orbit = scene.getObjectByName('Coins_Axis_Rotation_Animate');
19
+ scene.traverse(child => {
20
+ if (child.name.startsWith('Coin_')) {
21
+ const mesh = child;
22
+ const material = mesh.material;
23
+ material.bumpMap = wiseLogo;
24
+ material.bumpMap.flipY = false;
25
+ mesh.castShadow = false;
26
+ mesh.receiveShadow = false;
27
+ }
28
+ });
29
+ fiber.useFrame(() => {
30
+ orbit.rotation.y += 0.002;
31
+ planet.material.map.offset.x += -0.0002;
32
+ });
33
+ return /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
34
+ children: [/*#__PURE__*/jsxRuntime.jsx("primitive", {
35
+ position: [0, -10, 0],
36
+ scale: 1.3,
37
+ object: scene
38
+ }), /*#__PURE__*/jsxRuntime.jsx("primitive", {
39
+ object: lights
40
+ })]
41
+ });
42
+ };
43
+
44
+ exports.default = Globe;
45
+ //# sourceMappingURL=Globe-93237bd2.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Globe-93237bd2.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -0,0 +1,33 @@
1
+ 'use strict';
2
+
3
+ var drei = require('@react-three/drei');
4
+ var fiber = require('@react-three/fiber');
5
+ var three = require('three');
6
+ var index = require('./index-c17944c0.js');
7
+ var jsxRuntime = require('react/jsx-runtime');
8
+ require('react');
9
+ require('clsx');
10
+
11
+ const Graph = () => {
12
+ const model = drei.useGLTF(index.defineSrc(`graph.gltf`));
13
+ const lights = fiber.useLoader(three.ObjectLoader, index.defineSrc('graph-light.json'));
14
+ fiber.useFrame(() => {
15
+ const {
16
+ offset
17
+ } = model.materials['Standard '].map;
18
+ offset.x += -0.0015;
19
+ offset.y += 0.0015;
20
+ });
21
+ return /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
22
+ children: [/*#__PURE__*/jsxRuntime.jsx("primitive", {
23
+ scale: 1.3,
24
+ position: [0, -10, 0],
25
+ object: model.scene
26
+ }), /*#__PURE__*/jsxRuntime.jsx("primitive", {
27
+ object: lights
28
+ })]
29
+ });
30
+ };
31
+
32
+ exports.default = Graph;
33
+ //# sourceMappingURL=Graph-536a6847.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Graph-536a6847.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -0,0 +1,31 @@
1
+ import { useGLTF } from '@react-three/drei';
2
+ import { useLoader, useFrame } from '@react-three/fiber';
3
+ import { ObjectLoader } from 'three';
4
+ import { d as defineSrc } from './index-3b6277fc.esm.js';
5
+ import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
6
+ import 'react';
7
+ import 'clsx';
8
+
9
+ const Graph = () => {
10
+ const model = useGLTF(defineSrc(`graph.gltf`));
11
+ const lights = useLoader(ObjectLoader, defineSrc('graph-light.json'));
12
+ useFrame(() => {
13
+ const {
14
+ offset
15
+ } = model.materials['Standard '].map;
16
+ offset.x += -0.0015;
17
+ offset.y += 0.0015;
18
+ });
19
+ return /*#__PURE__*/jsxs(Fragment, {
20
+ children: [/*#__PURE__*/jsx("primitive", {
21
+ scale: 1.3,
22
+ position: [0, -10, 0],
23
+ object: model.scene
24
+ }), /*#__PURE__*/jsx("primitive", {
25
+ object: lights
26
+ })]
27
+ });
28
+ };
29
+
30
+ export { Graph as default };
31
+ //# sourceMappingURL=Graph-e766a791.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Graph-e766a791.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -6,3 +6,22 @@ img.wds-illustration {
6
6
  .wds-illustration-padding {
7
7
  padding: 24px;
8
8
  }
9
+
10
+ .wds-illustration-3d {
11
+ display: inline-flex;
12
+ }
13
+
14
+ .wds-illustration-3d-small {
15
+ width: 200px;
16
+ height: 200px;
17
+ }
18
+
19
+ .wds-illustration-3d-medium {
20
+ width: 300px;
21
+ height: 300px;
22
+ }
23
+
24
+ .wds-illustration-3d-large {
25
+ width: 500px;
26
+ height: 500px;
27
+ }
@@ -0,0 +1,50 @@
1
+ import { useGLTF, useAnimations } from '@react-three/drei';
2
+ import { useLoader, useFrame } from '@react-three/fiber';
3
+ import { useRef } from 'react';
4
+ import { ObjectLoader, TextureLoader } from 'three';
5
+ import { d as defineSrc } from './index-3b6277fc.esm.js';
6
+ import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
7
+ import 'clsx';
8
+
9
+ const Jars = () => {
10
+ const ref = useRef();
11
+ const model = useGLTF(defineSrc('jars.gltf'));
12
+ const lights = useLoader(ObjectLoader, defineSrc('jars-light.json'));
13
+ const wiseLogo = useLoader(TextureLoader, defineSrc('wise-flag-map-bump.jpg'));
14
+ const jars = [];
15
+ model.scene.traverse(child => {
16
+ if (child.name.startsWith('Coin_')) {
17
+ child.material.bumpMap = wiseLogo;
18
+ child.material.bumpMap.flipY = false;
19
+ child.castShadow = false;
20
+ child.receiveShadow = false;
21
+ }
22
+ if (child.name.startsWith('Jar_')) {
23
+ jars.push(child);
24
+ }
25
+ });
26
+ const {
27
+ mixer,
28
+ clips
29
+ } = useAnimations(model.animations, ref);
30
+ useFrame(() => {
31
+ mixer.clipAction(clips[0]).play();
32
+ jars.forEach(jar => {
33
+ jar.material.map.offset.x += 0.001;
34
+ jar.material.map.offset.y += 0.0;
35
+ });
36
+ });
37
+ return /*#__PURE__*/jsxs(Fragment, {
38
+ children: [/*#__PURE__*/jsx("primitive", {
39
+ ref: ref,
40
+ scale: 1.3,
41
+ position: [0, -10, 0],
42
+ object: model.scene
43
+ }), /*#__PURE__*/jsx("primitive", {
44
+ object: lights
45
+ })]
46
+ });
47
+ };
48
+
49
+ export { Jars as default };
50
+ //# sourceMappingURL=Jars-9afb6e8b.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Jars-9afb6e8b.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -0,0 +1,52 @@
1
+ 'use strict';
2
+
3
+ var drei = require('@react-three/drei');
4
+ var fiber = require('@react-three/fiber');
5
+ var react = require('react');
6
+ var three = require('three');
7
+ var index = require('./index-c17944c0.js');
8
+ var jsxRuntime = require('react/jsx-runtime');
9
+ require('clsx');
10
+
11
+ const Jars = () => {
12
+ const ref = react.useRef();
13
+ const model = drei.useGLTF(index.defineSrc('jars.gltf'));
14
+ const lights = fiber.useLoader(three.ObjectLoader, index.defineSrc('jars-light.json'));
15
+ const wiseLogo = fiber.useLoader(three.TextureLoader, index.defineSrc('wise-flag-map-bump.jpg'));
16
+ const jars = [];
17
+ model.scene.traverse(child => {
18
+ if (child.name.startsWith('Coin_')) {
19
+ child.material.bumpMap = wiseLogo;
20
+ child.material.bumpMap.flipY = false;
21
+ child.castShadow = false;
22
+ child.receiveShadow = false;
23
+ }
24
+ if (child.name.startsWith('Jar_')) {
25
+ jars.push(child);
26
+ }
27
+ });
28
+ const {
29
+ mixer,
30
+ clips
31
+ } = drei.useAnimations(model.animations, ref);
32
+ fiber.useFrame(() => {
33
+ mixer.clipAction(clips[0]).play();
34
+ jars.forEach(jar => {
35
+ jar.material.map.offset.x += 0.001;
36
+ jar.material.map.offset.y += 0.0;
37
+ });
38
+ });
39
+ return /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
40
+ children: [/*#__PURE__*/jsxRuntime.jsx("primitive", {
41
+ ref: ref,
42
+ scale: 1.3,
43
+ position: [0, -10, 0],
44
+ object: model.scene
45
+ }), /*#__PURE__*/jsxRuntime.jsx("primitive", {
46
+ object: lights
47
+ })]
48
+ });
49
+ };
50
+
51
+ exports.default = Jars;
52
+ //# sourceMappingURL=Jars-fcb1e2b1.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Jars-fcb1e2b1.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -0,0 +1,41 @@
1
+ import { useGLTF, useAnimations } from '@react-three/drei';
2
+ import { useLoader, useFrame } from '@react-three/fiber';
3
+ import { useRef } from 'react';
4
+ import { ObjectLoader, LoopOnce } from 'three';
5
+ import { d as defineSrc } from './index-3b6277fc.esm.js';
6
+ import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
7
+ import 'clsx';
8
+
9
+ const Lock = () => {
10
+ const ref = useRef();
11
+ const model = useGLTF(defineSrc('lock.gltf'));
12
+ const lights = useLoader(ObjectLoader, defineSrc('lock-light.json'));
13
+ model.scene.traverse(node => {
14
+ if (node.isMesh) {
15
+ node.castShadow = true;
16
+ node.receiveShadow = true;
17
+ }
18
+ });
19
+ const {
20
+ clips,
21
+ mixer
22
+ } = useAnimations(model.animations, ref);
23
+ let frame = 0;
24
+ useFrame(() => {
25
+ mixer.clipAction(clips[0]).play().setLoop(LoopOnce, 1);
26
+ model.scene.position.y = Math.sin(frame++ * 0.04) * 0.2;
27
+ model.materials.Standard.map.offset.x += -0.001;
28
+ });
29
+ return /*#__PURE__*/jsxs(Fragment, {
30
+ children: [/*#__PURE__*/jsx("primitive", {
31
+ ref: ref,
32
+ scale: 1.4,
33
+ object: model.scene
34
+ }), /*#__PURE__*/jsx("primitive", {
35
+ object: lights
36
+ })]
37
+ });
38
+ };
39
+
40
+ export { Lock as default };
41
+ //# sourceMappingURL=Lock-2365c3f9.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Lock-2365c3f9.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -0,0 +1,43 @@
1
+ 'use strict';
2
+
3
+ var drei = require('@react-three/drei');
4
+ var fiber = require('@react-three/fiber');
5
+ var react = require('react');
6
+ var three = require('three');
7
+ var index = require('./index-c17944c0.js');
8
+ var jsxRuntime = require('react/jsx-runtime');
9
+ require('clsx');
10
+
11
+ const Lock = () => {
12
+ const ref = react.useRef();
13
+ const model = drei.useGLTF(index.defineSrc('lock.gltf'));
14
+ const lights = fiber.useLoader(three.ObjectLoader, index.defineSrc('lock-light.json'));
15
+ model.scene.traverse(node => {
16
+ if (node.isMesh) {
17
+ node.castShadow = true;
18
+ node.receiveShadow = true;
19
+ }
20
+ });
21
+ const {
22
+ clips,
23
+ mixer
24
+ } = drei.useAnimations(model.animations, ref);
25
+ let frame = 0;
26
+ fiber.useFrame(() => {
27
+ mixer.clipAction(clips[0]).play().setLoop(three.LoopOnce, 1);
28
+ model.scene.position.y = Math.sin(frame++ * 0.04) * 0.2;
29
+ model.materials.Standard.map.offset.x += -0.001;
30
+ });
31
+ return /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
32
+ children: [/*#__PURE__*/jsxRuntime.jsx("primitive", {
33
+ ref: ref,
34
+ scale: 1.4,
35
+ object: model.scene
36
+ }), /*#__PURE__*/jsxRuntime.jsx("primitive", {
37
+ object: lights
38
+ })]
39
+ });
40
+ };
41
+
42
+ exports.default = Lock;
43
+ //# sourceMappingURL=Lock-e5c89aa2.js.map