<commit_before>class CubeMap {
  PosX: HTMLImageElement;
  NegX: HTMLImageElement;
  PosY: HTMLImageElement;
  NegY: HTMLImageElement;
  PosZ: HTMLImageElement;
  NegZ: HTMLImageElement;
}

class Scene {
  public renderables: Renderable[];
  public lights: Light[];
  private static activeScene;

  environment: CubeMap;

  constructor() {
    this.renderables = [];
    this.lights = [];
  }

  public addRenderable( renderable: Renderable ) {
    this.renderables.push( renderable );
  }

  public addLight( light: Light ) {
    this.lights.push( light );
  }

  static setActiveScene( scene: Scene ) {
    this.activeScene = scene;
  }
  
  static getActiveScene(): Scene {
    return this.activeScene;
  }
}
<commit_msg>[WEB] cube map constructor to kick off loading<commit_after>enum CUBEMAPTYPE {
  POS_X,
  NEG_X,
  POS_Y,
  NEG_Y,
  POS_Z,
  NEG_Z,
};

class CubeMap {
  faces: HTMLImageElement[];
  facesLoaded: number;

  constructor( px: string, nx: string, py: string, ny: string, pz: string, nz: string ) {

    for ( var t in CUBEMAPTYPE ) {
      if ( !isNaN( t ) ) {
        this.faces[ t ] = new Image();
      }
    }

    this.asyncLoadFace( px, CUBEMAPTYPE.POS_X );
    this.asyncLoadFace( nx, CUBEMAPTYPE.NEG_X );
    this.asyncLoadFace( py, CUBEMAPTYPE.POS_Y );
    this.asyncLoadFace( ny, CUBEMAPTYPE.NEG_Y );
    this.asyncLoadFace( pz, CUBEMAPTYPE.POS_Z );
    this.asyncLoadFace( nz, CUBEMAPTYPE.NEG_Z );
  }

  asyncLoadFace( url: string, ctype: CUBEMAPTYPE ) {
    this.faces[ ctype ].src = url;
    this.faces[ ctype ].onload = () => { this.faceLoaded( ctype ); };
  }

  faceLoaded( ctype: CUBEMAPTYPE ) {
    this.facesLoaded++;
  }

  finishedLoading(): boolean {
    return this.facesLoaded == 6;
  }
}

class Scene {
  public renderables: Renderable[];
  public lights: Light[];
  private static activeScene;

  environment: CubeMap;

  constructor() {
    this.renderables = [];
    this.lights = [];
  }

  public addRenderable( renderable: Renderable ) {
    this.renderables.push( renderable );
  }

  public addLight( light: Light ) {
    this.lights.push( light );
  }

  static setActiveScene( scene: Scene ) {
    this.activeScene = scene;
  }
  
  static getActiveScene(): Scene {
    return this.activeScene;
  }
}

{'fraction_non_alphanumeric': 0.12350597609561753, 'fraction_numerical': 0.0004426737494466578, 'mean_word_length': 3.162062615101289, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 4, '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': '7021810', 'n_tokens_mistral': 821, 'n_tokens_neox': 803, 'n_words': 179}