Coder Social home page Coder Social logo

zt-sv / schwartz.js Goto Github PK

View Code? Open in Web Editor NEW
18.0 5.0 0.0 6.49 MB

ASCII Art JavaScript library

Home Page: http://13rentgen.github.io/schwartz.js

License: MIT License

Makefile 0.44% JavaScript 99.56%
javascript character-art image-processing schwartz

schwartz.js's Introduction

May the schwartz be with you!

sCHwARTz - Character Art

Installation

Install with bower bower install schwartz.js

API spec

Constructor

Schwartz new Schwartz(
    [Object options]
)

Options

options.inverse

Type: Boolean Default: False

Inverse image

options.detail

Type: Nubmer Default: 50

Depth of detail

options.render

Type: Function

Output callback

Generate character art from image source

void generateFromImage(
    String src
)

Generate character art from video

void generateFromVideo(
    DOMElement video
)

Set up depth of detail

void setDetail(
    Number n
)

Set up characters

void setCharSet(
    String str
)

Inverse image

void inverseImage()

##Usage Examples

Generate from image

var
    body    = document.getElementsByTagName('body')[0],

    render = function() {
        //
    },

    schwartz = new Schwartz({
        render: render,
        detail: 60
    });
// end of vars

schwartz.generateFromImage('/path/to/img.jpg');

Generate from video

var
    body    = document.getElementsByTagName('body')[0],
    video   = document.getElementsByTagName('video')[0],

    render = function() {
        //
    },

    schwartz = new Schwartz({
        render: render,
        inverse: true,
        detail: 50
    });
// end of vars

schwartz.generateFromVideo(video);

License

Copyright (c) 2014 Alexandr Zaytcev. Licensed under the MIT license.

schwartz.js's People

Contributors

zt-sv avatar

Stargazers

TMF_Archivist avatar Sergei Karasev avatar Michael Anthony avatar  avatar William Falk-Wallace avatar Matthew McLeod avatar Ezequiel Maraschio avatar Emerson Brôga avatar Cheng Lou avatar Nikolay Kolev avatar Márk Bartos avatar Darío Villanueva avatar Brandon Brown avatar Steve Polyak avatar Ben Turner avatar Alexander Guz avatar  avatar Pavel Gertman avatar

Watchers

TMF_Archivist avatar Michael Anthony avatar Pavel Gertman avatar  avatar  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.