3d-effect-cinema 0.3.0 → 0.4.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/README.md +144 -78
- package/dist/index.d.mts +90 -6
- package/dist/index.d.ts +90 -6
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# 🎬 3D Effect Cinema
|
|
2
2
|
|
|
3
|
-
>
|
|
3
|
+
> Componente de Fondo WebGL 3D de Alto Rendimiento, Motor de Efectos Bioluminiscentes y Pantalla de Carga / Intro Cinematográfica para React y Next.js impulsado por `@react-three/fiber` & `three`.
|
|
4
4
|
|
|
5
5
|
[](https://www.npmjs.com/package/3d-effect-cinema)
|
|
6
6
|
[](https://github.com/esteban284/3d-effect-cinema)
|
|
@@ -9,28 +9,13 @@
|
|
|
9
9
|
|
|
10
10
|
---
|
|
11
11
|
|
|
12
|
-
## 🚀
|
|
12
|
+
## 🚀 Demo Interactivo en Vivo
|
|
13
13
|
|
|
14
|
-
👉 **[
|
|
14
|
+
👉 **[Probar la Galería Interactiva en Vivo (Vercel)](https://cinema-animation-sample.vercel.app)**
|
|
15
15
|
|
|
16
16
|
---
|
|
17
17
|
|
|
18
|
-
##
|
|
19
|
-
|
|
20
|
-
- 🪄 **Higher-Order Component (`withCinema3D`)**: Easily wrap any React component with a dynamic 3D WebGL background.
|
|
21
|
-
- 🖼️ **Dynamic Container Background (`<CinemaBackground />`)**: Fits inside any parent container (`div`, `header`, `section`, `card`) with responsive auto-resizing.
|
|
22
|
-
- ✍️ **Live 3D Title Control**: Dynamic text input that updates the 3D typography in real-time.
|
|
23
|
-
- 🎛️ **Interactive FX Toggles Bar**: Toggle buttons to control 3D Fire Sparks, Shockwave rings, Electric Plasma, and Ambient Embers.
|
|
24
|
-
- 💥 **Multiple Interactive 3D Effects**:
|
|
25
|
-
- 🔥 **`ClickFireSparks`**: Explosive fire ember burst & local point light flash on click.
|
|
26
|
-
- 🌊 **`ClickShockwave`**: Expanding 3D energy ring wave on click.
|
|
27
|
-
- ⚡ **`ElectricPlasma`**: Interactive electric plasma tendrils reacting to pointer movement.
|
|
28
|
-
- ✨ **`SceneParticles`**: Thermal rising ambient embers.
|
|
29
|
-
- 🎨 **6 Material Themes**: `emerald` (Matrix Luxe), `crimson` (Ruby Fire), `gold`, `neon`, `obsidian`, `glass`.
|
|
30
|
-
|
|
31
|
-
---
|
|
32
|
-
|
|
33
|
-
## 📦 Installation
|
|
18
|
+
## 📦 Instalación
|
|
34
19
|
|
|
35
20
|
```bash
|
|
36
21
|
npm install 3d-effect-cinema three @react-three/fiber @react-three/drei @react-three/postprocessing postprocessing
|
|
@@ -38,64 +23,53 @@ npm install 3d-effect-cinema three @react-three/fiber @react-three/drei @react-t
|
|
|
38
23
|
|
|
39
24
|
---
|
|
40
25
|
|
|
41
|
-
##
|
|
42
|
-
|
|
43
|
-
### 1. Using the HOC (`withCinema3D`)
|
|
26
|
+
## ⚡ Inicio Rápido
|
|
44
27
|
|
|
45
|
-
|
|
28
|
+
### Modo 1: Fondo 3D Permanente
|
|
46
29
|
|
|
47
30
|
```tsx
|
|
48
31
|
"use client";
|
|
49
32
|
|
|
50
|
-
import
|
|
33
|
+
import AnimatedBackground from "3d-effect-cinema";
|
|
51
34
|
|
|
52
|
-
function
|
|
35
|
+
export default function App() {
|
|
53
36
|
return (
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
37
|
+
// Fondo de Nubes de Energía Verde Bioluminiscente sobre Fondo Blanco
|
|
38
|
+
<div className="w-full h-screen">
|
|
39
|
+
<AnimatedBackground
|
|
40
|
+
effect="blobs"
|
|
41
|
+
effectColor="#00e676"
|
|
42
|
+
effectDensity={0.4}
|
|
43
|
+
effectSpeed={0.5}
|
|
44
|
+
backgroundColor="#ffffff"
|
|
45
|
+
/>
|
|
61
46
|
</div>
|
|
62
47
|
);
|
|
63
48
|
}
|
|
64
|
-
|
|
65
|
-
// Export wrapped with 3D Cinema background
|
|
66
|
-
export default withCinema3D(LandingHero, {
|
|
67
|
-
text: "UNITED OF WEB",
|
|
68
|
-
theme: "emerald",
|
|
69
|
-
interactiveSparks: true,
|
|
70
|
-
interactiveShockwave: true,
|
|
71
|
-
interactivePlasma: true,
|
|
72
|
-
});
|
|
73
49
|
```
|
|
74
50
|
|
|
75
51
|
---
|
|
76
52
|
|
|
77
|
-
### 2
|
|
78
|
-
|
|
79
|
-
Embed directly inside any container in your layout:
|
|
53
|
+
### Modo 2: Pantalla de Carga / Intro Splash Screen (con Redirección Automática)
|
|
80
54
|
|
|
81
55
|
```tsx
|
|
82
56
|
"use client";
|
|
83
57
|
|
|
84
|
-
import
|
|
58
|
+
import AnimatedBackground from "3d-effect-cinema";
|
|
85
59
|
|
|
86
|
-
export default function
|
|
60
|
+
export default function SplashIntro() {
|
|
87
61
|
return (
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
62
|
+
// Mantiene la animación durante 5 segundos y luego redirecciona a /home
|
|
63
|
+
<div className="w-full h-screen">
|
|
64
|
+
<AnimatedBackground
|
|
65
|
+
title="CINEMULTIPLEX"
|
|
66
|
+
fontFamily="helvetiker"
|
|
67
|
+
effect="blobs,flames"
|
|
68
|
+
effectColor="#00e5ff"
|
|
69
|
+
loaderDuration={5}
|
|
70
|
+
redirectUrl="/home"
|
|
71
|
+
containerSelector="home"
|
|
72
|
+
/>
|
|
99
73
|
</div>
|
|
100
74
|
);
|
|
101
75
|
}
|
|
@@ -103,41 +77,133 @@ export default function CustomCard() {
|
|
|
103
77
|
|
|
104
78
|
---
|
|
105
79
|
|
|
106
|
-
|
|
80
|
+
## 🎨 Documentación Completa de la API
|
|
81
|
+
|
|
82
|
+
### `<AnimatedBackground />`
|
|
83
|
+
|
|
84
|
+
| Propiedad | Tipo | Valor por Defecto | Descripción |
|
|
85
|
+
| :--- | :--- | :--- | :--- |
|
|
86
|
+
| `title` | `string` | `undefined` | Texto 3D renderizado en la escena. Si se omite o se pasa `""`, queda en blanco para usarse únicamente como **fondo de efectos 3D puro**. |
|
|
87
|
+
| `containerSelector` | `string` | `undefined` | ID o selector del contenedor objetivo en el DOM (ej: `containerSelector="home"` o `containerSelector="#main-hero"`) para montarse como fondo allí. |
|
|
88
|
+
| `effect` | `SingleEffectType \| SingleEffectType[] \| string` | `"flames"` | Efecto WebGL o **combinación múltiple de efectos** (ej: `effect="blobs,onda"` o `effect={["flames", "plasma"]}`). |
|
|
89
|
+
| `effectColor` | `string` | `undefined` | Color personalizado para **TODOS** los efectos 3D activos (soporta códigos `#HEX` como `#00e676`, `#ff0055` o nombres en español como `"azul"`, `"verde"`, `"magenta"`). |
|
|
90
|
+
| `effectDensity` | `number` | `0.3` | Densidad/cantidad de partículas y llamas (`0.1` a `1.0`, por defecto `0.3` para un aspecto limpio y equilibrado). |
|
|
91
|
+
| `effectSpeed` | `number` | `0.5` | Multiplicador de velocidad de movimiento 3D (`0.1` a `2.0`, por defecto `0.5` para un movimiento suave sin mareos). |
|
|
92
|
+
| `backgroundColor` | `string` | `undefined` | Color o gradiente de fondo (soporta códigos `#HEX` como `#ffffff`, `#3b0712`, gradientes CSS o nombres en español `"rojo"`, `"azul"`, `"verde"`). |
|
|
93
|
+
| `autoFitText` | `boolean` | `true` | Escala automáticamente el texto 3D para que jamás se desborde ni se corte del contenedor padre. |
|
|
94
|
+
| `loaderDuration` | `number` | `undefined` | *(Opcional)* Duración en **segundos** para usar el componente como pantalla de carga / intro splash screen. Si no se define, se mantiene como un fondo permanente. |
|
|
95
|
+
| `redirectUrl` | `string` | `undefined` | *(Opcional)* URL o ruta a la cual redireccionar automáticamente cuando finaliza la cuenta regresiva de `loaderDuration`. |
|
|
96
|
+
| `onComplete` | `() => void` | `undefined` | *(Opcional)* Callback ejecutado al finalizar el temporizador de `loaderDuration`. |
|
|
97
|
+
| `fontFamily` | `"cinema"` \| `"helvetiker"` \| `"gentilis"` \| `"optimer"` \| `string` | `"cinema"` | Tipografía 3D elegible (`"cinema"`, `"helvetiker"`, `"gentilis"`, `"optimer"` o URL personalizada). |
|
|
98
|
+
| `fontUrl` | `string` | `undefined` | URL personalizada de un archivo Typeface JSON 3D. |
|
|
99
|
+
| `letterSpacing` | `number` | `0.85` | Multiplicador del espaciado entre letras 3D. |
|
|
100
|
+
| `containerToDisplay` | `"lhome"` \| `"home"` \| `ReactNode` | `undefined` | Plantilla de vista superpuesta ("lhome" para la landing de cine, o cualquier componente React). |
|
|
101
|
+
| `theme` | `'emerald'` \| `'crimson'` \| `'gold'` \| `'neon'` \| `'obsidian'` \| `'glass'` | `'crimson'` | Tema de luces y material 3D del texto. |
|
|
102
|
+
|
|
103
|
+
---
|
|
104
|
+
|
|
105
|
+
## 🌟 Lista de Efectos Disponibles
|
|
106
|
+
|
|
107
|
+
| Nombre de Efecto | Valor de Prop `effect` | Icono | Descripción |
|
|
108
|
+
| :--- | :--- | :--- | :--- |
|
|
109
|
+
| **Nubes Bioluminiscentes** | `"blobs"` / `"energy-blobs"` / `"plasma-blobs"` | 🟢 | Nubes bioluminiscentes de energía líquida fusionándose suavemente. |
|
|
110
|
+
| **Llamas Orgánicas** | `"flames"` / `"fluid-flames"` / `"llamas"` | 🔥 | Partículas de llamas de fuego fluido de mezcla aditiva. |
|
|
111
|
+
| **Cristales 3D** | `"fire"` / `"crystal-flames"` / `"cristales"` | 💎 | Conos de llamas 3D de cristal facetado. |
|
|
112
|
+
| **Chispas 3D** | `"sparks"` / `"chispas"` | 💥 | Ráfagas de chispas incandescente con gravedad física. |
|
|
113
|
+
| **Onda de Choque 3D** | `"shockwave"` / `"wave"` / `"onda"` | 🌊 | Anillos emissivos de onda de choque expansivos. |
|
|
114
|
+
| **Plasma Eléctrico** | `"plasma"` / `"electric"` | ⚡ | Arcos de plasma eléctrico reactivos al cursor. |
|
|
115
|
+
| **Ascuas Ambientales** | `"embers"` / `"ascuas"` | ✨ | Ascuas y polvo estelar flotante en el aire. |
|
|
116
|
+
| **Todos los Efectos** | `"all"` / `"supernova"` / `"todos"` | 🌟 | Activa todos los efectos 3D en simultáneo. |
|
|
117
|
+
|
|
118
|
+
---
|
|
119
|
+
|
|
120
|
+
## 💡 Ejemplos de Uso
|
|
121
|
+
|
|
122
|
+
### 1. Fondo de Nubes Bioluminiscentes sobre Fondo Blanco (Estilo Captura)
|
|
107
123
|
|
|
108
124
|
```tsx
|
|
109
|
-
|
|
125
|
+
import AnimatedBackground from "3d-effect-cinema";
|
|
110
126
|
|
|
111
|
-
|
|
127
|
+
export default function NubesVerdes() {
|
|
128
|
+
return (
|
|
129
|
+
<div className="w-full h-screen">
|
|
130
|
+
<AnimatedBackground
|
|
131
|
+
effect="blobs"
|
|
132
|
+
effectColor="#00e676"
|
|
133
|
+
backgroundColor="#ffffff"
|
|
134
|
+
effectDensity={0.4}
|
|
135
|
+
effectSpeed={0.5}
|
|
136
|
+
/>
|
|
137
|
+
</div>
|
|
138
|
+
);
|
|
139
|
+
}
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
---
|
|
143
|
+
|
|
144
|
+
### 2. Multi-Selección de Efectos (`effect="llamas,onda,plasma"`)
|
|
145
|
+
|
|
146
|
+
```tsx
|
|
147
|
+
import AnimatedBackground from "3d-effect-cinema";
|
|
112
148
|
|
|
113
|
-
export default function
|
|
149
|
+
export default function MultiEfectos() {
|
|
114
150
|
return (
|
|
115
|
-
<
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
151
|
+
<div className="w-full h-[600px]">
|
|
152
|
+
<AnimatedBackground
|
|
153
|
+
title="UNITED OF WEB"
|
|
154
|
+
fontFamily="helvetiker"
|
|
155
|
+
effect="llamas,onda,plasma"
|
|
156
|
+
effectColor="#00e5ff"
|
|
157
|
+
backgroundColor="#021a38"
|
|
158
|
+
letterSpacing={0.85}
|
|
159
|
+
/>
|
|
160
|
+
</div>
|
|
119
161
|
);
|
|
120
162
|
}
|
|
121
163
|
```
|
|
122
164
|
|
|
123
165
|
---
|
|
124
166
|
|
|
125
|
-
|
|
167
|
+
### 3. Pantalla de Carga de 5 Segundos con Redirección y Selector de Contenedor DOM
|
|
126
168
|
|
|
127
|
-
|
|
169
|
+
```tsx
|
|
170
|
+
import AnimatedBackground from "3d-effect-cinema";
|
|
128
171
|
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
172
|
+
export default function SplashIntro() {
|
|
173
|
+
return (
|
|
174
|
+
<div id="home" className="w-full h-screen">
|
|
175
|
+
<AnimatedBackground
|
|
176
|
+
title="CINEMULTIPLEX"
|
|
177
|
+
fontFamily="helvetiker"
|
|
178
|
+
effect="blobs,flames"
|
|
179
|
+
effectColor="#00e5ff"
|
|
180
|
+
loaderDuration={5}
|
|
181
|
+
redirectUrl="/home"
|
|
182
|
+
containerSelector="home"
|
|
183
|
+
/>
|
|
184
|
+
</div>
|
|
185
|
+
);
|
|
186
|
+
}
|
|
187
|
+
```
|
|
188
|
+
|
|
189
|
+
---
|
|
190
|
+
|
|
191
|
+
## 🖱️ Interactividad Clic & Drag
|
|
192
|
+
|
|
193
|
+
Al hacer **clic o arrastrar el ratón/touch** sobre la escena 3D, brotan ráfagas instantáneas del efecto activo **en las coordenadas exactas del puntero**.
|
|
194
|
+
|
|
195
|
+
---
|
|
196
|
+
|
|
197
|
+
## 👤 Autor y Desarrollador
|
|
198
|
+
|
|
199
|
+
Creado con ❤️ por **Esteban Puentes**
|
|
200
|
+
|
|
201
|
+
- 🌐 **Portafolio**: [esteban-puentes.vercel.app](https://esteban-puentes.vercel.app)
|
|
202
|
+
- 💼 **LinkedIn**: [linkedin.com/in/esteban-puentes](https://www.linkedin.com/in/esteban-puentes/)
|
|
203
|
+
- 🚀 **Demo en Vivo**: [cinema-animation-sample.vercel.app](https://cinema-animation-sample.vercel.app)
|
|
138
204
|
|
|
139
205
|
---
|
|
140
206
|
|
|
141
|
-
## 📝
|
|
207
|
+
## 📝 Licencia
|
|
142
208
|
|
|
143
|
-
MIT © [Esteban](https://github.com/esteban284)
|
|
209
|
+
MIT © [Esteban Puentes](https://github.com/esteban284)
|
package/dist/index.d.mts
CHANGED
|
@@ -13,6 +13,55 @@ interface AnimatedLetterProps {
|
|
|
13
13
|
}
|
|
14
14
|
declare function AnimatedLetter({ char, index, totalLetters, position, phase, theme, fontUrl, }: AnimatedLetterProps): react.JSX.Element | null;
|
|
15
15
|
|
|
16
|
+
type SingleEffectType = "fire" | "flames" | "crystal-flames" | "fluid-flames" | "blobs" | "energy-blobs" | "plasma-blobs" | "inferno" | "sparks" | "shockwave" | "wave" | "plasma" | "electric" | "embers" | "supernova" | "all";
|
|
17
|
+
type EffectType = SingleEffectType | SingleEffectType[] | string;
|
|
18
|
+
interface AnimatedBackgroundProps {
|
|
19
|
+
/** View template or component to display ("lhome", "home", or custom React component) */
|
|
20
|
+
containerToDisplay?: string | react__default.ReactNode;
|
|
21
|
+
/** DOM element ID/class or container target to attach as background (e.g. "home", "#main-hero", "lhome") */
|
|
22
|
+
containerSelector?: string;
|
|
23
|
+
/** 3D Effect type or multiple effects (e.g. "blobs,onda" or ["flames", "shockwave"]) */
|
|
24
|
+
effect?: EffectType;
|
|
25
|
+
/** 3D Title rendered in world space (omit or pass "" for blank pure background effects) */
|
|
26
|
+
title?: string;
|
|
27
|
+
/** Background color or gradient (supports Spanish names like "rojo", "azul", "verde", "dorado" or #HEX / CSS colors) */
|
|
28
|
+
backgroundColor?: string;
|
|
29
|
+
/** Custom color for ALL 3D WebGL effects (e.g. "azul", "verde", "magenta", "#00e5ff", "#ff0055") */
|
|
30
|
+
effectColor?: string;
|
|
31
|
+
/** Speed multiplier for 3D motion & animation (default 0.5 for smooth relaxing motion) */
|
|
32
|
+
effectSpeed?: number;
|
|
33
|
+
/** Density / quantity of flame & WebGL particles (range 0.1 to 1.0, default 0.3 for clean elegant flames) */
|
|
34
|
+
effectDensity?: number;
|
|
35
|
+
/** Automatically scale 3D text to fit parent container perfectly (default true) */
|
|
36
|
+
autoFitText?: boolean;
|
|
37
|
+
/** Optional duration in seconds when used as a Loader / Splash screen animation */
|
|
38
|
+
loaderDuration?: number;
|
|
39
|
+
/** Optional URL to redirect to automatically when loaderDuration timer reaches 0 */
|
|
40
|
+
redirectUrl?: string;
|
|
41
|
+
/** Optional callback triggered when loaderDuration timer finishes */
|
|
42
|
+
onComplete?: () => void;
|
|
43
|
+
/** 3D Font Family ("cinema", "helvetiker", "gentilis", "optimer" or custom font URL) */
|
|
44
|
+
fontFamily?: "cinema" | "helvetiker" | "gentilis" | "optimer" | string;
|
|
45
|
+
/** Custom 3D Typeface JSON URL */
|
|
46
|
+
fontUrl?: string;
|
|
47
|
+
/** 3D Material theme */
|
|
48
|
+
theme?: MaterialTheme;
|
|
49
|
+
/** Letter spacing multiplier (default 0.85 to prevent text overlaps) */
|
|
50
|
+
letterSpacing?: number;
|
|
51
|
+
/** Container CSS class name */
|
|
52
|
+
className?: string;
|
|
53
|
+
/** Inline CSS styles */
|
|
54
|
+
style?: react__default.CSSProperties;
|
|
55
|
+
/** Custom children overlay */
|
|
56
|
+
children?: react__default.ReactNode;
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* Main Animated Background Component for 3d-effect-cinema.
|
|
60
|
+
* Supports permanent 3D background mode OR cinematic Splash Screen / Loader mode (with loaderDuration & redirectUrl).
|
|
61
|
+
* Can be targeted to a DOM container via `containerSelector` (e.g. containerSelector="home").
|
|
62
|
+
*/
|
|
63
|
+
declare function AnimatedBackground({ containerToDisplay, containerSelector, effect, title, backgroundColor, effectColor, effectSpeed, effectDensity, autoFitText, loaderDuration, redirectUrl, onComplete, fontFamily, fontUrl, theme, letterSpacing, className, style, children, }: AnimatedBackgroundProps): react__default.JSX.Element;
|
|
64
|
+
|
|
16
65
|
interface CinemaBackgroundProps {
|
|
17
66
|
/** 3D Text rendered in world space */
|
|
18
67
|
text?: string;
|
|
@@ -69,32 +118,67 @@ interface CinemaLoaderProps {
|
|
|
69
118
|
}
|
|
70
119
|
declare function CinemaLoader({ cinemaName, defaultTheme, customBackground, onEnterCinema, }: CinemaLoaderProps): react.JSX.Element;
|
|
71
120
|
|
|
72
|
-
|
|
121
|
+
interface FireFlamesProps {
|
|
122
|
+
theme?: MaterialTheme;
|
|
123
|
+
effectColor?: string;
|
|
124
|
+
effectSpeed?: number;
|
|
125
|
+
effectDensity?: number;
|
|
126
|
+
mode?: "fluid" | "crystal" | "all";
|
|
127
|
+
enabled?: boolean;
|
|
128
|
+
}
|
|
129
|
+
/**
|
|
130
|
+
* Dual-Engine Fire Flames Component:
|
|
131
|
+
* Offers both Organic Liquid Energy Flame Clouds (mode="fluid") and 3D Crystal Flame Geometries (mode="crystal" or mode="all")
|
|
132
|
+
*/
|
|
133
|
+
declare function FireFlames({ theme, effectColor, effectSpeed, effectDensity, mode, enabled, }: FireFlamesProps): react.JSX.Element | null;
|
|
134
|
+
|
|
135
|
+
interface PlasmaBlobsProps {
|
|
136
|
+
theme?: MaterialTheme;
|
|
137
|
+
effectColor?: string;
|
|
138
|
+
effectSpeed?: number;
|
|
139
|
+
effectDensity?: number;
|
|
140
|
+
enabled?: boolean;
|
|
141
|
+
}
|
|
142
|
+
/**
|
|
143
|
+
* Exact Bioluminescent Liquid Energy Blobs Effect (matching user screenshot)
|
|
144
|
+
*/
|
|
145
|
+
declare function PlasmaBlobs({ theme, effectColor, effectSpeed, effectDensity, enabled, }: PlasmaBlobsProps): react.JSX.Element | null;
|
|
146
|
+
|
|
147
|
+
declare function ClickFireSparks({ theme, effectColor, effectSpeed, enabled, }: {
|
|
73
148
|
theme?: MaterialTheme;
|
|
149
|
+
effectColor?: string;
|
|
150
|
+
effectSpeed?: number;
|
|
74
151
|
enabled?: boolean;
|
|
75
152
|
}): react.JSX.Element;
|
|
76
153
|
|
|
77
|
-
declare function ClickShockwave({ theme, enabled, }: {
|
|
154
|
+
declare function ClickShockwave({ theme, effectColor, effectSpeed, enabled, }: {
|
|
78
155
|
theme?: MaterialTheme;
|
|
156
|
+
effectColor?: string;
|
|
157
|
+
effectSpeed?: number;
|
|
79
158
|
enabled?: boolean;
|
|
80
159
|
}): react.JSX.Element | null;
|
|
81
160
|
|
|
82
161
|
interface ElectricPlasmaProps {
|
|
83
162
|
theme?: MaterialTheme;
|
|
163
|
+
effectColor?: string;
|
|
164
|
+
effectSpeed?: number;
|
|
84
165
|
enabled?: boolean;
|
|
85
166
|
}
|
|
86
|
-
declare function ElectricPlasma({ theme, enabled, }: ElectricPlasmaProps): react.JSX.Element | null;
|
|
167
|
+
declare function ElectricPlasma({ theme, effectColor, effectSpeed, enabled, }: ElectricPlasmaProps): react.JSX.Element | null;
|
|
87
168
|
|
|
88
169
|
interface SceneParticlesProps {
|
|
89
170
|
theme: MaterialTheme;
|
|
171
|
+
effectColor?: string;
|
|
172
|
+
effectSpeed?: number;
|
|
90
173
|
visible: boolean;
|
|
91
174
|
}
|
|
92
|
-
declare function SceneParticles({ theme, visible }: SceneParticlesProps): react.JSX.Element | null;
|
|
175
|
+
declare function SceneParticles({ theme, effectColor, effectSpeed, visible }: SceneParticlesProps): react.JSX.Element | null;
|
|
93
176
|
|
|
94
177
|
interface CameraRigProps {
|
|
95
178
|
phase: "loading" | "entering" | "idle" | "exiting";
|
|
179
|
+
effectSpeed?: number;
|
|
96
180
|
}
|
|
97
|
-
declare function CameraRig({ phase }: CameraRigProps): null;
|
|
181
|
+
declare function CameraRig({ phase, effectSpeed }: CameraRigProps): null;
|
|
98
182
|
|
|
99
183
|
interface EffectState {
|
|
100
184
|
sparks: boolean;
|
|
@@ -118,4 +202,4 @@ declare function CinemaHome({ cinemaName, webTheme }: {
|
|
|
118
202
|
webTheme?: string;
|
|
119
203
|
}): react.JSX.Element;
|
|
120
204
|
|
|
121
|
-
export { AnimatedLetter, CameraRig, CinemaBackground, type CinemaBackgroundProps, CinemaHome, CinemaLoader, ClickFireSparks, ClickShockwave, type EffectState, ElectricPlasma, LoaderOverlay, type MaterialTheme, SceneParticles, type WithCinema3DOptions, withCinema3D };
|
|
205
|
+
export { AnimatedBackground, type AnimatedBackgroundProps, AnimatedLetter, CameraRig, CinemaBackground, type CinemaBackgroundProps, CinemaHome, CinemaLoader, ClickFireSparks, ClickShockwave, type EffectState, type EffectType, ElectricPlasma, FireFlames, LoaderOverlay, type MaterialTheme, PlasmaBlobs, SceneParticles, type WithCinema3DOptions, AnimatedBackground as default, withCinema3D };
|
package/dist/index.d.ts
CHANGED
|
@@ -13,6 +13,55 @@ interface AnimatedLetterProps {
|
|
|
13
13
|
}
|
|
14
14
|
declare function AnimatedLetter({ char, index, totalLetters, position, phase, theme, fontUrl, }: AnimatedLetterProps): react.JSX.Element | null;
|
|
15
15
|
|
|
16
|
+
type SingleEffectType = "fire" | "flames" | "crystal-flames" | "fluid-flames" | "blobs" | "energy-blobs" | "plasma-blobs" | "inferno" | "sparks" | "shockwave" | "wave" | "plasma" | "electric" | "embers" | "supernova" | "all";
|
|
17
|
+
type EffectType = SingleEffectType | SingleEffectType[] | string;
|
|
18
|
+
interface AnimatedBackgroundProps {
|
|
19
|
+
/** View template or component to display ("lhome", "home", or custom React component) */
|
|
20
|
+
containerToDisplay?: string | react__default.ReactNode;
|
|
21
|
+
/** DOM element ID/class or container target to attach as background (e.g. "home", "#main-hero", "lhome") */
|
|
22
|
+
containerSelector?: string;
|
|
23
|
+
/** 3D Effect type or multiple effects (e.g. "blobs,onda" or ["flames", "shockwave"]) */
|
|
24
|
+
effect?: EffectType;
|
|
25
|
+
/** 3D Title rendered in world space (omit or pass "" for blank pure background effects) */
|
|
26
|
+
title?: string;
|
|
27
|
+
/** Background color or gradient (supports Spanish names like "rojo", "azul", "verde", "dorado" or #HEX / CSS colors) */
|
|
28
|
+
backgroundColor?: string;
|
|
29
|
+
/** Custom color for ALL 3D WebGL effects (e.g. "azul", "verde", "magenta", "#00e5ff", "#ff0055") */
|
|
30
|
+
effectColor?: string;
|
|
31
|
+
/** Speed multiplier for 3D motion & animation (default 0.5 for smooth relaxing motion) */
|
|
32
|
+
effectSpeed?: number;
|
|
33
|
+
/** Density / quantity of flame & WebGL particles (range 0.1 to 1.0, default 0.3 for clean elegant flames) */
|
|
34
|
+
effectDensity?: number;
|
|
35
|
+
/** Automatically scale 3D text to fit parent container perfectly (default true) */
|
|
36
|
+
autoFitText?: boolean;
|
|
37
|
+
/** Optional duration in seconds when used as a Loader / Splash screen animation */
|
|
38
|
+
loaderDuration?: number;
|
|
39
|
+
/** Optional URL to redirect to automatically when loaderDuration timer reaches 0 */
|
|
40
|
+
redirectUrl?: string;
|
|
41
|
+
/** Optional callback triggered when loaderDuration timer finishes */
|
|
42
|
+
onComplete?: () => void;
|
|
43
|
+
/** 3D Font Family ("cinema", "helvetiker", "gentilis", "optimer" or custom font URL) */
|
|
44
|
+
fontFamily?: "cinema" | "helvetiker" | "gentilis" | "optimer" | string;
|
|
45
|
+
/** Custom 3D Typeface JSON URL */
|
|
46
|
+
fontUrl?: string;
|
|
47
|
+
/** 3D Material theme */
|
|
48
|
+
theme?: MaterialTheme;
|
|
49
|
+
/** Letter spacing multiplier (default 0.85 to prevent text overlaps) */
|
|
50
|
+
letterSpacing?: number;
|
|
51
|
+
/** Container CSS class name */
|
|
52
|
+
className?: string;
|
|
53
|
+
/** Inline CSS styles */
|
|
54
|
+
style?: react__default.CSSProperties;
|
|
55
|
+
/** Custom children overlay */
|
|
56
|
+
children?: react__default.ReactNode;
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* Main Animated Background Component for 3d-effect-cinema.
|
|
60
|
+
* Supports permanent 3D background mode OR cinematic Splash Screen / Loader mode (with loaderDuration & redirectUrl).
|
|
61
|
+
* Can be targeted to a DOM container via `containerSelector` (e.g. containerSelector="home").
|
|
62
|
+
*/
|
|
63
|
+
declare function AnimatedBackground({ containerToDisplay, containerSelector, effect, title, backgroundColor, effectColor, effectSpeed, effectDensity, autoFitText, loaderDuration, redirectUrl, onComplete, fontFamily, fontUrl, theme, letterSpacing, className, style, children, }: AnimatedBackgroundProps): react__default.JSX.Element;
|
|
64
|
+
|
|
16
65
|
interface CinemaBackgroundProps {
|
|
17
66
|
/** 3D Text rendered in world space */
|
|
18
67
|
text?: string;
|
|
@@ -69,32 +118,67 @@ interface CinemaLoaderProps {
|
|
|
69
118
|
}
|
|
70
119
|
declare function CinemaLoader({ cinemaName, defaultTheme, customBackground, onEnterCinema, }: CinemaLoaderProps): react.JSX.Element;
|
|
71
120
|
|
|
72
|
-
|
|
121
|
+
interface FireFlamesProps {
|
|
122
|
+
theme?: MaterialTheme;
|
|
123
|
+
effectColor?: string;
|
|
124
|
+
effectSpeed?: number;
|
|
125
|
+
effectDensity?: number;
|
|
126
|
+
mode?: "fluid" | "crystal" | "all";
|
|
127
|
+
enabled?: boolean;
|
|
128
|
+
}
|
|
129
|
+
/**
|
|
130
|
+
* Dual-Engine Fire Flames Component:
|
|
131
|
+
* Offers both Organic Liquid Energy Flame Clouds (mode="fluid") and 3D Crystal Flame Geometries (mode="crystal" or mode="all")
|
|
132
|
+
*/
|
|
133
|
+
declare function FireFlames({ theme, effectColor, effectSpeed, effectDensity, mode, enabled, }: FireFlamesProps): react.JSX.Element | null;
|
|
134
|
+
|
|
135
|
+
interface PlasmaBlobsProps {
|
|
136
|
+
theme?: MaterialTheme;
|
|
137
|
+
effectColor?: string;
|
|
138
|
+
effectSpeed?: number;
|
|
139
|
+
effectDensity?: number;
|
|
140
|
+
enabled?: boolean;
|
|
141
|
+
}
|
|
142
|
+
/**
|
|
143
|
+
* Exact Bioluminescent Liquid Energy Blobs Effect (matching user screenshot)
|
|
144
|
+
*/
|
|
145
|
+
declare function PlasmaBlobs({ theme, effectColor, effectSpeed, effectDensity, enabled, }: PlasmaBlobsProps): react.JSX.Element | null;
|
|
146
|
+
|
|
147
|
+
declare function ClickFireSparks({ theme, effectColor, effectSpeed, enabled, }: {
|
|
73
148
|
theme?: MaterialTheme;
|
|
149
|
+
effectColor?: string;
|
|
150
|
+
effectSpeed?: number;
|
|
74
151
|
enabled?: boolean;
|
|
75
152
|
}): react.JSX.Element;
|
|
76
153
|
|
|
77
|
-
declare function ClickShockwave({ theme, enabled, }: {
|
|
154
|
+
declare function ClickShockwave({ theme, effectColor, effectSpeed, enabled, }: {
|
|
78
155
|
theme?: MaterialTheme;
|
|
156
|
+
effectColor?: string;
|
|
157
|
+
effectSpeed?: number;
|
|
79
158
|
enabled?: boolean;
|
|
80
159
|
}): react.JSX.Element | null;
|
|
81
160
|
|
|
82
161
|
interface ElectricPlasmaProps {
|
|
83
162
|
theme?: MaterialTheme;
|
|
163
|
+
effectColor?: string;
|
|
164
|
+
effectSpeed?: number;
|
|
84
165
|
enabled?: boolean;
|
|
85
166
|
}
|
|
86
|
-
declare function ElectricPlasma({ theme, enabled, }: ElectricPlasmaProps): react.JSX.Element | null;
|
|
167
|
+
declare function ElectricPlasma({ theme, effectColor, effectSpeed, enabled, }: ElectricPlasmaProps): react.JSX.Element | null;
|
|
87
168
|
|
|
88
169
|
interface SceneParticlesProps {
|
|
89
170
|
theme: MaterialTheme;
|
|
171
|
+
effectColor?: string;
|
|
172
|
+
effectSpeed?: number;
|
|
90
173
|
visible: boolean;
|
|
91
174
|
}
|
|
92
|
-
declare function SceneParticles({ theme, visible }: SceneParticlesProps): react.JSX.Element | null;
|
|
175
|
+
declare function SceneParticles({ theme, effectColor, effectSpeed, visible }: SceneParticlesProps): react.JSX.Element | null;
|
|
93
176
|
|
|
94
177
|
interface CameraRigProps {
|
|
95
178
|
phase: "loading" | "entering" | "idle" | "exiting";
|
|
179
|
+
effectSpeed?: number;
|
|
96
180
|
}
|
|
97
|
-
declare function CameraRig({ phase }: CameraRigProps): null;
|
|
181
|
+
declare function CameraRig({ phase, effectSpeed }: CameraRigProps): null;
|
|
98
182
|
|
|
99
183
|
interface EffectState {
|
|
100
184
|
sparks: boolean;
|
|
@@ -118,4 +202,4 @@ declare function CinemaHome({ cinemaName, webTheme }: {
|
|
|
118
202
|
webTheme?: string;
|
|
119
203
|
}): react.JSX.Element;
|
|
120
204
|
|
|
121
|
-
export { AnimatedLetter, CameraRig, CinemaBackground, type CinemaBackgroundProps, CinemaHome, CinemaLoader, ClickFireSparks, ClickShockwave, type EffectState, ElectricPlasma, LoaderOverlay, type MaterialTheme, SceneParticles, type WithCinema3DOptions, withCinema3D };
|
|
205
|
+
export { AnimatedBackground, type AnimatedBackgroundProps, AnimatedLetter, CameraRig, CinemaBackground, type CinemaBackgroundProps, CinemaHome, CinemaLoader, ClickFireSparks, ClickShockwave, type EffectState, type EffectType, ElectricPlasma, FireFlames, LoaderOverlay, type MaterialTheme, PlasmaBlobs, SceneParticles, type WithCinema3DOptions, AnimatedBackground as default, withCinema3D };
|