background preloader

Tutorials

Tutorials
Related:  paper.jscanvas, html, svg and js illustrations

What Can You Do With Paper.js? There are many JavaScript frameworks that leverage HTML5. Paper.js is one of these frameworks that uses Document Object Model (DOM) to structure objects in an easy-to-understand manner. It offers creative and neat ways of doing lots of stuff on a Web browser that supports the <canvas> tag. It also offers a new and interesting approach to drawing vector graphics. The basic setup is shown below: As you can see, the paper.js is included after which you add your code file under “type=”text/….” Working with Predefined Shapes Paper.js allows you to use predefined shapes of varying dimensions and create path items and segments. var myCircle = new Path.Circle(new Point(300, 70), 50); myCircle.fillColor = 'black'; This piece of code creates a black circle with a radius of 50pts and at the x position of 300 and a y position of y. To create a rectangle, you pass the “Rectangle” constructor the same way as a circle as shown below: Creating Interaction Creating Animations function onFrame(event) { }

Fabric.js Javascript Canvas Library How To Create a Retro Style Race Poster in Photoshop I recently put together a little vintage style poster to let my friends know about a karting event I’m organising for my stag do. I know lots of my readers are also big fans of the retro style and I had loads of fun creating the design, so I thought I’d share the process as a tutorial to give an insight into the techniques used. We’ll use Photoshop to put together the poster layout with various textures and brushes, but also switch back and forth to Illustrator to create the typographic elements. Here’s the little poster design I put together for my karting event. I initially had no plans of making it public, but I’m pretty proud of how it turned out and I know some of my readers will be interested in how to create the retro style. Before getting started, it’s worth gathering some inspiration from Google images for various retro and vintage race posters to pick out common styles. We’ll begin at the top and work down, starting with the red banner. Download this file

Dominikus Baur Interfacery - Data Visualization - How to make fast animated HTML5 visualizations Update: Jeremy Stucki from Interactive Things quickly hacked together an impressive demo of >500 animated, flower-like shapes in SVG - showing that complex animations can also be done using vector graphics. Still, it lacks some of the details (gradients! text labels!) and while working great on a reasonably fast laptop, it's similar in speed to our Canvas-BLI on an iPad 3/iPhone 4S. One thing that people tend to forget in today's HTML5-ed world is how extremely fast Flash actually was and still is. I had to learn the restrictions of HTML5 with the revamp of the OECD's Better Life Index. The OECD Better Life Index (BLI) is an appealing, web-based visualization of various quality-of-life indicators for a set of 36 countries. Every time these settings are changed, the flowers representing the countries adjust by changing their petals' colors and sizes (each petal represents one quality-of-life indicator). Flower animations in the (Flash) Better Life Index (click to see the animation).

Unfolding Maps: Getting Started in Processing Download Library Download the latest version of the Unfolding library. Unzip the archive and put the extracted Unfolding folder into the libraries folder of your Processing sketches. To find the Processing sketches location on your computer, open the Preferences window of the Processing application and look for the “Sketchbook location” item at the top. You will need to create the “libraries” folder if this is your first contributed library. Restart Processing, start a new sketch and create your first simple map. Hello World To get started, you need to include the Unfolding library via Sketch » Import Library and put the import statements at the top of your code. Create a reference to a “Map” object, i.e. Initialize a new map object and add the default event function for basic interaction (double-click to zoom and drag to pan the map). (You can specify P2D or P3D as renderer as the third parameter of the size() function, and Unfolding will use the appropriate one.) That’s it. Tips & Tricks

Dragan's Blog | Archive | javascript Aka canvas / SVG paradox. This year it will be full 10 years that I officially work for various companies, and i could add 3-4 years of freelancing / solo experimenting to that. Most of that time i spent drawing various data in browser. I visualiszed almost everything, big data sets, small data sets, real time sensory data, API responses, sql queries, you name it – i draw it. Back when i started, everything was done in server side, and just show in the browser, RRD/Cacti was the pinnacle of chart technology, and the Firefox was the best and fastest browser around. Those were early days of JS revolution, prototype was big, and jQuery was the enemy Since browsers were painfully slow those days, the majority of the work was in making the browser as fast as possible, so my first experiments were drawing using Js/DOM combo. Soon enough I had to do some more complex charts and I started exploring, which led me to canvas. What was my problem? What are you supposed to do when you need both?

Developing Your First HTML5 Game – Lesson 1 HTML5 Game Development – Lesson 1 Starting today we begin a series of articles on game development in HTML5. In our first article we will cover the basics – working with the canvas, creating simple objects, fill, and some linked event handlers by mouse. Also, pay attention at this stage, we will study this basis, not immediately work in 3D with WebGL. In each next article we will make something new. Here are our demo and downloadable package: Live Demo download in package Ok, download the example files and lets start coding ! Step 1. Here are all html of my demo index.html Step 2. Here are used CSS styles. css/main.css Step 3. js/jquery-1.5.2.min.js We will using jQuery for our demo. js/script.js I commented all necessary code, so I hope that you will not get lost here. Separate big thanks to Packt Publishing website which present me very useful book on developing games for the Web. Conclusion Cool, isn`t it? If you enjoy our articles, feel free to share our tutorials with your friends.

Free Vector Texture Pack for Adobe Illustrator In last week’s vintage logo tutorial we saw how useful vector textures can be to create that aged and weathered appearance, while maintaining a scaleable vector format. So this week I’ve gone ahead and created a pack of new texture files to give you extra choice when grunging up your vector work. Download these textures along with my vector bumper pack for free! This free vector pack contains 6 scaleable vector texture graphics. The detail and style varies between each graphic, giving you a choice from subtle grain to full on grunge. Each texture graphic is a compound path ready for use with the Pathfinder tool. Copy, paste and scale a texture to cover the whole logo/illustration, then send the texture to the bottom of the stack. Use the Intersect option from the Pathfinder palette to crop the texture to the outline of the logo/illustration. Delete out the unedited texture and replace it with the cropped texture from your clipboard using the Paste in Front comment (CMD+F).

Paper.js — About Paper.js — The Swiss Army Knife of Vector Graphics Scripting. Paper.js is an open source vector graphics scripting framework that runs on top of the HTML5 Canvas. It offers a clean Scene Graph / Document Object Model and a lot of powerful functionality to create and work with vector graphics and bezier curves, all neatly wrapped up in a well designed, consistent and clean programming interface. Paper.js is based on and largely compatible with Scriptographer, a scripting environment for Adobe Illustrator with an active community of scripters and more than 10 years of development. Paper.js is easy to learn for beginners and has lots to master for intermediate and advanced users. Paper.js is developed by Jürg Lehni & Jonathan Puckey, and distributed under the permissive MIT License. Getting Started First of all, take a look at some of our examples.Download Paper.js or check out the latest version from our Github Repository.Want to learn Paper.js? Overview Browser Support

Ghost Counties on Datavisualization.ch Earlier this year, Visualizing.org and Eyeo made an open call for designers and developers to create an interactive portrait of America by visualizing the 2010 census data. Jan Willem Tulp, a freelance information visualizer based in The Netherlands has recently published his submission for the competition called Ghost Counties. The visualization, developed in Processing, analyzes the numbers of homes and vacant homes in proportion to the population of all counties in the United States of America. The data itself was not very complex, but rather big, and the biggest challenge was to find a creative approach to visualize this data, but without using a map (which would be rather obvious since it’s about locations). The counties are represented by two concentric circles and the size of the outer bubble represents the total number of homes, the size of the inner bubble represents the number of vacant homes. The visualization achieves to clearly show exceptional states of counties.

HTML5 Game: Air Raid Defender – Gary Smith Welcome to my second attempt at an HTML5 game: Air Raid Defender! This game was coded in HTML5 Canvas and JavaScript with the Paper.js library. I’ve only used a few of the library’s many features (and pretty much ignored its focus on vector-based graphics in favour of bitmaps) but I found the library vastly simplified basic tasks such as placing image objects on the screen, rotating them, and refreshing and redrawing the canvas with every frame. In this respect it feels like progress over my more rudimentary first HTML5 game. The gameplay itself is straightforward: use the mouse to aim the anti-aircraft gun, and click to shoot. While the game is playable in all modern browsers, the experience differs drastically between them. I have attempted to optimize my code as much as possible, through basic things like reusing assets and freeing objects when no longer needed, so I’m not sure what I could do to improve these issues. Things I would add or fix if I had infinite time and energy:

Game Development with JavaScript and the Canvas Element - Getting Started JavaScript and the Canvas Element HTML started life as a way to format a static page. Animated GIF images and flashing text was about as dynamic as HTML could be. JavaScript changed all that by allowing web pages to be dynamically modified, and many web servies now make use of AJAX to create web pages that give the user a more seamless experience than the standard "click, reload page, click" procedure that is so often involved with standard HTML pages. Unfortunately JavaScript is somewhat limited by the functionality of the web browser that hosts it. Enter the canvas element. Anyone who has done 2D graphics programming will find the canvas element quite easy to use. This series will show you how to create a simple platformer game using JavaScript and the canvas element.

How To Create a Classic Tattoo Style Vector Illustration Follow this step by step Adobe Illustrator tutorial to create a vector illustration inspired by the classic tattoo art of Sailor Jerry. Our dagger and heart design will use clean black linework and perfectly formed shapes combined with vector textures to add an element of shading and appreciate the style of traditional tattoo art. A dagger through the heart is a classic tattoo symbol with both religious meanings and associations with betrayal or hurt through love. Before getting started, have some fun browsing images of vintage or classic sailor tattoos and sketch out a design concept with pencil and paper to gain a feel for the kinds of shapes we’ll need to construct digitially. The first element we’ll create is the heart. Click and and drag a curve on the artboard while holding Shift, then turn on Smart Guides (CMD+U) and continue a second path from the open end point. Continue a third path to form the lower portion of the heart outline. Download the source file

Related:  sergiorebelo