function Light(view, config) {
    _classCallCheck(this, Light);
    this.name = config.name;
    this.view = view;
    if (config.ambient == null || typeof config.ambient === 'number') {
      this.ambient = GLSL.expandVec3(config.ambient || 0);
    } else {
      this.ambient = StyleParser.parseColor(config.ambient).slice(0, 3);
    }
    if (config.diffuse == null || typeof config.diffuse === 'number') {
      this.diffuse = GLSL.expandVec3(config.diffuse != null ? config.diffuse : 1);
    } else {
      this.diffuse = StyleParser.parseColor(config.diffuse).slice(0, 3);
    }
    if (config.specular == null || typeof config.specular === 'number') {
      this.specular = GLSL.expandVec3(config.specular || 0);
    } else {
      this.specular = StyleParser.parseColor(config.specular).slice(0, 3);
    }
  }
Vector functions - vectors provided as [x, y] or [x, y, z] arrays **