getTypeFromLength method

dynamic getTypeFromLength(
  1. dynamic type
)

Implementation

getTypeFromLength(type) {
  if (type == 1) return 'float';
  if (type == 2) return 'vec2';
  if (type == 3) return 'vec3';
  if (type == 4) return 'vec4';

  return 0;
}