My loyal long-term readers (by whom I mean Anton) would know my technological aesthetic bent strongly favour the 1980s. Seeing as the third dimension was not discovered until 1992, I have thus far had little inclination to bother with it. But things have changed: now that the 90s are suitably retro I feel it's finally time to gently prod at the edges of this strange new plane...
Pix Up, Look Sharp: a pixel resizer for Pixelmator Nerd
More is Zmore Nerd
ZMORE: a game in 48 hours Game Javascript
DHTML Lemmings: an awesome hack Game Javascript
Short function syntax is here! Firefox Javascript
#Random Hex colour Game Javascript
Three.js: looking away from .lookAt 3D
Scala date range Scala
Pix Up, Look Sharp: a pixel resizer for Pixelmator

Pixelmator is a fantastic image editor for Mac, but it lacks the ability to stretch an image via a "nearest-neighbor, big pixels please" method. I know, right?! Anyhoo... I made a Quartz Composer called plugin Pix Up, Look Sharp that does it for you, allowing you to set the width and height scaling amount.
To use it, simply drop the plugin in your ~/Library/Compositions/ folder and it'll appear in Pixelmator under "Other" in your effects browser. I can't figure out how to resize the destination output area from within Quartz itself, so you first have to stretch your canvas to accomodate the new pixels before you run the plugin. Sorry 'bout that. Hopefully pixel stretching will be included in a future version of Pixelmator - but until then: Pix up, Look Sharrrrp!
ZMORE: a game in 48 hours
Here's my entry for Ludum Dare #26, on the theme Minimalism. Read on for more »
Short function syntax is here!
It's happened. It's finally happened. Short function syntax is here! At least, if you're running the nightly version of Firefox (which I am now, due to my promise to adopt the first browser to introduce short function syntax).
Short function syntax replaces the lengthy function keyword with a symbol =>, and the almost-as-lengthy return keyword with the much shorter nothing (for one-liners).
However, this change represents far more than a few saved keystrokes: it marks the beginning of JavaScript as a serious functional programming language. Read on for more »
Three.js: looking away from .lookAt
Have a hankering to look in the opposite direction of the vector you get from Three.js's .lookAt function? You need .lookAwayFrom! Dunno if there's an easier way, but the idea is find the vector between the target you'd normally "look at" and you, then add the resultant to your current position, and look at that instead! Here's the standalone function:
function lookAwayFrom(me, target) {
var v = new THREE.Vector3();
v.subVectors(me.position, target.position).add(me.position);
me.lookAt(v);
}
To face away from an enemy, you might do something like lookAwayFrom(player, enemy) and away you scarper. If you want to integrate it into Three.js, so you can do player.lookAwayFrom(enemy) then here ya go:
lookAwayFrom: function(target) {
var v = new THREE.Vector3();
v.subVectors(this.position, target.position).add(this.position);
this.lookAt(v);
}


