@sharadox/sharadox-web-library 0.6.5 → 0.7.0

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 (280) hide show
  1. package/README.md +46 -8
  2. package/distribution/action/send-contact/index.d.ts +5 -6
  3. package/distribution/action/send-contact/index.d.ts.map +1 -1
  4. package/distribution/action/send-contact/index.js +13 -49
  5. package/distribution/action/send-contact/index.js.map +1 -1
  6. package/distribution/action/send-contact/type.d.ts +1 -3
  7. package/distribution/action/send-contact/type.d.ts.map +1 -1
  8. package/distribution/component/button/index.module.css +1 -58
  9. package/distribution/component/button/index.module.scss +60 -0
  10. package/distribution/component/capability/index.js +2 -2
  11. package/distribution/component/capability/index.module.css +1 -94
  12. package/distribution/component/capability/index.module.scss +85 -0
  13. package/distribution/component/capability/type.d.ts +1 -1
  14. package/distribution/component/consent/index.d.ts +1 -4
  15. package/distribution/component/consent/index.d.ts.map +1 -1
  16. package/distribution/component/consent/index.js +19 -32
  17. package/distribution/component/consent/index.js.map +1 -1
  18. package/distribution/component/consent/index.module.css +1 -183
  19. package/distribution/component/consent/index.module.scss +45 -0
  20. package/distribution/component/consent/preferences-link/index.js +1 -1
  21. package/distribution/component/consent/type.d.ts +1 -1
  22. package/distribution/component/contact/form/index.d.ts.map +1 -1
  23. package/distribution/component/contact/form/index.js +4 -4
  24. package/distribution/component/contact/form/index.js.map +1 -1
  25. package/distribution/component/contact/form/index.module.css +1 -168
  26. package/distribution/component/contact/form/index.module.scss +163 -0
  27. package/distribution/component/contact/form/type.d.ts +1 -1
  28. package/distribution/component/contact/index.js +2 -2
  29. package/distribution/component/contact/index.module.css +1 -56
  30. package/distribution/component/contact/index.module.scss +52 -0
  31. package/distribution/component/contact/type.d.ts +1 -1
  32. package/distribution/component/cross/index.module.css +1 -53
  33. package/distribution/component/cross/index.module.scss +50 -0
  34. package/distribution/component/eyebrow/index.module.css +1 -9
  35. package/distribution/component/eyebrow/index.module.scss +9 -0
  36. package/distribution/component/footer/index.js +4 -4
  37. package/distribution/component/footer/index.js.map +1 -1
  38. package/distribution/component/footer/index.module.css +1 -138
  39. package/distribution/component/footer/index.module.scss +125 -0
  40. package/distribution/component/footer/type.d.ts +1 -1
  41. package/distribution/component/globe/index.d.ts +2 -2
  42. package/distribution/component/globe/index.d.ts.map +1 -1
  43. package/distribution/component/globe/index.js +23 -32
  44. package/distribution/component/globe/index.js.map +1 -1
  45. package/distribution/component/globe/index.module.css +1 -25
  46. package/distribution/component/globe/index.module.scss +7 -0
  47. package/distribution/component/hero/guide/index.module.css +1 -97
  48. package/distribution/component/hero/guide/index.module.scss +94 -0
  49. package/distribution/component/hero/index.js +1 -1
  50. package/distribution/component/hero/index.module.css +1 -124
  51. package/distribution/component/hero/index.module.scss +109 -0
  52. package/distribution/component/hero/type.d.ts +1 -1
  53. package/distribution/component/language-switch/index.js +4 -4
  54. package/distribution/component/language-switch/index.js.map +1 -1
  55. package/distribution/component/language-switch/index.module.css +1 -20
  56. package/distribution/component/language-switch/index.module.scss +22 -0
  57. package/distribution/component/language-switch/type.d.ts +1 -1
  58. package/distribution/component/marquee/index.js +1 -1
  59. package/distribution/component/marquee/index.module.css +1 -43
  60. package/distribution/component/marquee/index.module.scss +39 -0
  61. package/distribution/component/navigation/index.js +1 -1
  62. package/distribution/component/navigation/index.module.css +1 -81
  63. package/distribution/component/navigation/index.module.scss +76 -0
  64. package/distribution/component/navigation/type.d.ts +1 -1
  65. package/distribution/component/process/index.js +1 -1
  66. package/distribution/component/process/index.module.css +1 -43
  67. package/distribution/component/process/index.module.scss +40 -0
  68. package/distribution/component/process/step/index.module.css +1 -33
  69. package/distribution/component/process/step/index.module.scss +31 -0
  70. package/distribution/component/process/type.d.ts +1 -1
  71. package/distribution/component/section/index.module.css +1 -35
  72. package/distribution/component/section/index.module.scss +32 -0
  73. package/distribution/component/section-heading/index.js +1 -1
  74. package/distribution/component/section-heading/index.module.css +1 -7
  75. package/distribution/component/section-heading/index.module.scss +7 -0
  76. package/distribution/component/section-indicator/index.js +2 -2
  77. package/distribution/component/section-indicator/index.module.css +1 -145
  78. package/distribution/component/section-indicator/index.module.scss +143 -0
  79. package/distribution/component/section-indicator/type.d.ts +1 -1
  80. package/distribution/component/service-index/index.js +1 -1
  81. package/distribution/component/service-index/index.module.css +1 -88
  82. package/distribution/component/service-index/index.module.scss +83 -0
  83. package/distribution/component/service-index/type.d.ts +1 -1
  84. package/distribution/component/services/campaign-visual/index.js +2 -2
  85. package/distribution/component/services/campaign-visual/index.module.css +1 -128
  86. package/distribution/component/services/campaign-visual/index.module.scss +122 -0
  87. package/distribution/component/services/campaign-visual/stage/index.js +3 -3
  88. package/distribution/component/services/campaign-visual/stage/index.js.map +1 -1
  89. package/distribution/component/services/campaign-visual/stage/type.d.ts +1 -1
  90. package/distribution/component/services/campaign-visual/type.d.ts +1 -1
  91. package/distribution/component/services/cell/index.js +2 -2
  92. package/distribution/component/services/cell/index.module.css +1 -86
  93. package/distribution/component/services/cell/index.module.scss +81 -0
  94. package/distribution/component/services/design-visual/index.js +1 -1
  95. package/distribution/component/services/design-visual/index.module.css +1 -130
  96. package/distribution/component/services/design-visual/index.module.scss +117 -0
  97. package/distribution/component/services/index.js +2 -2
  98. package/distribution/component/services/index.module.css +1 -84
  99. package/distribution/component/services/index.module.scss +66 -0
  100. package/distribution/component/services/mobile-visual/index.d.ts.map +1 -1
  101. package/distribution/component/services/mobile-visual/index.js +2 -1
  102. package/distribution/component/services/mobile-visual/index.js.map +1 -1
  103. package/distribution/component/services/mobile-visual/index.module.css +1 -104
  104. package/distribution/component/services/mobile-visual/index.module.scss +93 -0
  105. package/distribution/component/services/mobile-visual/type.d.ts +1 -1
  106. package/distribution/component/services/platform-visual/index.module.css +1 -46
  107. package/distribution/component/services/platform-visual/index.module.scss +39 -0
  108. package/distribution/component/services/social-visual/index.js +5 -5
  109. package/distribution/component/services/social-visual/index.js.map +1 -1
  110. package/distribution/component/services/social-visual/index.module.css +1 -131
  111. package/distribution/component/services/social-visual/index.module.scss +120 -0
  112. package/distribution/component/services/social-visual/type.d.ts +1 -1
  113. package/distribution/component/services/type.d.ts +1 -1
  114. package/distribution/component/services/web-visual/index.js +1 -1
  115. package/distribution/component/services/web-visual/index.module.css +1 -142
  116. package/distribution/component/services/web-visual/index.module.scss +132 -0
  117. package/distribution/component/share-image/index.d.ts +1 -2
  118. package/distribution/component/share-image/index.d.ts.map +1 -1
  119. package/distribution/component/share-image/index.js +3 -3
  120. package/distribution/component/share-image/index.js.map +1 -1
  121. package/distribution/component/share-image/type.d.ts +1 -1
  122. package/distribution/component/statement/index.js +1 -1
  123. package/distribution/component/statement/index.module.css +1 -11
  124. package/distribution/component/statement/index.module.scss +10 -0
  125. package/distribution/component/structured-data/index.d.ts.map +1 -1
  126. package/distribution/component/structured-data/index.js +48 -53
  127. package/distribution/component/structured-data/index.js.map +1 -1
  128. package/distribution/component/structured-data/type.d.ts +1 -1
  129. package/distribution/component/style-switch/index.d.ts +2 -2
  130. package/distribution/component/style-switch/index.d.ts.map +1 -1
  131. package/distribution/component/style-switch/index.js +11 -18
  132. package/distribution/component/style-switch/index.js.map +1 -1
  133. package/distribution/component/style-switch/index.module.css +1 -36
  134. package/distribution/component/style-switch/index.module.scss +37 -0
  135. package/distribution/component/style-switch/type.d.ts +1 -1
  136. package/distribution/component/touchpoint/index.js +3 -3
  137. package/distribution/component/touchpoint/index.module.css +1 -85
  138. package/distribution/component/touchpoint/index.module.scss +75 -0
  139. package/distribution/component/touchpoint/plate/index.module.css +1 -136
  140. package/distribution/component/touchpoint/plate/index.module.scss +129 -0
  141. package/distribution/component/touchpoint/type.d.ts +1 -1
  142. package/distribution/component/wordmark/index.module.css +1 -23
  143. package/distribution/component/wordmark/index.module.scss +22 -0
  144. package/distribution/content/locale/index.d.ts +6 -0
  145. package/distribution/content/locale/index.d.ts.map +1 -0
  146. package/distribution/content/locale/index.js +7 -0
  147. package/distribution/content/locale/index.js.map +1 -0
  148. package/distribution/{utility → content}/locale/type.d.ts +3 -2
  149. package/distribution/content/locale/type.d.ts.map +1 -0
  150. package/distribution/{utility → content}/locale/type.js.map +1 -1
  151. package/distribution/content/style/index.d.ts +47 -43
  152. package/distribution/content/style/index.d.ts.map +1 -1
  153. package/distribution/content/style/index.js +20 -13
  154. package/distribution/content/style/index.js.map +1 -1
  155. package/distribution/utility/separate/index.d.ts +6 -1
  156. package/distribution/utility/separate/index.d.ts.map +1 -1
  157. package/distribution/utility/separate/index.js +8 -2
  158. package/distribution/utility/separate/index.js.map +1 -1
  159. package/llms.txt +10 -0
  160. package/package.json +37 -28
  161. package/distribution/component/consent/toggle/index.d.ts +0 -4
  162. package/distribution/component/consent/toggle/index.d.ts.map +0 -1
  163. package/distribution/component/consent/toggle/index.js +0 -7
  164. package/distribution/component/consent/toggle/index.js.map +0 -1
  165. package/distribution/component/consent/toggle/type.d.ts +0 -10
  166. package/distribution/component/consent/toggle/type.d.ts.map +0 -1
  167. package/distribution/component/consent/toggle/type.js.map +0 -1
  168. package/distribution/component/cursor/index.d.ts +0 -3
  169. package/distribution/component/cursor/index.d.ts.map +0 -1
  170. package/distribution/component/cursor/index.js +0 -45
  171. package/distribution/component/cursor/index.js.map +0 -1
  172. package/distribution/component/cursor/index.module.css +0 -55
  173. package/distribution/component/globe/arc/index.d.ts +0 -4
  174. package/distribution/component/globe/arc/index.d.ts.map +0 -1
  175. package/distribution/component/globe/arc/index.js +0 -29
  176. package/distribution/component/globe/arc/index.js.map +0 -1
  177. package/distribution/component/globe/arc/type.d.ts +0 -12
  178. package/distribution/component/globe/arc/type.d.ts.map +0 -1
  179. package/distribution/component/globe/arc/type.js +0 -2
  180. package/distribution/component/globe/arc/type.js.map +0 -1
  181. package/distribution/component/globe/color/index.d.ts +0 -4
  182. package/distribution/component/globe/color/index.d.ts.map +0 -1
  183. package/distribution/component/globe/color/index.js +0 -16
  184. package/distribution/component/globe/color/index.js.map +0 -1
  185. package/distribution/component/globe/color/type.d.ts +0 -13
  186. package/distribution/component/globe/color/type.d.ts.map +0 -1
  187. package/distribution/component/globe/color/type.js +0 -2
  188. package/distribution/component/globe/color/type.js.map +0 -1
  189. package/distribution/component/globe/dots/index.d.ts +0 -4
  190. package/distribution/component/globe/dots/index.d.ts.map +0 -1
  191. package/distribution/component/globe/dots/index.js +0 -38
  192. package/distribution/component/globe/dots/index.js.map +0 -1
  193. package/distribution/component/globe/dots/type.d.ts +0 -7
  194. package/distribution/component/globe/dots/type.d.ts.map +0 -1
  195. package/distribution/component/globe/dots/type.js +0 -2
  196. package/distribution/component/globe/dots/type.js.map +0 -1
  197. package/distribution/component/globe/marker/index.d.ts +0 -4
  198. package/distribution/component/globe/marker/index.d.ts.map +0 -1
  199. package/distribution/component/globe/marker/index.js +0 -21
  200. package/distribution/component/globe/marker/index.js.map +0 -1
  201. package/distribution/component/globe/marker/type.d.ts +0 -9
  202. package/distribution/component/globe/marker/type.d.ts.map +0 -1
  203. package/distribution/component/globe/marker/type.js +0 -2
  204. package/distribution/component/globe/marker/type.js.map +0 -1
  205. package/distribution/component/globe/shader/arc/index.d.ts +0 -6
  206. package/distribution/component/globe/shader/arc/index.d.ts.map +0 -1
  207. package/distribution/component/globe/shader/arc/index.js +0 -24
  208. package/distribution/component/globe/shader/arc/index.js.map +0 -1
  209. package/distribution/component/globe/shader/atmosphere/index.d.ts +0 -6
  210. package/distribution/component/globe/shader/atmosphere/index.d.ts.map +0 -1
  211. package/distribution/component/globe/shader/atmosphere/index.js +0 -15
  212. package/distribution/component/globe/shader/atmosphere/index.js.map +0 -1
  213. package/distribution/component/globe/shader/body/index.d.ts +0 -6
  214. package/distribution/component/globe/shader/body/index.d.ts.map +0 -1
  215. package/distribution/component/globe/shader/body/index.js +0 -15
  216. package/distribution/component/globe/shader/body/index.js.map +0 -1
  217. package/distribution/component/globe/shader/dot/index.d.ts +0 -6
  218. package/distribution/component/globe/shader/dot/index.d.ts.map +0 -1
  219. package/distribution/component/globe/shader/dot/index.js +0 -29
  220. package/distribution/component/globe/shader/dot/index.js.map +0 -1
  221. package/distribution/component/globe/shader/glow-vertex/index.d.ts +0 -3
  222. package/distribution/component/globe/shader/glow-vertex/index.d.ts.map +0 -1
  223. package/distribution/component/globe/shader/glow-vertex/index.js +0 -9
  224. package/distribution/component/globe/shader/glow-vertex/index.js.map +0 -1
  225. package/distribution/component/globe/world/index.d.ts +0 -4
  226. package/distribution/component/globe/world/index.d.ts.map +0 -1
  227. package/distribution/component/globe/world/index.js +0 -39
  228. package/distribution/component/globe/world/index.js.map +0 -1
  229. package/distribution/component/globe/world/type.d.ts +0 -10
  230. package/distribution/component/globe/world/type.d.ts.map +0 -1
  231. package/distribution/component/globe/world/type.js +0 -2
  232. package/distribution/component/globe/world/type.js.map +0 -1
  233. package/distribution/component/locale-link/index.d.ts +0 -4
  234. package/distribution/component/locale-link/index.d.ts.map +0 -1
  235. package/distribution/component/locale-link/index.js +0 -9
  236. package/distribution/component/locale-link/index.js.map +0 -1
  237. package/distribution/component/locale-link/type.d.ts +0 -10
  238. package/distribution/component/locale-link/type.d.ts.map +0 -1
  239. package/distribution/component/locale-link/type.js +0 -2
  240. package/distribution/component/locale-link/type.js.map +0 -1
  241. package/distribution/hook/globe-drag/index.d.ts +0 -10
  242. package/distribution/hook/globe-drag/index.d.ts.map +0 -1
  243. package/distribution/hook/globe-drag/index.js +0 -99
  244. package/distribution/hook/globe-drag/index.js.map +0 -1
  245. package/distribution/hook/globe-drag/type.d.ts +0 -11
  246. package/distribution/hook/globe-drag/type.d.ts.map +0 -1
  247. package/distribution/hook/globe-drag/type.js +0 -2
  248. package/distribution/hook/globe-drag/type.js.map +0 -1
  249. package/distribution/hook/land-points/index.d.ts +0 -3
  250. package/distribution/hook/land-points/index.d.ts.map +0 -1
  251. package/distribution/hook/land-points/index.js +0 -17
  252. package/distribution/hook/land-points/index.js.map +0 -1
  253. package/distribution/style/token/index.css +0 -1
  254. package/distribution/utility/hex-channel/index.d.ts +0 -3
  255. package/distribution/utility/hex-channel/index.d.ts.map +0 -1
  256. package/distribution/utility/hex-channel/index.js +0 -8
  257. package/distribution/utility/hex-channel/index.js.map +0 -1
  258. package/distribution/utility/latitude-longitude-to-vector/index.d.ts +0 -7
  259. package/distribution/utility/latitude-longitude-to-vector/index.d.ts.map +0 -1
  260. package/distribution/utility/latitude-longitude-to-vector/index.js +0 -12
  261. package/distribution/utility/latitude-longitude-to-vector/index.js.map +0 -1
  262. package/distribution/utility/locale/index.d.ts +0 -6
  263. package/distribution/utility/locale/index.d.ts.map +0 -1
  264. package/distribution/utility/locale/index.js +0 -8
  265. package/distribution/utility/locale/index.js.map +0 -1
  266. package/distribution/utility/locale/type.d.ts.map +0 -1
  267. package/distribution/utility/locale/type.js +0 -2
  268. package/distribution/utility/parse-contact/index.d.ts +0 -4
  269. package/distribution/utility/parse-contact/index.d.ts.map +0 -1
  270. package/distribution/utility/parse-contact/index.js +0 -23
  271. package/distribution/utility/parse-contact/index.js.map +0 -1
  272. package/distribution/utility/parse-contact/type.d.ts +0 -20
  273. package/distribution/utility/parse-contact/type.d.ts.map +0 -1
  274. package/distribution/utility/parse-contact/type.js +0 -2
  275. package/distribution/utility/parse-contact/type.js.map +0 -1
  276. package/distribution/utility/web-gl-support/index.d.ts +0 -3
  277. package/distribution/utility/web-gl-support/index.d.ts.map +0 -1
  278. package/distribution/utility/web-gl-support/index.js +0 -11
  279. package/distribution/utility/web-gl-support/index.js.map +0 -1
  280. /package/distribution/{component/consent/toggle → content/locale}/type.js +0 -0
@@ -1,21 +0,0 @@
1
- "use client";
2
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
- import { useFrame } from "@react-three/fiber";
4
- import { useMemo, useRef } from "react";
5
- import { Quaternion, Vector3 } from "three";
6
- import { latitudeLongitudeToVector } from "@sharadox/sharadox-web-library/utility/latitude-longitude-to-vector";
7
- /** A city dot lying flat on the surface. */
8
- export function Marker({ latitude, longitude, color, home = false }) {
9
- const ring = useRef(null);
10
- const position = useMemo(() => latitudeLongitudeToVector(latitude, longitude, 1.004), [latitude, longitude]);
11
- const quaternion = useMemo(() => new Quaternion().setFromUnitVectors(new Vector3(0, 0, 1), position.clone().normalize()), [position]);
12
- useFrame(({ clock }) => {
13
- if (!ring.current)
14
- return;
15
- const progress = (clock.elapsedTime * 0.6) % 1;
16
- ring.current.scale.setScalar(1 + progress * 5);
17
- ring.current.material.opacity = (1 - progress) * 0.8;
18
- });
19
- return (_jsxs("group", { position: position, quaternion: quaternion, children: [_jsxs("mesh", { children: [_jsx("circleGeometry", { args: [home ? 0.014 : 0.008, 20] }), _jsx("meshBasicMaterial", { color: color, transparent: true, opacity: home ? 1 : 0.85 })] }), home && (_jsxs("mesh", { ref: ring, children: [_jsx("ringGeometry", { args: [0.014, 0.018, 40] }), _jsx("meshBasicMaterial", { color: color, transparent: true, opacity: 0.8, depthWrite: false })] }))] }));
20
- }
21
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../source/component/globe/marker/index.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AACb,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAC9C,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AACxC,OAAO,EAAE,UAAU,EAAE,OAAO,EAAqC,MAAM,OAAO,CAAC;AAC/E,OAAO,EAAE,yBAAyB,EAAE,MAAM,qEAAqE,CAAC;AAGhH,4CAA4C;AAC5C,MAAM,UAAU,MAAM,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAE,KAAK,EAAE,IAAI,GAAG,KAAK,EAAoB;IACnF,MAAM,IAAI,GAAG,MAAM,CAAO,IAAI,CAAC,CAAC;IAChC,MAAM,QAAQ,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC,yBAAyB,CAAC,QAAQ,EAAE,SAAS,EAAE,KAAK,CAAC,EAAE,CAAC,QAAQ,EAAE,SAAS,CAAC,CAAC,CAAC;IAC7G,MAAM,UAAU,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@
1
- export interface MarkerProperties {
2
- /** "#rrggbb". */
3
- color: string;
4
- latitude: number;
5
- longitude: number;
6
- /** The home marker is larger and sends out a pulsing ring. */
7
- home?: boolean;
8
- }
9
- //# sourceMappingURL=type.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"type.d.ts","sourceRoot":"","sources":["../../../../source/component/globe/marker/type.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,gBAAgB;IAC/B,iBAAiB;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,8DAA8D;IAC9D,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB"}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=type.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"type.js","sourceRoot":"","sources":["../../../../source/component/globe/marker/type.ts"],"names":[],"mappings":""}
@@ -1,6 +0,0 @@
1
- /** Arcs: a faint path plus a bright pulse travelling along it. */
2
- export declare const ARC_SHADER: {
3
- vertex: string;
4
- fragment: string;
5
- };
6
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../source/component/globe/shader/arc/index.ts"],"names":[],"mappings":"AAAA,kEAAkE;AAClE,eAAO,MAAM,UAAU;;;CAqBtB,CAAC"}
@@ -1,24 +0,0 @@
1
- /** Arcs: a faint path plus a bright pulse travelling along it. */
2
- export const ARC_SHADER = {
3
- vertex: /* glsl */ `
4
- varying float alongArc;
5
- void main() {
6
- alongArc = uv.x;
7
- gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0);
8
- }
9
- `,
10
- fragment: /* glsl */ `
11
- uniform float time;
12
- uniform float offset;
13
- uniform vec3 color;
14
- varying float alongArc;
15
- void main() {
16
- float phase = fract(time * 0.16 + offset);
17
- float pulse = smoothstep(0.0, 0.16, 0.16 - abs(alongArc - phase * 1.3 + 0.15));
18
- float base = 0.10;
19
- float ends = smoothstep(0.0, 0.04, alongArc) * smoothstep(1.0, 0.96, alongArc);
20
- gl_FragColor = vec4(color, (base + pulse * 0.95) * ends);
21
- }
22
- `,
23
- };
24
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../source/component/globe/shader/arc/index.ts"],"names":[],"mappings":"AAAA,kEAAkE;AAClE,MAAM,CAAC,MAAM,UAAU,GAAG;IACxB,MAAM,EAAE,UAAU,CAAC;;;;;;GAMlB;IACD,QAAQ,EAAE,UAAU,CAAC;;;;;;;;;;;;GAYpB;CACF,CAAC"}
@@ -1,6 +0,0 @@
1
- /** Outer atmosphere, drawn on back faces: strongest just outside the edge, fading to zero at the rim. */
2
- export declare const ATMOSPHERE_SHADER: {
3
- vertex: string;
4
- fragment: string;
5
- };
6
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../source/component/globe/shader/atmosphere/index.ts"],"names":[],"mappings":"AAEA,yGAAyG;AACzG,eAAO,MAAM,iBAAiB;;;CAW7B,CAAC"}
@@ -1,15 +0,0 @@
1
- import { GLOW_VERTEX } from "@sharadox/sharadox-web-library/component/globe/shader/glow-vertex";
2
- /** Outer atmosphere, drawn on back faces: strongest just outside the edge, fading to zero at the rim. */
3
- export const ATMOSPHERE_SHADER = {
4
- vertex: GLOW_VERTEX,
5
- fragment: /* glsl */ `
6
- varying vec3 viewNormal;
7
- uniform float strength;
8
- uniform vec3 color;
9
- void main() {
10
- float intensity = smoothstep(0.0, 0.55, -viewNormal.z);
11
- gl_FragColor = vec4(color, intensity * intensity * strength);
12
- }
13
- `,
14
- };
15
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../source/component/globe/shader/atmosphere/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,mEAAmE,CAAC;AAEhG,yGAAyG;AACzG,MAAM,CAAC,MAAM,iBAAiB,GAAG;IAC/B,MAAM,EAAE,WAAW;IACnB,QAAQ,EAAE,UAAU,CAAC;;;;;;;;GAQpB;CACF,CAAC"}
@@ -1,6 +0,0 @@
1
- /** The planet body with a fresnel rim, in the style's colours. */
2
- export declare const BODY_SHADER: {
3
- vertex: string;
4
- fragment: string;
5
- };
6
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../source/component/globe/shader/body/index.ts"],"names":[],"mappings":"AAEA,kEAAkE;AAClE,eAAO,MAAM,WAAW;;;CAWvB,CAAC"}
@@ -1,15 +0,0 @@
1
- import { GLOW_VERTEX } from "@sharadox/sharadox-web-library/component/globe/shader/glow-vertex";
2
- /** The planet body with a fresnel rim, in the style's colours. */
3
- export const BODY_SHADER = {
4
- vertex: GLOW_VERTEX,
5
- fragment: /* glsl */ `
6
- varying vec3 viewNormal;
7
- uniform vec3 base;
8
- uniform vec3 rimColor;
9
- void main() {
10
- float rim = pow(1.0 - abs(viewNormal.z), 3.0);
11
- gl_FragColor = vec4(mix(base, rimColor, rim), 1.0);
12
- }
13
- `,
14
- };
15
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../source/component/globe/shader/body/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,mEAAmE,CAAC;AAEhG,kEAAkE;AAClE,MAAM,CAAC,MAAM,WAAW,GAAG;IACzB,MAAM,EAAE,WAAW;IACnB,QAAQ,EAAE,UAAU,CAAC;;;;;;;;GAQpB;CACF,CAAC"}
@@ -1,6 +0,0 @@
1
- /** Land dots: facing dots are bright, edge dots fade, a few twinkle. */
2
- export declare const DOT_SHADER: {
3
- vertex: string;
4
- fragment: string;
5
- };
6
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../source/component/globe/shader/dot/index.ts"],"names":[],"mappings":"AAAA,wEAAwE;AACxE,eAAO,MAAM,UAAU;;;CA0BtB,CAAC"}
@@ -1,29 +0,0 @@
1
- /** Land dots: facing dots are bright, edge dots fade, a few twinkle. */
2
- export const DOT_SHADER = {
3
- vertex: /* glsl */ `
4
- attribute float seed;
5
- uniform float time;
6
- uniform float pointSize;
7
- varying float opacity;
8
- void main() {
9
- vec4 viewPosition = modelViewMatrix * vec4(position, 1.0);
10
- vec3 surfaceNormal = normalize(normalMatrix * position);
11
- float facing = dot(surfaceNormal, vec3(0.0, 0.0, 1.0));
12
- float twinkle = 0.75 + 0.25 * sin(time * 1.6 + seed * 40.0);
13
- opacity = smoothstep(-0.05, 0.55, facing) * twinkle;
14
- gl_PointSize = pointSize * (0.9 + 0.5 * seed) * (3.2 / -viewPosition.z);
15
- gl_Position = projectionMatrix * viewPosition;
16
- }
17
- `,
18
- fragment: /* glsl */ `
19
- uniform vec3 color;
20
- varying float opacity;
21
- void main() {
22
- vec2 fromCenter = gl_PointCoord - 0.5;
23
- float distanceFromCenter = length(fromCenter);
24
- if (distanceFromCenter > 0.5) discard;
25
- gl_FragColor = vec4(color, smoothstep(0.5, 0.1, distanceFromCenter) * opacity);
26
- }
27
- `,
28
- };
29
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../source/component/globe/shader/dot/index.ts"],"names":[],"mappings":"AAAA,wEAAwE;AACxE,MAAM,CAAC,MAAM,UAAU,GAAG;IACxB,MAAM,EAAE,UAAU,CAAC;;;;;;;;;;;;;;GAclB;IACD,QAAQ,EAAE,UAAU,CAAC;;;;;;;;;GASpB;CACF,CAAC"}
@@ -1,3 +0,0 @@
1
- /** Vertex shader that passes the view-space normal on, for fresnel effects. */
2
- export declare const GLOW_VERTEX = "\n varying vec3 viewNormal;\n void main() {\n viewNormal = normalize(normalMatrix * normal);\n gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0);\n }\n";
3
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../source/component/globe/shader/glow-vertex/index.ts"],"names":[],"mappings":"AAAA,+EAA+E;AAC/E,eAAO,MAAM,WAAW,0LAMvB,CAAC"}
@@ -1,9 +0,0 @@
1
- /** Vertex shader that passes the view-space normal on, for fresnel effects. */
2
- export const GLOW_VERTEX = /* glsl */ `
3
- varying vec3 viewNormal;
4
- void main() {
5
- viewNormal = normalize(normalMatrix * normal);
6
- gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0);
7
- }
8
- `;
9
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../source/component/globe/shader/glow-vertex/index.ts"],"names":[],"mappings":"AAAA,+EAA+E;AAC/E,MAAM,CAAC,MAAM,WAAW,GAAG,UAAU,CAAC;;;;;;CAMrC,CAAC"}
@@ -1,4 +0,0 @@
1
- import type { WorldProperties } from "@sharadox/sharadox-web-library/component/globe/world/type";
2
- /** The planet scene: body, atmosphere, land, arcs and markers. Rotation comes from the drag controller. */
3
- export declare function World({ data, drag, colors }: WorldProperties): import("react").JSX.Element;
4
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../source/component/globe/world/index.tsx"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,2DAA2D,CAAC;AAEjG,2GAA2G;AAC3G,wBAAgB,KAAK,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE,eAAe,+BAsD5D"}
@@ -1,39 +0,0 @@
1
- "use client";
2
- import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
3
- import { useFrame } from "@react-three/fiber";
4
- import { useMemo, useRef } from "react";
5
- import { AdditiveBlending, BackSide, MathUtils, NormalBlending, ShaderMaterial } from "three";
6
- import { CITIES, HOME } from "@sharadox/sharadox-web-library/content/globe";
7
- import { ATMOSPHERE_SHADER } from "@sharadox/sharadox-web-library/component/globe/shader/atmosphere";
8
- import { BODY_SHADER } from "@sharadox/sharadox-web-library/component/globe/shader/body";
9
- import { Arc } from "@sharadox/sharadox-web-library/component/globe/arc";
10
- import { Dots } from "@sharadox/sharadox-web-library/component/globe/dots";
11
- import { Marker } from "@sharadox/sharadox-web-library/component/globe/marker";
12
- /** The planet scene: body, atmosphere, land, arcs and markers. Rotation comes from the drag controller. */
13
- export function World({ data, drag, colors }) {
14
- const group = useRef(null);
15
- useFrame((_, deltaSeconds) => {
16
- const planet = group.current;
17
- if (!planet)
18
- return;
19
- const target = drag.step(deltaSeconds);
20
- planet.rotation.y = MathUtils.damp(planet.rotation.y, target.y, 6, deltaSeconds);
21
- planet.rotation.x = MathUtils.damp(planet.rotation.x, target.x, 6, deltaSeconds);
22
- });
23
- const body = useMemo(() => new ShaderMaterial({
24
- vertexShader: BODY_SHADER.vertex,
25
- fragmentShader: BODY_SHADER.fragment,
26
- uniforms: { base: { value: colors.body }, rimColor: { value: colors.rim } },
27
- }), [colors]);
28
- const atmosphere = useMemo(() => new ShaderMaterial({
29
- vertexShader: ATMOSPHERE_SHADER.vertex,
30
- fragmentShader: ATMOSPHERE_SHADER.fragment,
31
- uniforms: { strength: { value: colors.additive ? 0.42 : 0.2 }, color: { value: colors.ink } },
32
- side: BackSide,
33
- transparent: true,
34
- blending: colors.additive ? AdditiveBlending : NormalBlending,
35
- depthWrite: false,
36
- }), [colors]);
37
- return (_jsxs(_Fragment, { children: [_jsx("mesh", { scale: 1.16, material: atmosphere, children: _jsx("sphereGeometry", { args: [1, 64, 64] }) }), _jsxs("group", { ref: group, children: [_jsx("mesh", { material: body, children: _jsx("sphereGeometry", { args: [0.995, 96, 96] }) }), _jsx(Dots, { data: data, colors: colors }), CITIES.map((city, index) => (_jsx(Arc, { from: HOME, to: city, offset: index / CITIES.length, colors: colors }, index))), CITIES.map((city, index) => (_jsx(Marker, { latitude: city[0], longitude: city[1], color: colors.inkHex }, `marker${index}`))), _jsx(Marker, { latitude: HOME.latitude, longitude: HOME.longitude, color: colors.inkHex, home: true })] })] }));
38
- }
39
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../source/component/globe/world/index.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AACb,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAC9C,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AACxC,OAAO,EAAE,gBAAgB,EAAE,QAAQ,EAAE,SAAS,EAAE,cAAc,EAAE,cAAc,EAAc,MAAM,OAAO,CAAC;AAC1G,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,8CAA8C,CAAC;AAC5E,OAAO,EAAE,iBAAiB,EAAE,MAAM,kEAAkE,CAAC;AACrG,OAAO,EAAE,WAAW,EAAE,MAAM,4DAA4D,CAAC;AACzF,OAAO,EAAE,GAAG,EAAE,MAAM,oDAAoD,CAAC;AACzE,OAAO,EAAE,IAAI,EAAE,MAAM,qDAAqD,CAAC;AAC3E,OAAO,EAAE,MAAM,EAAE,MAAM,uDAAuD,CAAC;AAG/E,2GAA2G;AAC3G,MAAM,UAAU,KAAK,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAmB;IAC3D,MAAM,KAAK,GAAG,MAAM,CAAQ,IAAI,CAAC,CAAC;IAElC,QAAQ,CAAC,CAAC,CAAC,EAAE,YAAY,EAAE,EAAE;QAC3B,MAAM,MAAM,GAAG,KAAK,CAAC,OAAO,CAAC;QAC7B,IAAI,CAAC,MAAM;YAAE,OAAO;QACpB,MAAM,MAAM,GAAG,IAAI,CAAC,IAAI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,CAAC,MAAM,CAAC,CACT,CAAC;IAEF,OAAO,CACL,8BACE,eAAM,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,UAAU,YACrC,yBAAgB,IAAI,EAAE,CAAC,CAAC,EAAE,EAAE,EAAE,EAAE,CAAC,GAAI,GAChC,EACP,iBAAO,GAAG,EAAE,KAAK,aACf,eAAM,QAAQ,EAAE,IAAI,YAClB,yBAAgB,IAAI,EAAE,CAAC,KAAK,EAAE,EAAE,EAAE,EAAE,CAAC,GAAI,GACpC,EACP,KAAC,IAAI,IAAC,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,GAAI,EACnC,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,CAAC,CAC3B,KAAC,GAAG,IAAa,IAAI,EAAE,IAAI,EAAE,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,IAA1E,KAAK,CAAyE,CACzF,CAAC,EACD,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,CAAC,CAC3B,KAAC,MAAM,IAAwB,QAAQ,EAAE,IAAI,CAAC,CAAC,CAAC,EAAE,SAAS,EAAE,IAAI,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,MAAM,CAAC,MAAM,IAA7E,SAAS,KAAK,EAAE,CAAiE,CAC/F,CAAC,EACF,KAAC,MAAM,IAAC,QAAQ,EAAE,IAAI,CAAC,QAAQ,EAAE,SAAS,EAAE,IAAI,CAAC,SAAS,EAAE,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,IAAI,SAAG,IACnF,IACP,CACJ,CAAC;AACJ,CAAC"}
@@ -1,10 +0,0 @@
1
- import type { GlobeColors } from "@sharadox/sharadox-web-library/component/globe/color/type";
2
- import type { GlobeDrag } from "@sharadox/sharadox-web-library/hook/globe-drag/type";
3
- export interface WorldProperties {
4
- /** Float32 [latitude, longitude] land pairs. */
5
- data: Float32Array;
6
- /** Supplies the rotation each frame. */
7
- drag: GlobeDrag;
8
- colors: GlobeColors;
9
- }
10
- //# sourceMappingURL=type.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"type.d.ts","sourceRoot":"","sources":["../../../../source/component/globe/world/type.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,2DAA2D,CAAC;AAC7F,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,qDAAqD,CAAC;AAErF,MAAM,WAAW,eAAe;IAC9B,gDAAgD;IAChD,IAAI,EAAE,YAAY,CAAC;IACnB,wCAAwC;IACxC,IAAI,EAAE,SAAS,CAAC;IAChB,MAAM,EAAE,WAAW,CAAC;CACrB"}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=type.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"type.js","sourceRoot":"","sources":["../../../../source/component/globe/world/type.ts"],"names":[],"mappings":""}
@@ -1,4 +0,0 @@
1
- import type { LocaleLinkProperties } from "@sharadox/sharadox-web-library/component/locale-link/type";
2
- /** A link to the site in another language that remembers the choice, so sharadox.com opens in it next time. */
3
- export declare function LocaleLink({ locale, current, children }: LocaleLinkProperties): import("react").JSX.Element;
4
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../source/component/locale-link/index.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,2DAA2D,CAAC;AAEtG,+GAA+G;AAC/G,wBAAgB,UAAU,CAAC,EAAE,MAAM,EAAE,OAAO,EAAE,QAAQ,EAAE,EAAE,oBAAoB,+BAW7E"}
@@ -1,9 +0,0 @@
1
- "use client";
2
- import { jsx as _jsx } from "react/jsx-runtime";
3
- import Link from "next/link";
4
- import { rememberLocale } from "@sharadox/web-library/internationalization/locale-preference";
5
- /** A link to the site in another language that remembers the choice, so sharadox.com opens in it next time. */
6
- export function LocaleLink({ locale, current, children }) {
7
- return (_jsx(Link, { href: `/${locale}`, hrefLang: locale, "aria-current": current ? "true" : undefined, onClick: () => rememberLocale(locale), children: children }));
8
- }
9
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../source/component/locale-link/index.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AACb,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,cAAc,EAAE,MAAM,8DAA8D,CAAC;AAG9F,+GAA+G;AAC/G,MAAM,UAAU,UAAU,CAAC,EAAE,MAAM,EAAE,OAAO,EAAE,QAAQ,EAAwB;IAC5E,OAAO,CACL,KAAC,IAAI,IACH,IAAI,EAAE,IAAI,MAAM,EAAE,EAClB,QAAQ,EAAE,MAAM,kBACF,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS,EAC1C,OAAO,EAAE,GAAG,EAAE,CAAC,cAAc,CAAC,MAAM,CAAC,YAEpC,QAAQ,GACJ,CACR,CAAC;AACJ,CAAC"}
@@ -1,10 +0,0 @@
1
- import type { ReactNode } from "react";
2
- import type { Locale } from "@sharadox/sharadox-web-library/utility/locale/type";
3
- export interface LocaleLinkProperties {
4
- /** The language the link switches to. */
5
- locale: Locale;
6
- /** Marks the link for the language being shown. */
7
- current?: boolean;
8
- children: ReactNode;
9
- }
10
- //# sourceMappingURL=type.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"type.d.ts","sourceRoot":"","sources":["../../../source/component/locale-link/type.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,oDAAoD,CAAC;AAEjF,MAAM,WAAW,oBAAoB;IACnC,yCAAyC;IACzC,MAAM,EAAE,MAAM,CAAC;IACf,mDAAmD;IACnD,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,QAAQ,EAAE,SAAS,CAAC;CACrB"}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=type.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"type.js","sourceRoot":"","sources":["../../../source/component/locale-link/type.ts"],"names":[],"mappings":""}
@@ -1,10 +0,0 @@
1
- import type { GlobeDrag } from "@sharadox/sharadox-web-library/hook/globe-drag/type";
2
- /**
3
- * Drag-to-spin with inertia, a slow auto-rotation that eases back in after a drag,
4
- * and a small tilt towards the cursor. Attach the returned reference to the element that receives the pointer.
5
- */
6
- export declare function useGlobeDrag(initial: {
7
- x: number;
8
- y: number;
9
- }, autoRotate: boolean): readonly [import("react").RefObject<HTMLDivElement | null>, GlobeDrag];
10
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../source/hook/globe-drag/index.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,qDAAqD,CAAC;AAErF;;;GAGG;AACH,wBAAgB,YAAY,CAAC,OAAO,EAAE;IAAE,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAA;CAAE,EAAE,UAAU,EAAE,OAAO,0EA6FlF"}
@@ -1,99 +0,0 @@
1
- "use client";
2
- import { clamp } from "@sharadox/web-library/math/clamp";
3
- import { useEffect, useRef, useState } from "react";
4
- /**
5
- * Drag-to-spin with inertia, a slow auto-rotation that eases back in after a drag,
6
- * and a small tilt towards the cursor. Attach the returned reference to the element that receives the pointer.
7
- */
8
- export function useGlobeDrag(initial, autoRotate) {
9
- const target = useRef(null);
10
- const [drag] = useState(() => {
11
- const state = {
12
- rotationX: initial.x,
13
- rotationY: initial.y,
14
- velocityX: 0,
15
- velocityY: 0,
16
- dragging: false,
17
- lastX: 0,
18
- lastY: 0,
19
- idleSeconds: 0,
20
- tiltX: 0,
21
- tiltY: 0,
22
- };
23
- const controller = {
24
- down(event) {
25
- state.dragging = true;
26
- state.lastX = event.clientX;
27
- state.lastY = event.clientY;
28
- },
29
- move(event, element) {
30
- const bounds = element.getBoundingClientRect();
31
- state.tiltX = ((event.clientY - bounds.top) / bounds.height - 0.5) * 0.18;
32
- state.tiltY = ((event.clientX - bounds.left) / bounds.width - 0.5) * 0.18;
33
- if (!state.dragging)
34
- return;
35
- const speed = 2.6 / Math.max(bounds.width, 1);
36
- state.velocityY = (event.clientX - state.lastX) * speed;
37
- state.velocityX = (event.clientY - state.lastY) * speed;
38
- state.lastX = event.clientX;
39
- state.lastY = event.clientY;
40
- state.rotationY += state.velocityY;
41
- state.rotationX = clamp(state.rotationX + state.velocityX, -0.9, 1.1);
42
- state.idleSeconds = 0;
43
- },
44
- up() {
45
- state.dragging = false;
46
- },
47
- leave() {
48
- state.tiltX = 0;
49
- state.tiltY = 0;
50
- },
51
- step(deltaSeconds) {
52
- if (!state.dragging) {
53
- state.rotationY += state.velocityY;
54
- state.rotationX = clamp(state.rotationX + state.velocityX, -0.9, 1.1);
55
- state.velocityY *= 0.94;
56
- state.velocityX *= 0.9;
57
- state.idleSeconds += deltaSeconds;
58
- if (autoRotate)
59
- state.rotationY += deltaSeconds * 0.06 * Math.min(1, state.idleSeconds / 2);
60
- }
61
- return { x: state.rotationX + state.tiltX, y: state.rotationY + state.tiltY };
62
- },
63
- };
64
- return controller;
65
- });
66
- useEffect(() => {
67
- const element = target.current;
68
- if (!element)
69
- return;
70
- const down = (event) => {
71
- drag.down(event, element);
72
- element.setPointerCapture(event.pointerId);
73
- element.style.cursor = "grabbing";
74
- };
75
- const move = (event) => drag.move(event, element);
76
- const up = (event) => {
77
- drag.up();
78
- element.style.cursor = "grab";
79
- if (element.hasPointerCapture(event.pointerId))
80
- element.releasePointerCapture(event.pointerId);
81
- };
82
- element.style.cursor = "grab";
83
- element.style.touchAction = "pan-y";
84
- element.addEventListener("pointerdown", down);
85
- element.addEventListener("pointermove", move);
86
- element.addEventListener("pointerup", up);
87
- element.addEventListener("pointercancel", up);
88
- element.addEventListener("pointerleave", drag.leave);
89
- return () => {
90
- element.removeEventListener("pointerdown", down);
91
- element.removeEventListener("pointermove", move);
92
- element.removeEventListener("pointerup", up);
93
- element.removeEventListener("pointercancel", up);
94
- element.removeEventListener("pointerleave", drag.leave);
95
- };
96
- }, [drag]);
97
- return [target, drag];
98
- }
99
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../source/hook/globe-drag/index.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;AACb,OAAO,EAAE,KAAK,EAAE,MAAM,kCAAkC,CAAC;AACzD,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAGpD;;;GAGG;AACH,MAAM,UAAU,YAAY,CAAC,OAAiC,EAAE,UAAmB;IACjF,MAAM,MAAM,GAAG,MAAM,CAAiB,IAAI,CAAC,CAAC;IAC5C,MAAM,CAAC,IAAI,CAAC,GAAG,QAAQ,CAAC,GAAG,EAAE;QAC3B,MAAM,KAAK,GAAG;YACZ,SAAS,EAAE,OAAO,CAAC,CAAC;YACpB,SAAS,EAAE,OAAO,CAAC,CAAC;YACpB,SAAS,EAAE,CAAC;YACZ,SAAS,EAAE,CAAC;YACZ,QAAQ,EAAE,KAAK;YACf,KAAK,EAAE,CAAC;YACR,KAAK,EAAE,CAAC;YACR,WAAW,EAAE,CAAC;YACd,KAAK,EAAE,CAAC;YACR,KAAK,EAAE,CAAC;SACT,CAAC;QACF,MAAM,UAAU,GAKZ;YACF,IAAI,CAAC,KAAK;gBACR,KAAK,CAAC,QAAQ,GAAG,IAAI,CAAC;gBACtB,KAAK,CAAC,KAAK,GAAG,KAAK,CAAC,OAAO,CAAC;gBAC5B,KAAK,CAAC,KAAK,GAAG,KAAK,CAAC,OAAO,CAAC;YAC9B,CAAC;YACD,IAAI,CAAC,KAAK,EAAE,OAAO;gBACjB,MA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,0 @@
1
- /** The rotation to apply this frame, in radians. */
2
- export interface GlobeRotation {
3
- x: number;
4
- y: number;
5
- }
6
- /** Drag-to-spin controller for the globe. */
7
- export interface GlobeDrag {
8
- /** Advances inertia and auto-rotation by `deltaSeconds` and returns the target rotation. */
9
- step: (deltaSeconds: number) => GlobeRotation;
10
- }
11
- //# sourceMappingURL=type.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"type.d.ts","sourceRoot":"","sources":["../../../source/hook/globe-drag/type.ts"],"names":[],"mappings":"AAAA,oDAAoD;AACpD,MAAM,WAAW,aAAa;IAC5B,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX;AAED,6CAA6C;AAC7C,MAAM,WAAW,SAAS;IACxB,4FAA4F;IAC5F,IAAI,EAAE,CAAC,YAAY,EAAE,MAAM,KAAK,aAAa,CAAC;CAC/C"}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=type.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"type.js","sourceRoot":"","sources":["../../../source/hook/globe-drag/type.ts"],"names":[],"mappings":""}
@@ -1,3 +0,0 @@
1
- /** Loads the precomputed land dots (Float32 latitude/longitude pairs) for the globe. */
2
- export declare function useLandPoints(url?: string): Float32Array<ArrayBufferLike> | null;
3
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../source/hook/land-points/index.ts"],"names":[],"mappings":"AAGA,wFAAwF;AACxF,wBAAgB,aAAa,CAAC,GAAG,SAAoB,wCAYpD"}
@@ -1,17 +0,0 @@
1
- "use client";
2
- import { useEffect, useState } from "react";
3
- /** Loads the precomputed land dots (Float32 latitude/longitude pairs) for the globe. */
4
- export function useLandPoints(url = "/globe/land.bin") {
5
- const [points, setPoints] = useState(null);
6
- useEffect(() => {
7
- let live = true;
8
- fetch(url)
9
- .then((response) => response.arrayBuffer())
10
- .then((buffer) => live && setPoints(new Float32Array(buffer)));
11
- return () => {
12
- live = false;
13
- };
14
- }, [url]);
15
- return points;
16
- }
17
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../source/hook/land-points/index.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;AACb,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAE5C,wFAAwF;AACxF,MAAM,UAAU,aAAa,CAAC,GAAG,GAAG,iBAAiB;IACnD,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG,QAAQ,CAAsB,IAAI,CAAC,CAAC;IAChE,SAAS,CAAC,GAAG,EAAE;QACb,IAAI,IAAI,GAAG,IAAI,CAAC;QAChB,KAAK,CAAC,GAAG,CAAC;aACP,IAAI,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,QAAQ,CAAC,WAAW,EAAE,CAAC;aAC1C,IAAI,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,IAAI,IAAI,SAAS,CAAC,IAAI,YAAY,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;QACjE,OAAO,GAAG,EAAE;YACV,IAAI,GAAG,KAAK,CAAC;QACf,CAAC,CAAC;IACJ,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IACV,OAAO,MAAM,CAAC;AAChB,CAAC"}
@@ -1 +0,0 @@
1
-
@@ -1,3 +0,0 @@
1
- /** "#rrggbb" (or "#rgb") as red, green and blue from 0 to 1, for shader colours. */
2
- export declare function hexChannel(hex: string): [number, number, number];
3
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../source/utility/hex-channel/index.ts"],"names":[],"mappings":"AAAA,oFAAoF;AACpF,wBAAgB,UAAU,CAAC,GAAG,EAAE,MAAM,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAKhE"}
@@ -1,8 +0,0 @@
1
- /** "#rrggbb" (or "#rgb") as red, green and blue from 0 to 1, for shader colours. */
2
- export function hexChannel(hex) {
3
- const digits = hex.replace("#", "");
4
- const full = digits.length === 3 ? [...digits].map((digit) => digit + digit).join("") : digits;
5
- const value = Number.parseInt(full, 16);
6
- return [((value >> 16) & 255) / 255, ((value >> 8) & 255) / 255, (value & 255) / 255];
7
- }
8
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../source/utility/hex-channel/index.ts"],"names":[],"mappings":"AAAA,oFAAoF;AACpF,MAAM,UAAU,UAAU,CAAC,GAAW;IACpC,MAAM,MAAM,GAAG,GAAG,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC;IACpC,MAAM,IAAI,GAAG,MAAM,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,MAAM,CAAC,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,GAAG,KAAK,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC;IAC/F,MAAM,KAAK,GAAG,MAAM,CAAC,QAAQ,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;IACxC,OAAO,CAAC,CAAC,CAAC,KAAK,IAAI,EAAE,CAAC,GAAG,GAAG,CAAC,GAAG,GAAG,EAAE,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC,GAAG,GAAG,CAAC,GAAG,GAAG,EAAE,CAAC,KAAK,GAAG,GAAG,CAAC,GAAG,GAAG,CAAC,CAAC;AACxF,CAAC"}
@@ -1,7 +0,0 @@
1
- import { Vector3 } from "three";
2
- /**
3
- * A point on a sphere of `radius`. Longitude 0 faces the camera (+z), so
4
- * `rotation.y = -longitude` brings a longitude to the front and `rotation.x = latitude` centres a latitude.
5
- */
6
- export declare function latitudeLongitudeToVector(latitude: number, longitude: number, radius?: number): Vector3;
7
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../source/utility/latitude-longitude-to-vector/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAGhC;;;GAGG;AACH,wBAAgB,yBAAyB,CAAC,QAAQ,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,SAAI,GAAG,OAAO,CAQlG"}
@@ -1,12 +0,0 @@
1
- import { Vector3 } from "three";
2
- import { radians } from "@sharadox/web-library/math/radians";
3
- /**
4
- * A point on a sphere of `radius`. Longitude 0 faces the camera (+z), so
5
- * `rotation.y = -longitude` brings a longitude to the front and `rotation.x = latitude` centres a latitude.
6
- */
7
- export function latitudeLongitudeToVector(latitude, longitude, radius = 1) {
8
- const latitudeRadians = radians(latitude);
9
- const longitudeRadians = radians(longitude);
10
- return new Vector3(radius * Math.cos(latitudeRadians) * Math.sin(longitudeRadians), radius * Math.sin(latitudeRadians), radius * Math.cos(latitudeRadians) * Math.cos(longitudeRadians));
11
- }
12
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../source/utility/latitude-longitude-to-vector/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAChC,OAAO,EAAE,OAAO,EAAE,MAAM,oCAAoC,CAAC;AAE7D;;;GAGG;AACH,MAAM,UAAU,yBAAyB,CAAC,QAAgB,EAAE,SAAiB,EAAE,MAAM,GAAG,CAAC;IACvF,MAAM,eAAe,GAAG,OAAO,CAAC,QAAQ,CAAC,CAAC;IAC1C,MAAM,gBAAgB,GAAG,OAAO,CAAC,SAAS,CAAC,CAAC;IAC5C,OAAO,IAAI,OAAO,CAChB,MAAM,GAAG,IAAI,CAAC,GAAG,CAAC,eAAe,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,gBAAgB,CAAC,EAC/D,MAAM,GAAG,IAAI,CAAC,GAAG,CAAC,eAAe,CAAC,EAClC,MAAM,GAAG,IAAI,CAAC,GAAG,CAAC,eAAe,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,gBAAgB,CAAC,CAChE,CAAC;AACJ,CAAC"}
@@ -1,6 +0,0 @@
1
- import type { Locale } from "@sharadox/sharadox-web-library/utility/locale/type";
2
- /** Every language sharadox.com is published in. The first one is the default (x-default). */
3
- export declare const LOCALES: readonly Locale[];
4
- /** Narrows an untrusted route segment to one of the site's locales. */
5
- export declare function isSiteLocale(value: string): value is Locale;
6
- //# sourceMappingURL=index.d.ts.map