Skip to content

antoniopacheco/react-live-drawing-firebase

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Canvas Drawing to firebase

Based on https://github.com/embiem/react-canvas-draw

Installation

npm install --save react-live-drawing-firebase

Usage

Person drawing:

import { ReactLiveDrawing } from "react-live-drawing-firebase";

<ReactLiveDrawing
  ref={(canvasDraw) => (drawingRef = canvasDraw)}
  db={fire.database().ref("draw-room")}
  {...props}
/>;

Person viewing

Live view

import {LiveViewer} from 'react-live-drawing-firebase'
<LiveViewer db={fireBase.ref('draws') {...props}} />

Recorder view

import { RecorderViewer } from "react-live-drawing-firebase";
<RecorderViewer db={firebase.href("draw")} {...props} />;

props

Functions

functions are only available on ReactLiveDrawing

clear

This function will clear the canvas, delete lines from firebase and will cause an update on the viewer

canvasDraw.clear();

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published