Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
C

curvejs

> 编程语言
Open source

Made curve a dancer in HTML5 canvas - 魔幻线条

1.3K stars0 likes2 views
WebsiteGitHub

About

Made curve a dancer in HTML5 canvas - 魔幻线条

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

bash
$ npm install curvejs
javascript
import curvejs from 'curvejs'

Or get it by the cdn and link curve.min.js in your HTML:

xml

Then start to dance:

…

Using built-in motion

javascript
var curve = new Curve({
    points: [277, 327, 230, 314, 236, 326, 257, 326],
    data: {angle: 0, r:5 ,step:Math.PI / 50 },
    motion: curvejs.motion.dance
})

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:

javascript
/**
 * move motion.
 *
 * @param {points}
 * @param {data}
 *      data rule example:
 *      [1, 0.2, -3, 0.7, 0.5, 0.3, -1, 1]
 */
export default function (points, data) {
    points.forEach(function (item, index) {
        points[index] += data[index]
    })
}

QQ Group

The group id is 179181560. Welcome to join the group.

License

MIT

Copyright (c) 2017-present, dntzhang & AlloyTeam

Issues· 0 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

JavaScriptanimationbeziercanvascurve

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 17, 2026
Category编程语言
PricingOpen source

> Related tools

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言