<commit_before>// This file is part of the Shapy project.
// Licensing information can be found in the LICENSE file.
// (C) 2015 The Shapy Team. All rights reserved.
goog.provide('shapy.editor.Editor');
goog.provide('shapy.editor.EditorController');

goog.require('goog.dom');
goog.require('goog.math.Size');
goog.require('goog.object');
goog.require('goog.string.format');
goog.require('goog.webgl');
goog.require('shapy.editor.Camera');
goog.require('shapy.editor.Editable');
goog.require('shapy.editor.Executor');
goog.require('shapy.editor.Layout');
goog.require('shapy.editor.Layout.Double');
goog.require('shapy.editor.Layout.Quad');
goog.require('shapy.editor.Layout.Single');
goog.require('shapy.editor.Mode');
goog.require('shapy.editor.Renderer');
goog.require('shapy.editor.Rig');
goog.require('shapy.editor.Rig.Cut');
goog.require('shapy.editor.Rig.Extrude');
goog.require('shapy.editor.Rig.Rotate');
goog.require('shapy.editor.Rig.Scale');
goog.require('shapy.editor.Rig.Translate');
goog.require('shapy.editor.Viewport');



/**
 * Minor editor controller.
 *
 * @constructor
 *
 * @param {!angular.$scope}      $scope
 * @param {!shapy.User}          user
 * @param {!shapy.Scene}         scene
 * @param {!shapy.editor.Editor} shEditor
 */
shapy.editor.EditorController = function($scope, user, scene, shEditor) {
  /** @private {!shapy.Scene} @const */
  this.scene_ = scene;
  /** @private {!shapy.editor.Editor} @const */
  this.shEditor_ = shEditor;
  /** @public {!shapy.User} @const */
  this.user = user;
  /** @public {string} */
  this.message = '';
  /** @public {!Array<Object>} */
  this.messageList = this.shEditor_.messageList;

  // Initialise the scene.
  this.shEditor_.setScene(this.scene_, this.user);
};


/**
 * Sends a message to all other people in the chat room.
 *
 * @param {string} msg
 */
shapy.editor.EditorController.prototype.sendMessage = function(msg) {
  this.shEditor_.sendMessage(msg);
  this.message = '';
};


/**
 * Editor service exposing all editor functionality.
 *
 * @constructor
 * @ngInject
 *
 * @param {!angular.$http}              $http      The Angular HTTP service.
 * @param {!angular.$location}          $location  The Angular location service.
 * @param {!angular.$scope}             $rootScope<commit_msg>Reset message list when entering the editor<commit_after>// This file is part of the Shapy project.
// Licensing information can be found in the LICENSE file.
// (C) 2015 The Shapy Team. All rights reserved.
goog.provide('shapy.editor.Editor');
goog.provide('shapy.editor.EditorController');

goog.require('goog.dom');
goog.require('goog.math.Size');
goog.require('goog.object');
goog.require('goog.string.format');
goog.require('goog.webgl');
goog.require('shapy.editor.Camera');
goog.require('shapy.editor.Editable');
goog.require('shapy.editor.Executor');
goog.require('shapy.editor.Layout');
goog.require('shapy.editor.Layout.Double');
goog.require('shapy.editor.Layout.Quad');
goog.require('shapy.editor.Layout.Single');
goog.require('shapy.editor.Mode');
goog.require('shapy.editor.Renderer');
goog.require('shapy.editor.Rig');
goog.require('shapy.editor.Rig.Cut');
goog.require('shapy.editor.Rig.Extrude');
goog.require('shapy.editor.Rig.Rotate');
goog.require('shapy.editor.Rig.Scale');
goog.require('shapy.editor.Rig.Translate');
goog.require('shapy.editor.Viewport');



/**
 * Minor editor controller.
 *
 * @constructor
 *
 * @param {!angular.$scope}      $scope
 * @param {!shapy.User}          user
 * @param {!shapy.Scene}         scene
 * @param {!shapy.editor.Editor} shEditor
 */
shapy.editor.EditorController = function($scope, user, scene, shEditor) {
  /** @private {!shapy.Scene} @const */
  this.scene_ = scene;
  /** @private {!shapy.editor.Editor} @const */
  this.shEditor_ = shEditor;
  /** @public {!shapy.User} @const */
  this.user = user;
  /** @public {string} */
  this.message = '';
  /** @public {!Array<Object>} */
  this.messageList = this.shEditor_.messageList = [];

  // Initialise the scene.
  this.shEditor_.setScene(this.scene_, this.user);
};


/**
 * Sends a message to all other people in the chat room.
 *
 * @param {string} msg
 */
shapy.editor.EditorController.prototype.sendMessage = function(msg) {
  this.shEditor_.sendMessage(msg);
  this.message = '';
};


/**
 * Editor service exposing all editor functionality.
 *
 * @constructor
 * @ngInject
 *
 * @param {!angular.$http}              $http      The Angular HTTP service.
 * @param {!angular.$location}          $location  The Angular location service.
 * @param {!angular.$scope}             $rootScope
{'fraction_non_alphanumeric': 0.1776760409853935, 'fraction_numerical': 0.0017440592980161324, 'mean_word_length': 4.058434399117972, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '4594752', 'n_tokens_mistral': 1556, 'n_tokens_neox': 1529, 'n_words': 285}