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
+16-8Lines changed: 16 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,21 +4,21 @@ GUI for live easing/property curves editing.
4
4
5
5

6
6
7
-
`MojsCurveEditor` is a GUI plugin for interactive `custom easings`/`property curves` editing while crafting your animations. Part of `mojs` tools.
7
+
`MojsCurveEditor` is a GUI plugin for interactive custom easings and property curves editing while crafting your animations. It is part of [`mojs` tools](https://mojs.github.io/tools/).
8
8
9
9
## Installation
10
10
11
11
The `MojsCurveEditor` depends on `mojs >= 0.225.2`, tween autoupdates available for `mojs >= 0.276.2`. Please make sure you've linked [mojs](https://github.com/mojs/mojs) library first.
@@ -63,7 +63,10 @@ After that you can "connect" the curve with your `mojs` modules by passing a "sa
63
63
64
64
consthtml=newmojs.Html({
65
65
el:'#js-el',
66
-
x: { 0:100, curve:mojsCurve.getEasing() }
66
+
x: {
67
+
0:100,
68
+
curve:mojsCurve.getEasing()
69
+
}
67
70
});
68
71
69
72
```
@@ -76,19 +79,23 @@ The `getEasing` function receives options hash:
76
79
77
80
```javascript
78
81
easing:mojsCurve.getEasing({
82
+
79
83
// `transform` function that pipes through the current value
80
84
// of the curve so you can transform it
81
85
transform: (k) => { return k; }
82
86
});
83
87
84
88
```
85
89
86
-
After you are happy with the curve you made, you need to change the `sample`(`mojsCurve.getEasing()` calls) with actual path data which you can get by clicking on the `code` button (<imgwidth="32"style="margin-bottom: -10px"src="https://github.com/legomushroom/mojs-curve-editor/blob/master/mockups/code-button.png?raw=true"alt="code button" />):
90
+
After you are happy with the curve you made, you need to change the `sample`, `mojsCurve.getEasing()` calls, with the actual path data that you can get by clicking on the `code` button <imgwidth="32"style="margin-bottom: -10px"src="https://github.com/mojs/mojs-curve-editor/blob/master/mockups/code-button.png?raw=true"alt="code button" />:
0 commit comments