@@ -42,7 +42,7 @@ export type VFXProps = {
42
42
shader ?: ShaderPreset | string ;
43
43
44
44
/**
45
- * The release time for the element.
45
+ * The release time for the element. (Default: `0`)
46
46
*
47
47
* Basically, VFX-JS starts rendering the element when the element entered the viewport,
48
48
* and it stops rendering after it got out of the viewport by scroll etc.
@@ -86,7 +86,7 @@ export type VFXProps = {
86
86
uniforms ?: VFXUniforms ;
87
87
88
88
/**
89
- * The opacity for the original HTML element.
89
+ * The opacity for the original HTML element. (Default: `false`)
90
90
*
91
91
* By default, VFX-JS hides the original element by setting its opacity to 0.
92
92
* However, in some cases you might want not to hide the original element.
@@ -100,7 +100,8 @@ export type VFXProps = {
100
100
overlay ?: true | number ;
101
101
102
102
/**
103
- * Allow shader outputs to oveflow the original element area.
103
+ * Allow shader outputs to oveflow the original element area. (Default: `0`)
104
+ *
104
105
* If true, REACT-VFX will render the shader in fullscreen.
105
106
* If number is specified, REACT-VFX adds paddings with the given value.
106
107
*
@@ -119,14 +120,23 @@ export type VFXProps = {
119
120
| { top ?: number ; right ?: number ; bottom ?: number ; left ?: number } ;
120
121
121
122
/**
122
- * Texture wrapping mode.
123
+ * Texture wrapping mode. (Default: `"repeat"`)
123
124
*
124
125
* You can pass a single value to specify both horizontal and vertical wrapping at once,
125
126
* or you can provide a tuple to spefify different modes for horizontal / vertical wrapping.
126
127
*
127
128
* If not provided, VFX-JS will use "repeat" mode for both horizontal and vertical wrapping.
128
129
*/
129
130
wrap ?: VFXWrap | [ VFXWrap , VFXWrap ] ;
131
+
132
+ /**
133
+ * Z-index inside WebGL world. (Default: `0`)
134
+ *
135
+ * VFX-JS renders elements in ascending order by `zIndex`.
136
+ * For example, when we have elements with `zIndex: 1` and `zIndex: -1`, the second element is rendered first.
137
+ * When elements have the same `zIndex`, they are rendered in the order they were added.
138
+ */
139
+ zIndex ?: number ;
130
140
} ;
131
141
132
142
/**
@@ -176,6 +186,7 @@ export type VFXElement = {
176
186
isGif : boolean ;
177
187
overflow : VFXElementOverflow ;
178
188
originalOpacity : number ;
189
+ zIndex : number ;
179
190
} ;
180
191
181
192
/**
0 commit comments