GithubHelp home page GithubHelp logo

alexfifi / pixel-editor Goto Github PK

View Code? Open in Web Editor NEW

This project forked from strd6/pixel-editor

0.0 2.0 0.0 5.03 MB

It edits pixels

Home Page: https://danielx.net/pixel-editor/

License: MIT License

CoffeeScript 56.86% JavaScript 33.63% CSS 8.86% HTML 0.65%

pixel-editor's Introduction

Pixel Editor

It edits pixels

Live Demo

Embedding Instructions

The editor will send a postMessage to its parent window when "Save" is clicked.

One thing to note is that this is pointing to the latest version of https://danielx.net/pixel-editor/ so it might break out from under you. You'd probably want to host a stable version of the editor on your own service after you get it working if you care about that kind of thing.

    <html>
    <body>
    </body>
    <iframe src="https://danielx.net/pixel-editor/" width="100%" height="100%"></iframe>
    <script>
    window.addEventListener("message", receiveMessage, false);
    function receiveMessage(event) {
      var origin = event.origin;

      if (origin !== "https://danielx.net") {
        return;
      }

      var data = event.data;
      if (data.method === "save") {
        var image = data.image; // HTML5 Blob object
        var width = data.width;
        var height = data.height;

        // Post to your server, etc
        console.log(data);
      }
    }
    <\/script>
    </html>

Developer Instructions

Fork on Github https://github.com/STRd6/pixel-editor/fork

Go to http://danielx.net/editor

Load your fork by clicking "Load Repo" and typing in "/pixel-editor"

When it loads click "Run" to make sure it works

Click "New Feature" to start working on a feature branch

Modify the code and click "Run" to see your changes.

Click "Save" to push the code to your feature branch

Review your branch on Github to make a pull request.

Hopefully that works, but if not open an issue at https://github.com/STRd6/editor/issues/ and let me know what's not working.

pixel-editor's People

Contributors

strd6 avatar frewsxcv avatar

Watchers

James Cloos 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.