For anyone who’s good with math, I suppose this is a fairly easy one, but if you’re not, rotating a camera in threeJS can be a bit tricky. I did a lot of asking around, and most of the answers I got involved using pre-built libraries such as the built in trackball controls, or the great drag-pan...
Read MoreRecently I had to convert a website that had once run off a server to run locally, so that we could demo the site without the need for an internet connection. The site didn’t use PHP or any server-side scripting language, so it seemed doable - the only problem was that it used data from an XML feed...
Read MoreI recently stumbled on an incredible HTML5 graphics library called d3. It’s well documented, powerful, smooth, and pretty. The problem is, most of the folks that use it well are apparently geniuses, so support for learning from the ground up can be a bit limited. There are plenty of examples out...
Read MoreI’ve had a few questions on this, so I figured I’d write a quick tutorial. Loading a java applet through AJAX doesn’t tend to work too well. Processing.js, however, makes this fairly easy, especially when coupled with jQuery. In order to load a sketch through AJAX, you need to include of course,...
Read MoreHi - recently I was trying to utilize the Vimeo Javascript API to do some basic event listening - I wanted to make sure that when one video in a series of videos finished playing, that it would load the next video and play it. Vimeo has 3 different APIs - a simple API which is used primarily to get...
Read MoreI recently had a project in which I needed to draw a sort of graph in which there is a center circle, and wedge shaped pieces that surround that circle. Turns out drawing even drawing an arc is difficult in flash (much less a wedge, much less a wedge that has an inner radius). I went about this all...
Read MoreThis is a quick snippet that often comes in handy - you have a bunch of objects which are being added to an array in no particular order, and you want to sort that array into some logical order, using a common property that all of the objects possess. The code is simple:
Read Morevar array = [(id, name, ...
Recently I had to submit an ISO 8601 timestamp in order to use Amazon’s AWS API - unfortunately there’s no cut and dry method of doing this in javascript like there is in other languages. I finally came across this method, which I figured I’d share.
Read Morefunction ISODateString(d){
function ...
Ever try to post to a web service or access AJAX data from a different domain, and get those annoying access-control origin errors? Often, these result from the remote host’s server configuration being not set up to accommodate requests from your IP. If accessing the remote server is something that...
Read MoreSay you’re building a form in which users can create a person, and assign that person a city to live in. But that city field needs to be populated depending on the state the person lives in, otherwise the city field will be enormously long (and there is more of a chance for user error and...
Read More