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
Copy file name to clipboardExpand all lines: README.md
+41-3Lines changed: 41 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -213,8 +213,8 @@ ParticleSystem {
213
213
}
214
214
```
215
215
216
-
> [!WARNING]
217
-
> Particles is in **Pre-Release**. While the API for `Lattice` is to remain unchanged, there is a known performance issue with this entity. `Lattice` uses an expensive initializer that can cause a delay in appearance. This will be optimized before release.
216
+
> [!TIP]
217
+
> You can choose to have the lattice spawn particles along a view's edge by passing `Lattice(hugging:)`.
218
218
219
219
## Defining Entities
220
220
@@ -262,17 +262,21 @@ Like SwiftUI modifiers, *most*\* entity modifiers are applied *outside first*, *
262
262
263
263
### List of Entity Modifiers
264
264
265
+
For more information on modifier parameters, see symbol documentation.
266
+
265
267
- Lifetime
266
268
-`.lifetime(...)`
267
269
- Position and Offset
268
270
-`.initialPosition(...)`
269
271
-`.initialOffset(...)`
270
272
-`.fixPosition(...)`
273
+
-`.zIndex(...)`
271
274
- Velocity and Acceleration
272
275
-`.initialVelocity(...)`
273
276
-`.fixVelocity(...)`
274
277
-`.initialAcceleration(...)`
275
278
-`.fixAcceleration(...)`
279
+
-`.drag(...)`
276
280
- Rotation and Torque
277
281
-`.initialRotation(...)`
278
282
-`.fixRotation(...)`
@@ -288,8 +292,9 @@ Like SwiftUI modifiers, *most*\* entity modifiers are applied *outside first*, *
288
292
-`.scale(...)`
289
293
-`.glow(...)`
290
294
-`.shader(...)`
291
-
- Transitions
295
+
- Transitions and Timing
292
296
-`.transition(_:on:duration:)`
297
+
-`.delay(...)`
293
298
- Custom Behavior
294
299
-`.onAppear(perform:)`
295
300
-`.onUpdate(perform:)`
@@ -315,6 +320,39 @@ All modifiers are documented with parameter information.
315
320
316
321
> [!WARNING]
317
322
> Particles is in **Pre-Release**. The API for the four view modifiers listed above may be changed before release.
323
+
324
+
### Custom Behavior Closures
325
+
326
+
Some modifier parameters take in a closure of the form `(Proxy.Context) -> <Type>`. [`Proxy.Context`](Sources/Particles/API/Proxy.swift#L68-L89) provides information about the current proxy and the system it lives in.
327
+
328
+
Below is a list of properties of `Proxy.Context`. All symbols are documented.
0 commit comments