background preloader

Front-end

Facebook Twitter

JavaScript Animation Libraries. Matt Bailey - Web designer and front-end developer - Grunt - Synchronised Testing Between Browsers/Devices. Today I discovered how easy it is to synchronise testing between browsers/devices when using grunt server.

Matt Bailey - Web designer and front-end developer - Grunt - Synchronised Testing Between Browsers/Devices

UPDATE: It has been pointed out to me that I should make it clear that grunt server is part of Yeoman’s Gruntfile. If you’ve set up your project not using Yeoman then this command might be different. When you run grunt server from the root directory of your project it watches for changes to your site files and refreshes the browser window automatically (using the grunt task grunt-contrib-watch). If you used Yeoman to scaffold your project (Yeoman installs Bower and Grunt in one neat package, you should definitely check it out) it would have created a Gruntfile for you with all the necessary code to get the live reload task up-and-running. There’s only one thing you need to change, and that’s the hostname option. Next, run grunt server and a browser window should open showing you your dev site. DOM Enlightenment - Exploring the relationship between JavaScript and the modern HTML DOM.

Performance

High Performance Browser Networking. The gzip home page. Let's make the web Jank-free! Zero to Sixty in One Second. When streaming out new pieces of ribbon, the occlusion is baked in on the fly, stored in the unused alpha channel next to the position (RGB).

Zero to Sixty in One Second

The four nearest discs on the ribbon are interpolated bilinearly, and the vertex's normal and position is used to mix the front and back shadow values appropriately. Thus it's effectively trilinear filtering a 2×2×N voxel grid per ribbon, which snakes and twists along its length. I'm very happy with how good it looks, even with very coarse divisions like this. Unlike SSAO it costs practically nothing once generated. If you wish, you can view the design entirely in white to examine the lighting—or in black and white, or in the seventies, tone mapping is fun. To ensure smooth rendering, the resolution is scaled down if it drops below 45 fps for several frames. Finally I also turned on MultiSample Anti-Aliasing to avoid the dreaded jaggies and make the vector style shine.

Achievement Unlocked. Recently I worked with Art Processors to create... - German for black. Recently I worked with Art Processors to create the “Replay” feature for The State Library of New South Wales’ “Curio” — Essentially, you get to see which exhibits you viewed at the gallery after you’ve left (you’re geotagged through the building as you explore).

Recently I worked with Art Processors to create... - German for black

One particular part of this build proved difficult, I thought it may be worth sharing — The polygonally (is that a word?) Masked images: To get this effect to work on webkit browsers, I was able to use the proprietary webkit feature: -webkit-mask-image, with an SVG polygon image. In Firefox (or browsers that actually handle SVG well) — I hand modified the SVG polygon image, adding a clipPath that also contained a copy of the original polygon. I also added some IDs so that the clipPath and original polygon could be referenced separately, then it was just a matter of changing the CSS so webkit would reference the polygon and Firefox would use the clipPath. « Hannu's Plaza » Doing gravity right. Now you may be thinking: "baah, I know how to do gravity.. " but there's a big flaw in the commonly used Euler's method to handle the gravity (or other forces). Even all the Quake games have this problem.

Then what is it? If you have more frames per second in Quake, your player will run faster and jump higher. There are some places in Quake where you can't jump high enough if you don't have enough frames per second. Sounds odd, right? Most of the programmers do the gravity something like this: velocity = velocity + gravity*delta_time position = position + velocity*delta_time The algorithm above is ok but when delta_time changes or delta_time is too high, it causes many unwanted problems.

Velocity = velocity + gravity*delta_time/2 position = position + velocity*delta_time velocity = velocity + gravity*delta_time/2 That's it.. but you need proof, right? But what the bad algorithm actually does is shown in the picture on right. Here is how the new algorithm handles the integration: Fresco - A Beautiful Responsive Lightbox. Semantic Versioning 2.0.0-rc.2. Shiny Demos. Create high quality cinemagraphs with CSS3 and jQuery.

QuirksMode - for all your browser quirks.