@buoy-gg/shared-ui 7.0.26 → 7.0.28
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/lib/commonjs/JsModal.js +156 -20
- package/lib/commonjs/JsModal.web.js +85 -39
- package/lib/commonjs/dataViewer/VirtualizedDataExplorer.js +14 -4
- package/lib/commonjs/dataViewer/diffThemes.js +20 -18
- package/lib/commonjs/dataViewer/tree/TreeDiffViewer.js +8 -8
- package/lib/commonjs/hooks/safe-area-impl.js +1 -1
- package/lib/commonjs/icons/lucide-icons.js +74 -15
- package/lib/commonjs/index.js +86 -0
- package/lib/commonjs/ui/backgrounds/BackgroundSwitcher.js +248 -74
- package/lib/commonjs/ui/backgrounds/README.md +102 -20
- package/lib/commonjs/ui/backgrounds/backgroundStore.js +20 -6
- package/lib/commonjs/ui/backgrounds/index.js +91 -1
- package/lib/commonjs/ui/backgrounds/primitives.js +50 -14
- package/lib/commonjs/ui/backgrounds/registry.js +41 -64
- package/lib/commonjs/ui/backgrounds/rng.js +21 -0
- package/lib/commonjs/ui/backgrounds/skyClock.js +45 -0
- package/lib/commonjs/ui/backgrounds/variants/daylight.js +453 -0
- package/lib/commonjs/ui/backgrounds/variants/deepField.js +60 -30
- package/lib/commonjs/ui/backgrounds/variants/hyperspace.js +218 -0
- package/lib/commonjs/ui/backgrounds/variants/liveSky.js +898 -0
- package/lib/commonjs/ui/backgrounds/variants/meteors.js +257 -0
- package/lib/commonjs/ui/backgrounds/variants/moonlight.js +472 -0
- package/lib/commonjs/ui/backgrounds/variants/underwater.js +757 -0
- package/lib/commonjs/ui/components/Badge.js +11 -10
- package/lib/commonjs/ui/components/CompactRow.js +35 -18
- package/lib/commonjs/ui/components/CopyButton.js +6 -4
- package/lib/commonjs/ui/components/DevToolsCard.js +16 -9
- package/lib/commonjs/ui/components/DynamicFilterView.js +43 -41
- package/lib/commonjs/ui/components/EventStepperFooter.js +38 -10
- package/lib/commonjs/ui/components/FilterComponents.js +11 -11
- package/lib/commonjs/ui/components/ModalHeader.js +28 -15
- package/lib/commonjs/ui/components/SectionHeader.js +3 -1
- package/lib/commonjs/ui/components/StorageTypeBadge.js +3 -2
- package/lib/commonjs/ui/components/TabSelector.js +56 -38
- package/lib/commonjs/ui/components/ValueTypeBadge.js +7 -6
- package/lib/commonjs/ui/components/WindowControls.js +37 -10
- package/lib/commonjs/ui/gameUI/constants/gameUIColors.js +8 -0
- package/lib/commonjs/ui/night/nightTheme.js +120 -0
- package/lib/commonjs/ui/night/primitives.js +498 -0
- package/lib/module/JsModal.js +156 -20
- package/lib/module/JsModal.web.js +83 -39
- package/lib/module/dataViewer/VirtualizedDataExplorer.js +14 -4
- package/lib/module/dataViewer/diffThemes.js +20 -18
- package/lib/module/dataViewer/tree/TreeDiffViewer.js +9 -9
- package/lib/module/hooks/safe-area-impl.js +1 -1
- package/lib/module/icons/lucide-icons.js +74 -15
- package/lib/module/index.js +4 -0
- package/lib/module/ui/backgrounds/BackgroundSwitcher.js +250 -76
- package/lib/module/ui/backgrounds/README.md +102 -20
- package/lib/module/ui/backgrounds/backgroundStore.js +19 -5
- package/lib/module/ui/backgrounds/index.js +11 -2
- package/lib/module/ui/backgrounds/primitives.js +53 -16
- package/lib/module/ui/backgrounds/registry.js +41 -64
- package/lib/module/ui/backgrounds/rng.js +20 -0
- package/lib/module/ui/backgrounds/skyClock.js +39 -0
- package/lib/module/ui/backgrounds/variants/daylight.js +449 -0
- package/lib/module/ui/backgrounds/variants/deepField.js +62 -31
- package/lib/module/ui/backgrounds/variants/hyperspace.js +214 -0
- package/lib/module/ui/backgrounds/variants/liveSky.js +893 -0
- package/lib/module/ui/backgrounds/variants/meteors.js +253 -0
- package/lib/module/ui/backgrounds/variants/moonlight.js +468 -0
- package/lib/module/ui/backgrounds/variants/underwater.js +753 -0
- package/lib/module/ui/components/Badge.js +11 -10
- package/lib/module/ui/components/CompactRow.js +35 -18
- package/lib/module/ui/components/CopyButton.js +6 -4
- package/lib/module/ui/components/DevToolsCard.js +16 -9
- package/lib/module/ui/components/DynamicFilterView.js +43 -41
- package/lib/module/ui/components/EventStepperFooter.js +38 -10
- package/lib/module/ui/components/FilterComponents.js +11 -11
- package/lib/module/ui/components/ModalHeader.js +28 -15
- package/lib/module/ui/components/SectionHeader.js +3 -1
- package/lib/module/ui/components/StorageTypeBadge.js +3 -2
- package/lib/module/ui/components/TabSelector.js +57 -39
- package/lib/module/ui/components/ValueTypeBadge.js +7 -6
- package/lib/module/ui/components/WindowControls.js +37 -10
- package/lib/module/ui/gameUI/constants/gameUIColors.js +8 -0
- package/lib/module/ui/night/nightTheme.js +116 -0
- package/lib/module/ui/night/primitives.js +485 -0
- package/lib/typescript/commonjs/JsModal.d.ts +18 -0
- package/lib/typescript/commonjs/JsModal.d.ts.map +1 -1
- package/lib/typescript/commonjs/JsModal.web.d.ts +13 -0
- package/lib/typescript/commonjs/JsModal.web.d.ts.map +1 -1
- package/lib/typescript/commonjs/dataViewer/VirtualizedDataExplorer.d.ts.map +1 -1
- package/lib/typescript/commonjs/dataViewer/diffThemes.d.ts +3 -1
- package/lib/typescript/commonjs/dataViewer/diffThemes.d.ts.map +1 -1
- package/lib/typescript/commonjs/dataViewer/tree/TreeDiffViewer.d.ts.map +1 -1
- package/lib/typescript/commonjs/hooks/safe-area-impl.d.ts +1 -1
- package/lib/typescript/commonjs/icons/lucide-icons.d.ts +12 -1
- package/lib/typescript/commonjs/icons/lucide-icons.d.ts.map +1 -1
- package/lib/typescript/commonjs/index.d.ts +3 -0
- package/lib/typescript/commonjs/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/backgrounds/BackgroundSwitcher.d.ts +26 -6
- package/lib/typescript/commonjs/ui/backgrounds/BackgroundSwitcher.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/backgrounds/backgroundStore.d.ts +3 -0
- package/lib/typescript/commonjs/ui/backgrounds/backgroundStore.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/backgrounds/index.d.ts +7 -1
- package/lib/typescript/commonjs/ui/backgrounds/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/backgrounds/primitives.d.ts +18 -3
- package/lib/typescript/commonjs/ui/backgrounds/primitives.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/backgrounds/registry.d.ts +8 -0
- package/lib/typescript/commonjs/ui/backgrounds/registry.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/backgrounds/rng.d.ts +6 -0
- package/lib/typescript/commonjs/ui/backgrounds/rng.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/backgrounds/skyClock.d.ts +17 -0
- package/lib/typescript/commonjs/ui/backgrounds/skyClock.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/backgrounds/types.d.ts +1 -1
- package/lib/typescript/commonjs/ui/backgrounds/types.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/backgrounds/variants/daylight.d.ts +30 -0
- package/lib/typescript/commonjs/ui/backgrounds/variants/daylight.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/backgrounds/variants/deepField.d.ts +19 -4
- package/lib/typescript/commonjs/ui/backgrounds/variants/deepField.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/backgrounds/variants/hyperspace.d.ts +39 -0
- package/lib/typescript/commonjs/ui/backgrounds/variants/hyperspace.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/backgrounds/variants/liveSky.d.ts +41 -0
- package/lib/typescript/commonjs/ui/backgrounds/variants/liveSky.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/backgrounds/variants/meteors.d.ts +26 -0
- package/lib/typescript/commonjs/ui/backgrounds/variants/meteors.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/backgrounds/variants/moonlight.d.ts +35 -0
- package/lib/typescript/commonjs/ui/backgrounds/variants/moonlight.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/backgrounds/variants/underwater.d.ts +51 -0
- package/lib/typescript/commonjs/ui/backgrounds/variants/underwater.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/components/Badge.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/CompactRow.d.ts +3 -1
- package/lib/typescript/commonjs/ui/components/CompactRow.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/CopyButton.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/DevToolsCard.d.ts +3 -1
- package/lib/typescript/commonjs/ui/components/DevToolsCard.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/DynamicFilterView.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/EventStepperFooter.d.ts +2 -0
- package/lib/typescript/commonjs/ui/components/EventStepperFooter.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/ModalHeader.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/StorageTypeBadge.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/TabSelector.d.ts +9 -0
- package/lib/typescript/commonjs/ui/components/TabSelector.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/ValueTypeBadge.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/WindowControls.d.ts +4 -2
- package/lib/typescript/commonjs/ui/components/WindowControls.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/gameUI/constants/gameUIColors.d.ts +8 -0
- package/lib/typescript/commonjs/ui/gameUI/constants/gameUIColors.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/night/nightTheme.d.ts +113 -0
- package/lib/typescript/commonjs/ui/night/nightTheme.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/night/primitives.d.ts +111 -0
- package/lib/typescript/commonjs/ui/night/primitives.d.ts.map +1 -0
- package/lib/typescript/module/JsModal.d.ts +18 -0
- package/lib/typescript/module/JsModal.d.ts.map +1 -1
- package/lib/typescript/module/JsModal.web.d.ts +13 -0
- package/lib/typescript/module/JsModal.web.d.ts.map +1 -1
- package/lib/typescript/module/dataViewer/VirtualizedDataExplorer.d.ts.map +1 -1
- package/lib/typescript/module/dataViewer/diffThemes.d.ts +3 -1
- package/lib/typescript/module/dataViewer/diffThemes.d.ts.map +1 -1
- package/lib/typescript/module/dataViewer/tree/TreeDiffViewer.d.ts.map +1 -1
- package/lib/typescript/module/hooks/safe-area-impl.d.ts +1 -1
- package/lib/typescript/module/icons/lucide-icons.d.ts +12 -1
- package/lib/typescript/module/icons/lucide-icons.d.ts.map +1 -1
- package/lib/typescript/module/index.d.ts +3 -0
- package/lib/typescript/module/index.d.ts.map +1 -1
- package/lib/typescript/module/ui/backgrounds/BackgroundSwitcher.d.ts +26 -6
- package/lib/typescript/module/ui/backgrounds/BackgroundSwitcher.d.ts.map +1 -1
- package/lib/typescript/module/ui/backgrounds/backgroundStore.d.ts +3 -0
- package/lib/typescript/module/ui/backgrounds/backgroundStore.d.ts.map +1 -1
- package/lib/typescript/module/ui/backgrounds/index.d.ts +7 -1
- package/lib/typescript/module/ui/backgrounds/index.d.ts.map +1 -1
- package/lib/typescript/module/ui/backgrounds/primitives.d.ts +18 -3
- package/lib/typescript/module/ui/backgrounds/primitives.d.ts.map +1 -1
- package/lib/typescript/module/ui/backgrounds/registry.d.ts +8 -0
- package/lib/typescript/module/ui/backgrounds/registry.d.ts.map +1 -1
- package/lib/typescript/module/ui/backgrounds/rng.d.ts +6 -0
- package/lib/typescript/module/ui/backgrounds/rng.d.ts.map +1 -1
- package/lib/typescript/module/ui/backgrounds/skyClock.d.ts +17 -0
- package/lib/typescript/module/ui/backgrounds/skyClock.d.ts.map +1 -0
- package/lib/typescript/module/ui/backgrounds/types.d.ts +1 -1
- package/lib/typescript/module/ui/backgrounds/types.d.ts.map +1 -1
- package/lib/typescript/module/ui/backgrounds/variants/daylight.d.ts +30 -0
- package/lib/typescript/module/ui/backgrounds/variants/daylight.d.ts.map +1 -0
- package/lib/typescript/module/ui/backgrounds/variants/deepField.d.ts +19 -4
- package/lib/typescript/module/ui/backgrounds/variants/deepField.d.ts.map +1 -1
- package/lib/typescript/module/ui/backgrounds/variants/hyperspace.d.ts +39 -0
- package/lib/typescript/module/ui/backgrounds/variants/hyperspace.d.ts.map +1 -0
- package/lib/typescript/module/ui/backgrounds/variants/liveSky.d.ts +41 -0
- package/lib/typescript/module/ui/backgrounds/variants/liveSky.d.ts.map +1 -0
- package/lib/typescript/module/ui/backgrounds/variants/meteors.d.ts +26 -0
- package/lib/typescript/module/ui/backgrounds/variants/meteors.d.ts.map +1 -0
- package/lib/typescript/module/ui/backgrounds/variants/moonlight.d.ts +35 -0
- package/lib/typescript/module/ui/backgrounds/variants/moonlight.d.ts.map +1 -0
- package/lib/typescript/module/ui/backgrounds/variants/underwater.d.ts +51 -0
- package/lib/typescript/module/ui/backgrounds/variants/underwater.d.ts.map +1 -0
- package/lib/typescript/module/ui/components/Badge.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/CompactRow.d.ts +3 -1
- package/lib/typescript/module/ui/components/CompactRow.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/CopyButton.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/DevToolsCard.d.ts +3 -1
- package/lib/typescript/module/ui/components/DevToolsCard.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/DynamicFilterView.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/EventStepperFooter.d.ts +2 -0
- package/lib/typescript/module/ui/components/EventStepperFooter.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/ModalHeader.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/StorageTypeBadge.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/TabSelector.d.ts +9 -0
- package/lib/typescript/module/ui/components/TabSelector.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/ValueTypeBadge.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/WindowControls.d.ts +4 -2
- package/lib/typescript/module/ui/components/WindowControls.d.ts.map +1 -1
- package/lib/typescript/module/ui/gameUI/constants/gameUIColors.d.ts +8 -0
- package/lib/typescript/module/ui/gameUI/constants/gameUIColors.d.ts.map +1 -1
- package/lib/typescript/module/ui/night/nightTheme.d.ts +113 -0
- package/lib/typescript/module/ui/night/nightTheme.d.ts.map +1 -0
- package/lib/typescript/module/ui/night/primitives.d.ts +111 -0
- package/lib/typescript/module/ui/night/primitives.d.ts.map +1 -0
- package/package.json +4 -4
- package/lib/commonjs/ui/backgrounds/variants/lattice.js +0 -579
- package/lib/commonjs/ui/backgrounds/variants/starfield.js +0 -210
- package/lib/module/ui/backgrounds/variants/lattice.js +0 -575
- package/lib/module/ui/backgrounds/variants/starfield.js +0 -206
- package/lib/typescript/commonjs/ui/backgrounds/variants/lattice.d.ts +0 -33
- package/lib/typescript/commonjs/ui/backgrounds/variants/lattice.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/backgrounds/variants/starfield.d.ts +0 -12
- package/lib/typescript/commonjs/ui/backgrounds/variants/starfield.d.ts.map +0 -1
- package/lib/typescript/module/ui/backgrounds/variants/lattice.d.ts +0 -33
- package/lib/typescript/module/ui/backgrounds/variants/lattice.d.ts.map +0 -1
- package/lib/typescript/module/ui/backgrounds/variants/starfield.d.ts +0 -12
- package/lib/typescript/module/ui/backgrounds/variants/starfield.d.ts.map +0 -1
|
@@ -0,0 +1,253 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* MeteorShower — shooting stars that slam into the walls.
|
|
5
|
+
*
|
|
6
|
+
* Each meteor streaks in from off-screen, hits an EDGE of the surface, and
|
|
7
|
+
* bursts: a flash, an expanding shockwave ring (half-clipped by the wall,
|
|
8
|
+
* which is what sells the impact), and a handful of sparks ricocheting back
|
|
9
|
+
* into the room. The whole life cycle — parked invisible, streak, impact,
|
|
10
|
+
* decay — is keyframed into interpolate stops on ONE plain native loop per
|
|
11
|
+
* meteor; `Animated.sequence([timing, loop])` silently fails to drive
|
|
12
|
+
* natively, so nothing here sequences.
|
|
13
|
+
*
|
|
14
|
+
* This used to be a standalone "Meteors" preset with its own 40-star sky;
|
|
15
|
+
* that scene was folded into Deep Field (which supplies the far better sky),
|
|
16
|
+
* so what remains is just the meteor LAYER — transparent, composed on top of
|
|
17
|
+
* a host scene by `deepField.tsx`.
|
|
18
|
+
*
|
|
19
|
+
* Same contract as ../README.md: keyframes on module-load constants, no
|
|
20
|
+
* `transformOrigin`.
|
|
21
|
+
*/
|
|
22
|
+
|
|
23
|
+
import { memo } from "react";
|
|
24
|
+
import { Animated, View } from "react-native";
|
|
25
|
+
import { absoluteFill } from "../../../utils/absoluteFill.js";
|
|
26
|
+
import { RadialGlow, useLoop } from "../primitives.js";
|
|
27
|
+
import { withAlpha } from "../rng.js";
|
|
28
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
29
|
+
/**
|
|
30
|
+
* `to` is ON a wall — that's the impact point. `sparkArc` is the hemisphere
|
|
31
|
+
* (in degrees) sparks scatter into, pointed back away from the wall the
|
|
32
|
+
* meteor just hit. Different periods keep the two impacts from syncing up.
|
|
33
|
+
*/
|
|
34
|
+
const METEORS = [{
|
|
35
|
+
from: [0.08, -0.06],
|
|
36
|
+
to: [0.99, 0.36],
|
|
37
|
+
periodMs: 11000,
|
|
38
|
+
window: [0.05, 0.15],
|
|
39
|
+
sparkArc: [110, 250] // right wall → sparks fly left
|
|
40
|
+
}, {
|
|
41
|
+
from: [0.92, -0.08],
|
|
42
|
+
to: [0.01, 0.62],
|
|
43
|
+
periodMs: 15500,
|
|
44
|
+
window: [0.56, 0.66],
|
|
45
|
+
sparkArc: [-70, 70] // left wall → sparks fly right
|
|
46
|
+
}];
|
|
47
|
+
const SPARKS_PER_IMPACT = 6;
|
|
48
|
+
const SHOCKWAVE_DIA = 92;
|
|
49
|
+
const Meteor = /*#__PURE__*/memo(function Meteor({
|
|
50
|
+
index,
|
|
51
|
+
width,
|
|
52
|
+
height,
|
|
53
|
+
animated
|
|
54
|
+
}) {
|
|
55
|
+
const m = METEORS[index];
|
|
56
|
+
const t = useLoop(m.periodMs, animated);
|
|
57
|
+
const [a, b] = m.window;
|
|
58
|
+
const x0 = m.from[0] * width;
|
|
59
|
+
const y0 = m.from[1] * height;
|
|
60
|
+
const x1 = m.to[0] * width;
|
|
61
|
+
const y1 = m.to[1] * height;
|
|
62
|
+
const angleRad = Math.atan2(y1 - y0, x1 - x0);
|
|
63
|
+
const angle = angleRad * 180 / Math.PI;
|
|
64
|
+
// The 108x16 box rotates about its center (54, 8) and the bright head sits
|
|
65
|
+
// at local (96, 8), so the head leads the box's top-left corner by this
|
|
66
|
+
// much in world space. Translations must anchor the HEAD to the path, or it
|
|
67
|
+
// crosses the wall long before t=b and the burst lands off the flight line.
|
|
68
|
+
const headDx = 54 + 42 * Math.cos(angleRad);
|
|
69
|
+
const headDy = 8 + 42 * Math.sin(angleRad);
|
|
70
|
+
|
|
71
|
+
// --- The streak ---------------------------------------------------------
|
|
72
|
+
const translateX = t.interpolate({
|
|
73
|
+
inputRange: [0, a, b, 1],
|
|
74
|
+
outputRange: [x0 - headDx, x0 - headDx, x1 - headDx, x1 - headDx]
|
|
75
|
+
});
|
|
76
|
+
const translateY = t.interpolate({
|
|
77
|
+
inputRange: [0, a, b, 1],
|
|
78
|
+
outputRange: [y0 - headDy, y0 - headDy, y1 - headDy, y1 - headDy]
|
|
79
|
+
});
|
|
80
|
+
const streakOpacity = t.interpolate({
|
|
81
|
+
inputRange: [0, a, a + (b - a) * 0.15, b - (b - a) * 0.1, b, 1],
|
|
82
|
+
outputRange: [0, 0, 1, 1, 0, 0]
|
|
83
|
+
});
|
|
84
|
+
const trail = [];
|
|
85
|
+
for (let i = 0; i < 8; i++) {
|
|
86
|
+
const d = 2.4 - i * 0.24;
|
|
87
|
+
trail.push(/*#__PURE__*/_jsx(View, {
|
|
88
|
+
style: {
|
|
89
|
+
position: "absolute",
|
|
90
|
+
left: 96 - (i + 1) * 11,
|
|
91
|
+
top: 8 - d / 2,
|
|
92
|
+
width: d,
|
|
93
|
+
height: d,
|
|
94
|
+
borderRadius: d / 2,
|
|
95
|
+
backgroundColor: withAlpha("#C9D9F0", 0.68 - i * 0.08)
|
|
96
|
+
}
|
|
97
|
+
}, i));
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
// --- The impact ---------------------------------------------------------
|
|
101
|
+
// Everything below reads the SAME loop value; the burst simply lives in the
|
|
102
|
+
// slice of the timeline right after the streak arrives at the wall.
|
|
103
|
+
const flashOpacity = t.interpolate({
|
|
104
|
+
inputRange: [0, b, Math.min(b + 0.012, 0.999), Math.min(b + 0.07, 0.9995), 1],
|
|
105
|
+
outputRange: [0, 0, 1, 0, 0]
|
|
106
|
+
});
|
|
107
|
+
const flashScale = t.interpolate({
|
|
108
|
+
inputRange: [0, b, Math.min(b + 0.07, 0.999), 1],
|
|
109
|
+
outputRange: [0.4, 0.4, 1.4, 1.4]
|
|
110
|
+
});
|
|
111
|
+
const waveOpacity = t.interpolate({
|
|
112
|
+
inputRange: [0, b, Math.min(b + 0.02, 0.999), Math.min(b + 0.11, 0.9995), 1],
|
|
113
|
+
outputRange: [0, 0, 0.85, 0, 0]
|
|
114
|
+
});
|
|
115
|
+
const waveScale = t.interpolate({
|
|
116
|
+
inputRange: [0, b, Math.min(b + 0.11, 0.999), 1],
|
|
117
|
+
outputRange: [0.12, 0.12, 1, 1]
|
|
118
|
+
});
|
|
119
|
+
const sparks = [];
|
|
120
|
+
for (let i = 0; i < SPARKS_PER_IMPACT; i++) {
|
|
121
|
+
// Deterministic fan across the arc, alternating reach so the burst reads
|
|
122
|
+
// as debris rather than a perfect star.
|
|
123
|
+
const frac = i / (SPARKS_PER_IMPACT - 1);
|
|
124
|
+
const deg = m.sparkArc[0] + (m.sparkArc[1] - m.sparkArc[0]) * frac;
|
|
125
|
+
const rad = deg * Math.PI / 180;
|
|
126
|
+
const dist = 30 + i % 3 * 14;
|
|
127
|
+
const sx = t.interpolate({
|
|
128
|
+
inputRange: [0, b, Math.min(b + 0.09, 0.999), 1],
|
|
129
|
+
outputRange: [0, 0, Math.cos(rad) * dist, Math.cos(rad) * dist]
|
|
130
|
+
});
|
|
131
|
+
const sy = t.interpolate({
|
|
132
|
+
inputRange: [0, b, Math.min(b + 0.09, 0.999), 1],
|
|
133
|
+
outputRange: [0, 0, Math.sin(rad) * dist, Math.sin(rad) * dist]
|
|
134
|
+
});
|
|
135
|
+
const so = t.interpolate({
|
|
136
|
+
inputRange: [0, b, Math.min(b + 0.02, 0.999), Math.min(b + 0.09, 0.9995), 1],
|
|
137
|
+
outputRange: [0, 0, 0.9, 0, 0]
|
|
138
|
+
});
|
|
139
|
+
const d = 2.2 - i % 3 * 0.4;
|
|
140
|
+
sparks.push(/*#__PURE__*/_jsx(Animated.View, {
|
|
141
|
+
style: {
|
|
142
|
+
position: "absolute",
|
|
143
|
+
left: x1 - d / 2,
|
|
144
|
+
top: y1 - d / 2,
|
|
145
|
+
width: d,
|
|
146
|
+
height: d,
|
|
147
|
+
borderRadius: d / 2,
|
|
148
|
+
backgroundColor: withAlpha("#E5EEFC", 1),
|
|
149
|
+
opacity: so,
|
|
150
|
+
transform: [{
|
|
151
|
+
translateX: sx
|
|
152
|
+
}, {
|
|
153
|
+
translateY: sy
|
|
154
|
+
}]
|
|
155
|
+
},
|
|
156
|
+
pointerEvents: "none"
|
|
157
|
+
}, i));
|
|
158
|
+
}
|
|
159
|
+
return /*#__PURE__*/_jsxs(View, {
|
|
160
|
+
style: absoluteFill,
|
|
161
|
+
pointerEvents: "none",
|
|
162
|
+
children: [/*#__PURE__*/_jsxs(Animated.View, {
|
|
163
|
+
style: {
|
|
164
|
+
position: "absolute",
|
|
165
|
+
left: 0,
|
|
166
|
+
top: 0,
|
|
167
|
+
width: 108,
|
|
168
|
+
height: 16,
|
|
169
|
+
opacity: streakOpacity,
|
|
170
|
+
transform: [{
|
|
171
|
+
translateX
|
|
172
|
+
}, {
|
|
173
|
+
translateY
|
|
174
|
+
}, {
|
|
175
|
+
rotate: `${angle}deg`
|
|
176
|
+
}]
|
|
177
|
+
},
|
|
178
|
+
pointerEvents: "none",
|
|
179
|
+
children: [/*#__PURE__*/_jsx(View, {
|
|
180
|
+
style: {
|
|
181
|
+
position: "absolute",
|
|
182
|
+
left: 86,
|
|
183
|
+
top: -2,
|
|
184
|
+
width: 20,
|
|
185
|
+
height: 20,
|
|
186
|
+
borderRadius: 10,
|
|
187
|
+
backgroundColor: withAlpha("#E5EEFC", 0.16)
|
|
188
|
+
}
|
|
189
|
+
}), /*#__PURE__*/_jsx(View, {
|
|
190
|
+
style: {
|
|
191
|
+
position: "absolute",
|
|
192
|
+
left: 94.5,
|
|
193
|
+
top: 6.5,
|
|
194
|
+
width: 3,
|
|
195
|
+
height: 3,
|
|
196
|
+
borderRadius: 1.5,
|
|
197
|
+
backgroundColor: withAlpha("#F5F9FF", 1)
|
|
198
|
+
}
|
|
199
|
+
}), trail]
|
|
200
|
+
}), /*#__PURE__*/_jsx(Animated.View, {
|
|
201
|
+
style: {
|
|
202
|
+
position: "absolute",
|
|
203
|
+
left: x1 - 32,
|
|
204
|
+
top: y1 - 32,
|
|
205
|
+
width: 64,
|
|
206
|
+
height: 64,
|
|
207
|
+
opacity: flashOpacity,
|
|
208
|
+
transform: [{
|
|
209
|
+
scale: flashScale
|
|
210
|
+
}]
|
|
211
|
+
},
|
|
212
|
+
pointerEvents: "none",
|
|
213
|
+
children: /*#__PURE__*/_jsx(RadialGlow, {
|
|
214
|
+
size: 64,
|
|
215
|
+
color: "#EDF3FC",
|
|
216
|
+
alpha: 0.6,
|
|
217
|
+
rings: 6,
|
|
218
|
+
falloff: 1.6
|
|
219
|
+
})
|
|
220
|
+
}), /*#__PURE__*/_jsx(Animated.View, {
|
|
221
|
+
style: {
|
|
222
|
+
position: "absolute",
|
|
223
|
+
left: x1 - SHOCKWAVE_DIA / 2,
|
|
224
|
+
top: y1 - SHOCKWAVE_DIA / 2,
|
|
225
|
+
width: SHOCKWAVE_DIA,
|
|
226
|
+
height: SHOCKWAVE_DIA,
|
|
227
|
+
borderRadius: SHOCKWAVE_DIA / 2,
|
|
228
|
+
borderWidth: 1.5,
|
|
229
|
+
borderColor: withAlpha("#BBE5FA", 0.9),
|
|
230
|
+
opacity: waveOpacity,
|
|
231
|
+
transform: [{
|
|
232
|
+
scale: waveScale
|
|
233
|
+
}]
|
|
234
|
+
},
|
|
235
|
+
pointerEvents: "none"
|
|
236
|
+
}), sparks]
|
|
237
|
+
});
|
|
238
|
+
});
|
|
239
|
+
|
|
240
|
+
/**
|
|
241
|
+
* The transparent meteor layer — just the streaks and their wall impacts,
|
|
242
|
+
* ready to compose over any host sky (Deep Field is the shipping mount).
|
|
243
|
+
*/
|
|
244
|
+
export const MeteorShower = /*#__PURE__*/memo(function MeteorShower(props) {
|
|
245
|
+
return /*#__PURE__*/_jsx(View, {
|
|
246
|
+
style: absoluteFill,
|
|
247
|
+
pointerEvents: "none",
|
|
248
|
+
children: METEORS.map((_, i) => /*#__PURE__*/_jsx(Meteor, {
|
|
249
|
+
index: i,
|
|
250
|
+
...props
|
|
251
|
+
}, i))
|
|
252
|
+
});
|
|
253
|
+
});
|