Made curve a dancer in HTML5 canvas.
中文README
Demos
- Loading
- Rope
- Siri-Wave
- Water
- Sprout
- Scale-To
- Points-To
- Rotate
- Word
- Perlin-Noise
- Simple
- Simple-ES5
- Lerp Color
- Curves
- Line
- Close
Usage
$ npm install curvejs
Or get it by the cdn and link curve.min.js
in your HTML:
Then start to dance:
var Stage = curvejsStage Curve = curvejsCurve canvas = document stage = canvas { return -2 + Math * 2 } var curve = color: '#00FF00' points: 277 327 230 314 236 326 257 326 data: { points } stage { stage }
Using built-in motion
var curve = points: 277 327 230 314 236 326 257 326 data: angle: 0 r:5 step:MathPI / 50 motion: curvejsmotiondance
Submit your motion
In this motion directory, there are already some built-in motion. you can submit your motion and then create a pull request to the project.
Format and specification of your motion:
/** * move motion. * * @param * @param * data rule example: * [1, 0.2, -3, 0.7, 0.5, 0.3, -1, 1] */ { points}
QQ Group
The group id is 179181560. Welcome to join the group.
License
Copyright (c) 2017-present, dntzhang & AlloyTeam