mrdoob/three.js — pull request #5418 by tstanev (2014-10-07 17:00:03+00:00)
Title: Allow DataTexture to be used as cube map.

This is an alternative way to accomplish the change proposed in https://github.com/mrdoob/three.js/pull/5380

The way to construct a data texture cube map if this approach is used would be, e.g.:

var x_neg = new THREE.DataTexture( pixelsSide, 2, 2, THREE.RGBAFormat );
var x_pos = new THREE.DataTexture( pixelsSide, 2, 2, THREE.RGBAFormat );
var y_neg = new THREE.DataTexture( pixelsBot, 2, 2, THREE.RGBAFormat );
var y_pos = new THREE.DataTexture( pixelsTop, 2, 2, THREE.RGBAFormat );
var z_neg = new THREE.DataTexture( pixelsSide, 2, 2, THREE.RGBAFormat );
var z_pos = new THREE.DataTexture( pixelsSide, 2, 2, THREE.RGBAFormat );

var texture = new THREE.Texture(null, new THREE.CubeReflectionMapping(),
THREE.RepeatWrapping, THREE.RepeatWrapping,
THREE.LinearFilter, THREE.LinearFilter,
THREE.RGBAFormat);
texture.image = [x_pos, x_neg, y_pos, y_neg, z_pos, z_neg];
texture.needsUpdate = true;