GithubHelp home page GithubHelp logo

locker's Introduction

Pattern Locker

A Vanilla JS implementation of a pattern locker

Note: This is a WIP, it is not ready for a production environment

Usage

var locker = new Locker({
    // This is what identifies the wrapping div for the lock
    wrap: '.locker',

    // The height and width of the locker in pixels
    height: 320,
    width: 320,

    // The background colour of the locker
    background: '#333333',

    // Add styling to position it centered on the page
    // set to false if using custom styles to position
    centered: true,

    // The colour of the line as it is being drawn
    drawing: '#FFFFFF',

    // The colour of the line on save
    saved: '#0088CC',

    // The colour of the line on completion if successful
    success: '#00CC88',

    // The colour of the line on completion if incorrect
    error: '#EF5350',

    // The minimum number of points that need to be filled in
    cap: 4,

    // The colour of the points
    pointscolour: '#FFFFFF',

    // The radius of the points
    pointsize: 5,

    // The radius of the points when active
    pointhoversize: 7,

    // The radius of the area around the point which can activate
    // the point
    pointboundary: 22,

    // The width of the line
    strokewidth: 2,

    // The time taken on completion to reset the lock
    timer: 1000,

    // Add a debugger just below the lock showing the event
    // and the x and y values for the event (useful for mobile testing)
    debug: false
});

locker's People

Contributors

lopeax avatar

Watchers

James Cloos avatar Izzy Skye avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.