React 版的 Paper.js 绑定
http://react-paper.github.io/react-paper-bindings/
Start watching src with babel
cd react-paper-bindings
npm startLink the library to the demo
# npm link the library
cd react-paper-bindings
npm link
cd demo
npm link react-paper-bindingsStart demo with create-react-app
cd demo
npm startIf someone knows a better way, please let me know ;)
import React, { Component } from 'react'
import {
View,
Layer,
Group,
Path,
Circle,
Ellipse,
Rectangle,
PointText,
Tool,
} from 'react-paper-bindings'
const ReactLogo = ({ rotation, x, y }) => {
return (
)
}
const Paper = ({ activeTool, circles, rectangles, width, height }) => {
return (
{circles.map(circle => )}
{rectangles.map(rectangle => )}
)
}暂无开放 Issues,或尚未同步最近议题。