Skip to content

Commit 6396cef

Browse files
committed
Updated curve-editor example
1 parent 464ba58 commit 6396cef

File tree

3 files changed

+10
-7
lines changed

3 files changed

+10
-7
lines changed

docs/.vuepress/components/MojsCurveEditorExample.vue

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Usage:
77
<div class="mojs-interactive demo-mojs-logo-reveal__wrap">
88
<slot></slot>
99
<button class="button" v-on:click="openExample()">{{open ? 'Close demo' : 'Open demo'}}</button>
10-
<p v-if="open">Try to make the ball bounce. Click on the curve to add new points. See shortcuts <a href="#shortcuts">below</a>.</p>
10+
<p v-if="open">This easing curve makes the circle bounce when animating the <code>y</code> value. Click on the points to edit them, or click on the curve in between to add new points. See shortcuts <a href="#shortcuts">below</a>.</p>
1111
<div id="curve-editor-example" :class="(open ? 'curve-example curve-example--open ' : 'curve-example curve-example--closed ') + 'mojs-interactive__result ' + (dark ? 'mojs-interactive__result--dark' : 'mojs-interactive__result--transparent')">
1212
<div id="curve-controller" class="mojs-interactive__controller"></div>
1313
</div>
@@ -25,7 +25,7 @@ Usage:
2525
},
2626
2727
props: {
28-
isPlaying: { type: Boolean, default: false },
28+
isPlaying: { type: Boolean, default: true },
2929
dark: {type: Boolean, default: false },
3030
},
3131
@@ -40,13 +40,14 @@ Usage:
4040
import('@mojs/core').then(module => {
4141
import('@mojs/player').then(module => {
4242
import('@mojs/curve-editor').then(module => {
43-
44-
// const startPath = 'M0, 100 C21, 100 25, 38 25, 38 C25, 38 37, 60 50, 60 C63, 60 65, 15 75, 15 C85, 15 87.71428571428571, 100 100, 100';
43+
//const startPath = 'M0, 100 C26, 100 30, 0 30, 0 C30, 0 37, 50 50, 50 C63, 50 75, 0 75, 0 C75, 0 83, 100 100, 100';
44+
const startPath = 'M0, 100 C0, 100 0, 100 0, 100 C26, 100 30, 0 30, 0 C30, 0 37, 50 50, 50 C63, 50 75, 0 75, 0 C75, 0 83, 100 100, 100';
4545
4646
this.myCurve = new MojsCurveEditor({
4747
name: 'myCurve',
48-
// startPath: startPath, // doesn't work properly in v1.5.0
48+
startPath: startPath, // doesn't work properly in v1.5.0
4949
isHiddenOnMin: true,
50+
isSaveState: false,
5051
});
5152
5253
this.myCurve.minimize();

docs/.vuepress/styles/index.styl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,15 +28,15 @@ html, body {
2828
border: none;
2929
position: sticky;
3030
top: 0;
31-
z-index: 102;
31+
z-index: 2;
3232
.links {
3333
background-color: transparent;
3434
}
3535
}
3636

3737
.sidebar {
3838
background-color: $sidebarBg;
39-
z-index: 101;
39+
z-index: 1;
4040
}
4141

4242
.content__default {

docs/tools/curve-editor/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33

44
> `MojsCurveEditor` is a GUI plugin for interactive **custom easings / property curves** editing while crafting your animations. Part of mojs tools.
55
6+
[CodePen Example](https://codepen.io/sandstedt/pen/MWJNewP?editors=1010)
7+
68
## TLDR;
79
* Install it: `npm i @mojs/curve-editor`
810
* Import it: `import MojsCurveEditor from '@mojs/curve-editor';`'

0 commit comments

Comments
 (0)