0.0.6 • Published 6 years ago

yuzhua-logo v0.0.6

Weekly downloads
4
License
MIT
Repository
github
Last release
6 years ago

yuzhua logo

Build Status npm npm

Installation

Install with npm or Yarn

# npm
$ npm install yuzhua-logo --save
# yarn
$ yarn add yuzhua-logo

Usage

import Logo from 'yuzhua-logo'

// with constructor options
new Logo({ x: 50, y: 50 }).render()

// render static logo
new Logo().render()

// render motive logo with options
new Logo().move({ duration: 3000 })
new Logo().move({ duration: 3000, count: 3 })
new Logo().move({ duration: 3000, count: Infinity, reverse: true })
new Logo().move({ duration: 3000, count: 0, reverse: true })
// typings
// constructor options
interface Options {
  // target canvas element
  el?: string | HTMLCanvasElement
  // canvas width
  width?: number
  // canvas height
  height?: number
  // logo size
  size?: number
  // logo line style
  lineWidth?: number
  color?: string
  // render position on the canvas
  x?: number
  y?: number
}

// move function options
interface MotiveOptions {
  // render time
  duration?: number
  // timing function
  ease?: easeFunc
  // render count
  count?: number
  // rendering end reversal position
  reverse?: boolean
}

LICENSE

MIT

0.0.6

6 years ago

0.0.5

6 years ago

0.0.4

6 years ago

0.0.3

6 years ago

0.0.2

6 years ago

0.0.1

6 years ago