<commit_before>part of base;

const int kMaxLights = 4;
const int kMaxBones = 128;

const int lightTypeInvalid = 0;
const int lightTypeDirectional = 1;
const int lightTypeSpot = 2;
const int lightTypePoint = 3;

const double lightTypeInvalidFloat = lightTypeInvalid + 0.0;
const double lightTypeDirectionalFloat = lightTypeDirectional + 0.0;
const double lightTypeSpotFloat = lightTypeSpot + 0.0;
const double lightTypePointFloat = lightTypePoint + 0.0;

class ShaderVarDesc {
  final String type;
  final String purpose;
  final int arraySize;

  ShaderVarDesc(this.type, this.purpose, {this.arraySize: 0});

  int GetSize() {
    switch (type) {
      case "float":
        return 1;
      case "vec2":
        return 2;
      case "vec3":
        return 3;
      case "vec4":
        return 4;
      default:
        assert(false);
        return -1;
    }
  }

  bool IsScalarTypeFloat() {
    switch (type) {
      case "float":
      case "vec2":
      case "vec3":
      case "vec4":<commit_msg>fix shader syntax for light enums<commit_after>part of base;

const int kMaxLights = 4;
const int kMaxBones = 128;

const int lightTypeInvalid = 0;
const int lightTypeDirectional = 1;
const int lightTypeSpot = 2;
const int lightTypePoint = 3;

const String lightTypeInvalidFloat = "${lightTypeInvalid}.0";
const String lightTypeDirectionalFloat = "${lightTypeDirectional}.0";
const String lightTypeSpotFloat = "${lightTypeSpot}.0";
const String lightTypePointFloat = "${lightTypePoint}.0";

class ShaderVarDesc {
  final String type;
  final String purpose;
  final int arraySize;

  ShaderVarDesc(this.type, this.purpose, {this.arraySize: 0});

  int GetSize() {
    switch (type) {
      case "float":
        return 1;
      case "vec2":
        return 2;
      case "vec3":
        return 3;
      case "vec4":
        return 4;
      default:
        assert(false);
        return -1;
    }
  }

  bool IsScalarTypeFloat() {
    switch (type) {
      case "float":
      case "vec2":
      case "vec3":
      case "vec4":
{'fraction_non_alphanumeric': 0.10157790927021697, 'fraction_numerical': 0.02564102564102564, 'mean_word_length': 2.901923076923077, 'pattern_counts': {'":': 16, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7035268', 'n_tokens_mistral': 676, 'n_tokens_neox': 628, 'n_words': 196}