You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Loop requires `initialAnimate` to define the starting value. Spring animations do not support looping.
155
+
133
156
### Enter Animations
134
157
135
158
Use `initialAnimate` to set starting values. On mount, the view starts at `initialAnimate` values and animates to `animate` values.
@@ -187,6 +210,8 @@ A `View` that animates property changes using native platform APIs.
187
210
|`animate`|`AnimateProps`| Target values for animated properties |
188
211
|`initialAnimate`|`AnimateProps`| Starting values for enter animations (animates to `animate` on mount) |
189
212
|`transition`|`Transition`| Animation configuration (timing or spring) |
213
+
|`onTransitionEnd`|`(event) => void`| Called when an animation finishes with `{ finished: boolean }`|
214
+
|`useHardwareLayer`|`boolean`| Android only — rasterize to GPU texture during animations. See [Hardware Layers](#hardware-layers-android). Default: `false`|
@@ -224,6 +250,25 @@ Properties not specified in `animate` default to their identity values.
224
250
}
225
251
```
226
252
253
+
## Hardware Layers (Android)
254
+
255
+
Setting `useHardwareLayer` rasterizes the view into a GPU texture for the duration of the animation. This means animated property changes (opacity, scale, rotation) are composited on the RenderThread without redrawing the view hierarchy — useful for complex views with many children.
256
+
257
+
```tsx
258
+
<EaseView
259
+
animate={{ opacity: isVisible?1:0 }}
260
+
useHardwareLayer
261
+
/>
262
+
```
263
+
264
+
**Trade-offs:**
265
+
266
+
- Faster rendering for opacity, scale, and rotation animations (RenderThread compositing).
267
+
- Uses additional GPU memory for the off-screen texture (proportional to view size).
268
+
- Children that overflow the view's layout bounds are **clipped** by the texture. This causes visual artifacts when animating `translateX`/`translateY` on views with overflowing content.
269
+
270
+
No-op on iOS where Core Animation already composites off the main thread.
271
+
227
272
## How It Works
228
273
229
274
`EaseView` is a native Fabric component. The JS side flattens your `animate` and `transition` props into flat native props. When those props change, the native view:
0 commit comments