raphael README

The project's README from github.com/DmitryBaranovskiy/raphael. As one markdown file: README.md.

Raphaël: Cross-browser vector graphics the easy way

Visit the library website for more information: http://raphaeljs.com https://dmitrybaranovskiy.github.io/raphael/

Quickstart guide

You need to have NPM installed to build the library.

To run tests you need to run npx bower install open dev/test/index.html in your browser, there's no automated way right now.

Dependencies

Distributable

All files are UMD compliant.

You can use:

Where to start

Check Raphael-boilerplate to see examples of loading.

Raphael can be loaded in a script tag or with AMD:

define([ "path/to/raphael" ], function( Raphael ) {
  console.log( Raphael );
});

Development

Versions will be released as we gather and test new PRs. As there are a lot of browsers being supported it might take a while to accept a PR, we will use the feedback from other users too.

You can use the raphaelTest.html to try things, you need to start a server in the root dir to start testing things there. Something like running python -m SimpleHTTPServer in the raphael directory and hitting http://localhost:8000/dev/raphaelTest.html with the browser. You should run npm run start before this can work.

Collaborators

Books

Copyright © 2008-2013 Dmitry Baranovskiy (http://dmitrybaranovskiy.github.io/raphael/)

Copyright © 2008-2013 Sencha Labs (http://sencha.com)

Licensed under the MIT (http://dmitrybaranovskiy.github.io/raphael/license.html) license.

raphael (DmitryBaranovskiy/raphael)

Searching Database…

11.3K ·GitHub
这是什么东西?Raphaël 是一个面向浏览器的 JavaScript 矢量图形库:你通过它的 API 绘制图形、文字和动画,它能在各种不同的浏览器上渲染出来。
这是一个我写代码时调用的库,还是一个独立的应用?是一个库,不是应用——你把它引入自己的网页,然后通过它的 JavaScript API 来绘图;它本身没有什么需要单独安装或运行的东西。
我怎么把它引入到我的项目里?用 script 标签或 AMD 方式加载 raphael.min.js 这样的发行文件即可——Raphael-boilerplate 里展示了加载示例。如果要从源码构建,需要 NPM:先 git clone,然后执行 yarn install --frozen-lockfile 和 yarn build-all。
它需要依赖其他库才能运行吗?只有一个:eve。标准构建版本已经把它打包进去了,而 raphael.no-deps.js 和 raphael.no-deps.min.js 则不包含它,这样你就可以按自己的需要单独加载 eve。
在选用它之前,有什么坑需要提前知道?测试是手动的——你需要在浏览器里打开 dev/test/index.html,没有自动化的测试流程。另外由于它支持的浏览器很多,提交的 pull request 可能要等较长时间才会被接受。
它是免费的吗?可以用于商业项目吗?可以——Raphaël 采用 MIT 许可证(版权归 Dmitry Baranovskiy 和 Sencha Labs 所有),任何用途都可以免费使用,包括商业用途。
这个项目还在积极开发吗?它没有固定的发布周期——维护者收集并测试社区的 pull request 后会发布新版本,其他用户的反馈也会帮助决定哪些改动最终合入。
我在哪里能看到示例,或者系统地学习它?README 中指向了 Raphael-boilerplate 的加载示例,以及一个 raphaelTest.html 演练场,用任意静态服务器就能在本地跑起来。还有相关的书:《Learning Raphael JS Vector Graphics》和《Instant RaphaelJS Starter》。
还有哪些项目是围绕 Raphaël 构建的?README 列出了六个相关项目:graphael、raphael.boilerplate、backbone.raphael、mapael、snap 和 react-raphael——其中包括与 Backbone 和 React 的集成。
What are similar projects?mojs, vivus, paper.js, svg.js, lottie-web, anime, fabric.js, zdog
Size
6.7 MB
Stars
11.3K
Age
18y
Commits · 90 Days