demo/module-import/js/vendor/three.module.js
function getSingularSetter( type ) {

	switch ( type ) {

		case 0x1406: return setValue1f; // FLOAT
		case 0x8b50: return setValue2fv; // _VEC2
		case 0x8b51: return setValue3fv; // _VEC3
		case 0x8b52: return setValue4fv; // _VEC4

		case 0x8b5a: return setValue2fm; // _MAT2
		case 0x8b5b: return setValue3fm; // _MAT3
		case 0x8b5c: return setValue4fm; // _MAT4

		case 0x8b5e: case 0x8d66: return setValueT1; // SAMPLER_2D, SAMPLER_EXTERNAL_OES
		case 0x8B5F: return setValueT3D1; // SAMPLER_3D
		case 0x8b60: return setValueT6; // SAMPLER_CUBE

		case 0x1404: case 0x8b56: return setValue1i; // INT, BOOL
		case 0x8b53: case 0x8b57: return setValue2iv; // _VEC2
		case 0x8b54: case 0x8b58: return setValue3iv; // _VEC3
		case 0x8b55: case 0x8b59: return setValue4iv; // _VEC4

	}

}
function getSingularSetter( type ) {

	switch ( type ) {

		case 0x1406: return setValue1f; // FLOAT
		case 0x8b50: return setValue2fv; // _VEC2
		case 0x8b51: return setValue3fv; // _VEC3
		case 0x8b52: return setValue4fv; // _VEC4

		case 0x8b5a: return setValue2fm; // _MAT2
		case 0x8b5b: return setValue3fm; // _MAT3
		case 0x8b5c: return setValue4fm; // _MAT4

		case 0x8b5e: case 0x8d66: return setValueT1; // SAMPLER_2D, SAMPLER_EXTERNAL_OES
		case 0x8B5F: return setValueT3D1; // SAMPLER_3D
		case 0x8b60: return setValueT6; // SAMPLER_CUBE

		case 0x1404: case 0x8b56: return setValue1i; // INT, BOOL
		case 0x8b53: case 0x8b57: return setValue2iv; // _VEC2
		case 0x8b54: case 0x8b58: return setValue3iv; // _VEC3
		case 0x8b55: case 0x8b59: return setValue4iv; // _VEC4

	}

}
function getSingularSetter ( type ) { switch ( type ) { case 0x1406 : return setValue1f ; // FLOAT case 0x8b50 : return setValue2fv ; // _VEC2 case 0x8b51 : return setValue3fv ; // _VEC3 case 0x8b52 : return setValue4fv ; // _VEC4 case 0x8b5a : return setValue2fm ; // _MAT2 case 0x8b5b : return setValue3fm ; // _MAT3 case 0x8b5c : return setValue4fm ; // _MAT4 case 0x8b5e : case 0x8d66 : return setValueT1 ; // SAMPLER_2D, SAMPLER_EXTERNAL_OES case 0x8B5F : return setValueT3D1 ; // SAMPLER_3D case 0x8b60 : return setValueT6 ; // SAMPLER_CUBE case 0x1404 : case 0x8b56 : return setValue1i ; // INT, BOOL case 0x8b53 : case 0x8b57 : return setValue2iv ; // _VEC2 case 0x8b54 : case 0x8b58 : return setValue3iv ; // _VEC3 case 0x8b55 : case 0x8b59 : return setValue4iv ; // _VEC4 } }
Helper to pick the right setter for the singular case
Helper to pick the right setter for the singular case