Giter Site home page Giter Site logo

editartp5template's Introduction

EditART p5.js Template Instructions

This is a template for p5.js for creating projects on EditART.

Create your art

  • Use the variables m0, m1, m2, m3, m4 which are tha values of the 5 sliders.

    IMPORTANT: Every single part of the output must ONLY depend on the values m0..m4. Otherwise the pieces will change after minting.

  • The entrypoint is the draw() function which will be triggered automatically everytime the sliders change. Everything necessary for the sketch to render properly should be initialized in draw(). Find an example in index.js.

  • Call triggerPreview() at the point in time when the preview image should be renderd.

  • To handle window resizing please do everything necessary in windowResizedUser(). Do not overwrite windowResized() unless you know exactly what you are doing.

  • If your project is animated, please restart the animation when the sliders change. You can do this as follows:

    function draw() {
        if(resetAnimation) {
            // Do necessary steps to reset the animation
            resetAnimation = false;
        }
        // Rest of the draw() function
    }
    
  • If you use any libraries, include all source files in the project. Do not load any dependencies from the internet.

  • Make a sketch that renders fast for the best user experience.

Randomness

If you need randomness, you can use the functions randomM0()..randomM4() these functions provide randomness seeded by the respective values m0..m4.

NOTE: You can set the randomSeedEditArt variable in index.html to any string you like in order to distinguish your randomness from the one of other projects. IMPORTANT: Don't use any source of randomness other than the one described above.

Testing

In order to test your project with the EditART platform, start a local development server of your project and paste its address in the sandbox and you can start playing around with the sliders.

Project ready or questions?

Is you have a finished project or any questions, send me a DM on twitter @pifragile. Looking forward to hearing from you!

License

MIT License

editartp5template's People

Contributors

pifragile avatar meezwhite avatar loackme avatar mattebb 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.