GithubHelp home page GithubHelp logo

kerynjane77 / my-pix-art Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 0.0 2 KB

Pixel art -- simple js app to paint with your cursor

Home Page: http://kerynjane77.github.io/my-pix-art/

HTML 24.16% JavaScript 33.32% CSS 42.52%

my-pix-art's Introduction

#PixArt!

Objectives

A app that uses jQuery and event listeners to create an interactive web interface that will paint pixels.

Step 1: Set Color

When you click the #set-color button, it changes the color of the .brush-color palette to the color you specify in the input field.

An event listener listens for a click on the button with the id of set-color and uses jQuery to take the value from the color input field and make the brush swatch that color.

Step 2: Create the Canvas

Using jQuery, a pixel div with the class square is appended to the body. An event listener is added to this div so that it changes color on mouseover to the color of the brush swatch. This is repeated 2000 times to draw the canvas.

Step 3

  • Choose a CSS colour by typing in the input field and clicking the button.
  • Use your mouse to paint a picture!

my-pix-art's People

Contributors

kerynjane77 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.