0.1.1 • Published 5 years ago

vue-8-puzzle v0.1.1

Weekly downloads
3
License
MIT
Repository
github
Last release
5 years ago

Vue-8-puzzle

An itty-bitty slide puzzle game made as Vue.js component

PLAY DEMO

8-puzzle

Images/Videos for source

select-source

Auto-resize

resize

Install and Usage

$ npm install vue-8-puzzle --save
import Vue from 'vue'
import PuzzleBoard from 'vue-8-puzzle'
import videoSrc from 'myvideo.webm'

let v = new Vue({
  el: '#app',
  template: `
    <app>
      <puzzle-board
      :src="videoSrc" />
    </app>`,
  components: {
    PuzzleBoard
  }
})

Props

PropsTypeDescriptionDefault
srcStringsource path-
sourcesArraysource paths-
colsnumbernumber of columns4
rowsnumbernumber of rows4
autoResizebooleanwhen true the component fits to its root automaticallyfalse
showNumberbooleanwhen true the component shows tile numbers on the videotrue

Events

EventPayloadDescription
initnonethe puzzle is initialized
startnonethe tile start to move
changenonethe tile changes
finishnoneall the tile is on correct position
0.1.1

5 years ago

0.1.0

6 years ago

0.0.2

6 years ago

0.0.1

6 years ago