expo-orb 0.1.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.
- package/.eslintrc.js +5 -0
- package/LICENSE +21 -0
- package/README.md +129 -0
- package/android/build.gradle +60 -0
- package/android/src/main/AndroidManifest.xml +2 -0
- package/android/src/main/java/expo/modules/orb/ExpoOrbModule.kt +79 -0
- package/android/src/main/java/expo/modules/orb/ExpoOrbView.kt +105 -0
- package/android/src/main/java/expo/modules/orb/OrbConfiguration.kt +30 -0
- package/android/src/main/java/expo/modules/orb/OrbSharedState.kt +25 -0
- package/android/src/main/java/expo/modules/orb/OrbView.kt +368 -0
- package/android/src/main/java/expo/modules/orb/ParticlesView.kt +77 -0
- package/android/src/main/java/expo/modules/orb/RotatingGlowView.kt +90 -0
- package/android/src/main/java/expo/modules/orb/WavyBlobView.kt +90 -0
- package/build/ExpoOrb.types.d.ts +17 -0
- package/build/ExpoOrb.types.d.ts.map +1 -0
- package/build/ExpoOrb.types.js +2 -0
- package/build/ExpoOrb.types.js.map +1 -0
- package/build/ExpoOrbModule.d.ts +17 -0
- package/build/ExpoOrbModule.d.ts.map +1 -0
- package/build/ExpoOrbModule.js +11 -0
- package/build/ExpoOrbModule.js.map +1 -0
- package/build/ExpoOrbModule.web.d.ts +6 -0
- package/build/ExpoOrbModule.web.d.ts.map +1 -0
- package/build/ExpoOrbModule.web.js +5 -0
- package/build/ExpoOrbModule.web.js.map +1 -0
- package/build/ExpoOrbView.d.ts +4 -0
- package/build/ExpoOrbView.d.ts.map +1 -0
- package/build/ExpoOrbView.js +7 -0
- package/build/ExpoOrbView.js.map +1 -0
- package/build/ExpoOrbView.web.d.ts +4 -0
- package/build/ExpoOrbView.web.d.ts.map +1 -0
- package/build/ExpoOrbView.web.js +17 -0
- package/build/ExpoOrbView.web.js.map +1 -0
- package/build/index.d.ts +4 -0
- package/build/index.d.ts.map +1 -0
- package/build/index.js +4 -0
- package/build/index.js.map +1 -0
- package/expo-module.config.json +9 -0
- package/ios/ExpoOrb.podspec +30 -0
- package/ios/ExpoOrbModule.swift +70 -0
- package/ios/ExpoOrbView.swift +105 -0
- package/ios/Orb/OrbConfiguration.swift +53 -0
- package/ios/Orb/OrbView.swift +367 -0
- package/ios/Orb/ParticlesView.swift +156 -0
- package/ios/Orb/RealisticShadows.swift +42 -0
- package/ios/Orb/RotatingGlowView.swift +62 -0
- package/ios/Orb/WavyBlobView.swift +83 -0
- package/package.json +46 -0
- package/src/ExpoOrb.types.ts +17 -0
- package/src/ExpoOrbModule.ts +22 -0
- package/src/ExpoOrbModule.web.ts +5 -0
- package/src/ExpoOrbView.tsx +11 -0
- package/src/ExpoOrbView.web.tsx +26 -0
- package/src/index.ts +3 -0
- package/tsconfig.json +9 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ExpoOrbModule.web.d.ts","sourceRoot":"","sources":["../src/ExpoOrbModule.web.ts"],"names":[],"mappings":"AAAA,OAAO,EAAqB,YAAY,EAAE,MAAM,MAAM,CAAC;AAEvD,cAAM,aAAc,SAAQ,YAAY;CAAG;;AAE3C,wBAAiE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ExpoOrbModule.web.js","sourceRoot":"","sources":["../src/ExpoOrbModule.web.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,YAAY,EAAE,MAAM,MAAM,CAAC;AAEvD,MAAM,aAAc,SAAQ,YAAY;CAAG;AAE3C,eAAe,iBAAiB,CAAC,aAAa,EAAE,eAAe,CAAC,CAAC","sourcesContent":["import { registerWebModule, NativeModule } from 'expo';\n\nclass ExpoOrbModule extends NativeModule {}\n\nexport default registerWebModule(ExpoOrbModule, 'ExpoOrbModule');\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ExpoOrbView.d.ts","sourceRoot":"","sources":["../src/ExpoOrbView.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAKnD,MAAM,CAAC,OAAO,UAAU,WAAW,CAAC,KAAK,EAAE,gBAAgB,qBAE1D"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ExpoOrbView.js","sourceRoot":"","sources":["../src/ExpoOrbView.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,MAAM,CAAC;AACzC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,MAAM,UAAU,GACd,iBAAiB,CAAC,SAAS,CAAC,CAAC;AAE/B,MAAM,CAAC,OAAO,UAAU,WAAW,CAAC,KAAuB;IACzD,OAAO,CAAC,UAAU,CAAC,IAAI,KAAK,CAAC,EAAG,CAAC;AACnC,CAAC","sourcesContent":["import { requireNativeView } from 'expo';\nimport * as React from 'react';\n\nimport { ExpoOrbViewProps } from './ExpoOrb.types';\n\nconst NativeView: React.ComponentType<ExpoOrbViewProps> =\n requireNativeView('ExpoOrb');\n\nexport default function ExpoOrbView(props: ExpoOrbViewProps) {\n return <NativeView {...props} />;\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ExpoOrbView.web.d.ts","sourceRoot":"","sources":["../src/ExpoOrbView.web.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAInD,MAAM,CAAC,OAAO,UAAU,WAAW,CAAC,KAAK,EAAE,gBAAgB,qBAmB1D"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
const defaultColors = ['#22c55e', '#3b82f6', '#ec4899'];
|
|
3
|
+
export default function ExpoOrbView(props) {
|
|
4
|
+
const colors = Array.isArray(props.backgroundColors) &&
|
|
5
|
+
props.backgroundColors.every((color) => typeof color === 'string')
|
|
6
|
+
? props.backgroundColors
|
|
7
|
+
: defaultColors;
|
|
8
|
+
const gradient = `radial-gradient(circle at 30% 30%, ${colors[0]}, ${colors[1] ?? colors[0]}, ${colors[2] ?? colors[1] ?? colors[0]})`;
|
|
9
|
+
return (<div style={{
|
|
10
|
+
width: '100%',
|
|
11
|
+
height: '100%',
|
|
12
|
+
borderRadius: '9999px',
|
|
13
|
+
background: gradient,
|
|
14
|
+
boxShadow: '0 0 30px rgba(255,255,255,0.2)',
|
|
15
|
+
}}/>);
|
|
16
|
+
}
|
|
17
|
+
//# sourceMappingURL=ExpoOrbView.web.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ExpoOrbView.web.js","sourceRoot":"","sources":["../src/ExpoOrbView.web.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,MAAM,aAAa,GAAG,CAAC,SAAS,EAAE,SAAS,EAAE,SAAS,CAAC,CAAC;AAExD,MAAM,CAAC,OAAO,UAAU,WAAW,CAAC,KAAuB;IACzD,MAAM,MAAM,GAAG,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,gBAAgB,CAAC;QAClD,KAAK,CAAC,gBAAgB,CAAC,KAAK,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,OAAO,KAAK,KAAK,QAAQ,CAAC;QAClE,CAAC,CAAE,KAAK,CAAC,gBAA6B;QACtC,CAAC,CAAC,aAAa,CAAC;IAElB,MAAM,QAAQ,GAAG,sCAAsC,MAAM,CAAC,CAAC,CAAC,KAAK,MAAM,CAAC,CAAC,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,KAAK,MAAM,CAAC,CAAC,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,GAAG,CAAC;IAEvI,OAAO,CACL,CAAC,GAAG,CACF,KAAK,CAAC,CAAC;YACL,KAAK,EAAE,MAAM;YACb,MAAM,EAAE,MAAM;YACd,YAAY,EAAE,QAAQ;YACtB,UAAU,EAAE,QAAQ;YACpB,SAAS,EAAE,gCAAgC;SAC5C,CAAC,EACF,CACH,CAAC;AACJ,CAAC","sourcesContent":["import * as React from 'react';\n\nimport { ExpoOrbViewProps } from './ExpoOrb.types';\n\nconst defaultColors = ['#22c55e', '#3b82f6', '#ec4899'];\n\nexport default function ExpoOrbView(props: ExpoOrbViewProps) {\n const colors = Array.isArray(props.backgroundColors) &&\n props.backgroundColors.every((color) => typeof color === 'string')\n ? (props.backgroundColors as string[])\n : defaultColors;\n\n const gradient = `radial-gradient(circle at 30% 30%, ${colors[0]}, ${colors[1] ?? colors[0]}, ${colors[2] ?? colors[1] ?? colors[0]})`;\n\n return (\n <div\n style={{\n width: '100%',\n height: '100%',\n borderRadius: '9999px',\n background: gradient,\n boxShadow: '0 0 30px rgba(255,255,255,0.2)',\n }}\n />\n );\n}\n"]}
|
package/build/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAC1D,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,eAAe,CAAC;AACvD,cAAe,iBAAiB,CAAC"}
|
package/build/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAC1D,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,eAAe,CAAC;AACvD,cAAe,iBAAiB,CAAC","sourcesContent":["export { default, setOrbActivity } from './ExpoOrbModule';\nexport { default as ExpoOrbView } from './ExpoOrbView';\nexport * from './ExpoOrb.types';\n"]}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
require 'json'
|
|
2
|
+
|
|
3
|
+
package = JSON.parse(File.read(File.join(__dir__, '..', 'package.json')))
|
|
4
|
+
|
|
5
|
+
Pod::Spec.new do |s|
|
|
6
|
+
s.name = 'ExpoOrb'
|
|
7
|
+
s.version = package['version']
|
|
8
|
+
s.summary = package['description']
|
|
9
|
+
s.description = package['description']
|
|
10
|
+
s.license = package['license']
|
|
11
|
+
s.author = package['author']
|
|
12
|
+
s.homepage = package['homepage']
|
|
13
|
+
s.platforms = {
|
|
14
|
+
:ios => '15.1'
|
|
15
|
+
}
|
|
16
|
+
s.swift_version = '5.9'
|
|
17
|
+
s.source = { git: 'https://github.com/enso-works/expo-orb' }
|
|
18
|
+
s.static_framework = true
|
|
19
|
+
|
|
20
|
+
s.frameworks = ['SwiftUI', 'SpriteKit']
|
|
21
|
+
|
|
22
|
+
s.dependency 'ExpoModulesCore'
|
|
23
|
+
|
|
24
|
+
# Swift/Objective-C compatibility
|
|
25
|
+
s.pod_target_xcconfig = {
|
|
26
|
+
'DEFINES_MODULE' => 'YES',
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
s.source_files = "**/*.{h,m,mm,swift,hpp,cpp}"
|
|
30
|
+
end
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import ExpoModulesCore
|
|
2
|
+
import UIKit
|
|
3
|
+
|
|
4
|
+
public class ExpoOrbModule: Module {
|
|
5
|
+
public func definition() -> ModuleDefinition {
|
|
6
|
+
Name("ExpoOrb")
|
|
7
|
+
|
|
8
|
+
// Use a Function instead of Prop for activity - bypasses React's prop reconciliation
|
|
9
|
+
// Dispatch async to avoid blocking the JS thread and causing animation hiccups
|
|
10
|
+
Function("setActivity") { (activity: Double) in
|
|
11
|
+
let clampedActivity = max(0, min(1, activity))
|
|
12
|
+
DispatchQueue.main.async {
|
|
13
|
+
OrbSharedState.shared.targetActivity = clampedActivity
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
View(ExpoOrbView.self) {
|
|
18
|
+
Prop("backgroundColors") { (view: ExpoOrbView, colors: [UIColor]) in
|
|
19
|
+
view.updateProps { $0.backgroundColors = colors }
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
Prop("glowColor") { (view: ExpoOrbView, color: UIColor) in
|
|
23
|
+
view.updateProps { $0.glowColor = color }
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
Prop("particleColor") { (view: ExpoOrbView, color: UIColor) in
|
|
27
|
+
view.updateProps { $0.particleColor = color }
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
Prop("coreGlowIntensity") { (view: ExpoOrbView, value: Double) in
|
|
31
|
+
view.updateProps { $0.coreGlowIntensity = value }
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
Prop("breathingIntensity") { (view: ExpoOrbView, value: Double) in
|
|
35
|
+
view.updateProps { $0.breathingIntensity = value }
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
Prop("breathingSpeed") { (view: ExpoOrbView, value: Double) in
|
|
39
|
+
view.updateProps { $0.breathingSpeed = value }
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
Prop("showBackground") { (view: ExpoOrbView, value: Bool) in
|
|
43
|
+
view.updateProps { $0.showBackground = value }
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
Prop("showWavyBlobs") { (view: ExpoOrbView, value: Bool) in
|
|
47
|
+
view.updateProps { $0.showWavyBlobs = value }
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
Prop("showParticles") { (view: ExpoOrbView, value: Bool) in
|
|
51
|
+
view.updateProps { $0.showParticles = value }
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
Prop("showGlowEffects") { (view: ExpoOrbView, value: Bool) in
|
|
55
|
+
view.updateProps { $0.showGlowEffects = value }
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
Prop("showShadow") { (view: ExpoOrbView, value: Bool) in
|
|
59
|
+
view.updateProps { $0.showShadow = value }
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
Prop("speed") { (view: ExpoOrbView, value: Double) in
|
|
63
|
+
view.updateProps { $0.speed = value }
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
// NOTE: activity is handled via Function("setActivity") instead of Prop
|
|
67
|
+
// to bypass React's prop reconciliation and prevent view re-renders
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
}
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
import ExpoModulesCore
|
|
2
|
+
import SwiftUI
|
|
3
|
+
|
|
4
|
+
private final class OrbConfigurationModel: ObservableObject {
|
|
5
|
+
@Published var configuration: OrbConfiguration
|
|
6
|
+
|
|
7
|
+
init(configuration: OrbConfiguration) {
|
|
8
|
+
self.configuration = configuration
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
private struct OrbContainerView: View {
|
|
13
|
+
@ObservedObject var model: OrbConfigurationModel
|
|
14
|
+
|
|
15
|
+
var body: some View {
|
|
16
|
+
// OrbView reads activity from OrbSharedState directly during animation loop
|
|
17
|
+
OrbView(configuration: model.configuration, useSharedActivityState: true)
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
struct OrbProps {
|
|
22
|
+
private static let defaultBackgroundColors: [UIColor] = [
|
|
23
|
+
.systemGreen,
|
|
24
|
+
.systemBlue,
|
|
25
|
+
.systemPink,
|
|
26
|
+
]
|
|
27
|
+
|
|
28
|
+
var backgroundColors: [UIColor] = OrbProps.defaultBackgroundColors
|
|
29
|
+
var glowColor: UIColor = .white
|
|
30
|
+
var particleColor: UIColor = .white
|
|
31
|
+
var coreGlowIntensity: Double = 1.0
|
|
32
|
+
var breathingIntensity: Double = 0
|
|
33
|
+
var breathingSpeed: Double = 0.25
|
|
34
|
+
var showBackground: Bool = true
|
|
35
|
+
var showWavyBlobs: Bool = true
|
|
36
|
+
var showParticles: Bool = true
|
|
37
|
+
var showGlowEffects: Bool = true
|
|
38
|
+
var showShadow: Bool = true
|
|
39
|
+
var speed: Double = 60
|
|
40
|
+
|
|
41
|
+
func makeConfiguration() -> OrbConfiguration {
|
|
42
|
+
let resolvedBackgroundColors = backgroundColors.count >= 2
|
|
43
|
+
? backgroundColors
|
|
44
|
+
: OrbProps.defaultBackgroundColors
|
|
45
|
+
let safeSpeed = max(1, speed)
|
|
46
|
+
let safeIntensity = max(0, coreGlowIntensity)
|
|
47
|
+
let safeBreathingIntensity = max(0, breathingIntensity)
|
|
48
|
+
let safeBreathingSpeed = max(0.05, breathingSpeed)
|
|
49
|
+
|
|
50
|
+
return OrbConfiguration(
|
|
51
|
+
backgroundColors: resolvedBackgroundColors.map { Color(uiColor: $0) },
|
|
52
|
+
glowColor: Color(uiColor: glowColor),
|
|
53
|
+
particleColor: Color(uiColor: particleColor),
|
|
54
|
+
coreGlowIntensity: safeIntensity,
|
|
55
|
+
showBackground: showBackground,
|
|
56
|
+
showWavyBlobs: showWavyBlobs,
|
|
57
|
+
showParticles: showParticles,
|
|
58
|
+
showGlowEffects: showGlowEffects,
|
|
59
|
+
showShadow: showShadow,
|
|
60
|
+
speed: safeSpeed,
|
|
61
|
+
breathingIntensity: safeBreathingIntensity,
|
|
62
|
+
breathingSpeed: safeBreathingSpeed
|
|
63
|
+
)
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
class ExpoOrbView: ExpoView {
|
|
68
|
+
private var props = OrbProps()
|
|
69
|
+
private let model: OrbConfigurationModel
|
|
70
|
+
private let hostingController: UIHostingController<OrbContainerView>
|
|
71
|
+
|
|
72
|
+
required init(appContext: AppContext? = nil) {
|
|
73
|
+
let initialConfig = OrbConfiguration()
|
|
74
|
+
let model = OrbConfigurationModel(configuration: initialConfig)
|
|
75
|
+
self.model = model
|
|
76
|
+
self.hostingController = UIHostingController(rootView: OrbContainerView(model: model))
|
|
77
|
+
|
|
78
|
+
super.init(appContext: appContext)
|
|
79
|
+
|
|
80
|
+
clipsToBounds = false
|
|
81
|
+
hostingController.view.backgroundColor = .clear
|
|
82
|
+
hostingController.view.clipsToBounds = false
|
|
83
|
+
hostingController.view.isOpaque = false
|
|
84
|
+
hostingController.view.translatesAutoresizingMaskIntoConstraints = false
|
|
85
|
+
addSubview(hostingController.view)
|
|
86
|
+
|
|
87
|
+
NSLayoutConstraint.activate([
|
|
88
|
+
hostingController.view.leadingAnchor.constraint(equalTo: leadingAnchor),
|
|
89
|
+
hostingController.view.trailingAnchor.constraint(equalTo: trailingAnchor),
|
|
90
|
+
hostingController.view.topAnchor.constraint(equalTo: topAnchor),
|
|
91
|
+
hostingController.view.bottomAnchor.constraint(equalTo: bottomAnchor),
|
|
92
|
+
])
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
func updateProps(_ update: (inout OrbProps) -> Void) {
|
|
96
|
+
update(&props)
|
|
97
|
+
model.configuration = props.makeConfiguration()
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
func setTargetActivity(_ target: Double) {
|
|
101
|
+
// Write to shared state - no SwiftUI re-render triggered
|
|
102
|
+
// OrbView reads this during its animation loop
|
|
103
|
+
OrbSharedState.shared.targetActivity = max(0, min(1, target))
|
|
104
|
+
}
|
|
105
|
+
}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
//
|
|
2
|
+
// OrbConfiguration.swift
|
|
3
|
+
// Orb
|
|
4
|
+
//
|
|
5
|
+
// Created by Siddhant Mehta on 2024-11-08.
|
|
6
|
+
//
|
|
7
|
+
|
|
8
|
+
import SwiftUI
|
|
9
|
+
|
|
10
|
+
public struct OrbConfiguration {
|
|
11
|
+
public let glowColor: Color
|
|
12
|
+
public let backgroundColors: [Color]
|
|
13
|
+
public let particleColor: Color
|
|
14
|
+
|
|
15
|
+
public let showBackground: Bool
|
|
16
|
+
public let showWavyBlobs: Bool
|
|
17
|
+
public let showParticles: Bool
|
|
18
|
+
public let showGlowEffects: Bool
|
|
19
|
+
public let showShadow: Bool
|
|
20
|
+
|
|
21
|
+
public let coreGlowIntensity: Double
|
|
22
|
+
public let speed: Double
|
|
23
|
+
public let breathingIntensity: Double
|
|
24
|
+
public let breathingSpeed: Double
|
|
25
|
+
|
|
26
|
+
public init(
|
|
27
|
+
backgroundColors: [Color] = [.green, .blue, .pink],
|
|
28
|
+
glowColor: Color = .white,
|
|
29
|
+
particleColor: Color = .white,
|
|
30
|
+
coreGlowIntensity: Double = 1.0,
|
|
31
|
+
showBackground: Bool = true,
|
|
32
|
+
showWavyBlobs: Bool = true,
|
|
33
|
+
showParticles: Bool = true,
|
|
34
|
+
showGlowEffects: Bool = true,
|
|
35
|
+
showShadow: Bool = true,
|
|
36
|
+
speed: Double = 60,
|
|
37
|
+
breathingIntensity: Double = 0,
|
|
38
|
+
breathingSpeed: Double = 0.25
|
|
39
|
+
) {
|
|
40
|
+
self.backgroundColors = backgroundColors
|
|
41
|
+
self.glowColor = glowColor
|
|
42
|
+
self.particleColor = particleColor
|
|
43
|
+
self.showBackground = showBackground
|
|
44
|
+
self.showWavyBlobs = showWavyBlobs
|
|
45
|
+
self.showParticles = showParticles
|
|
46
|
+
self.showGlowEffects = showGlowEffects
|
|
47
|
+
self.showShadow = showShadow
|
|
48
|
+
self.coreGlowIntensity = coreGlowIntensity
|
|
49
|
+
self.speed = speed
|
|
50
|
+
self.breathingIntensity = breathingIntensity
|
|
51
|
+
self.breathingSpeed = breathingSpeed
|
|
52
|
+
}
|
|
53
|
+
}
|