Skip to content

Feature: New modes #6

@mster

Description

@mster

Want to work with buffers to create some fun images?

Consider adding a mode to Datamosh!

Work

By adding a new mode, you will be creating a new file which exports a function that manipulates data extracted from a source image's bitmap. That may sound like a lot, but it'll essentially come down to basic iteration over a buffer. Starter code has been provided here.

Your mosh mode doesn't have to do anything specific -- if you think it's cool, we probably will too. Use your imagination and feel free to experiment!

Most of Datamosh's current modes overwrite existing Red/Green/Blue (RGB) pixel values with something random. If you get stuck check out some examples.

To test your mode, you have two options:

  1. (Preferred) Import it into Datamosh by adding an entery in mosh.MODES, here.
  2. Add it to the function property after you initialize Datamosh. Example code on how to do this can be found here.

On Contributing

There aren't many hoops to jump though.

Datamosh uses Prettier for linting and formatting. You will be approved for merging as long as your code passes npm test and only modifies what is needed for your contribution.

You can learn more about contributing in our Contributing document.

Contributing

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions