Published

Proposal with Mobile Studio for RIBA’s Constructing Communitites

Photo of the Constructing Communities wall vinyl

I enjoyed working on a proposal with Mobile Studio recently for Constructing Communities. This evening at the RIBA building on Great Portland Street, Julie Cormie is giving a pecha kucha on ‘Flipping Bricks’, our proposal for an architectural intervention driven by real-time train data.

The photos above and below are from the opening of the exhibition of shortlisted proposals in Peckham Levels, on from 2-30 June 2016. The exhibition graphics are by Matias Clottu.

Panoramic photo of Constructing Communities

Published

Photo of midsummer Musarc performance at The Old Truman Brewery in Shoreditch

Musarc performing at the Old Truman Brewery on the summer solstice in 2016

Recently had the pleasure of participating in “On repetition: Musarc folk meet on a midsummer day until dusk II”. The evening culminated in a performance of Tape Music: Score for Musarc (2015) by Lin Chiwei.

Read more at musarc.org
See more at musarc.org

Published

Snippet for LazyLoad + Spin.js

/**
 * Identify images by class. For each image, add 
 * [Spin.js](http://fgnass.github.io/spin.js/) to parent, [LazyLoad](http://verlok.github.io/lazyload/) image, stop spinner 
 * when image is loaded.
 */

var imgClass = "lazy";

var spinOpts = {
  // [Spin.js options](http://fgnass.github.io/spin.js/#usage)
};

var spinners = [];
var elems = document.getElementsByClassName( imgClass );
for ( var i = 0; i < elems.length; i++ ) {
  var pId = "lazy-" + ( i + 1 );
  var parent = elems[i].parentElement;
  parent.id = pId;
  spinners[pId] = new Spinner( spinOpts ).spin( parent );
}

var lazyLoad = new LazyLoad( {
  elements_selector: "." + imgClass,
  callback_load: function( element ) {
    var spinner = spinners[element.parentElement.id];
    if ( spinner ) {
      spinner.stop();
    }
  }
} );

For use with LazyLoad by Andrea Verlicchi and Spin.js by Felix Gnass. SB and I have both checked out a few different lazyloading plugins, we’re pleased with how this one works with srcset.

Since the default positioning of Spin.js centres the spinner in the element, it’s best for the image to be the only child of the parent element. The code above assumes that this is the case. If I didn’t have control over the markup or needed to individually wrap each image for any other reason, would probably implement something similar to the above w/ jQuery (see the Spin.js jQuery plugin).

Published

Update to colour JS on piperhaywood.com

Just pushed an update to the colour JS on piperhaywood.com. The HSL colour has been looking pretty muddy recently, partly since it’s an orange-y hue this time of year, but mostly because sunrise and sunset weren’t being taken in to account properly. Before, the lightness value changed gradually between 12:01am and midnight. Now it looks a little more “sunny” in the daytime. Will need to keep monitoring the min/max values, yellow could be problematic.