lm example, extracted from three.js examples