Git Product home page Git Product logo

pixel-sort's Introduction

pixel-sort

Not actually though, just shifts lines of pixels up and down randomly after you draw an area to shift about in. Also allows for multiple iterations of shifting.

Output

From

To

Using

  1. Use the config to edit values, see end of readme for details on that.
  2. Run it using commands under Running section
  3. Draw a shape
    • You can hold down to draw a series of points or just click for each vertex
    • If no shape drawn it will use the previous one
  4. Hit any key other than q
    • Hit q to save image in out and stay at this stage
  5. Watch it melt
  6. Goto 3

Running

If you have processing installed as a system package you can simply do:

make run

If you have installed processing to a custom location you can instead do:

make run processing-bin=/path/to/processing-java

Lovingly taken from preda-prey

Configuration

The sketch looks for a config.json file in the directory that it is run from and will load values if they are present. All configurable values are optional and have sensible defaults which will be loaded unless overriden. Colors are specified as string representation of hex codes with the first digit being the alpha channel and the following digits the standard RGB values.

iteration_limit (Integers): How many iterations of melting per key press

iter_frame_rate and normal_frame_rate (Integers): How frequently to redraw the screen when drawing and when the computer is melting

shift_block_chance and down_chance (Float): Chance of a line in a block being shifted and the chance that the direction of that block will be down

offset_scaler and up_dampening and down_dampening (Float): Shifting is calculated by the length of the inputted line, but can be adjusted by offset_scaler, and up and down dampening just allow for reduction of the amount each line will be moved by.

image_file (String): Input image to mess with.

save_file_name and save_file_type (String): Says what file type and filename you will have for your saved frames when you hit q.

flash_selection (Boolean): Flashes up the slected shape before melting. Used to see what you are shifting.

pixel-sort's People

Contributors

f-prettyland avatar

Watchers

 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.