Skip to content

Commit ae52422

Browse files
authored
add example code
1 parent 05c8f7a commit ae52422

File tree

1 file changed

+16
-2
lines changed

1 file changed

+16
-2
lines changed

README.md

+16-2
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,8 @@ It comes in the form of a JSON file that's imported into the project, and then r
2323
- [Overview](#overview)
2424
- [Contents](#contents)
2525
- [Compatibility](#compatibility)
26-
- [Usage](#usage)
27-
- [4. Use effector properties](#4-use-effector-properties)
2826
- [Example](#example)
27+
- [Usage](#usage)
2928
- [License](#license)
3029
- [Contact](#contact)
3130

@@ -35,6 +34,21 @@ This aeFunctions is compatible with After Effects versions >= 16.0.1 (CC2019) wh
3534

3635
[Back To Top ↑]
3736

37+
## Example
38+
39+
Example layer attraction setup using eTractors:
40+
41+
```javascript
42+
// Import the library
43+
const eTractors = footage('eTractors.jsx').sourceData;
44+
45+
// Create a new effector
46+
const myEffector = eTractors.createEffector(effectorLayer, particlePosition);
47+
48+
// Move towards the effector layer
49+
particlePosition + myEffector.attract;
50+
```
51+
3852
## Usage
3953

4054
### 1. **Download and import `eTractors.jsx` into your After Effects project** <!-- omit in toc -->

0 commit comments

Comments
 (0)