oh-my-canvas
Omc is a React like web framework for Canvas 2D render component
Install
npm i oh-my-canvas
Usage
{ return thiscontext } { const x y width height fillColor = thisprops const path = thiscontextfillStyle = fillColor || '#000' path thiscontext thispath = path } { superprops thisstate = x: 10 y: 10 width: 100 height: 100 fillColor: 'red' } { const x y width height fillColor = thisstate return <Group> <Rect key=0 x=x y=y width=width height=height fillColor=fillColor onClick= { thisstatex start } onMouseenter= thisstatefillColor = 'yellow' onMouseleave= thisstatefillColor = 'red' /> </Group> }
The output would be like:
LICENSE
MIT