0.2.0 • Published 6 years ago

@j0nz/decoder-text v0.2.0

Weekly downloads
-
License
ISC
Repository
github
Last release
6 years ago

decoder-text

Installation

yarn add @j0nz/decoder-text

Setup

import DecoderText from '@j0nz/decoder-text'
Vue.use(DecoderText)

Example

<decoder-text
  v-model='model'
  :target='text'
  :fps='24'
  :resetWord='false'
  :steps='4'
  @start='startFunc'
  @end='endFunc'
  @abort='cancelFunc'
/>
PropTypeDescription
targetstringDesired end state after decoding is complete
valuestringCurrent state of text. (is all jumbled up during decoding)
fpsnumberframes per second (how fast to switch characters)
stepsnumberhow many letters are jumbled at any given time
resetWordbooleanreset between target changes (or not)
EventsReturnsDescription
startreturns the word that was startedOccurs when a new word is started
endreturns the word that finishedOccurs when a word finishes
abortreturns two params, the cancelled word and the newly started wordOccurs when a new word is started before the old word finishes