All Projects → peteroid → react-polygon

peteroid / react-polygon

Licence: other
A react add-on for drawing polygons for any number of sides, as well as animation

Programming Languages

javascript
184084 projects - #8 most used programming language
HTML
75241 projects
CSS
56736 projects

Projects that are alternatives of or similar to react-polygon

origami
Origami Building in threejs
Stars: ✭ 29 (+7.41%)
Mutual labels:  polygon
country-bounding-boxes
A list of ISO 3166-1 country codes and their bounding boxes.
Stars: ✭ 26 (-3.7%)
Mutual labels:  polygon
client-js
JS client for polygon.io api
Stars: ✭ 81 (+200%)
Mutual labels:  polygon
PolyDraw
✳️ PTSource PolyDraw is a free 3D polygonal modeller for Windows x86 and x64, for creating or modifying 3D objects using a mesh of 3D points and parametric NURBS Curves .Exports and imports to over 40 formats including WebVR and 3D Printing.
Stars: ✭ 17 (-37.04%)
Mutual labels:  polygon
Spin-Hexagon
Port of Super Hexagon to the Parallax Propeller
Stars: ✭ 13 (-51.85%)
Mutual labels:  hexagon
cryptowallet-cli
CW is a crypto wallet generator CLI tool for a lot of blockchains: Bitcoin, Ethereum, Binance Smart Chain and many others
Stars: ✭ 45 (+66.67%)
Mutual labels:  polygon
OpenLoginSdk
Pluggable auth infrastructure for Web3 wallets and dapps
Stars: ✭ 108 (+300%)
Mutual labels:  polygon
markjs
一个插件化的多边形标注库
Stars: ✭ 23 (-14.81%)
Mutual labels:  polygon
ludigraphix.github.io
Documentation for Ludigraphix
Stars: ✭ 21 (-22.22%)
Mutual labels:  polygon
Vault-13
Canvas (Fallout 2 like) game in functional programming style
Stars: ✭ 22 (-18.52%)
Mutual labels:  hexagon
poly-flashloan-bot
Flashloan Bot on Polygon
Stars: ✭ 199 (+637.04%)
Mutual labels:  polygon
typescript-eth-starter
🔌 Ethereum Dapp Basic Typescript Starter
Stars: ✭ 125 (+362.96%)
Mutual labels:  polygon
geojson-python-utils
Python helper functions for manipulating GeoJSON
Stars: ✭ 86 (+218.52%)
Mutual labels:  polygon
kotal
Blockchain Kubernetes Operator
Stars: ✭ 137 (+407.41%)
Mutual labels:  polygon
CryptoLogos
Hundreds of crypto logos simply named by their normalized contract address
Stars: ✭ 14 (-48.15%)
Mutual labels:  polygon
nft-collection-scaffold
Production-ready code for an NFT Collection sale and minting on Ethereum, Polygon, Arbitrum or Binance Smart Chain
Stars: ✭ 53 (+96.3%)
Mutual labels:  polygon
hexagonTab
Hexagon bookmarks accented with a chosen colour. Customise the layout, style, background and bookmarks with hexagonTab.
Stars: ✭ 65 (+140.74%)
Mutual labels:  hexagon
pixel-avatars
A Polygon-based minting projects for Developer DAO members who own an Devs for Revolution NFT
Stars: ✭ 117 (+333.33%)
Mutual labels:  polygon
h3net
H3NET: A Hexagonal Hierarchical Geo-spatial Indexing System In C#
Stars: ✭ 20 (-25.93%)
Mutual labels:  hexagon
Awesome NFTs
A curated collection about NFTs - by bt3gl
Stars: ✭ 42 (+55.56%)
Mutual labels:  polygon

Standard - JavaScript Style Guide Build Status npm version

react-polygon react-polygon

A react add-on for drawing polygons for any number of sides, as well as animation

Demo

https://peteroid.github.io/react-polygon/

Usage

npm install react-polygon --save
import Polygon from 'react-polygon'

// add this to your components
<Polygon />

Build your own

npm install
npm run webpack

Props

name : propType = defaultValue

Basic

  • n : number = 3
  • size : number = 50
  • fill : string = "#ad893e"
  • ratios : [number] = [1, 1, 1, 1, 1]

Animation

  • isAnimating : bool = true
  • duration : number = 1000

renderPoint

You can render extra elements on each point by passing a function to the props renderPoint. Here is an example for rendering a point on each vertice:

import React, { Component } from 'react'
import Polygon from 'react-polygon'

class MyPolygon extends Component {
  myRenderPoint (point) {
    return (
      <circle cx={point[0]} cy={point[1]} r={5} />
    )
  }

  render () {
    return (
      <Polygon renderPoint={this.myRenderPoint} />
    )
  }
}

Credits

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].