Blog
Categories
- Jun 23 2010
Make your own JavaScript Ninja with Processing.js
.NET Magazine: Mom will be proud! I was asked back at the start of the year by .NET Magazine (Practical Web Design in the US) to write a JavaScript article on the subject of my choice. I doubt you read the article because I went to the stores and bought all the copies. (Had to […]
Continue ReadingMake your own JavaScript Ninja with Processing.js- Tagged in:
- tutorial
- Jun 21 2010
Alternate x axis Intervals In g.raphaël.js linechart()
Use the code below to try out everything that I talk about in this post, and check out the live demo over on code.bocoup.com. modified-x-axis-intervals-and-labels.js //based on the source of http://g.raphaeljs.com/linechart.html var options = { axis: “0 0 1 1”, // Where to put the labels (trbl) axisxstep: 16 // How many x interval labels […]
Continue ReadingAlternate x axis Intervals In g.raphaël.js linechart()- Tagged in:
- performance,
- tools and workflow
- Jun 21 2010
Javascript Web Workers: Chrome 5+ supports new SharedWorker()
In my excitement and haste upon discovering new SharedWorker() support in the Opera 10.60 Beta, I neglected to snoop around the window object of my two favorites, Chrome 5+ and FireFox 3.6+ … WHOOPS! If I had done so, I would’ve discovered, as I did just now, that Chrome 5+ ALSO supports new SharedWorker(). Of […]
Continue ReadingJavascript Web Workers: Chrome 5+ supports new SharedWorker()- Tagged in:
- performance,
- tools and workflow
- Jun 18 2010
Find the closest Power of 2 with JavaScript
One of the things I have been working on over the last couple of days, is a convenient set of functions to manipulate a Processing.js Canvas for use in the CubicVR WebGL Engine. You may already know that a OpenGL performs best with textures with 2^n (power of 2) dimensions. To minimize CPU load, We […]
Continue ReadingFind the closest Power of 2 with JavaScript- Tagged in:
- performance,
- tools and workflow
- Jun 18 2010
Javascript Web Workers: Opera 10.6 Beta Supports SharedWorkers
While poking around the Web Worker API in the latest Opera Beta Release, I discovered that they had also implemented support for Shared Web Workers. If you’re not familiar with Shared Web Workers, have a look here. The basic premise is that a Shared Worker can have multiple connections made to one Worker. Paraphrased from […]
Continue ReadingJavascript Web Workers: Opera 10.6 Beta Supports SharedWorkers- Tagged in:
- performance,
- tools and workflow
- Jun 17 2010
Processing Pixel Data with Web Workers…
One of the questions that came up in the Processing track was: “Can you pass the image data from a Canvas to a Web-Worker for processing?” My assumption was “yes” as the specs declare you can paste any complex object to and from workers so long as you’re not trying to pass a DOM element. […]
Continue ReadingProcessing Pixel Data with Web Workers…- Tagged in:
- design,
- performance
- Jun 17 2010
Javascript Web Workers: Opera 10.60 Beta Supports Complex Messages
Opera 10.60 Beta was announced this week and along with the list of new HTML5 features it’s supporting was Web Workers. Of course I was excited to run it through the renderer/worker test suite I set up for my previous posts about Safari 5 and Chrome 5. The results were pleasing, the first Opera release […]
Continue ReadingJavascript Web Workers: Opera 10.60 Beta Supports Complex Messages- Tagged in:
- performance,
- tools and workflow
- Jun 08 2010
JS Truthiness
‘0’ && (‘0′ == false) // true We’ll just have to agree to disagree, javascript. {: .space} Update: this is what I mean by “truthy” and “falsy”: function truthy(x) { return !!x; }; function falsy(x) { return !x; };
Continue ReadingJS Truthiness- Tagged in:
- javascript
- Jun 07 2010
Javascript Web Workers: Safari 5 Now Supports Complex Messages
Following the announcement of Safari 5 [ 5.0 (7533.16) ] today, I did some due diligence and ran it through the json-object, array, boolean and string Worker message cases that I had produced for testing against Chrome 5. The results are in and thankfully consistent – so not much to report here accept that – […]
Continue ReadingJavascript Web Workers: Safari 5 Now Supports Complex Messages- Tagged in:
- performance,
- tools and workflow
- Jun 07 2010
JavaScript EventSource: Now available in Firefox!
…Not natively… but this will work in the meantime: Git it here firefox-event-source.js ;(function (w) { if ( !w[‘EventSource’] ) { // parseUri 1.2.2 // (c) Steven Levithan <stevenlevithan.com> // MIT License var parseUri = function(str) { var o = { key: [‘source’,’protocol’,’authority’,’userInfo’,’user’,’password’,’host’,’port’,’relative’,’path’,’directory’,’file’,’query’,’anchor’], q: { name: ‘queryKey’, parser: /(?:^|&)([^&=]*)=?([^&]*)/g }, parser: { strict: /^(?:([^:\/?#]+):)?(?:\/\/((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?))?((((?:[^?#\/]*\/)*)([^?#]*))(?:\?([^#]*))?(?:#(.*))?)/ } […]
Continue ReadingJavaScript EventSource: Now available in Firefox!- Tagged in:
- performance,
- tools and workflow